fix input data

This commit is contained in:
SowinskiBraeden committed 2025-03-16 18:11:01 -07:00
1 parent e6c3b75f59
commit 149440a137
15 files changed
+44 -42

No files matched your search

Regular → Executable
+8 -6
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!/usr/bin/env python3
import json
import random
from string import hexdigits
@@ -117,10 +117,12 @@ def generateScheduleV3(
# If remaining fit in open slots in existing classes
if remaining <= classRunCount * (classCap - median):
# Equally disperse remaining into existing classes
for j in range(classRunCount):
if remaining == 0: break
emptyClasses[index][f"{index}-{hexdigits[j]}"]["expectedLen"] += 1
remaining -= 1
while remaining > 0:
for j in range(classRunCount):
if remaining == 0: break
emptyClasses[index][f"{index}-{hexdigits[j]}"]["expectedLen"] += 1
remaining -= 1
if remaining > 0: print("step 2 logic error", remaining, "remaining")
# If we can create a class using remaining, create class
elif remaining >= minReq:
@@ -366,7 +368,7 @@ def generateScheduleV3(
}
if hasConflicts:
student.Classes: int = 0
student.Classes = 0
missing: list[str] = []
# Clear student schedule to restructure