begin step 6 rewrite
This commit is contained in:
1 parent
29d0456236
commit
9d861d14c2
2 files changed
+7
-1
No files matched your search
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
# Test
|
# Test
|
||||||
/test/test.py
|
/test/test.py
|
||||||
|
/test/step6.py
|
||||||
|
|
||||||
# Test output
|
# Test output
|
||||||
/test/output/*
|
/test/output/*
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ def generateScheduleV3(
|
|||||||
with open("./output/timetable.json", "w") as outfile:
|
with open("./output/timetable.json", "w") as outfile:
|
||||||
json.dump(running, outfile, indent=2)
|
json.dump(running, outfile, indent=2)
|
||||||
|
|
||||||
# Step 6 - Evaluate, move students to fix
|
# Step 6 | Part A - Evaluate, move students to fix conflicts
|
||||||
conflicts = []
|
conflicts = []
|
||||||
|
|
||||||
for student in students:
|
for student in students:
|
||||||
@@ -357,6 +357,11 @@ def generateScheduleV3(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Step 6 | Part B - Check difference between
|
||||||
|
# classes vs expectedClasses
|
||||||
|
|
||||||
|
# If difference is too great, attempt to fix
|
||||||
|
|
||||||
# Update Student records
|
# Update Student records
|
||||||
with open(studentsDir, "w") as outfile:
|
with open(studentsDir, "w") as outfile:
|
||||||
json.dump(students, outfile, indent=2)
|
json.dump(students, outfile, indent=2)
|
||||||
|
|||||||
Reference in new issue
Block a user