Presentation is loading. Please wait.

Presentation is loading. Please wait.

FEUP | PDEEC | Decision Support January 3 rd, 2011 Metaheuristics: GRASP Group 1: Clara Gouveia Daniel Oliveira Fabrício Sperandio Filipe Sousa [Presenter]

Similar presentations


Presentation on theme: "FEUP | PDEEC | Decision Support January 3 rd, 2011 Metaheuristics: GRASP Group 1: Clara Gouveia Daniel Oliveira Fabrício Sperandio Filipe Sousa [Presenter]"— Presentation transcript:

1 FEUP | PDEEC | Decision Support January 3 rd, 2011 Metaheuristics: GRASP Group 1: Clara Gouveia Daniel Oliveira Fabrício Sperandio Filipe Sousa [Presenter] Group 1: Clara Gouveia Daniel Oliveira Fabrício Sperandio Filipe Sousa [Presenter]

2 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 2  GRASP Overview  Construction Phase  Local Search Phase  GRASP Example  GRASP Variations  3D BPP Definition  2D BPP Definition  Hybrid GRASP/VND for BPP  Preprocess Phase  Construction Phase  Improvement Phase  Improvement Procedures  Combined Strategies  Diversification Phase  Computational Results  Comparison with other Algorithms  Conclusions Outline

3 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 3 G R A S P reedy andomized daptive earch rocedure GRASP Overview

4 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 4 GRASP Overview GRASP is a metaheuristic:  A metaheuristic is a method that works with local improvement procedures and other higher level strategies to create processes capable of escaping from local optima, and performing a robust search of a solution space. GRASP was first described in 1989:  Published by Thomas A. Feo and Mauricio G. C. Resende.  In this first publication GRASP was applied to the set covering problem. References: M. Gendreau, and J. Potvin. Handbook of Metaheuristics. 2nd edition, Springer, 2010. T. A. Feo, and M. G. C. Resende. A Probabilistic Heuristic for a Computationally Difficult Set Covering Problem. Operations Research Letters, no. 8, pp. 67-71, 1989.

5 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 5 GRASP Overview References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. M. G. C. Resende. Greedy Randomized Adaptive Search Procedures (GRASP). AT&T Labs Research Technical Report, 98.41.1, Dec. 1998. M. G. C. Resende, and Celso C. Ribeiro. Greedy Randomized Search Procedures. AT&T Labs Research Technical Report TD-53RSJY, version 2, Aug. 2002 GRASP can be divided in two phases:  Construction: where a feasible solution is built.  Local Search: from the solution obtained a neighborhood is built and the search is then performed. Best Solution For N iterations Improved Solution Local Search PhaseConstruction Phase

6 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 6 GRASP Overview References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. M. G. C. Resende. Greedy Randomized Adaptive Search Procedures (GRASP). AT&T Labs Research Technical Report, 98.41.1, Dec. 1998. M. G. C. Resende, and Celso C. Ribeiro. Greedy Randomized Search Procedures. AT&T Labs Research Technical Report TD-53RSJY, version 2, Aug. 2002 GRASP is easy to implement:  Few parameters need to be set and tuned.  Effort can be transferred to the implementation of efficient data structures. GRASP is also easily implemented in parallel. Best Solution For N iterations Improved Solution Local Search PhaseConstruction Phase Improved Solution Local Search PhaseConstruction Phase compare

7 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 7 Construction Phase References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. M. G. C. Resende. Greedy Randomized Adaptive Search Procedures (GRASP). AT&T Labs Research Technical Report, 98.41.1, Dec. 1998. M. G. C. Resende, and Celso C. Ribeiro. Greedy Randomized Search Procedures. AT&T Labs Research Technical Report TD-53RSJY, version 2, Aug. 2002 The RCL (Restricted Candidate List) is built based on the α parameter:  α is variable between 0 and 1:  0 makes the construction too random.  1 makes the construction too greedy.  If β is the best free element and Σ represents the free elements, RCL is composed by:  RCL U {Σ ≥ α.β} Build RCLInitialize elements Randomly choose an element Update Solution Contructed Solution Repeat until element list is empty Update Candidate List

