1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

[WEI] Extreme test with full buses and quality constraints

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-09-02 01:36:37 +02:00
parent 451851c955
commit 74ab4df9fe
3 changed files with 49 additions and 3 deletions

View File

@ -190,6 +190,9 @@ class WEISurveyAlgorithm2021(WEISurveyAlgorithm):
# If it does not exist, choose the next bus.
least_preferred_survey.free()
least_preferred_survey.save()
free_surveys.append(least_preferred_survey)
survey.select_bus(bus)
survey.save()
break
else:
raise ValueError(f"User {survey.registration.user} has no free seat")