Skip to content
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

Allocating Centres even if distance is greater than ABS_DISTANCE_THRESHOLD and even more greater if we also take Stretch factor to account. #85

Closed
4 tasks done
nirmala-sharma opened this issue Apr 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@nirmala-sharma
Copy link
Contributor

nirmala-sharma commented Apr 28, 2024

Steps to reproduce

To Reproduce the issue take below Data:

schools_grade12_2081.tsv

scode count name-address lat long
27101 600 काठमाण्डौ मोडेल मा.वि., वागवजार 45.77476723 85.27076582
27007 1700 ट्रिनीटी इन्टरनेशनल मा.वि., डिल्लीबजार 45.77476723 85.27076582
27045 1278 साउथ वेस्टर्न स्टेट मा.वि., बसुन्धारा 27.73966002 85.32545325
27127 1210 क्यापिटल मा.वि., कोटेश्वर 27.67354169 85.34490138
27011 1166 विश्व निकेतन मा.वि., त्रिपुरेश्वर 27.67354169 85.27076582

centres_grade12_2081.tsv:
cscode capacity name address नाम ठेगाना lat long
27003 5000 NATIONAL SCHOOL OF SCIENCES SECONDARY SCHOOL LAINCHAUR नेशनल स्कुल अफ साइन्सेस मा.वि लैनचौर 27.78577775 85.27276585
27051 5000 UNIGLOBE MA VI KAMALADI युनिग्लोब मा.वि कमलादी 27.78577775 85.27176585
27045 5680 SOUTH WESTERN ACADEMY SECONDARY SCHOOL BASUNDHARA साउथ वेर्ष्टन एकेडेमी मा.वि. बसुन्धरा 27.78577775 85.27276585
27075 5000 SIGMA SECONDARY SCHOOL SORAKHUTTE सिग्मा मा.वि. सोह्रखुट्टे 27.71854977 85.27276585
27115 382 NABODIT BIDHYAKUNJA SECONDARY SCHOOL MHEPI SAMAKHUSI नवोदीत विद्याकुञ्ज मा.वि म्हैपी सामाखुसी 27.78577775 85.27276585

prefs.tsv:

scode cscode pref reason
27001 27999 -5 same management
27999 27001 -5 same management
27990 27992 -5 problematic history
27998 27997 1 community school

Output:

school-centre.tsv:

scode school cscode center center_address center_lat center_long allocation distance_km

27127 क्यापिटल मा.वि., कोटेश्वर 27075 SIGMA SECONDARY SCHOOL SORAKHUTTE 27.71854977 85.27276585 1210 8.688293003084407

27045 साउथ वेस्टर्न स्टेट मा.वि., बसुन्धारा 27075 SIGMA SECONDARY SCHOOL SORAKHUTTE 27.71854977 85.27276585 1278 5.692288518271926

27011 विश्व निकेतन मा.वि., त्रिपुरेश्वर 27075 SIGMA SECONDARY SCHOOL SORAKHUTTE 27.71854977 85.27276585 1166 5.008542496281751

27101 काठमाण्डौ मोडेल मा.वि., वागवजार 27051 UNIGLOBE MA VI KAMALADI 27.78577775 85.27176585 600 2000.2843675772574

27007 ट्रिनीटी इन्टरनेशनल मा.वि., डिल्लीबजार 27051 UNIGLOBE MA VI KAMALADI 27.78577775 85.27176585 1700 2000.2843675772574

school-center-distance.tsv:

scode s_count school_name school_lat school_long cscode center_name center_address center_capacity distance_km

27127 1210 क्यापिटल मा.वि., कोटेश्वर 27.67354169 85.34490138 27075 SIGMA SECONDARY SCHOOL SORAKHUTTE 5000 8.688293003084407

27045 1278 साउथ वेस्टर्न स्टेट मा.वि., बसुन्धारा 27.73966002 85.32545325 27075 SIGMA SECONDARY SCHOOL SORAKHUTTE 5000 5.692288518271926

27011 1166 विश्व निकेतन मा.वि., त्रिपुरेश्वर 27.67354169 85.27076582 27075 SIGMA SECONDARY SCHOOL SORAKHUTTE 5000 5.008542496281751

27101 600 काठमाण्डौ मोडेल मा.वि., वागवजार 45.77476723 85.27076582 27051 UNIGLOBE MA VI KAMALADI 5000 2000.2843675772574

27007 1700 ट्रिनीटी इन्टरनेशनल मा.वि., डिल्लीबजार 45.77476723 85.27076582 27051 UNIGLOBE MA VI KAMALADI 5000 2000.2843675772574

So, if we notice the distance_km field of the output tables then we can see that it is allowing to allocate centers even if the distance between school and center is greater than ABS_DISTANCE_THRESHOLD and even more greater if we also take Stretch factor to account.

Describe what you expected to happen.

It should not allow the distance greater than the absolute Distance Threshold + STRETCH_CAPACITY_FACTOR.

Put here any screenshots or videos (optional)

No response

Environment

No response

Would you like to work on this issue?

None

Acknowledgements

  • My issue title is concise, descriptive.
  • I searched the existing issues to ensure this bug hasn't been reported.
  • I am using the latest version of repo.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@nirmala-sharma nirmala-sharma added the bug Something isn't working label Apr 28, 2024
@sapradhan
Copy link
Collaborator

I dont think this is a bug, rather a fallback strategy. If the closest center is farther than ABS_DISTANCE_THRESHOLD, we still have to assign a center for students in that school. That seems to be an arbitrary value, I guess naming the constant ABSOLUTE_DISTANCE_THRESHOLD has caused this confusion.

@nirmala-sharma
Copy link
Contributor Author

@sapradhan Ok So, let's ignore this ABSOLUTE_DISTANCE_THRESHOLD for now, is it worth /good /practical to assign centre that is 2000.2843675772574 km far from his(student's) school. I have highlight this distance value to focus.

@sapradhan
Copy link
Collaborator

All the schools in the dataset are in Kathmandu district, you always get assigned to a school within the same district as your school. The point you have chosen seems to be in North west China :)

@sumanashrestha
Copy link
Collaborator

STRECH_FACTOR of .02 means a center can be allocated 2% more than its capacity. It hints for a center with 500 capacity, it is okay to assign up to 510 students if need be. And if there are no other options assigning centers farther than ABS_DiSTANCE_THRESHOLD. this will be reviewed during manual verification. it may be necessary to add centers or it may be due to mistake in school co ordinates

@sumanashrestha sumanashrestha closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants