june.groups.school.School¶
-
class
june.groups.school.
School
(coordinates: Tuple[float, float] = None, n_pupils_max: int = None, age_min: int = 0, age_max: int = 18, sector: str = None, area: june.geography.geography.Area = None, n_classrooms: Optional[int] = None, years: Optional[int] = None) Create a School given its description.
- coordinates:
latitude and longitude
- n_pupils_max:
maximum number of pupils that can attend the school
- age_min:
minimum age of the pupils
- age_max:
maximum age of the pupils
- sector:
whether it is a “primary”, “secondary” or both “primary_secondary”
- area:
area the school belongs to
- n_classrooms:
number of classrooms in the school
- years:
age group year per classroom
number of SubGroups N = age_max-age_min year +1 (student years) + 1 (teachers): 0 - teachers 1 - year of lowest age (age_min) … n - year of highest age (age_max)
-
class
SubgroupType
(value) An enumeration.
-
students
= 1
-
teachers
= 0
-
-
__init__
(coordinates: Tuple[float, float] = None, n_pupils_max: int = None, age_min: int = 0, age_max: int = 18, sector: str = None, area: june.geography.geography.Area = None, n_classrooms: Optional[int] = None, years: Optional[int] = None) Create a School given its description.
- coordinates:
latitude and longitude
- n_pupils_max:
maximum number of pupils that can attend the school
- age_min:
minimum age of the pupils
- age_max:
maximum age of the pupils
- sector:
whether it is a “primary”, “secondary” or both “primary_secondary”
- area:
area the school belongs to
- n_classrooms:
number of classrooms in the school
- years:
age group year per classroom
number of SubGroups N = age_max-age_min year +1 (student years) + 1 (teachers): 0 - teachers 1 - year of lowest age (age_min) … n - year of highest age (age_max)
-
_collate_from_subgroups
(attribute: str) → List[june.demography.person.Person] Return a set of all of the people in the subgroups with a particular health status
- attribute
The name of the attribute in the subgroup, e.g. “in_hospital”
The union of all the sets with the given attribute name in all of the sub groups.
-
classmethod
_next_id
() → int Iterate an id for this class. Each group class has its own id iterator starting at 0
-
add
(person, subgroup_type=<SubgroupType.students: 1>) Add a person to a given subgroup. For example, in a school a student is added to the subgroup matching their age.
- person
A person
group_type
-
clear
()
-
get_spec
() → str Returns the speciailization of the group.
-
limit_classroom_sizes
(max_classroom_size: int) Make all subgroups smaller than
`max_classroom_size`
- max_classroom_size:
maximum number of students per classroom (subgroup)
-
remove_person
(person: june.demography.person.Person) Remove a person from this group by removing them from the subgroup to which they belong
- person
A person
-
_abc_impl
= <_abc_data object>
-
age_max
-
age_min
-
age_structure
-
property
contains_people
Does this group contain at least one person?
-
coordinates
-
property
dead
-
external
= False
-
id
-
property
in_hospital
-
property
infected
-
property
is_full
-
property
must_timestep
-
property
n_pupils
-
n_pupils_max
-
property
n_teachers
-
n_teachers_max
-
property
name
The name is computed on the fly to reduce memory footprint. It combines the name fo the class with the id of the instance.
-
property
people
All the people in this group
-
property
recovered
-
sector
-
property
size
-
property
size_infected
-
property
size_recovered
-
property
size_susceptible
-
spec
-
property
students
-
subgroups
-
property
super_area
-
property
susceptible
-
property
teachers
-
years