PVC routing algorithms - PowerPoint PPT Presentation

About This Presentation
Title:

PVC routing algorithms

Description:

Distances between the stadiums are known. A team playing two consecutive away games goes directly from one city to the ... problems into touch', (1999) ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 89
Provided by: at01
Category:

less

Transcript and Presenter's Notes

Title: PVC routing algorithms


1
Heuristics for the Traveling Tournament Problem
Scheduling the Brazilian Soccer Championship
Celso C. RIBEIRO Sebastián URRUTIA
2
Summary
  • Formulation
  • Constructive heuristic
  • Neighborhoods
  • Extended GRASP ILS heuristic
  • Computational results
  • Concluding remarks

3
Formulation
  • Game scheduling is a difficult task, involving
    different types of constraints, logistic issues,
    multiple objectives to optimize, and several
    decision makers (officials, managers, TV, etc).
  • The total distance traveled becomes an important
    variable to be minimized, to reduce traveling
    costs and to give more time to the players for
    resting and training.

4
Formulation
  • 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.

5
Formulation
  • Conditions (cont.)
  • Tournament is a strict double round-robin
    tournament
  • There are 2(n-1) rounds, each one with n/2 games.
  • Each team plays against every other team twice,
    one at home and the other away.
  • No team can play more than three games in a home
    stand or in a road trip (away games).

6
Formulation
  • 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.
  • Common structure in Latin-American tournaments.
  • Goal minimize the total distance traveled by all
    teams.

7
Formulation
  • Variants
  • single round-robin
  • no-repeaters
  • no synchronized rounds
  • multiple games (more than two, variable)
  • teams with complementary patterns in the same
    city
  • pre-scheduled games and TV constraints
  • stadium availability
  • minimize airfare and hotel costs, etc.

8
Formulation
  • Some references
  • Easton, Nemhauser, Trick, Scheduling in
    sports, Handbook of Scheduling (2004)
  • Easton, Nemhauser, Trick, The traveling
    tournament problem Description and benchmarks
    (2001)
  • Trick, Challenge traveling tournament
    instances, web page
  • Nemhauser Trick, Scheduling a major college
    basketball conference (1998)
  • Thompson, Kicking timetabling problems into
    touch, (1999)
  • Anagnostopoulos, Michel, Van Hentenryck,
    Vergados, A simulated annealing approach to the
    traveling tournament problem (2003)

9
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?...?EpE.
  • All factors in a 1-factorization of G are
    1-factors.

10
Formulation
1
2
5
4
3
Example 1-factorization of K6
6
11
Formulation
1
1
2
5
4
3
Example 1-factorization of K6
6
12
Formulation
2
1
2
5
4
3
Example 1-factorization of K6
6
13
Formulation
3
1
2
5
4
3
Example 1-factorization of K6
6
14
Formulation
4
1
2
5
4
3
Example 1-factorization of K6
6
15
Formulation
5
1
2
5
4
3
Example 1-factorization of K6
6
16
Formulation
  • Mirrored tournament games in the second phase
    are determined by those in the first.
  • Each edge of Kn represents a game.
  • Each 1-factor of Kn represents a round.
  • Each ordered 1-factorization of Kn is a schedule.
  • Without considering the stadiums, there are
    (n-1)! times (number of nonisomorphic factors)
    different mirrored tournaments.Dinitz,
    Garnick, McKay, There are 526,915,620
    nonisomorphic one-factorizations of K12 (1995)

17
Summary
  • Formulation
  • Constructive heuristic
  • Neighborhoods
  • Extended GRASP ILS heuristic
  • Computational results
  • Concluding remarks

18
Constructive heuristic
  • Three steps
  • Schedule games using abstract teams (structure of
    the draw).
  • Assign real teams to abstract teams.
  • Select stadium for each game (home/away pattern)
    in the first phase (mirrored tournament).
  • Other algorithms first define the home/away
    pattern and then assign teams to games.

19
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.

20
Constructive heuristic
6
Example polygon method for n6
1
5
2
1st round
3
4
21
Constructive heuristic
6
Example polygon method for n6
5
4
1
2nd round
2
3
22
Constructive heuristic
6
Example polygon method for n6
4
3
5
3rd round
1
2
23
Constructive heuristic
6
Example polygon method for n6
3
2
4
4th round
5
1
24
Constructive heuristic
6
Example polygon method for n6
2
1
3
5th round
4
5
25
Constructive heuristic
Abstract teams (n6) Abstract teams (n6) Abstract teams (n6) Abstract teams (n6) Abstract teams (n6) Abstract teams (n6)
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
26
Constructive heuristic
  • Step 2 assign real teams to abstract teams
  • Polygon method was used to build a schedule
    with 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.

27
Constructive heuristic
A 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
28
Constructive heuristic
  • Step 2 assign real teams to abstract teams
  • Polygon method was used to build a schedule
    with abstract teams.
  • Build a matrix with the number of consecutive
    games for each pair of abstract teams.
  • Greedily (QAP) 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.

29
Constructive heuristic
n 16 note the large number of times in which
two teams are faced consecutively, which is
explored by step 2 of the constructive heuristic.
30
Constructive heuristic
  • Teams (n6)
  • FLAMENGO and FLUMINENSE two teams
    in the same city (Rio de Janeiro)
  • SANTOS and PALMEIRAS two
    teams in two very close cities
    (Santos and São Paulo) 400 kms
    south of Rio de Janeiro
  • GREMIO team with home city approximately
    1100 kms south of Rio de Janeiro
  • PAYSANDU team with home city approximately 2500
    kms north of Rio de Janeiro

31
Constructive heuristic
Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6)
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
32
Constructive heuristic
  • Step 3 select stadium for each game in the first
    phase of the tournament
  • Schedule games in multiple-game trips with no
    more than three away games each face teams with
    close stadiums in the same road trip.
  • 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.

33
Constructive heuristic
Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6)
Round FLU SAN FLA GRE PAL PAY
1/6 PAY _at_PAL GRE _at_FLA SAN _at_FLU
2/7 GRE _at_FLA SAN _at_FLU PAY _at_PAL
3/8 _at_SAN FLU _at_PAL PAY FLA _at_GRE
4/9 PAL _at_GRE _at_PAY SAN _at_FLU FLA
5/10 _at_FLA PAY FLU _at_PAL GRE _at_SAN
34
Summary
  • Formulation
  • Constructive heuristic
  • Neighborhoods
  • Extended GRASP ILS heuristic
  • Computational results
  • Concluding remarks

35
Neighborhoods
  • Neighborhood home-away swap (HAS) select a
    game and exchange the stadium where it takes
    place.

Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6)
Round FLU SAN FLA GRE PAL PAY
1/6 PAY _at_PAL GRE _at_FLA SAN _at_FLU
2/7 GRE _at_FLA SAN _at_FLU PAY _at_PAL
3/8 _at_SAN FLU _at_PAL PAY FLA _at_GRE
4/9 PAL _at_GRE _at_PAY SAN _at_FLU FLA
5/10 _at_FLA PAY FLU _at_PAL GRE _at_SAN
36
Neighborhoods
  • Neighborhood home-away swap (HAS) select a
    game and exchange the stadium where it takes
    place.

Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6)
Round FLU SAN FLA GRE PAL PAY
1/6 PAY PAL GRE _at_FLA _at_SAN _at_FLU
2/7 GRE _at_FLA SAN _at_FLU PAY _at_PAL
3/8 _at_SAN FLU _at_PAL PAY FLA _at_GRE
4/9 PAL _at_GRE _at_PAY SAN _at_FLU FLA
5/10 _at_FLA PAY FLU _at_PAL GRE _at_SAN
37
Neighborhoods
  • Neighborhood team swap (TS) select two teams
    and swap their games, also swap the home-away
    assignment of their own game.

Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6)
Round FLU SAN FLA GRE PAL PAY
1/6 PAY _at_PAL GRE _at_FLA SAN _at_FLU
2/7 GRE _at_FLA SAN _at_FLU PAY _at_PAL
3/8 _at_SAN FLU _at_PAL PAY FLA _at_GRE
4/9 PAL _at_GRE _at_PAY SAN _at_FLU FLA
5/10 _at_FLA PAY FLU _at_PAL GRE _at_SAN
38
Neighborhoods
  • Neighborhood team swap (TS) select two teams
    and swap their games also swap the home-away
    assignment of their own game.

Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6)
Round FLU SAN FLA GRE PAL PAY
1/6 PAY _at_PAL GRE _at_FLA SAN _at_FLU
2/7 GRE _at_FLA SAN _at_FLU PAY _at_PAL
3/8 _at_SAN FLU _at_PAL PAY FLA _at_GRE
4/9 PAL _at_GRE _at_PAY SAN _at_FLU FLA
5/10 _at_FLA PAY FLU _at_PAL GRE _at_SAN
39
Neighborhoods
  • Neighborhood team swap (TS) select two teams
    and swap their games, also swap the home-away
    assignment of their own game.

Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6) Real teams (n6)
Round FLU SAN FLA GRE PAL PAY
1/6 PAY _at_PAL SAN _at_FLA GRE _at_FLU
2/7 GRE _at_FLA PAY _at_FLU SAN _at_PAL
3/8 _at_SAN FLU PAL PAY _at_FLA _at_GRE
4/9 PAL _at_GRE _at_FLU SAN _at_PAY FLA
5/10 _at_FLA PAY GRE _at_PAL FLU _at_SAN
40
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 n?8, not always possible).

41
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 n?8, not always possible).

42
Neighborhoods
  • Neigborhood 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.

43
Neighborhoods
2
1
2
5
4
3
6
Enforce game 1vs. 3 at round (factor) 2.
44
Neighborhoods
2
1
2
5
4
3
6
Teams 1 and 3 are now playing twice in this round.
45
Neighborhoods
2
1
2
5
4
3
6
Eliminate the other games played by teams 1 and 3
in this round.
46
Neighborhoods
2
1
2
5
4
3
6
Enforce the former oponents of teams 1 and 3 to
play each other in this round new game 2 vs. 4
in this round.
47
Neighborhoods
4
1
2
5
4
3
6
Consider the factor where game 2 vs. 4 was
scheduled.
48
Neighborhoods
4
1
2
5
4
3
6
Enforce game 1 vs. 4 (eliminated from round 2) to
be played in this round.
49
Neighborhoods
4
1
2
5
4
3
6
Eliminate games 2 vs. 4 (enforced in round 2) and
1 vs. 5 (since team 1 cannot play twice).
50
Neighborhoods
4
1
2
5
4
3
6
Enforce game 2 vs. 5 to be played in this round.
51
Neighborhoods
1
1
2
5
4
3
6
Consider the factor where game 2 vs. 5 was
scheduled.
52
Neighborhoods
1
1
2
5
4
3
6
Enforce game 1 vs. 5 (eliminated from round 4)
to be played in this round.
53
Neighborhoods
1
1
2
5
4
3
6
Eliminate games 2 vs. 5 (enforced in round 4) and
1 vs. 6 (since team 1 cannot play twice).
54
Neighborhoods
1
1
2
5
4
3
6
Enforce game 2 vs. 6 to be played in this round.
55
Neighborhoods
5
1
2
5
4
3
6
Consider the factor where game 2 vs. 6 was
scheduled.
56
Neighborhoods
5
1
2
5
4
3
6
Enforce game 1 vs. 6 (eliminated from round 1) to
be played in this round.
57
Neighborhoods
5
1
2
5
4
3
6
Eliminate games 2 vs. 6 (enforced in round 1) and
1 vs. 3 (since team 1 cannot play twice and this
game was enforced in round 2 at the beginning of
the ejection chain).
58
Neighborhoods
5
1
2
5
4
3
6
Finally, enforce game 2 vs. 3 (eliminated from
round 2 at the beginning of the ejection chain )
to be played in this round.
59
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
  • The ejection chain move is able to find solutions
    that are not reachable through other
    neighborhoods.
  • PRS moves may appear after an ejection chain move
    is made.

60
Neighborhoods
  • PRS GR for n4 PRS ? GR for n?6.
  • Only neighborhoods PRS and GR are able to change
    the structure of the schedule of the initial
    solution built by the polygon method.
  • However, PRS cannot always be used, due to the
    structure of the solutions built by polygon
    method for some values of n.

61
Neighborhoods
  • The length of the ejection chain is variable.
  • If ejections chains are not used, one may be
    stucked at schedules with the structure of the
    solutions built by the polygon method.
  • n?6,8,12,14,16,20,24 no PRS moves exist if
    polygon method is used, but...
  • ... PRS moves may appear after an ejection chain
    move is made.

