File tree Expand file tree Collapse file tree
apps/scheduler/src/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,7 +110,11 @@ def _make_matches(self):
110110 return matches
111111
112112 def _use_constraints (self ):
113- """Use the constraints from the validator to assign teams to matches."""
113+ """Use the constraints from the validator to assign teams to matches.
114+
115+ Available matches are processed in reverse chronological order to maximize
116+ the gap between team activities (judging sessions and robot matches).
117+ """
114118
115119 for entry in self .validator_data :
116120 overlapping_rounds = entry ["overlapping_rounds" ]
@@ -125,7 +129,10 @@ def _use_constraints(self):
125129 )
126130
127131 for round in overlapping_rounds :
128- available_matches = round ["available_matches" ]
132+ # Process matches in reverse order (last matches first) so that
133+ # teams are assigned to later matches whenever possible, resulting
134+ # in larger wait times between judging and robot game activities.
135+ available_matches = list (reversed (round ["available_matches" ]))
129136 round_teams = session_teams .copy ()
130137
131138 for match in available_matches :
You can’t perform that action at this time.
0 commit comments