heuristics for the traveling tournament problem: scheduling the brazilian soccer championship

57
December 2003 Traveling tournament problem 1/57 ics for the Traveling Tournament Pr uling the Brazilian Soccer Champio Celso C. RIBEIRO Sebastián URRUTIA

Upload: destiny-compton

Post on 02-Jan-2016

25 views

Category:

Documents


0 download

DESCRIPTION

Heuristics for the Traveling Tournament Problem: Scheduling the Brazilian Soccer Championship. Celso C. RIBEIRO Sebastián URRUTIA. Summary. Motivation Formulation Constructive heuristic Neighborhoods Iterated local search Extended ILS for TTP Computational results Concluding remarks. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem1/57

Heuristics for the Traveling Tournament Problem: Scheduling the Brazilian Soccer Championship

Celso C. RIBEIROSebastián URRUTIA

Page 2: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem2/57

Summary• Motivation• Formulation• Constructive heuristic• Neighborhoods• Iterated local search• Extended ILS for TTP• Computational results• Concluding remarks

Page 3: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem3/57

Motivation• Professional sports leagues are a major

economic activity around the world.• Teams and leagues do not want to waste

their investments in players and structure as a consequence of poor schedules of games.

• Game scheduling is a difficult task, involving different types of constraints and many objectives to optimize. – Several decision makers (team managers,

league authorities, TV, etc) with contrary goals.– Economic issues– Logistic issues– Fairness

Page 4: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem4/57

Formulation (TTP)

• Conditions:– n (even) teams take part in a tournament.– Each team has its own stadium at its home

city.– Distances between the stadiums are

known.– A team playing two consecutive away

games goes directly from one city to the other, without returning to its home city.

Page 5: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem5/57

Formulation (TTP)

• Constraints:– Tournament is a strict double round-robin

tournament:• Each team plays against every other team

twice, one at home and the other away.• There are 2(n-1) rounds, each one with n/2

games.

– No team can play more than three games in a home stand or in a road trip (away games).

Page 6: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem6/57

Formulation (TTP)• Conditions (cont.):

– Tournament is mirrored: • All teams face each other once in the first phase

with n-1 rounds.• In the second phase with the last n-1 rounds the

teams play each other again in the same order, following an inverted home/away pattern.

• Games in the second phase are determined by those in the first (simple strict round robin).

• Common structure in Latin-American tournaments.

• Goal: minimize the total distance traveled by all teams.

Page 7: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem7/57

Formulation

• Given a graph G=(V, E), a factor of G is a graph G’=(V,E’) with E’E.

• G’ is a 1-factor if all its nodes have degree equal to one.

• A factorization of G=(V,E) is a set of edge-disjoint factors G1=(V,E1), ..., Gp=(V,Ep), with E1...Ep=E.

• In a 1-factorization of G all factors are 1-factors.

Page 8: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem8/57

4 3

2

1

5

6

Formulation

Example: 1-factorization of K6

Page 9: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem9/57

4 3

2

1

5

6

1Formulation

Example: 1-factorization of K6

Page 10: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem10/57

4 3

2

1

5

6

2Formulation

Example: 1-factorization of K6

Page 11: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem11/57

4 3

2

1

5

6

3Formulation

Example: 1-factorization of K6

Page 12: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem12/57

4 3

2

1

5

6

4Formulation

Example: 1-factorization of K6

Page 13: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem13/57

4 3

2

1

5

6

5Formulation

Example: 1-factorization of K6

Page 14: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem14/57

• For strict single round robin and strict mirrored double round robin tournaments:– Each edge in Kn represents a game.

– Each 1-factor of Kn represents a round.

– Each ordered 1-factorization of Kn represents a schedule.

Formulation

Page 15: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem15/57

Constructive heuristic

• Three steps:1. Schedule games using abstract

teams (structure of the draw, 1-factorization).

2. Assign real teams to abstract teams.3. Select stadium for each game

(home/away pattern) in the first phase (mirrored tournament).

Page 16: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem16/57

Constructive heuristic

• Step 1: schedule games using abstract teams

– This phase creates the structure of the tournament.

– “Polygon method” is used.– Tournament structure is fixed and

will not change in the other steps.

