Skip to content

Great effort! Here are some edge cases you might need to consider in future. #2

@sumitto

Description

@sumitto

Hi, this is a great effort to have an open sourced algorithm for doing things like this. I hope you continue to open source any other problems/solutions so that more people might be able to take a look at them.

On a quick look, I didn't find any big issue. I am just going to mention some edge cases that I thought of while going through the code. You may need to account for these situations (in future) if you haven't already done so. Piloting this in Kathmandu, itself shouldn't be problematic but as you expand this in future these cases might occur more frequently. Case 3. and 4. might be applicable in Kathmandu as well.

  1. Distance calculation with latitude, longitude doesn't always equal to distance students need to travel by road.
    Example:
    For places in remote areas, where there is no accessible bridge available and the center happens to be on the other side of river,
    closest by km might not be easily accessible.
    Maybe this can be handled by setting up prefs code?

  2. If no centers are within the absolute distance threshold, it always chooses the same center(the closest one)
    Example: If school A doesn't have any center within threshold (7km).
    But has 5 centers near threshold but slightly different distance like 7.1, 7.2 km etc. This doesn't choose different center every year.
    In this case, there is no check for PREF_CUTOFF either. So even if it was problematic last year, same center will still be chosen.

  3. Not sure if its possible for students to be not from any school(eg: homeschool). In which case they might need special center allocation.

  4. Centers assignment for students with special needs might need to be handled separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions