Add a TimeSlot object, refactor

This commit is contained in:
2025-10-30 09:35:41 -04:00
parent 967aa567e8
commit cf9949876d
6 changed files with 133 additions and 109 deletions
+2 -2
View File
@@ -92,7 +92,7 @@ public class TeamScheduler
var timeSlotTeams = new Team[_timeSlots.Length][];
if (cpSolverStatus is not (CpSolverStatus.Optimal or CpSolverStatus.Feasible))
return new TeamSchedulerSolution(timeSlotTeams, cpSolverStatus.ToString());
return new TeamSchedulerSolution(timeSlotTeams, _studentObjects.ToArray(), cpSolverStatus.ToString());
Debug.WriteLine($"Total cost: {solver.ObjectiveValue}\n");
@@ -102,6 +102,6 @@ public class TeamScheduler
timeSlotTeams[s] = teams;
}
//Debug.WriteLine("No solution found.");
return new TeamSchedulerSolution(timeSlotTeams, cpSolverStatus.ToString());
return new TeamSchedulerSolution(timeSlotTeams, _studentObjects.ToArray(), cpSolverStatus.ToString());
}
}