Page 17: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem17/57

Constructive heuristic

4 3

2

1

5

6

Example: “polygon method” for n=6

1st round

Page 18: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem18/57

Constructive heuristic

3 2

1

5

4

6

Example: “polygon method” for n=6

2nd round

Page 19: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem19/57

Constructive heuristic

2 1

5

4

3

6

Example: “polygon method” for n=6

3rd round

Page 20: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem20/57

Constructive heuristic

1 5

4

3

2

6

Example: “polygon method” for n=6

4th round

Page 21: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem21/57

Constructive heuristic

5 4

3

2

1

6

Example: “polygon method” for n=6

5th round

Page 22: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem22/57

Constructive heuristic Abstract teams (n=6)

Round

A B C D E F

1/6 F E D C B A

2/7 D C B A F E

3/8 B A E F C D

4/9 E D F B A C

5/10 C F A E D B

Page 23: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem23/57

Constructive heuristic

• Step 2: assign real teams to abstract teams

– Build a matrix with the number of consecutive games for each pair of abstract teams:• For each pair of teams X and Y, an entry

in this table contains the total number of times in which the other teams play consecutively with X and Y in any order.

Page 24: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem24/57

Constructive heuristicA B C D E F

A 0 1 6 5 2 4

B 1 0 2 5 6 4

C 6 2 0 2 5 3

D 5 5 2 0 2 4

E 2 6 5 2 0 3

F 4 4 3 4 3 0

Page 25: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem25/57

Constructive heuristic• Step 2: assign real teams to

abstract teams– Greedily assign pairs of real teams

with close home cities to pairs of abstract teams with large entries in the matrix with the number of consecutive games.

Page 26: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem26/57

Constructive heuristic Real teams (n=6)

Round

FLU SAN

FLA GRE

PAL PAY

1/6 PAY PAL GRE

FLA SAN

FLU

2/7 GRE

FLA SAN

FLU PAY PAL

3/8 SAN

FLU PAL PAY FLA GRE

4/9 PAL GRE

PAY SAN

FLU FLA

5/10 FLA PAY FLU PAL GRE

SAN

Page 27: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem27/57

Constructive heuristic

• Step 3: select stadium for each game in the first phase of the tournament

– Two-part strategy:• Build a feasible assignment of stadiums,

starting from a random assignment in the first round.

• Improve the assignment of stadiums, performing a simple local search algorithm based on home-away swaps.

Page 28: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem28/57

Constructive heuristic Real teams (n=6)

Round FLU SAN FLA GRE PAL PAY

1/6 PAY@PA

LGRE

@FLA

SAN@FL

U

2/7 GRE@FL

ASAN

@FLU

PAY@PA

L

3/8@SA

NFLU

@PAL

PAY FLA@GR

E

4/9 PAL@GR

E@PA

YSAN

@FLU

FLA

5/10@FL

APAY FLU

@PAL

GRE@SA

N

Page 29: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem29/57

Neighborhoods• Neighborhood “home-away swap”

(HAS): select a game and exchange the stadium where it takes place.

Real teams (n=6)

Round FLU SAN FLA GRE PAL PAY

1/6 PAY@PA

LGRE

@FLA

SAN@FL

U

2/7 GRE@FL

ASAN

@FLU

PAY@PA

L

3/8@SA

NFLU

@PAL

PAY FLA@GR

E

4/9 PAL@GR

E@PA

YSAN

@FLU

FLA

5/10@FL

APAY FLU

@PAL

GRE@SA

N

Page 30: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem30/57

Neighborhoods• Neighborhood “home-away swap”

(HAS): select a game and exchange the stadium where it takes place.

Real teams (n=6)

Round FLU SAN FLA GRE PAL PAY

1/6 PAY PAL GRE@FL

A@SA

N@FL

U

2/7 GRE@FL

ASAN

@FLU

PAY@PA

L

3/8@SA

NFLU

@PAL

PAY FLA@GR

E

4/9 PAL@GR

E@PA

YSAN

@FLU

FLA

5/10@FL

APAY FLU

@PAL

GRE@SA

N

Page 31: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem31/57

Neighborhoods• Neighborhood “team swap” (TS):

