820 likes | 830 Views
This book explores the advances and applications of the GRASP and path-relinking algorithms in solving optimization problems. It covers the basic GRASP algorithm, enhanced construction strategies, local search, and variants of GRASP with path-relinking.
E N D
GRASP and Path-Relinking: Advances and Applications Celso C. RIBEIRO 7th CEMAPRE CONFERENCE Lisbon, September 18-19, 2003 GRASP and path-relinking: Advances and applications
Summary • The need for heuristics • Basic GRASP algorithm • Construction phase • Enhanced construction strategies • Local search • Path-relinking • GRASP with path-relinking • Variants of GRASP with path-relinking • Concluding remarks ... + Applications and numerical results GRASP and path-relinking: Advances and applications
The need for heuristics • Decision problem: “is there a solution satisfying some given conditions?” Answer:“yes” or “no” • Optimization problem: “among all solutions satisfying some given conditions, find one optimizing a cost function.” Answer:a feasible optimal solution • Complexity theory: decision problems GRASP and path-relinking: Advances and applications
The need for heuristics • Example: traveling salesman problem Input: n cities and distances cijDecision problem:“given an integer L, is there a hamiltonian cycle of length less than or equal to L?” Optimization problem:“find a minimum length hamiltonian cycle.” GRASP and path-relinking: Advances and applications
The need for heuristics • Class P: decision problems solvable by polynomial time algorithms. • Examples: shortest paths, minimum spanning trees, maximum flow, linear programming, matching, etc. • Class NP: decision problems for which one can check in polynomial time if a solution leads to a “yes” answer (but not necessarilly find one). GRASP and path-relinking: Advances and applications
The need for heuristics • NP-complete problems: hardest decision problems in NP, if there exists a polynomial time algorithm for any of them, then all of them can be solved in polynomial time. • NP-hard problems: optimization problems whose associated decision problem is NP-complete. • Examples: traveling salesman problem, knapsack problem, graph coloring, Steiner problem in graphs, integer programming, and many others. GRASP and path-relinking: Advances and applications
The need for heuristics • How do we cope with NP-hardness? • Heuristics: approximate methods tailored for each problem, which are able to find high quality feasible solutions in “reasonable” computation times. • Strategies: • Construction algorithms: build feasible solutions • Local search algorithms: improve feasible solutions and stop at first local optimum • Metaheuristics: go beyond local optimality GRASP and path-relinking: Advances and applications
The need for heuristics • Metaheuristics are based on different metaphors: • Simulated annealing • Tabu search • Genetic algorithms • Scatter search • GRASP (greedy randomized adaptive search procedures) • Variable neighborhood search • Ant colonies • Swarm particles • Asynchronous teams (A-teams), … GRASP and path-relinking: Advances and applications
The need for heuristics • Effective implementation of metaheuristics combine several common ingredients: • Greedy algorithms, randomization, local search, intensification, diversification, short-term memory, learning, elite solutions, etc. • Advances in heuristic search methods: • Solve larger problems • Solve problems in smaller times • Find better solutions GRASP and path-relinking: Advances and applications
Summary • The need for heuristics • Basic GRASP algorithm • Construction phase • Enhanced construction strategies • Local search • Path-relinking • GRASP with path-relinking • Variants of GRASP with path-relinking • Concluding remarks GRASP and path-relinking: Advances and applications
GRASP: Basic algorithm • GRASP: • Multistart metaheuristic: • Feo & Resende (1989): set covering • Festa & Resende (2002): annotated bibliography • Resende & Ribeiro (2003): survey • Repeat for Max_Iterations: • Construct a greedy randomized solution. • Use local search to improve the constructed solution. • Update the best solution found. GRASP and path-relinking: Advances and applications
GRASP: Basic algorithm • Construction phase: greediness + randomness • Builds a feasible solution: • Use greediness to build restricted candidate list and apply randomness to select an element from the list. • Use randomness to build restricted candidate list and apply greediness to select an element from the list. • Local search: search for an improving neighbor solution until a local optimum is found • Solutions generated by the construction procedure are not necessarily optimal: • Effectiveness of local search depends on neighborhood structure, search strategy, and fast evaluation of neighbors, but also on the construction procedure itself. GRASP and path-relinking: Advances and applications
local search local search weight weight GRASP construction weight iterations random construction iterations GRASP: Basic algorithm Effectiveness of greedy randomized vs purely randomized construction: Application: modem placement max weighted covering problem maximization problem: = 0.85 GRASP and path-relinking: Advances and applications
Summary • The need for heuristics • Basic GRASP algorithm • Construction phase • Enhanced construction strategies • Local search • Path-relinking • GRASP with path-relinking • Variants of GRASP with path-relinking • Parallel implementations • Concluding remarks GRASP and path-relinking: Advances and applications
Construction phase • Greedy Randomized Construction: • Solution • Evaluate incremental costs of candidate elements • While Solution is not complete do: • Build restricted candidate list (RCL). • Select an element s from RCL at random. • Solution Solution {s} • Reevaluate the incremental costs. • endwhile GRASP and path-relinking: Advances and applications
Construction phase • Minimization problem • Basic construction procedure: • Greedy function c(e): incremental cost associated with the incorporation of element e into the current partial solution under construction • cmin (resp. cmax): smallest (resp. largest) incremental cost • RCL made up by the elements with the smallest incremental costs. GRASP and path-relinking: Advances and applications
Construction phase • Cardinality-based construction: • p elements with the smallest incremental costs • Quality-based construction: • Parameter defines the quality of the elements in RCL. • RCL contains elements with incremental cost cmin c(e) cmin + (cmax –cmin) • = 0 : pure greedy construction • = 1 : pure randomized construction • Select at random from RCL using uniform probability distribution GRASP and path-relinking: Advances and applications
Illustrative results: RCL parameter best solution average solution solution value time (seconds) for 1000 iterations time weighted MAX-SAT instance: 100 variables and 850 clauses 1000 GRASP iterations random greedy RCL parameter α SGI Challenge 196 MHz GRASP and path-relinking: Advances and applications
Illustrative results: RCL parameter Another weighted MAX-SAT instance random greedy RCL parameter α SGI Challenge 196 MHz GRASP and path-relinking: Advances and applications
Summary • The need for heuristics • Basic GRASP algorithm • Construction phase • Enhanced construction strategies • Local search • Path-relinking • GRASP with path-relinking • Variants of GRASP with path-relinking • Concluding remarks GRASP and path-relinking: Advances and applications
Enhanced construction strategies • Reactive GRASP: Prais & Ribeiro (2000) (traffic assignment in TDMA satellites) • At each GRASP iteration, a value of the RCL parameter is chosen from a discrete set of values [1, 2, ..., m]. • The probability that k is selected is pk. • Reactive GRASP: adaptively changes the probabilities [p1, p2, ..., pm] to favor values of that produce good solutions. • Other applications, e.g. to graph planarization, set covering, and weighted max-sat: • Better solutions, at the cost of slightly larger times. GRASP and path-relinking: Advances and applications
Enhanced construction strategies • Cost perturbations: Canuto, Resende, & Ribeiro (2001) (prize-collecting Steiner tree) • Randomly perturb original costs and apply some heuristic. • Adds flexibility to algorithm design: • May be more effective than greedy randomized construction in circumstances where the construction algorithm is not very sensitive to randomization. • Also useful when no greedy algorithm is available. GRASP and path-relinking: Advances and applications
Enhanced construction strategies • Memory and learning in construction: Fleurent & Glover (1999) (quadratic assignment) • Uses long-term memory (pool of elite solutions) to favor elements which frequently appear in the elite solutions (consistent and strongly determined variables). GRASP and path-relinking: Advances and applications
Summary • The need for heuristics • Basic GRASP algorithm • Construction phase • Enhanced construction strategies • Local search • Path-relinking • GRASP with path-relinking • Variants of GRASP with path-relinking • Concluding remarks GRASP and path-relinking: Advances and applications
Local search • First improving vs. best improving: • First improving is usually faster. • Premature convergence to low quality local optimum is more likely to occur with best improving. • VND to speedup search and to overcome optimality w.r.t. to simple neighborhoods: Ribeiro, Uchoa, & Werneck (2002) (Steiner problem in graphs) • Hashing to avoid cycling or repeated application of local search to same solution built in the construction phase: Woodruff & Zemel (1993), Ribeiro et. al (1997) (query optimization), Martins et al. (2000) (Steiner problem in graphs) GRASP and path-relinking: Advances and applications
Local search • Filtering to avoid application of local search to low quality solutions, only promising solutions are investigated: Feo, Resende, & Smith (1994), Prais & Ribeiro (2000) (traffic assignment), Martins et. al (2000) (Steiner problem in graphs) • Extended quick-tabu local search to overcome premature convergence: Souza, Duhamel, & Ribeiro (2003) (capacitated minimum spanning tree, better solutions for largest benchmark problems) • Candidate list strategies GRASP and path-relinking: Advances and applications
Summary • The need for heuristics • Basic GRASP algorithm • Construction phase • Enhanced construction strategies • Local search • Path-relinking • GRASP with path-relinking • Variants of GRASP with path-relinking • Concluding remarks GRASP and path-relinking: Advances and applications
Path-relinking • Path-relinking: • Intensification strategy exploring trajectories connecting elite solutions: Glover (1996) • Originally proposed in the context of tabu search and scatter search. • Paths in the solution space leading to other elite solutions are explored in the search for better solutions: • selection of moves that introduce attributes of a guiding solution into the current solution GRASP and path-relinking: Advances and applications
guiding solution path in the neighborhood of solutions initial solution Path-relinking • Exploration of trajectories that connect high quality (elite) solutions: GRASP and path-relinking: Advances and applications
Path-relinking • Path is generated by selecting moves that introduce in the initial solution attributes of the guiding solution. • At each step, all moves that incorporate attributes of the guiding solution are evaluated and the best move is selected: guiding solution initial solution GRASP and path-relinking: Advances and applications
Path-relinking Elite solutions x and y (x,y): symmetric difference between x and y while ( |(x,y)| > 0 ) { evaluate moves corresponding in(x,y)make best move update (x,y) } GRASP and path-relinking: Advances and applications
Summary • The need for heuristics • Basic GRASP algorithm • Construction phase • Enhanced construction strategies • Local search • Path-relinking • GRASP with path-relinking • Variants of GRASP with path-relinking • Concluding remarks GRASP and path-relinking: Advances and applications
GRASP with path-relinking • Maintains a set of elite solutions found during GRASP iterations. • After each GRASP iteration (construction and local search): • Use GRASP solution as initial solution. • Select an elite solution uniformly at random: guiding solution(may also be selected with probabilities proportional to the symmetric difference w.r.t. the initial solution). • Perform path-relinking between these two solutions. GRASP and path-relinking: Advances and applications
GRASP with path-relinking • Repeat for Max_Iterations: • Construct a greedy randomized solution. • Use local search to improve the constructed solution. • Apply path-relinking to further improve the solution. • Update the pool of elite solutions. • Update the best solution found. GRASP and path-relinking: Advances and applications
GRASP with path-relinking • Variants: trade-offs between computation time and solution quality • Explore different trajectories (e.g. backward, forward): better start from the best, neighborhood of the initial solution is fully explored! • Explore both trajectories: twice as much the time, often with marginal improvements only! • Do not apply PR at every iteration, but instead only periodically: similar to filtering during local search. • Truncate the search, do not follow the full trajectory. • May also be applied as a post-optimization step to all pairs of elite solutions. GRASP and path-relinking: Advances and applications
GRASP with path-relinking • Successful applications: • Prize-collecting minimum Steiner tree problem: Canuto, Resende, & Ribeiro (2001) (e.g. improved all solutions found by approximation algorithm of Goemans & Williamson) • Minimum Steiner tree problem: Ribeiro, Uchoa, & Werneck (2002) (e.g., best known results for open problems in seriesdv640 of the SteinLib) • p-median: Resende & Werneck (2002)(e.g., best known solutions for problems in literature) GRASP and path-relinking: Advances and applications
GRASP with path-relinking • Successful applications (cont’d): • Capacitated minimum spanning tree:Souza, Duhamel, & Ribeiro (2002) (e.g., best known results for largest problems with 160 nodes) • 2-path network design: Ribeiro & Rosseti (2002) (better solutions than greedy heuristic) • Max-cut: Festa, Pardalos, Resende, & Ribeiro (2002) (e.g., best known results for several instances) • Quadratic assignment:Oliveira, Pardalos, & Resende (2003) GRASP and path-relinking: Advances and applications
GRASP with path-relinking • Successful applications (cont’d): • Job-shop scheduling: Aiex, Binato, & Resende (2003) • Three-index assignment problem: Aiex, Resende, Pardalos, & Toraldo (2003) • PVC routing: Resende & Ribeiro (2003) • Phylogenetic trees: Ribeiro & Vianna (2003) GRASP and path-relinking: Advances and applications
GRASP with path-relinking • P is a set (pool) of elite solutions. • Each iteration of first |P| GRASP iterations adds one solution to P(if different from others). • After that: solution x is promoted to P if: • x is better than best solution in P. • x is not better than best solution in P, but is better than worst and is sufficiently different from all solutions in P. GRASP and path-relinking: Advances and applications
Local access network design • Design a local access network taking into account tradeoff between: • cost of network • revenue potential of network GRASP and path-relinking: Advances and applications
Local access network design • Build an optical fyber network to provide large bandwidth services to commercial and residential users, taking into account the construction costs (fyber laying) and the potential revenues obtained by providing the services to the selected clients (loss of revenue in the case of clients which are not served). • Prize-collecting Steiner tree problem: application developped for AT&T GRASP and path-relinking: Advances and applications
Local access network design Street (cost) residence (revenue) GRASP and path-relinking: Advances and applications
potential equipment location (cost) coverage area of equipment GRASP and path-relinking: Advances and applications
Locate p boxes to maximize revenue of covered residences. potential equipment location area of coverage GRASP and path-relinking: Advances and applications
Assign to each equipment box the total revenue of residences it covers for which there is no closer box. This is theprize. equipment box GRASP and path-relinking: Advances and applications
Solve prize-collecting Steiner tree problem Maximize prize collected minus edge costs: Here all prizes are collected. GRASP and path-relinking: Advances and applications
Solve prize collecting Steiner tree problem Maximize prize collected minus edge costs: Here not all prizes are collected. GRASP and path-relinking: Advances and applications
Prize collecting Steiner tree problem • Typical dimension: 20,000 to 100,000 nodes. • Use GRASP for maximum covering to locate equipment boxes. • Compute lower bounds with cutting planes algorithm of Lucena & Resende (2000). • Compute solutions (upper bounds) with GRASP (local search with perturbations) algorithm of Canuto, Resende, & Ribeiro (2001). GRASP and path-relinking: Advances and applications
Prize collecting Steiner tree problem • Construction phase (each iteration): • Memory-based perturbation of original costs to diversify previously obtained solutions. • Determine nodes to be collected using Goemans & Williamson (1996) 2-opt primal-dual algorithm. • Connect the selected nodes by a minimum spanning tree. • Local search: add/drop nodes to/from the current tree. • PR: nodes in one solution but not in the other GRASP and path-relinking: Advances and applications
Prize collecting Steiner tree problem • Computational results: • 114 test problems (up to 1,000 nodes and 25,000 edges) • Heuristic found: • 96 out of 104 known optimal solutions. • Solution within 1% of lower bound for 104 of 114 problems. • PR more than doubled the number of optima found. • Cutting plane algorithm produces tight lower bounds but running times are very high for the largest instances (days, even weeks), while the GRASP heuristic averaged less than 3 hours for the same instances. GRASP and path-relinking: Advances and applications