june.distributors.school_distributor.SchoolDistributor¶
-
class
june.distributors.school_distributor.
SchoolDistributor
(schools: june.groups.school.Schools, education_sector_label='P', neighbour_schools: int = 35, age_range: Tuple[int, int] = 0, 19, mandatory_age_range: Tuple[int, int] = 5, 18, teacher_student_ratio_primary=21, teacher_student_ratio_secondary=16, teacher_min_age=21, max_classroom_size=40) Distributes students in an area to different schools
Get closest schools to this output area, per age group (different schools admit pupils with different age ranges)
- schools:
instance of Schools, with information on all schools in world.
- area:
instance of Area.
- config:
config dictionary.
-
__init__
(schools: june.groups.school.Schools, education_sector_label='P', neighbour_schools: int = 35, age_range: Tuple[int, int] = 0, 19, mandatory_age_range: Tuple[int, int] = 5, 18, teacher_student_ratio_primary=21, teacher_student_ratio_secondary=16, teacher_min_age=21, max_classroom_size=40) Get closest schools to this output area, per age group (different schools admit pupils with different age ranges)
- schools:
instance of Schools, with information on all schools in world.
- area:
instance of Area.
- config:
config dictionary.
-
distribute_kids_to_school
(areas: List[june.geography.geography.Area]) Function to distribute kids to schools according to distance
-
distribute_mandatory_kids_to_school
(area: june.geography.geography.Area, is_school_full: dict, closest_schools_by_age: dict) Send kids to the nearest school among the self.neighbour_schools, that has vacancies. If none of them has vacancies, pick one of them at random (making it larger than it should be)
-
distribute_non_mandatory_kids_to_school
(area: june.geography.geography.Area, is_school_full: dict, closest_schools_by_age: dict) For kids in age ranges that might go to school, but it is not mandatory send them to the closest school that has vacancies among the self.max_schools closests. If none of them has vacancies do not send them to school
-
distribute_teachers_to_school
(super_area: june.geography.geography.SuperArea) Assigns teachers to super area. The strategy is the following: we loop over the schools to divide them into two subgroups, primary schools and secondary schools. If a school is both, then we assign it randomly to one of the two. Then we loop over the workers in the super area to find the teachers, which we also divide into two subgroups analogously to the schools. We assign the teachers to the schools following a fix student to teacher ratio. We put a lower age limit to teachers at the age of 21.
-
distribute_teachers_to_schools_in_super_areas
(super_areas: List[june.geography.geography.SuperArea])
-
static
find_jobs
(config: dict)
-
classmethod
from_file
(schools: june.groups.school.Schools, config_filename: str = PosixPath('/home/sadie/JUNE/configs/defaults/distributors/school_distributor.yaml')) → june.distributors.school_distributor.SchoolDistributor Initialize SchoolDistributor from path to its config file
- schools:
instance of Schools, with information on all schools in world.
- area:
instance of Area.
- config:
path to config dictionary
SchoolDistributor instance
-
classmethod
from_geography
(geography: june.geography.geography.Geography, config_filename: str = PosixPath('/home/sadie/JUNE/configs/defaults/distributors/school_distributor.yaml'))
-
limit_classroom_sizes
() Limit subgroup sizes that represent class rooms to a maximum number of students. If maximum number is exceeded create new subgroups to distribute students homogeneously