select two teams and swap their games, also swap the home-away assignment of their own game. Real teams (n=6)

Round FLU SAN FLA GRE PAL PAY

1/6 PAY@PA

LGRE

@FLA

SAN@FL

U

2/7 GRE@FL

ASAN

@FLU

PAY@PA

L

3/8@SA

NFLU

@PAL

PAY FLA@GR

E

4/9 PAL@GR

E@PA

YSAN

@FLU

FLA

5/10@FL

APAY FLU

@PAL

GRE@SA

N

Page 32: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem32/57

Neighborhoods• Neighborhood “team swap” (TS):

select two teams and swap their games, also swap the home-away assignment of their own game. Real teams (n=6)

Round FLU SAN FLA GRE PAL PAY

1/6 PAY@PA

LGRE

@FLA

SAN@FL

U

2/7 GRE@FL

ASAN

@FLU

PAY@PA

L

3/8@SA

NFLU

@PAL

PAY FLA@GR

E

4/9 PAL@GR

E@PA

YSAN

@FLU

FLA

5/10@FL

APAY FLU

@PAL

GRE@SA

N

Page 33: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem33/57

Neighborhoods• Neighborhood “team swap” (TS):

select two teams and swap their games, also swap the home-away assignment of their own game. Real teams (n=6)

Round FLU SAN FLA GRE PAL PAY

1/6 PAY@PA

LSAN

@FLA

GRE@FL

U

2/7 GRE@FL

APAY

@FLU

SAN@PA

L

3/8@SA

NFLU PAL PAY

@FLA

@GRE

4/9 PAL@GR

E@FL

USAN

@PAY

FLA

5/10@FL

APAY GRE

@PAL

FLU@SA

N

Page 34: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem34/57

Neighborhoods

• Neighborhood “partial round swap” (PRS): select two games AxB and CxD from round X and two games AxC and BxD from round Y, and swap their rounds (only for n8 and not always applicable).

Rounds ATM SAP CON FLA FLU INT CRU GRE1/82/9 FLA @INT @ATM SAP3/104/11 @SAP ATM @INT FLA5/126/137/14

Page 35: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem35/57

Neighborhoods

• Neighborhood “partial round swap” (PRS): select two games AxB and CxD from round X and two games AxC and BxD from round Y, and swap their rounds (only for n8 and not always applicable).

Rounds ATM SAP CON FLA FLU INT CRU GRE1/82/9 @SAP ATM @INT FLA3/104/11 FLA @INT @ATM SAP5/126/137/14

Page 36: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem36/57

Neighborhoods

• Neighborhood “game rotation” (GR) (ejection chain):– Enforce a game to be played at some

round: add a new edge to a 1-factor of the 1-factorization associated with the current schedule.

– Use an ejection chain to recover a 1-factorization.

Page 37: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem37/57

Neighborhoods

4 3

2

1

5

6

2

Enforce game 1 vs. 3 at round (factor) 2.

Page 38: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem38/57

4 3

2

1

5

6

2Neighborhoods

Teams 1 and 3 are now playing twice in this round.

Page 39: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem39/57

4 3

2

1

5

6

2Neighborhoods

Eliminate the other games played by teams 1 and 3 in this round.

Page 40: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem40/57

4 3

2

1

5

6

2Neighborhoods

Enforce the former opponents of teams 1 and 3 to play each other in this round: new game 2 vs. 4 in this round.

Page 41: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem41/57

4 3

2

1

5

6

4Neighborhoods

Consider the factor where game 2 vs. 4 was scheduled.

Page 42: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem42/57

Neighborhoods

4 3

2

1

5

6

4

Enforce game 1 vs. 4 (eliminated from round 2) to beplayed in this round, and so on...

Page 43: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem43/57

Neighborhoods

• The ejection chain terminates when the game enforced in the beginning is removed from the round where it was played in the original schedule.

• PRS moves may appear after an ejection chain move is made.

Page 44: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem44/57

Iterated local searchMartin, Otto, & Felten (1991); Martin & Otto

(1996)

S GenerateInitialSolution() S,S* LocalSearch(S) repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateBestSolution(S,S*)

until StoppingCriterion

Page 45: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem45/57