8 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 8 Construction Phase References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. M. G. C. Resende. Greedy Randomized Adaptive Search Procedures (GRASP). AT&T Labs Research Technical Report, 98.41.1, Dec. 1998. M. G. C. Resende, and Celso C. Ribeiro. Greedy Randomized Search Procedures. AT&T Labs Research Technical Report TD-53RSJY, version 2, Aug. 2002 The randomness of GRASP is present when an element is picked by chance from the RCL. After the element is added to the current solution the cost of each free element is updated:  This is the adaptive part of the GRASP metaheuristic. Build RCLInitialize elements Randomly choose an element Update Solution Update Candidate List Contructed Solution Repeat until element list is empty

9 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 9 Local Search Phase References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. M. G. C. Resende. Greedy Randomized Adaptive Search Procedures (GRASP). AT&T Labs Research Technical Report, 98.41.1, Dec. 1998. F. Parreño, R. Alvarez-Valdes, J. F. Oliveira, and J. M. Tamarit. A hybrid GRASP/VND algorithm for two- and three-dimensional bin packing. Annals of Operations Research, vol. 179, no. 1, pp. 203-220, Oct. 2008. The Create Neighborhood can be implement in several different ways:  This is problem dependent.  The stopping criteria varies with the implemented method. Create Neighborhood Select Best Solution Contructed Solution Repeat until stopping criteria is satisfied Compare with Existing Best Improved Solution

10 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 10 GRASP Example References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995.  Set Covering Problem:  Having α = 40% implies a RCL = {P 1, P 4, P 5, P 6, P 7 }.  Randomly selecting P 5 translates into:  Covering elements 3, 4, and 5.  The next GRASP step consists in the candidate list update. P1P1 P2P2 P3P3 P4P4 P5P5 P6P6 P7P7 P8P8 X1 XXX2 XXXXX3 XXXXX4 XX5 21133321

11 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 11 GRASP Example References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. Set Covering Problem:  RCL = {P 3, P 4, P 6, P 7 }.  Randomly choosing P 3 leaves P 6 as the only option:  Translates into solution {P 5, P 3, P 6 }. P1P1 P2P2 P3P3 P4P4 P5P5 P6P6 P7P7 P8P8 X1 XXX2 3 4 5 00110110

12 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 12 GRASP Example References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. Set Covering Problem:  Once again, having α = 40% implies a RCL = {P 1, P 4, P 5, P 6, P 7 }.  However, if P 6 had been randomly chosen, and then P 4 we would have reached an optimal solution:  {P 6, P 4 }. P1P1 P2P2 P3P3 P4P4 P5P5 P6P6 P7P7 P8P8 X1 XXX2 XXXXX3 XXXXX4 XX5 21133321

13 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 13 GRASP Variations References: T. A. Feo, and M. G. C. Resende. Greedy Randomized Adaptive Search Procedures. Journal of Global Optimization, no. 6, pp. 109-133, 1995. M. G. C. Resende, and Celso C. Ribeiro. Greedy Randomized Search Procedures. AT&T Labs Research Technical Report TD-53RSJY, version 2, Aug. 2002 Reactive GRASP:  RCL size is adjusted according to the quality of the solutions previously found. GRASP using GA (Genetic Algorithm) methodology :  Introduces a mutation in the local search phase. GRASP with cost perturbation:  The cost associated with an element is modified in some way to cause a perturbation in the greedy function. Other variations exist...

14 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 14 Outline  GRASP Overview  Construction Phase  Local Search Phase  GRASP Example  GRASP Variations  3D BPP Definition  2D BPP Definition  Hybrid GRASP/VND for BPP  Preprocess Phase  Construction Phase  Improvement Phase  Improvement Procedures  Combined Strategies  Diversification Phase  Computational Results  Comparison with other Algorithms  Conclusions

15 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 15 Part Two: Paper Presentation A hybrid GRASP/VND algorithm for two- and three-dimensional bin packing. F. Parreño, R. Alvarez-Valdes, J.F. Oliveira, and J.M. Tamarit Annals of Operations Research Volume 179, Number 1, Pages 203-220, 25 October 2008.

16 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 16 3D BPP Definition The three-dimensional bin packing problem (3BP):  NP-hard problem.  Useful for industrial applications (loading cargo into pallets, containers or vehicles, or packaging design). Assumptions:  Known dimensions:  Bin (W,H,D).  Boxes (wi,hi, di ), (i = 1,..., n).  w i ≤ W, h i ≤ H, and d i ≤ D.  The items cannot be rotated.

17 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 17 2D BPP Definition The two-dimensional bin packing problem (2BP):  Special case of 3BP where d i =D, i=1,..., n. Assumptions:  Known dimensions:  Bin (W,H).  Boxes (w i,h i ), (i = 1,..., n).  w i ≤ W, and h i ≤ H.  The items cannot be rotated.

