Download presentation
Presentation is loading. Please wait.
Published byJeffrey Simon Modified over 9 years ago
1
Double Fuzzy Stopping Rule for a hybrid metaheuristic for the Strip Packing Problem Jesús David Beltrán, José Eduardo Calderón, Ignacio José García del Amo, Rayco Jorge Cabrera, José A. Moreno Pérez and J. Marcos Moreno-Vega Intelligent Computation Group University of La Laguna. http://webpages.ull.es/users/gci/ gci@ull.es TIC2002-04242-C03-01 (70% FEDER) RASC 2004, Nottingham, December 16-18
2
Abstract The Strip Packing Problem (SPP) consists in packing a given set of rectangles in a fixed width strip minimizing the length or height of the strip used by the packing. The hybrid algorithm: to use a VNS to improve the quality of part of the solution obtained with a GRASP. VNS: Variable Neighbourhood Search. GRASP: Greedy Randomized Adaptive Search Procedure. The Double Stopping Rules decides when to stop each phase of the hybrid based on different characteristics of the solution: interior wastes and outer wastes We formulate in fuzzy terms the double stooping rule.
3
The Problem The Strip Packing Problem (SPP) consists of packing a set of rectangles in a strip minimizing the height of the packing the rectangles can be rotated at 90 0. the cuttings can be non guillotine. (a cutting is guillotine if it goes from a side of the object to the front side; in a non-guillotine cut this can not be true)
4
Literature Many researches have tackled these problems. Lodi, Martello and Monaci (2002) discuss mathematical models, and survey lower bounds, classical approximation algorithms, recent heuristic and metaheuristic methods and exact enumerative approaches for the two-dimensional packing problems. Hopper and Turton (2001) have a review of metaheuristic algorithms to solve two-dimensional strip packing problems. A Genetic approach was proposed for the oriented two- dimensional strip packing problem in Yeung and Tang (2004).
5
Packing Problems Packing problems involve constructing an arrangement of items that minimizes the total space required by the arrangement. These problems are encountered in many areas of business and industry. Some applications can be found in wood, glass, paper, textile or leather industries. It must be note that small improvements can be very valuable for industrial applications of these problems.
6
The Hybrid Metaheuristics The Hybrid: Use VNS to improve the solution provided by GRASP. VNS operates on a part of the solution given by GRASP. VNS attempts to improve the packing of the last rectangles introduced into the solution. w h
7
The Strip Packing Problem (SPP) The Strip Packing Problem (SPP). Consider: a strip of fixed width w and infinite height, a finite set of rectangles, with at least one of their sides less than w. The SPP consists of packing the rectangles in the strip minimizing the total height h (The rectangles can be rotate at 90 degrees) w h
8
The data of the SPP The elements of an instance of the Strip Packing Problem (SPP) are: A strip with fixed width w and infinite height. A set of n rectangles: = {R(w i,h i ): i = 1,..., n } Each rectangle R(w i,h i ) has width w i and height h i verifying: min{ w i, h i } w. hihi w wiwi
9
The solutions of the SPP The solutions are given by placing [(r i, a i,b i ) : i = 1,..., n] of the rectangles R(w i,h i ), i = 1,..., n. where: r i represents if R(w i,h i ) is rotated or not: if r i = 1 then the R(w i,h i ) is rotated at 90º; otherwise r i = 0 and it is not rotated. (a i,b i ) are the coordinates of the position of the bottom-left corner of the rectangle R(w i,h i ) with respect to the origin of coordinates (the bottom-left corner of the strip). bibi wiwi hihi r i = 0 aiai
10
Representing Solutions Representing solutions wiwi hihi wiwi hihi bibi wiwi hihi aiai r i = 0 r i = 1 r i = 0
11
The feasible placings The placing of each rectangle is feasible if The following two conditions are verified: the rectangle is completely included in the strip and it does not overlap with any other rectangle already placed. In other words, If r i = 0 then 0 a i w – w i, 0 b i and the position of no other rectangle R( w j, h j ) verifies: a i < a j < a i + w i and b i < b j < b i + h i If r i = 1 then 0 a i w – h i, 0 b i and the position of no other rectangle R( w j, h j ) verifies: a i < a j < a i + h i and b i < b j < b i + w i
12
Unfeasible Solutions Unfeasible solutions bjbj ajaj bibi wiwi hihi aiai
13
The objective function The objective to be minimized is the maximum height h reached by the rectangles It is computed by: h = max {max (b i +h i ), max (b i +w i )} r i =0 r i =1 Equivalently, the objective is to minimize the area of the strip used It is computed by the product: h · w. w h bibi hihi
14
The Infinite set of Solutions Infinite equivalent feasible solutions could be obtained by shifting horizontally or vertically some rectangles. To avoid it: consider only solutions obtained by introducing successively the rectangles following a given placement strategy. We choose the well known bottom-left strategy
15
The Bottom-left placing We use the usual bottom-left strategy: each rectangle is placed at the deepest location and, within it, in the most left possible location. The space of solutions consists of: the permutations of the numbers [1, 2 ···, n] that represents: the order in which the rectangles are introduced. and a binary vector [r i,..., r n ] that represents if each rectangle is rotated or not.
16
The New Solution Space The space of solutions consists of: the permutations of the numbers [1, 2 ···, n] that represents: the order in which the rectangles are introduced a binary vector [r i,..., r n ] that represents if each rectangle is rotated or not. With the bottom-left strategy: each rectangle is placed at the deepest location and, within it, in the most left possible location.
17
High Quality Solutions h w Small outer waste areas SMALL WASTE AREAS Small interior waste areas
18
Representing the upper contour The upper contour is a series of segments from left to right. It is represented by the coordinates of the segments (the origin is the bottom-left corner of the strip) C = [( y k, x 1 k, x 2 k ): k = 1,...,c], where, for the i-th segment, y k is the y-coordinate (height) of its points and [x 1 k, x 2 k ] is the interval of their x-coordinates. C = [(y 1, x 1 1, x 2 1 ), (y 2, x 1 2, x 2 2 ), … (y k, x 1 k, x 2 k ), … (y c, x 1 c, x 2 c )] This sequence, verifies: x 1 1 = 0 and x 2 c = w, x 1 k+1 = x 2 k, for each k = 1,..., c 1. y k+1 ≠ y k, for each k = 1,..., c 1.
19
Representation of upper contour y1 y1 y4 y4 y3 y3 y2 y2 (y 1,x 1 1,x 2 1 ) (y 2,x 1 2,x 2 2 ) (y 3,x 1 3,x 2 3 ) (y 4,x 1 4,x 2 4 ) 0 = x 1 1 x 2 1 = x 1 2 x 2 2 = x 1 3 x 2 3 = x 1 4 x 2 4 = w C = [(y 1, x 1 1, x 2 1 ), (y 2, x 1 2, x 2 2 ), (y 3, x 1 3, x 2 3 ), (y 4, x 1 4, x 2 4 )]
20
Computing the wastes The maximum height: The Total Waste: The OUT Waste: The IN Waste:
21
(y k,x 1 k,x 2 k ) Updating the upper contour y k 1 y k+1 y k (y k 1,x 1 k 1,x 2 k 1 ) (y k+1,x 1 k+1,x 2 k+1 ) x 1 k x 2 k
22
The GRASP metaheuristic GRASP: Greedy Randomized Adaptive Search Procedure The GRASP metaheuristic has two phases: a constructive phase, that constructs a good initial solution x. an improving phase, that is applied to the initial solution x. (the improving phase consists in a restricted VNS) Both phases are repeated until the stopping criterion is met. [Resende and Ribeiro, 2003]
23
The Constructive Method of GRASP A constructive method: an items is iteratively added to an initially empty structure until a solution of the problem is obtained. A heuristic constructive procedure: The choice of the item based heuristic evaluation(s): measure(s) of the convenience of considering the item as belonging to the solution. An adaptive heuristic constructive algorithm: The evaluation depends on the items already in the solution. The greedy strategy: Choose the item that optimize the evaluation (the best item) A randomized rule: Use random numbers in the choice.
24
The GRASP rule Choose (at random) one of the best items. The evaluations by: The wasted areas The smoothness of the upper contour. The best items are those that best fit: to the lower segment of the upper contour Construct a Restricted Candidate List of items that contains the best items, then choose one item of the list
25
The GRASP pseudocode The Constructive phase: Let x 0 = {} be the initial empty partial solution. Let t ← 0. Repeat the steps: Construct the restricted candidate list RCL(t). Choose at random an element e t+1 of RCL(t). Update the partial solution x t ← x t+1 U e t+1. Set t ← t+1. until there is not element in RCL(t). The post-processing phase: Apply a VNS to the last k packed rectangles
26
Computing the RCL At any iteration t, the RCL(t) is constructed as follows: Let 1 (t) be the inserted rectangles and 2 (t) = \ 1 (t). Let C(t) = [(y i, x 1 i, x 2 i ): i = 1,...,c] be the contour at iteration t. Let s j be the lowest segment of C(t) (minimum height) The rectangles in 2 (t) are evaluated by its adjustment to s j. Let y j = min { y 1, y 2,..., y c } and l = x 2 j x 1 j be its length. Given α [0,1], RCL(t), is built as follows. RCL(t) = { R(w i,h i ) 2 (t): l α ≤ w i ≤ l or l α ≤ h i ≤ l }.
27
Update the RCL If there is not rectangle to choose (with some side less than l) then: The rectangle [x 1 j,x 2 j ]×[y j,min{y j 1,y j+1 ] becomes a wasted area. If y j+1 ≤y j 1 (the other case is similar) then replace: the segments (y j,x 1 j,x 2 j ) and (y j+1,x 1 j+1,x 2 j+1 ) by (y j+1,x 1 j,x 2 j+1 ). ( the size of the contour decreases; i.e., |C(t+1)| = |C(t)| 1 ) Otherwise, If R(w i,h i ) is the selected rectangle of RCL(t) then replace (y j, x 1 j, x 2 j ) by (y j +h i, x 1 j, x 1 j +w i ) and (y j, x 1 j +w i, x 2 j ). ( the size of the contour increases; i.e., |C(t+1)| = |C(t)| + 1 )
28
The VNS Metaheuristics Variable Neighbourhood Search (VNS) is a recent metaheuristic based on systematic change of the neighbourhood in a search. Usual heuristic searches are based on transformations of solutions that determine a neighbourhood structure on the solution space. A neighbourhood structure in a solution space S is a mapping N: S → 2 S. x → N(x). The solutions of y N(x) are the neighbour solutions of x and constitute its neighbourhood N(x). VNS uses a series of neighbourhoods N k, k = 1, …, k max. A local search takes a better neighbour while possible. The basic idea of the VNS is: to change the neighbourhood structure when the local search is trapped on a local minimum. The k-neighbours are obtained by interchanging k rectangles
29
VNS: Variable Neighbourhood Search Initially it takes k ← 1 and a random initial solution x. A local search from x with the neighbourhood N 1 returns x*. These steps are repeated until the stopping condition is met. Take k ← k+1 and a random neighbour y of the local optimum x* using in the neighbourhoods N k ; i.e., y N k (x*). Apply the local search from y using the neighbourhoods N 1. If the local minimum found y* is better than x* then the process is iterated with x* ← y* and k = 1. Otherwise, iterate the process with the current solution x*. When k = k max, generate a new initial solution x and iterate the process with k ← 1. [Hansen & Maldenovic 2001,2003,2004]
30
VND: Variable Neighbourhood descent Given a neighbourhood structure, an improving local search iteratively seeks for a better solution in the neighbourhood of the current solution; therefore it is trapped in a local optimum with respect to the current neighbourhood structure. The VND (Variable Neighbourhood Descent) method changes the neighbourhoods N k each time a local optimum is reached. It ends when there is not improve with the all neighbourhoods The final solution provided by the algorithm should be a local optimum with respect to all k max neighbourhoods.
31
A simple VNS A VNS can be implemented by the combination of series of random and improving (local) searches. When the improving local search stops at a local minimum, a shake procedure performs a random search for a new starting point for a new local search. The improving local search and the random shake procedure are usually based on standard moves that determine neighbourhood structures. A basic local search consists of applying an improving move until no such move exists. A simple shake procedure consists of applying a number of random moves. The stopping condition in a VNS may be maximum CPU time allowed, maximum number of iterations, or maximum number of iterations between two improvements.
32
The General VNS The GVNS (General Variable Neighborhood Search) method applies two (possibly different) series of neighbourhoods; one for the shaking and one for the descent. Several applications use the same set of neighbourhood structures for shaking and descent. The neighbourhoods are often nested and based on a single standard move. Given a base neighbourhood structure N: S → 2 S, the series of nested neighbourhood structure is defined as follows. The first neighbourhoods are the basic ones; N 1 (x) = N(x). and the next neighbourhoods are defined recursively by N k+1 (x) = N(N k (x)). N k (x) consists of the solutions that can be obtained from x by k base moves.
33
The Nested VNS Initialization: Find an initial solution x. Set x* ← x and k ← 1. Iterations: Repeat the following until the stopping condition is met: Shake: Apply k random moves to the solution x to get x’. Local Search: Apply an improving move to the solution x’ until a local minimum x” is found. Improve or not: If x” is better than x*, do x* ← x” and k ← 1. Otherwise do k ← k+1. Set x ← x*.
34
Further details For the local search we use the greedy strategy: at step 2b an iterative procedure tests all the base moves, and that providing the best solution is made until no improving move exists. The shake consists of applying k of random base moves. This number of random moves is the size of the shake. The base move for problems with solutions represented by permutations is the interchange move that consists in the exchange of the position of two elements of the permutation. The random generation of solutions is performed by successively selecting one of the remainder elements with the same probability.
35
The Hybrid approach The hybrid approach proposed is obtained by using a nested Variable Neighborhood Search in the post- processing phase of the above GRASP. The GRASP constructs a solution by inserting at random a rectangle of the RCL; it gets small interior waste. The VNS gets a better packing of the last packed rectangles; it increases the smothness of the upper contour
36
The Hybrid approach The last packed rectangle(s) by GRASP
37
The VNS/GRASP hybrid Apply the constructive phase of the GRASP. Let [R 1, R 2, …, R n ] be the solution provided by the GRASP. Let [R’ 1, R’ 2, …, R’ k ] be the last k rectangles of the solution. Apply the nested VNS on the solution space consisting of: all the permutations of the rectangles [R’ 1, R’ 2, …, R’ k ] to be packed in the free strip. Let [R* 1, R* 2, …, R* k ] be the best permutation obtained by the nested VNS Return the solution [R 1, R 2, …, R n k,R* 1, R* 2, …, R* k ].
38
The Stopping Rules (SR) One of the elements most influent in the success of the search procedures to solve a problem is the stopping criterion applied. The stopping rules must provide an appropriated trade-off between efficiency and efficacy of the solution procedure by detecting when a high quality solution is reached. Our double stopping rule decides when to stop both phases of the hybrid metaheuristic. The GRASP stops when it gets a solution with small inner waste. The VNS stops when it gets a solution also with smooth contour; i.e., a solution with small total waste. We use fuzzy set techniques to formalize these stopping rules.
39
Fuzzy SR in the literature In Sancho-Royo et al. (1999) we found the first fuzzy stopping rules in the literature that are used for exact algorithms. Those rules are based on the fact that most of the decision makers would accept solutions that are not optimal but good enough; they use membership functions depending on the objective for good solutions. The corresponding -cuts determine general and robust stopping criteria. The Fuzzy sets-based heuristic FANS (Blanco et al. (2002)) is the first metaheuristic that incorporate fuzzy sets and it includes the use of a fuzzy or subjective valuation of the solutions, that is one of its most relevant elements.
40
General Stopping Rules The stopping rules, like the solution procedures, can be general or specific. From the point of view of of Metaheuristics field, where the generality of the procedures is one of the most relevant desirable characteristics, the stopping rules must also be general. However, as we show in Beltrán et al. (2004), the stopping rules depending of the problem are more efficient and effective. The basic general or independent of the problem stopping rules are those based on the computation time, number of iterations or number of times an basic procedure is applied (for instance, number of solution evaluations). These quantities are alternative ways to measure computational resource. The stopping criterion is to stop when this number is “large enough”. General fuzzy stopping rule are obtained by considering the set of “large enough” numbers defined by the membership function: (x) = 1 – /x, where is a parameter provided by the decision maker.
41
Specific Stopping Rules In the other hand, specific or problem dependent stopping rules use properties or characteristics of the problem or its solutions. We showed in Beltrán et al. (2004) that the stopping rules depending of the problem are more efficient and effective. Our stopping rules for the SPP use the property of high quality. The inner and outer wastes are two characteristics that indicate the quality of two parts of the solution. Solutions with a “small” wastes are high quality solutions. In Moreno Pérez and Moreno-Vega (2003) we use small inner waste and smooth contour to define a fuzzy stopping rule for a GRASP procedure. Here we use the fuzzy concepts of small wastes to define a double fuzzy problem-dependent stopping rules.
42
Our Fuzzy Stopping Rules Let [0,1] be a value fixed by the decision maker. The set of solutions with small waste is given by the membership function given by (X, )= 1 – W(X)/A. The membership function of a solution is 1 if there is not waste (W(X) = 0), and decreases linearly when the waste W(X) increases. A fuzzy stopping rule based on the waste stops the search when the process finds a solution with small waste. This can be applied to inner, outer and total waste. The smooth contour is given by small outer waste. For the GRASP/VNS hybrid we propose a double fuzzy stopping rule consisting in stopping the first phase when it finds a solution with small inner waste and stopping the second phase when it finds a solution also with small inner waste; i.e., with small total waste.
43
Practical implementations The decision maker fixes the level for the -cut. For instance, to stop the search when (X, ) 1 – , that is, when W(X)/A (1 – )/. The concrete values for the two parameters that appear in the stopping rules can be fixed together. So, to say that the percentage of inner waste must be no more than 5% of the total area A we set (1 – )/ = 0.05. For the total waste, since it depends directly to the height h, it is practically equivalent to fix the absolute or relative gap with respect to the ideal height; i.e. h opt = A/w.
44
Computational Experiments The computational experiments were performed to analyse the performance of the double fuzzy stopping rule for the GRASP/VNS in solving the Strip Packing Problem. The fuzzy stopping rules bound the values for the percentages of waste. The double stopping rule stops the first phase when the inner waste is less than a given percentage of the total area of the rectangles and the second phase when total waste is less than a corresponding percentage. We compare the results obtained with the GRASP/VNS hybrid metaheuristics using the double stopping rule compared with a Simulated Annealing (Hopper and Turton (2001) that also uses the bottom-left strategy.
45
Test Instances for the comparative analysis The instances used in: Hopper and Turton (2001) Data are available on the OR-Library at: http://mscmga.ms.ic.ac.uk/jeb/orlib/stripinfo.html 120 80 97 C6C6 90 60 73 C5C5 60 49 C4C4 30 60 28 29 28 C3C3 15 40 25 C2C2 20 16 17 16 C1C1 h opt w nCategory C7C7 196 197 160 240
46
Comparative table EXACTGRASP + VNSSA + BLF Category h opt h t (sec) h t (min) C1C1 2021.0001.1220.80.7 C2C2 1516.66736.11615.92.4 C3C3 3032.16781.30231.54 C4C4 6063.467139.02361.833 C5C5 9094.16790.47192.71157 C6C6 120126.300177.653123.6382 C7C7 240252.100373.716249.64181
47
Conclusions The double fuzzy stoping rule allows to get solutions with high quality that have small interior waste and smooth upper contour. This stopping rule applied to the VNS/GRASP hybrid provide solutions with similar quality in a less order of magnitude computation time than classical SA + BLF approach
48
Double Fuzzy Stopping Rule for a hybrid metaheuristic for the Strip Packing Problem Intelligent Computation Group. University of La Laguna. http://webpages.ull.es/users/gci/ gci@ull.es RASC 2004, Nottingham, December 16-18 THANKS
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.