Extended ILS heuristicwhile .not.StoppingCriterion

S GenerateRandomizedInitialSolution() S LocalSearch(S)repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateOverallBestSolution(S,S*)

until ReinitializationCriterionend

Page 46: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem46/57

Extended ILS heuristicwhile .not.StoppingCriterion

S GenerateRandomizedInitialSolution() S LocalSearch(S)repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateOverallBestSolution(S,S*)

until ReinitializationCriterionend

Constructive heuristicrandomized in the 2nd

step

Page 47: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem47/57

Extended ILS heuristicwhile .not.StoppingCriterion

S GenerateRandomizedInitialSolution() S LocalSearch(S)repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateOverallBestSolution(S,S*)

until ReinitializationCriterionend

TS HAS PRS HAS until a local optimum

for all neighborhoods is found

Page 48: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem48/57

Extended ILS heuristicwhile .not.StoppingCriterion

S GenerateRandomizedInitialSolution() S LocalSearch(S)repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateOverallBestSolution(S,S*)

until ReinitializationCriterionend

TS HAS PRS HAS until a local optimum

for all neighborhoods is found

Page 49: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem49/57

Extended ILS heuristicwhile .not.StoppingCriterion

S GenerateRandomizedInitialSolution() S LocalSearch(S)repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateOverallBestSolution(S,S*)

until ReinitializationCriterionend

Apply one GR move randomly selected.

Execute the 3rd step of the constructive

heuristic to ensure feasibility

Page 50: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem50/57

Extended ILS heuristicwhile .not.StoppingCriterion

S GenerateRandomizedInitialSolution() S LocalSearch(S)repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateOverallBestSolution(S,S*)

until ReinitializationCriterionend

Initial criterion: At least almost as good as

current solution. Relax the criterion as current

solution is not changing.

Page 51: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem51/57

Extended ILS heuristicwhile .not.StoppingCriterion

S GenerateRandomizedInitialSolution() S LocalSearch(S)repeat

S’ Perturbation(S,history)S’ LocalSearch(S’)S AceptanceCriterion(S,S’,history)S* UpdateOverallBestSolution(S,S*)

until ReinitializationCriterionend

Too many iterations without improving best

solution in cycle

Page 52: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem52/57

Computational results

• Benchmark circular instances with n = 8, 10, 12, 14, 16, 18, and 20 teams.

• Harder benchmark MLB instances with n = 8, 10, 12, 14, and 16 teams. – All available from Michael Trick’s web

page.

• 2003 edition of the Brazilian nationalsoccer championship with 24 teams.

Page 53: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem53/57

Computational results• Largest problems solved to optimality using

an integer programming formulation: n = 6 teams

• Approximate solutions listed at Michael Trick’s home page for the corresponding unmirrored (not necessary mirrored) instances.

• Solutions found for CIRC and MLB instances are even better than those available for the corresponding unmirrored instances in 2002 (e.g. 3.5 hours for NL16 in Pentium IV 2.0 MHz).

Page 54: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem54/57

Computational results

• Total distance traveled for the 2003 edition of the Brazilian soccer championship with 24 teams (instance br24) in 12 hours (Pentium IV 2.0 MHz):Realized (official draw): 1, 048,134 kms

Our solution: 549,020 kms (50% reduction)• Approximate corresponding savings in airfares:US$ 1,700,000

Page 55: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem55/57

Computational results

Page 56: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem56/57

Concluding remarks

• Extended ILS heuristic found very good solutions to benchmark instances:– Solutions found for CIRC and MLB instances

are even better than those available for the corresponding unmirrored instances in 2002.

• Effectiveness of ejection chain neighborhood.

• Significant savings in airfares costs and traveled distance in a real instance.

Page 57: Heuristics for the Traveling Tournament Problem:  Scheduling the Brazilian Soccer Championship

December 2003 Traveling tournament problem57/57

Work in progress• Combination of constraint programming

with heuristics to handle difficult constraints.

• Incorporation of additional real-life constraints: TV constraints, pre-scheduled games, complementary teams, airfares + hotel costs, ...

• Talks with Brazilian federations of soccer(CBF) and basketball (CBB) to schedule the2004 edition of national tournaments.