Problems we treat: DM87 SCHEDULING, TIMETABLING AND ROUTING I single and double round-robin tournaments I balanced tournaments I bipartite tournaments Solutions: Lecture 15 I Sport Timetabling general results I graph algorithms I integer programming I constraint programming I metaheuristics Marco Chiarandini DM87 – Scheduling, Timetabling and Routing Terminology: 2 Round Robin Tournaments I A schedule is a mapping of games to slots or time periods, such that each team plays at most once in each slot. I A schedule is compact if it has the minimum number of slots. I Mirrored schedule: games in the first half of the schedule are repeated in the same order in the second half (with venues reversed) I Partially mirrored schedule:all slots in the schedule are paired such that one is the mirror of the other I A pattern is a vector of home (H) away (A) or bye (B) for a single team over the slots I Two patterns are complementary if in every slot one pattern has a home and the other has an away. Definition SRRT Problem I A pattern set is a collection of patterns, one for each team I A tour is the schedule for a single team, a trip a series of consecutive away games and a home stand a series of consecutive home games Output: A mapping of the games in the set G ={gij : i, j ∈ T, i < j}, to the slots in the set S = {sk , k = 1, . . . , n − 1 if n is even and k = 1, . . . , n if n is odd} such that no more than one game including i is mapped to any given slot for all i ∈ T . DM87 – Scheduling, Timetabling and Routing (round-robin principle known from other fields, where each person takes an equal share of something in turn) I Single round robin tournament (SRRT) each team meets each other team once I Double round robin tournament (DRRT) each meets each other team twice Input: A set of n teams T = {1, . . . , n} 3 DM87 – Scheduling, Timetabling and Routing 4 Circle method Label teams and play: Round 1. (1 plays 14 , 2 plays 13 , ... ) 1 2 3 4 5 6 14 13 12 11 10 9 Definition DRRT Problem 7 8 Input: A set of n teams T = {1, . . . , n}. Fix one team (number one in this example) and rotate the others clockwise: Output: A mapping of the games in the set G ={gij : i, j ∈ T, i 6= j}, to the slots in the set S = {sk , k = 1, . . . , 2(n − 1) if n is even and k = 1, . . . , 2n if n is odd} such that no more than one game including i is mapped to any given slot for all i ∈ T . Round 2. (1 plays 13 , 14 plays 12 , ... ) 1 14 2 3 4 13 12 11 10 9 5 8 6 7 Round 3. (1 plays 12 , 13 plays 11 , ... ) 1 13 14 2 12 11 10 9 3 8 4 7 The schedule can be obtained by the circle method plus mirroring 5 6 Venue assignment can also be done through the circle method Repeat until almost back at the initial position Round 13. (1 plays 2 , 3 plays 14 , ... ) 1 3 2 14 4 5 6 7 8 13 12 11 10 9 DM87 – Scheduling, Timetabling and Routing 5 DM87 – Scheduling, Timetabling and Routing 6 Latin square 2 1 62 6 63 44 5 2 3 5 1 4 3 5 4 2 1 4 1 2 5 3 3 5 47 7 17 35 2 Even, symmetric Latin square ⇔ SRRT Example: 4 Teams assigning actual teams to slots (so far where just place holders) Decomposition: 1. First generate a pattern set Rewrite the schedule as a multiplication table: "a plays b in round c". 1 2 3 4 Extension: I determining the venue for each game I round 1: 1 plays 2, 3 plays 4 round 2: 2 plays 3, 1 plays 4 round 3: 3 plays 1, 2 plays 4 1 2 3 4 ----------| 1 3 2 | 1 2 3 | 3 2 1 | 2 3 1 Round robin tournaments with preassignments correspond to complete partial latin squares Ü NP-complete If the blank entries were filled with the symbol 4, then we have an even, symmetric latin square. 2. Then find a pairing compatible team games (this yeilds a timetable) 3. Then assign actual teams in the timetable DM87 – Scheduling, Timetabling and Routing 8 Generation of feasible pattern sets I In SRRT: I I I Input: A set of n teams T = {1, . . . , n} and a set of facilities F. Output: A mapping of the games in the set G ={gij : i, j ∈ T, i < j}, to the slots available at each facility described by the set S = {sfk , f = 1, . . . , |F|, k = 1, . . . , n − 1 if n is even and k = 1, . . . , n if n is odd} such that no more than one game involving team i is assigned to a particular slot and the difference between the number of appearances of team i at two separate facilities is no more than 1. if at most one break per team, then a feasible pattern must have the complementary property (m/2 complementary pairs) In DRRT, I for every pair of patterns i, j such that 1 ≤ i < j ≤ n there must be at least one slot in which i is home and j is away and at least one slot in which j is at home and i is away. I every slot in the pattern set includes an equal number of home and away games. DM87 – Scheduling, Timetabling and Routing I Definition Balanced Tournament Designs (BTDP) every pair of patterns must differ in at least one slot. ⇒ no two patterns are equal in the pattern set 9 DM87 – Scheduling, Timetabling and Routing 10 BTDP(2m,m): 2m teams and m facilities. There exists a solution for every m 6= 2. Bipartite Tournament I BTDP(2m + 1, m): extension of the circle method: Input: Two teams with n players T1 = {x1 , . . . , x2 } and T2 = {y1 , . . . , yn }. Step 1: arrange the teams 1, . . . , 2m + 1 in an elongated pentagon. Indicate a facility associated with each row containing two teams. Output: A mapping of the games in the set G = {gij i ∈ T1 , j ∈ T2 }, to the slots in the set S = {sk , k = 1, . . . , n} such that exactly one game including t is mapped to any given slot for all t ∈ T1 ∪ T2 Step 2: For each slot k = 1, . . . , 2m + 1, give the team at the top of the pentagon the bye. For each row with two teams i, j associated with facility f assign gij to skf . Then shift the trams around the pentagon one position in a clockwise direction. DM87 – Scheduling, Timetabling and Routing Latin square ⇔ bipartite tournament (l[i, j] if player xi meets player yj in lij ) 11 DM87 – Scheduling, Timetabling and Routing 12 Extensions: I n facilities and seek for a balanced BT in which each player plays exactly once in each facility ⇐⇒ two mutually orthogonal Latin squares (rows are slots and columns facilities) A pair of Latin squares A = [aij ] and B = [bij ] are orthogonal iff the the ordered pairs (aij , bij ) are distinct for all i and j. 1 2 3 1 2 3 1 1 2 2 3 3 2 3 1 3 1 2 2 3 3 1 1 2 3 1 2 2 3 1 3 2 1 3 2 1 A and B A B superimposed Graph Algorithms A spanning subgraph of G = (V, E) with all vertices of degree k is called a k-factor (A subgraph H ⊆ G is a 1-factor ⇔ E(H) is a matching of V) A 1-factorization of Kn ≡ decomposition of Kn in perfect matchings ≡ edge coloring of Kn A SRRT among 2m teams is modeled by a complete graph K2m with edge (i, j) representing the game between i and j and the schedule correspond to an edge coloring. I Chess tournaments (assigning white and black) To include venues, the graph K2m is oriented (arc (ij) represents the game team i at team j) and the edge coloring is said an oriented coloring. I avoid carry-over effects, no two players xi and yj may play the same sequence of opponents yp and followed immediately by yq . ⇒ complete latin square. A DRRT is modeled by the oriented graph G2m with two arcs aij and aji for each ij and the schedule correspond to a decomposition of the arc set that is equivalent to the union of two oriented colorings of K2m . Mutually orthogonal Latin squares do not exist if m = 2, 6. DM87 – Scheduling, Timetabling and Routing 13 DM87 – Scheduling, Timetabling and Routing 14 Applications Assigning venues with minimal number of breaks: I SRRT: there are at least 2m − 2 breaks. Extension of circle method. I DRRT: Any decomposition of G2m−2 has at least 6m − 6 breaks. I SRRT for n odd: the complete graph on an odd number of nodes k2m+1 has an oriented factorization with no breaks. DM87 – Scheduling, Timetabling and Routing I Dutch Professional Football League [Schreuder, 1992] 1. SRRT canonical schedule with minimum breaks and mirroring to make a DRRT 2. assign actual teams to the patterns I European Soccer League [Bartsch, Drexl, Kroger (BDK), 2002] 1. DRRT schedule made of two separate SRRT with complementary patterns (Germany) four SRRTs the (2nd,3rd) and (1st,4th) complementary (Austria) 2. teams assigned to patterns with truncated branch and bound 3. games in each round are assigned to days of the week by greedy and local search algorithms 15 DM87 – Scheduling, Timetabling and Routing 16 IP formulation Basic SRRT (just the games) Branch and cut algorithm Adds odd-set constrains that strengthen the one-factor constraint, that is, exactly one game for each team in each slot Variable xijk ∈ {0, 1} ∀i, j = 1, . . . , n; i < j, k = 1, . . . , n − 1 X Every team plays exactly once in each slot X xijk = 1 ∀i = 1, . . . , n; k = 1, . . . , n − 1 xijk ≤ 1 ∀S ⊆ T, |S| is odd, k = 1, . . . , n − 1 i∈S,j6∈S j:j>i Each team plays every opponent exactly once. X xijk = 1 ∀i, j = 1, . . . , n; i < j k DM87 – Scheduling, Timetabling and Routing I 17 t I CP for phase 1 (games and patterns) I CP for phase 2: assign actual teams to position in timetable ∀l, k ∈ S; t ∈ T l and k meet exactly once X X xlkt + xklt = 1 18 CP formulation For Phase 2 (assign slots T to patterns S, a team to each selected pattern) Variable xlkt = {0, 1} DM87 – Scheduling, Timetabling and Routing ∀l, k ∈ S, l 6= k t k plays at most once in a round X X xlkt + xklt ≤ 1 ∀k ∈ S; t ∈ T l I l For Phase 3 (assignment problem) DM87 – Scheduling, Timetabling and Routing 19 DM87 – Scheduling, Timetabling and Routing 20 Traveling tournament problem Constraints to be included in practice: I Pattern set constraints I I I feasible pattern sequences: avoid three consecutive home or away games equally distributed home and away games Input: A set of teams T = {1, . . . , n}; D an n × n integer distance matrix with elements dij ; l, u integer parameters. Team-specific constraints I I I I I fixed home and away patterns fixed games and opponent constraints stadium availability forbidden patterns for sets of teams constraints on the positioning of top games Output: A double round robin tournament on the teams in T such that 1. the length of every home stand and road trip is between l and u inclusive 2. the total distance traveled by the teams is minimized Objective: maximize the number of good slots, that is, slots with popular match-ups later in the season or other TV broadcasting preferences. DM87 – Scheduling, Timetabling and Routing 21 A metaheuristic approach: Simulated Annealing DRRT constraints always satisfied (enforced) I constraints on repeaters (i may not play at j and host j at home in consecutive slots) are relaxed in soft constraints Objective made of: I total distance I a component to penalize violation of constraints on repeaters Ü Penalties are dynamically adjusted to prevent the algorithm from spending too much time in a space where the soft constraints are not satisfied. DM87 – Scheduling, Timetabling and Routing 22 Neighborhood operators: Constraints: I DM87 – Scheduling, Timetabling and Routing 23 I Swap the positions of two slots of games I Swap the schedules of two teams (except for the games when they play against) I Swap venues for a particular pair of games (i at j in slot s and j at i in slot s 0 becomes i at j in slot s 0 and j at i in slot s) Use reheating in SA. DM87 – Scheduling, Timetabling and Routing 24 Reference Kelly Easton and George Nemhauser and Michael Trick, Sport Scheduling, in Handbook of Scheduling: Algorithms, Models, and Performance Analysis, J.Y-T. Leung (Ed.), Computer & Information Science Series, Chapman & Hall/CRC, 2004. DM87 – Scheduling, Timetabling and Routing 25
© Copyright 2025 Paperzz