18 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 18 Hybrid GRASP/VND for BPP k=1; f=[] B={b 1,...,b n } Preprocess B={b 1,...,b m } S={E} Constructive Phase k=k+1 Target: n-1 Improvement Phase f=[] YES NO YES NO YES NO Inputs:  Items to pack.  Number of iterations.  Alpha. Preprocess:  Simplify the problem. Constructive Phase:  Develop a feasible solution. Improvement Phase:  Improves the solution.

19 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 19 Hybrid GRASP/VND for BPP Constructive Phase (1) Choose Maximal Space – S* (0) Initialization (2) Choose Boxes to Pack (3) Update List S Vectors with boxes left to pack:  B={b 1,...,b m }. Set of empty maximal spaces:  S={E}.

20 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 20 Hybrid GRASP/VND for BPP Constructive Phase: Step 1 (1) Choose Maximal Space – S* (0) Initialization (2) Choose Boxes to Pack (3) Update List S Choose Maximal Space:  Maximal Space (S*): maximal space in S closer to a corner.  The volume can be used as a tie breaker. Objective:  First fill the corners.  Then the sides.  Later the inner space.

21 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 21 Hybrid GRASP/VND for BPP Constructive Phase: Step 2 (1) Choose Maximal Space – S* (0) Initialization (2) Choose Boxes to Pack (3) Update List S Choose Boxes to Pack:  Boxes fitting in S* can be packed:  Individually.  Layer: several boxes with the same dimensions.  Using one of the following criteria:  Best volume: order by the box that produces the largest increase in the bin volume.  Best fit: order by the box which fits best in the maximal space.  The box to be moved is selected randomly among the (1-α)*100% blocks.  α is the RCL GRASP parameter.

22 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 22 Hybrid GRASP/VND for BPP Constructive Phase: Step 2 (1) Choose Maximal Space – S* (0) Initialization (2) Choose Boxes to Pack (3) Update List S α parameter:  Responsible for the random selection of the boxes to pack.  The authors used the reactive-GRASP principle to determine α:  α is initially chosen randomly from the discrete set {0.1, 0.2,...,0.9}.  After some iterations the probability distribution of α is adjusted taking into account the relative quality of the solutions.  This incorporates a learning mechanism in GRASP, which is memory less in its constructive phase.

23 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 23 Hybrid GRASP/VND for BPP Constructive Phase: Step 3 (1) Choose Maximal Space – S* (0) Initialization (2) Choose Boxes to Pack (3) Update List S

24 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 24 Hybrid GRASP/VND for BPP Improvement Phase Initial Procedure Improvement Procedures Repacking Objects Combined Procedures Order Solution by Non-increasing Volume Procedure 1Procedure 2Procedure 3 Procedure 4 Local Search Best FitBest Volume VND (N 1, N 2, N 3, N 4 ) VNDseq (N 1, N 2, N 3, N 4 ) All Moves 1→ 4

25 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 25 Improvement Phase Improvement Procedures Procedure 1:  Eliminates the last k% items in the solution.  k is a random value between 30 and 90%. Procedure 2:  Removes the last k% pieces packed from each bin, whose occupied volume is less than the average. Procedure 3:  Select all the bins in which the occupied volume is lower than the overall average occupancy.  Split each bin into two parts randomly selecting how to cut: vertically or horizontally.  Choose randomly one side of the bin: [up/down left/right]:  Remove all boxes that are mostly in the selected side.

26 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 26 Procedure 4 – Local Search:  Neighborhood: consists in all pairs of bins in which at least one have an occupancy bellow the average.  Search method:  For each pair in the neighborhood unpack all the items.  The first box to pack must be one of the boxes that was not packed (initial solution).  The moves are chosen considering one of the following criteria:  First Improve: select the first pair which improves the current solution.  Best Improve: Examine all the neighborhood and select the best improvement.  The move improves the solution if the total volume of boxes packed into the bins increases. Improvement Phase Improvement Procedures

27 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 27 All moves:  The improvement procedures are applied: 1→ 4. VND (Variable Neighborhood Descent):  Neighborhood (N 1 to N 4 ): generated by the four improvement procedures.  Start with the solution given by the constructive heuristic (x): 1.set p ← 1 2.while p <= 4 a)Exploration of the neighborhood to find the best x’ in the neighbor N p (x). b)Move if x’ is better then x. Return to p ← 1. Otherwise set p ← p +1. VND seq (Sequential Variable Neighborhood Descent):  Similar to VND but:  In step 2.a) instead of setting p=1, the algorithm proceeds sequentially to the (p+1) th. Improvement Phase Combined Strategies

28 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 28 Computation and Data Sets:  The algorithm was coded in C++ and run on a standard laptop.  2D and 3D data sets were used in order to test the proposed algorithm:  For the 3D simulation, a standard benchmark generated by Martello et al was used. This data set was also used by Faroe et al.  For the 2D simulation, more than one data set was used. To compare with already published results of other heuristics. Computational Results

29 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 29 Choosing the best strategy :  Constructive Phase:  Number of corners to consider:  [1, 2, 3, 4] for the 2D BPP.  [1, 2, 3, 4, 8] for the 3D BPP.  Deterministic or random constructive phase.  Improvement Phase:  Compare the performance of the four improvement methods individually.  Compare the performance of the combined improvement methods.  Comparison with other algorithms to solve 2D and 3D BPP. Computational Results Experiments

30 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 30 Applying the constructive phase with randomization:  Each improvement methods were tested with both objective functions: Best Volume and Best Fit.  At each iteration one of the four strategies to choose the corner is randomly selected.  The algorithm run for 5000 iterations. Computational Results Constructive DeterministicRandom 2D76357492 3D101489877 Overall1778317369 The results obtained for each dataset showed that using the randomized constructive algorithm proved to be better than the determinist.

31 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 31 2D:  Method 4 was the best independently of the objective function used.  Method 2 with best fit approach also produced good results. 3D  For both objective functions, method 4 performed better followed by method 2. Computational Results Improvements Best VolumeBest Fit 12341234 2D7492 749474787492748474947476 3D98769867987598209877986598719828 Overall1736817359173691729817369173491736517304

32 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 32 Computational Results Combined Improvement The diversification algorithm is applied after 500 iterations without improvement in the following 100 iterations. The analysis of the three strategies for the combination of improvements shows:  2D/3D:  “All moves” is the worst strategy.  Small difference among the others. The method chosen for the final implementation was:  VND seq + Diversification.

33 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 33 2D statistical analysis show:  GRASP is better than TS3 and it favors GRASP against the others algorithms. 3D statistical analysis show:  GRASP and SCH are significantly better than TS3, GLS, and HBP. GRASP and SCH achieved optimal solutions:  Indicates a good performance of the proposed algorithm. Comparison with other Algorithms

34 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 34 Regarding the GRASP algorithm:  Grasp consists in a constructive phase followed by a local search procedure.  It is easy to implement due to the reduced number of parameters  Parameter α defines the randomness of Grasp  Basic version of GRASP does not have memory. It can be combined with other procedures such as reactive GRASP that adjust α. Hybrid GRASP/VND for BPP:  Combination of GRASP with VND allowed the algorithm to obtain high quality solutions.  The quality of the solutions were similar to well known algorithms to solve 2D and 3D BPP.  Reinforces the fact that GRASP is flexible and could be adapted easily to accommodate constraints or other conditions. Conclusions

35 FEUP | PDEEC | Decision Support Metaheuristics: GRASP Thank you for your attention!!! Questions?

36 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 36 Frequency Vector: frequency that each item is not packed into the available bins.  Whenever an improved solution is found the frequency vector is initialized. After n iterations without any improvement:  The constructive phase is changed:  The first box to be placed in each bin is the box with the largest frequency value.  Only one of this difficult items are packed into new bins to avoid bad solutions.  The diversification phase does not start until half of the total iterations or half the total computation time. Hybrid GRASP/VND for BPP Diversification Phase

37 FEUP | PDEEC | Decision Support Metaheuristics: GRASP 37 Hybrid GRASP/VND for BPP Preprocess Phase Transforms the original instance into an simple equivalent. Procedure:  Identifies the boxes equal to half of the volume of the bin j.  Build the set of items that can be packed with boxes j.  The items are packed into bins and discard to from the problem. Reduces the problem dimension.


Download ppt "FEUP | PDEEC | Decision Support January 3 rd, 2011 Metaheuristics: GRASP Group 1: Clara Gouveia Daniel Oliveira Fabrício Sperandio Filipe Sousa [Presenter]"

Similar presentations


Ads by Google