62
Summary
  • Formulation
  • Constructive heuristic
  • Neighborhoods
  • Extended GRASP ILS heuristic
  • Computational results
  • Concluding remarks

63
Extended GRASP ILS heuristic
  • while .not.StoppingCriterion
  • S ? GenerateRandomizedInitialSolution()
  • S,S ? LocalSearch(S) / S best solution in
    cycle /
  • repeat / S best
    overall solution /
  • S ? Perturbation(S,history)
  • S ? LocalSearch(S)
  • S ? AceptanceCriterion(S,S,history)
  • S ? UpdateOverallBestSolution(S,S)
  • S ? UpdateCycleBestSolution(S,S)
  • until ReinitializationCriterion
  • end

64
Extended GRASP ILS heuristic
  • Initial solutions (for each cycle)
  • Use the constructive heuristic.
  • Randomize the second step team assignment using
    the matrix of consecutive games.
  • Third step (stadium assignment) was already
    randomized.
  • New cycle is started if
    ReinitializationCriterion is met.

65
Extended GRASP ILS heuristic
  • Local search
  • First improving strategy.
  • Multiple neighborhoods are used in this order
  • TS ? HAS ? PRS ? HAS
  • GR is very costly and is not used during the
    local search.
  • Repeat until a local optimum with respect to all
    neighborhoods is found.
  • Neighbor solutions are investigated at random for
    each type of neighborhood.

66
Extended GRASP ILS heuristic
  • Perturbation
  • Obtain S by applying one ejection chain randomly
    selected GR move to the current solution S.
  • The new solution may be infeasible regarding
    stadium assignment (more than three consecutive
    home or away games).
  • Perform a fast (very few infeasibilities in the
    solution obtained after the GR move) tabu search
    heuristic using the home-away swap neighborhood.
  • Tabu search stops when all infeasibilities have
    been eliminated.

67
Extended GRASP ILS heuristic
  • while .not.StoppingCriterion
  • S ? GenerateRandomizedInitialSolution()
  • S,S ? LocalSearch(S) / S best solution in
    cycle /
  • repeat / S best
    overall solution /
  • S ? Perturbation(S,history)
  • S ? LocalSearch(S)
  • S ? AceptanceCriterion(S,S,history)
  • S ? UpdateOverallBestSolution(S,S)
  • S ? UpdateCycleBestSolution(S,S)
  • until ReinitializationCriterion
  • end

68
Extended GRASP ILS heuristic
  • Acceptance criterion
  • Set threshold acceptance criterion at ?0.1
  • Accept new solution if its cost is lower than
    (100?) of the current solution.
  • If the current solution does not change after a
    certain number of iterations, double the value of
    ?(i.e., acceptance criterion is relaxed if
    current solution does not change).
  • Reset ?0.1 when the current solution changes.

69
Extended GRASP ILS heuristic
  • Reinitialization criterion
  • If 50 deteriorating moves are accepted since the
    last time the best solution in the cycle S was
    updated, then start a new cycle computing a new
    initial solution.
  • Re-initialization occurs if too many iterations
    are performed without improving the best solution
    in a cycle.
  • Computations in a cycle are not interrupted if
    the algorithm is improving the current solution S.

70
Summary
  • Formulation
  • Constructive heuristic
  • Neighborhoods
  • Extended GRASP ILS heuristic
  • Computational results
  • Concluding remarks

71
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 Tricks web page.
  • 2003 edition of the Brazilian national
    soccer championship with 24 teams.

72
Computational results
  • All numerical results on a Pentium IV 2.0 MHz
    machine
  • Lower bounds best known approximate solutions
    for the corresponding less constrained unmirrored
    instances.
  • Largest problems solved to optimality using an
    integer programming formulation n 6 teams
  • Gaps 0.6 for n8 3.6 for n10 (MLB)

73
Computational results
  • Constructive heuristic
  • Very fast
  • Instance nl16 1000 runs in approximately 1
    second
  • Average gap is 17.1, but the constructive
    heuristic is several orders of magnitude faster
    than the best heuristics.
  • Better solutions than those found after several
    days of computations by the ant colony with
    backtracking and local search heuristic of
    Crauwells Van Oudheusden (2003)

