New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LOGIC_IMPROVEMENT] Handle no centers are within the absolute distance threshold #31
Comments
Well to address this issue we need to modify the 'centers_within_distance' function to consider the preference cutoff (PREF_CUTOFF) even when no centers are within the absolute distance threshold. We should ensure that the closest center is not always chosen in such cases.
Now what it does with this modification is if no centers are within the absolute distance threshold and no centers meet the preference cutoff, it will still allocate a center, but it will choose based on preference score and distance, excluding those below the preference cutoff. This ensures that the same center is not chosen every time if there are other options available. |
[LOGIC_IMPROVEMENT] Handle no centers are within the absolute distance threshold while ensuring that the same center is not chosen every time if there are other options available. Resolves moest-np#31
fixed in #37 |
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.
originally reported in #2
The text was updated successfully, but these errors were encountered: