The new implementation fixes the #13 of allocating small amount of students to a new center.
Details
The center allocation works exactly as it was before, allocating the total students based on calc_per_center
If there are any remaining students ( less than MIN_STUDENT_IN_CENTER ), they are assigned to the first center of that specific school.
If there are any remaining students ( greater than MIN_STUDENT_IN_CENTER ), they are assigned to a new center
The PR also abstract the center allocation logic to a new function allocate_to_centers.
I saw that there is a WIP PR related to the unit test. I can also add the test for allocate_to_centers function once the that PR is merged to make sure that the allocation is working as expected.
The new implementation fixes the #13 of allocating small amount of students to a new center.
Details
calc_per_center
MIN_STUDENT_IN_CENTER
), they are assigned to the first center of that specific school.MIN_STUDENT_IN_CENTER
), they are assigned to a new centerThe PR also abstract the center allocation logic to a new function
allocate_to_centers
.I saw that there is a WIP PR related to the unit test. I can also add the test for
allocate_to_centers
function once the that PR is merged to make sure that the allocation is working as expected.Resolves #13