74
Computational results
  • GRASP ILS heuristic time limit is 10 minutes
    only
  • Very robust largest gap with respect to the best
    known solution for the less constrained
    unmirrored problem was only 11.2

(before this work, times were measured in days!)
75
Computational results
Instance Best unmirrored Best mirrored gap () Time to best (s)
circ12 420 456 8.6 8.5
circ14 682 714 4.7 1.1
circ16 976 1004 2.9 115.3
circ18 1420 1364 -3.9 284.2
circ20 1908 1882 -1.4 578.3
nl12 112298 120655 7.4 24.0
nl14 190056 208086 9.5 69.9
nl16 267194 285614 6.9 514.2
76
Computational results
Instance Best unmirrored Best mirrored gap () Time to best (s)
circ12 420 456 8.6 8.5
circ14 682 714 4.7 1.1
circ16 976 1004 2.9 115.3
circ18 1420 1364 -3.9 284.2
circ20 1908 1882 -1.4 578.3
nl12 112298 120655 7.4 24.0
nl14 190056 208086 9.5 69.9
nl16 267194 285614 6.9 514.2
77
Computational results
Instance Best unmirrored Best mirrored gap () Time to best (s)
circ12 420 456 8.6 8.5
circ14 682 714 4.7 1.1
circ16 976 1004 2.9 115.3
circ18 1364 1364 0.0 284.2
circ20 1882 1882 0.0 578.3
nl12 112298 120655 7.4 24.0
nl14 190056 208086 9.5 69.9
nl16 267194 285614 6.9 514.2
78
Computational results
  • New heuristic improved by 3.9 and 1.4 the best
    known solutions for the corresponding less
    constrained unmirrored instances circ18 and
    circ20.
  • Computation times compare favorably with other
    heuristics, e.g. for instance nl14
  • Anagnostopoulos et al. (2003) approximately five
    days of computation time
  • GRASP ILS 10 minutes (only 0.2)

79
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 506,433 kms (52 reduction)
  • Approximate corresponding potential savings
    in airfaresUS 1,700,000

80
Summary
  • Formulation
  • Constructive heuristic
  • Neighborhoods
  • Extended GRASP ILS heuristic
  • Computational results
  • Concluding remarks

81
Concluding remarks
  • Constructive heuristic is very fast and
    effective.
  • Extended GRASP ILS heuristic found very good
    solutions to benchmark instances
  • Very fast (10 minutes)
  • Solutions found for some instances are even
    better than those available for the corresponding
    less constrained unmirrored instances.
  • Effectiveness of ejection chain neighborhood.
  • Significant savings in airfares costs and
    traveled distance in real instance.

82
Slides and publications
  • Slides of this talk can be downloaded from
    http//www.inf.puc-rio.br/celso/talks
  • This paper (soon) and other papers about GRASP,
    path-relinking, and their applications available
    athttp//www.inf.puc-rio.br/celso/publicacoes
  • Materials about applications of OR techniques to
    problems in sports management and scheduling may
    be found at http//www.esportemax.orgPlease
    let us know about new links and materials!

83
Computational results
  • Methodology used to evaluate and compare
    different algorithms for the same problem
  • Probability distribution of time-to-target-solutio
    n-value experimental plotsAiex, Resende,
    Ribeiro Probability distribution of solution
    time in GRASP An experimental investigation,
    (2002)Resende Ribeiro GRASP and
    path-relinking Recent advances and
    applications, (2003)

84
Computational results
  • Select an instance and a target value
  • Perform 200 runs using different seeds.
  • Stopping when a solution value at least as good
    as the target is found.
  • For each run, measure the time-to-target-value.
  • Plot the probabilities of finding a solution at
    least as good as the target value within some
    computation time.

85
Computational results
Instance br24 Target 586,000 kms
86
Computational results
Instance br24 Time 10 minutes
87
Computational results
Instance br24 Time 12 hours
88
Concluding remarks
  • Combination of constraint programming with
    heuristics to handle difficult constraints.
  • Incorporation of additional real-life constraints
    in progress TV constraints, pre-scheduled games,
    complementary teams, airfares hotel costs, ...
  • Talks with Brazilian federations of soccer
    (CBF) and basketball (CBB) to schedule the
    national tournaments.
Write a Comment
User Comments (0)
About PowerShow.com