• Aucun résultat trouvé

An Exact Algorithm for the Two- Dimensional Orthogonal Packing Problem with Unloading Constraints

N/A
N/A
Protected

Academic year: 2022

Partager "An Exact Algorithm for the Two- Dimensional Orthogonal Packing Problem with Unloading Constraints "

Copied!
33
0
0

Texte intégral

(1)

______________________________

An Exact Algorithm for the Two- Dimensional Orthogonal Packing Problem with Unloading Constraints

Jean-François Côté Michel Gendreau Jean-Yves Potvin

April 2013

CIRRELT-2013-26

G1V 0A6 Bureaux de Montréal : Bureaux de Québec :

Université de Montréal Université Laval

C.P. 6128, succ. Centre-ville 2325, de la Terrasse, bureau 2642 Montréal (Québec) Québec (Québec)

Canada H3C 3J7 Canada G1V 0A6

Téléphone : 514 343-7575 Téléphone : 418 656-2073 Télécopie : 514 343-7121 Télécopie : 418 656-2624

(2)

1 Interuniversity Research Centre on Enterprise Networks, Logistics and Transportation (CIRRELT)

2 Department of Computer Science and Operations Research, Université de Montréal, P.O. Box 6128, Station Centre-Ville, Montréal, Canada H3C 3J7

3 Department of Mathematics and Industrial Engineering, École Polytechnique de Montréal, P.O.

Box 6079, Station Centre-ville, Montréal, Canada H3C 3A7

Abstract.

This paper describes a branch-and-cut algorithm for solving a two-dimensional orthogonal packing problem with unloading constraints, which often occurs as a subproblem of mixed vehicle routing and loading problems. At each node of the branching tree, cuts are generated to find a feasible integer solution to a one-dimensional contiguous bin packing problem. If an integer solution is obtained, an auxiliary problem is then solved to find a feasible two-dimensional packing of the items. Different techniques to reduce the size of the solution space and uncover infeasibility are also described. A numerical comparison with the best known exact method is reported at the end on benchmark instances.

Keywords: Vehicle routing, unloading constraints, packing, branch-and-cut.

Acknowledgements.

Financial support for this work was provided by the Natural Sciences and Engineering Research Council of Canada (NSERC). This support is gratefully acknowledged

.

Results and views expressed in this publication are the sole responsibility of the authors and do not necessarily reflect those of CIRRELT.

Les résultats et opinions contenus dans cette publication ne reflètent pas nécessairement la position du CIRRELT et n'engagent pas sa responsabilité.

_____________________________

* Corresponding author: Jean-Yves.Potvin@cirrelt.ca

Dépôt légal – Bibliothèque et Archives nationales du Québec Bibliothèque et Archives Canada, 2013

(3)

1 Introduction

Typically, when solving a mixed vehicle routing and loading problem, a delivery route is first generated and then a feasibility check is performed to determine if the goods can be feasibly packed inside the vehicle. This feasibility problem, in two dimensions (2D) or three dimensions (3D), is far from obvious and the work reported here focuses on this issue.

Let us consider the delivery route R of two-dimensional rectangular objects (called items, thereafter), which is defined as a sequence of cardinality Rover a set of customers J = {1,2, ..., R}. Without loss of generality, we will assume in the following that customerj is the j-th customer in the sequence, that is, customer 1 is delivered first, customer 2 is delivered second, etc. Let us also consider the set of items I = {1, ..., n} to be delivered to the customers, where each item i ∈ I is characterized by its width wi, its height hi, as well as its associated customer and delivery order seqi ∈ {1,2, ..., R} in route R. Note that all items delivered to a given customer have the same delivery order. The loading area of the vehicle (called bin, thereafter) has width W and height H. Given these assumptions, we want to know if the items can fit inside the bin, that is, without overlap and in such a way that the items of any given customer are directly available at delivery time (i.e., the items can be moved out by directly pulling each one of them outside of the bin without moving any other item). The latter characteristic will be referred to as the unloading constraints. It should be noted that the unloading constraints are also referred to assequential loading,rear loading,multi-droporLIFO constraints in the literature. We prefer unloading constraints because these constraints relate to the deliveries.

Figure 1 presents an example for a route that starts from the depot 0 and then visits the customers 1, 2, 3, 4 and 5. Figures 1(a) and 1(b) show two possible packings for this route: the first one satisfies the unloading constraints while the second one does not (note that the items are taken out from the top of the bin, which corresponds to the rear of the vehicle). In the second case, the items of customers 2 must clearly be moved to allow the items of customer 1 to be unloaded.

This problem is the classical 2D Orthogonal Packing Problem (2OPP) with the addition of unloading constraints (UL). The 2OPP is often found as a subproblem of the2D Strip Packing Problem (2SPP) and the2D Bin Packing Problem (2BPP).

Recent exact methods for the 2OPP can be found in [7, 11, 14, 24], while exact methods for the 2SPP are found in [2, 3, 6, 10, 23]. A recent work on the 2SPP with unloading constraints is also reported in [26] where a GRASP heuristic, previously proposed in [1], and two approximation algorithms are used to solve the problem.

The 2OPP-UL occurs in several papers as a subproblem of mixed vehicle routing and loading problems, when unloading constraints apply as well. In these problems, a fleet of vehicles must visit a set of customers while minimizing the total traveled distance. In addition, the items in the route of each vehicle must be feasibly packed.

(4)

Infeasible 0

0 3

1 1 1

1 5

2

4 2 2

3 1 3 4

4 5

5 5 H

y

Wx 0

H y

Wx

5 3

4 4

3 1

2 2

5 5

1 1 1

Feasible

Figure 1: Packing examples

The literature on this problem distinguishes four main variants, depending if the items can be rotated by 90 degrees (non-oriented) or not (oriented) and if unloading constraints apply or not:

• 2|OU|: two-dimensional oriented with unloading constraints;

• 2|OR|: two-dimensional oriented without unloading constraints;

• 2|N U|: two-dimensional non-oriented with unloading constraints;

• 2|N R|: two-dimensional non-oriented without unloading constraints.

Our work focuses on the 2|OU| variant. The 2|OR| and 2|N R| variants are related to the 2OPP and a vast literature can be found on the subject. We believe that the work reported here can also be generalized to the non-oriented variant 2|N U|.

The heuristics reported in the literature for mixed vehicle routing and loading problems are often local search heuristics which are designed to improve the current solution by applying some modification to it (see, for example, [12, 15, 16, 22, 29]).

A modification to a vehicle route is accepted only if all constraints related to the packing are satisfied. This is typically verified with simple heuristics like the Bottom- Left, Bottom-Left Fill and Touching Perimeter heuristics [29].

Only a few exact algorithms are reported in the literature for these problems due, in particular, to the inherent difficulty of the packing. In [20], a branch-and- cut algorithm is proposed where the classical Bottom-Left heuristic if first used and, if it fails, an exact branch-and-bound algorithm based on the work in [23]

is applied. More recently, the authors in [9] describe a branch-and-cut-and-price

(5)

algorithm where a similar, but more involved, tree-based search is proposed. A lower bound that takes into account the unloading constraints is also reported. The reader is referred to the exhaustive surveys in [5, 19] for the three-dimensional case.

When considering the 2OPP, a relaxation known as the One-dimensional Con- tiguous Bin Packing Problem (1CBP) can be used to generate an initial lower bound on the required height of the bin. This relaxation is defined as follows:

Definition 1.1 Given that each item i of width wi is cut into hi slices of unitary height, we ask for the packing of all slices into a minimum number of bins of capacity W, in such a way that if the first slice of item i is packed into bin j, then the kth slice is packed into bin j+k,k∈ {1,2, ..., hi}.

The number of bins obtained is a lower bound on the required height H. That is, if the resulting lower bound is larger than H then the problem is infeasible, otherwise the problem remains undecided. Note that if we have a feasible solution for the 2OPP, a feasible solution of the 1CBP can be obtained by considering the y coordinate of the bottom-left corner of each item as the height position of its starting slice in the 1CBP. Conversely, one could try to build a feasible solution for the 2OPP from a 1CBP solution by using the height position of the first slice of every item as the set ofy-coordinates and then by determining a set ofx-coordinates that does not lead to any overlap. This kind of two-phase approach can be found in [10], although the authors go the other way around by first solving for the x- coordinates and then, for the y-coordinates. Intuitively, this approach looks good in our case, given that the width W (x-axis) of a vehicle’s loading area is typically smaller than its heightH (y-axis). It means that the first problem is smaller, while the second problem exhibits a larger degree of freedom when suitabley-coordinates must be found. Unfortunately, a preliminary computational study has shown that the structure of the x-coordinates obtained by solving the first problem seems to preclude, in most cases, the identification ofy-coordinates that satisfy the unloading constraints.

Given the above observations, we propose a branch-and-cut algorithm to solve the 2OPP-UL, where the 1CBP is first solved to get y-coordinates, followed by a so-called x-check problem to get the corresponding x-coordinates. Several prepro- cessing routines and inequalities that take into account the unloading constraints are also proposed to tighten the problem.

The remainder of the paper is organized as follows. A basic mathematical model is first introduced in Section 2. Then, the outline of the problem-solving methodol- ogy is explained in Section 3. Various inequalities for LP relaxations of the 1CBP are reported in Section 4, including a description of the separation routines associ- ated with these inequalities. Section 5 describes the various preprocessing routines, while the lower bounds are presented in Section 6. Computational results are finally reported in Section 7.

(6)

2 Model

In the following, the mathematical notation is first presented. Then, the notion of normal patterns is introduced to reduce, without impairing optimality, the set of solutions to be examined. After these preliminaries, an integer programming model for the 2OPP-UL is reported.

2.1 Notation

The following notation will be used throughout the paper:

• Ii : set of items with delivery orderi(same customer),

• Ii= : set of items delivered at the same time than item i,

• Ii< : set of items delivered before item i,

• Ii<,w : set of items delivered before item iof width> w,

• Ii> : set of items delivered after item i,

• Ii>,w : set of items delivered after item iof width> w,

• Σ>(i)=P

k∈I\{i}

seqk>seqi

wkhk : total area of the items delivered after itemi,

• Σ>,w(i) =P

k∈I\{i}

seqk>seqi

wk>w

wkhk : total area of the items of width> w delivered after itemi,

• Σ<(i,j) = P

k∈I\{i,j}

seqi<seqk<seqj

wkhk : total area of the items delivered after item i but before itemj,

• Σ<,w(i,j) =P

j∈I\{i,j}

seqi<seqk<seqj

wk>w

wkhk : total area of the items of width> w delivered after itemibut before itemj.

This notation is extended in the following to include items that are delivered at the same time than itemi (i.e., the <and > signs are replaced by ≤and ≥ signs, respectively).

2.2 Normal Patterns

In general, the bottom-left corner of a given itemi∈I can be found at every (x, y) coordinate where x ∈ [0, W −wi] is the width position and y ∈ [0, H−hi] is the

(7)

height position. This set of coordinates can however be reduced by considering only normal patterns [18], which are defined as follow:

PiW ={x= X

j∈I\{i}

wjξj : 0≤x≤W −wi, ξj ∈ {0,1}, j∈I\{i}} (1)

PiH ={y= X

j∈I\{i}

hjξj : 0≤y ≤H−hi, ξj ∈ {0,1}, j ∈I\{i}} (2)

When the unloading constraints are considered, the set PiH can be reduced by observing that items to be delivered after item icannot be over it:

PiH ={y= X

j∈Ii\{i}

hjξj : 0≤y≤H−hi, ξj ∈ {0,1}, j∈Ii\{i}} (3)

We define PW = S

i∈IPiW and PH = S

i∈IPiH as the set of all possible width and height positions. We also define the setPiW(r) as the set of positions that cover width position r. The setPiH(t) is defined similarly for height positiont:

PiW(r) ={x∈PiW : [r−wi+ 1]+≤x≤r}, i∈I, r∈PW (4)

PiH(t) ={y ∈PiH : [t−hi+ 1]+≤y≤t}, i∈I, t∈PH 2.3 Mathematical model

Given the decision variables

• xir is 1 if the bottom-left corner of item i is located at width position r, 0 otherwise,i∈I,r ∈PiW;

• yit is 1 if the bottom-left corner of item i is located at height position t, 0 otherwise,i∈I,t∈PiH,

we formulate the 2OPP-UL as follow :

(8)

(2OPP-UL) X

r∈PiW

xir = 1 i∈I (5)

X

t∈PiH

yit= 1 i∈I (6)

X

r∈PiWr)

xir+X

r∈PjWr)

xjr+X

t∈PiHt)

yit+X

t∈PjHt)

yjt ≤3 i∈I, j ∈Ii=,r¯∈PW,t¯∈PH(7) yi¯t+X

r∈PiWr)

xir+X

r∈PjWr)

xjr+X

t∈PjHt) t≤¯t+hi−1

yjt ≤3 i∈I, j ∈Ii<,r¯∈PW,t¯∈PiH(8)

xir ∈ {0,1} r ∈PiW, i∈I (9) yit∈ {0,1} t∈PiH, i∈I (10) Constraints (5) and (6) impose a (x,y) coordinate for each item. Constraints (7) insure that no pair of items covers the same (x,y) coordinate. In particular, if items iand j overlap, it is possible to find a coordinate (x,y) such that the left hand side of constraint (7) equals 4. The unloading constraints are imposed through (8). If item i is to be delivered after j and both items cover the same x coordinate (i.e., the summation of the two terms involving the x-coordinates equals 2), then itemj cannot be belowi(i.e., the summation of the two terms involving they-coordinates must be smaller than or equal to 1). The number of constraints of types (7) and (8) is pseudo-polynomial and grows very quickly with W and H, thus leading to a model which is not really useful in practice. Accordingly, the next section will describe an alternative approach to tackle this problem.

3 Problem-solving methodology

In the following, we first describe preprocessing techniques aimed at reducing the number of solutions to be examined. Then, instead of solving directly the 2OPP- UL model, a two-phase approach similar to the one reported in [10] for the 2SPP is applied. Basically, at each node of our branch-and-cut algorithm, a modified 1CBP (formulated as a binary program) is solved to find y coordinates. Then, the correspondingx-check problem is addressed in the second phase.

3.1 Preprocessing

Some preprocessing is first applied to tighten the problem. In this process, infeasi- bility might be uncovered. The algorithmic flow is the following:

1. Apply height position restrictions

(9)

2. Apply lifting

3. Calculate lower boundsSP P,L2,LH3 ,LW3 4. From bottom to top-fill do

(a) Apply precedence relations (b) Apply normal pattern dominance

(c) Apply normal pattern removal 5. Select best fill

6. Calculate LH4 ,LW4

In step 1, the minimum and maximum possible height positions for each item are determined (section 5.1). This is followed by lifting procedures aimed at artificially increasing the item sizes (section 5.2). Then, some lower bounds are calculated (section 6). Different ways of filling the bin, either from the bottom, from the top, or from the bottom and top are considered (section 5.5), while applying normal pattern dominance and normal pattern removal to reduce as much as possible the set of normal patterns (section 5.4). The filling associated with the smallest set of normal patterns is then selected. At the end, two sophisticated bounds, which exploit the current set of normal patterns, are applied (section 6) .

At each step, infeasibility tests are performed to detect if the current set of normal patterns for any given item becomes empty or if the minimum and maximum height positions of any given item are not coherent with the dimensions of the bin (e.g., if the minimum height position of itemimust be larger than H−hi).

3.2 Modified 1CBP

The modified 1CBP has the same variables than the 2OPP-UL and is defined as follow :

(1CBP ) X

t∈PiH

yit= 1 i∈I (11)

X

i∈I

X

¯t∈PiH(t)

wiyi¯t ≤W t∈PH (12) X

yit∈S

yit≤ |S| −1 S∈ S (13) yit∈ {0,1} i∈I, t∈PiH (14)

(10)

Basically, this is a standard 1CBP but with the number of bins fixed at H.

Constraints (11) state that the first slice of each item must be assigned to a bin.

Constraints (12) ensure that the capacity W of each bin is satisfied. Finally, con- straints (13) correspond toBenders’ feasibility cuts. The set S contains all subsets S = {yit} ∈ S such that an infeasibility occurs in the x-check problem when all variables inS are equal to 1. Given that setS can be very large, these constraints are relaxed in the initial formulation of the problem.

Within the branch-and-cut algorithm, the x-check problem is called each time a binary solution to the current 1CBP linear relaxation is obtained. If the x-check problem is feasible, then we have a feasible solution to the 2OPP-UL. Otherwise, a Benders’ cut of type (13) is added to the 1CBP model. Such an inequality is very weak because it typically removes a single (x,y) coordinate from the solution space. However, stronger cuts can be generated by applying an idea similar to the one in [10]. Let S be the subset of variables equal to 1 in a solution of the 1CBP for which the correspondingx-check problem is infeasible. LetS0 ⊂S be such that the correspondingx-check problem is also infeasible. Then, any modification to the y coordinates of the items in S\S0 induces a cut that subsumes the cut generated byS. Based on this observation, the set S is reduced as much as possible to obtain a minimal infeasible set (MIS) [8].

To find a MIS, the variables in S = {yit} are considered sequentially from the one with the smallest height position to the one with the largest height position. We remove the chosen variable from S and solve the x-check problem for the reduced set. If it is feasible, the variable is put back in S, otherwise a smaller set that is still infeasible is found. We repeat the procedure until all variables have been considered. Although the order of removal of the variables from set S can lead to different MISs, a single order was considered here (no significant improvement was observed in preliminary tests using multiple MISs). Note also that the resulting inequality cannot be lifted as in [10], because the infeasibility of thex-check problem can come from the unloading constraints.

Apart from the Bender’s cuts, additional cuts are generated when the solution of the current 1CBP linear relaxation is fractional. These inequalities are described in Section 4.

3.3 x-check problem

The model for the x-check problem is obtained by replacing the yit variables in the 2OPP-UL model by their optimal values in the 1CBP problem. Unfortunately, the resulting model is still too large to be solved in practice with CPLEX. The x-check problem is thus addressed with an enumerative tree search-based approach, which proves to be very efficient. Let ¯yi be the y-coordinate of item iin the 1CBP solution. The algorithm starts by filling the bottom of the bin and then moves up progressively. At the root node, no item is in the bin. Then, for each itemisuch that

(11)

¯

yi = 0 a child node is created withiat coordinate (0,0) in the bin. For subsequent nodes, let (xcur, ycur) be the current lowest leftmost position. For each itemi such that ¯yi = ycur, a child node is created with item i at (xcur, ycur) if the item fits without overlap and if the unloading constraints are satisfied. An empty node is also created where coordinates (xcur, ycur) to (xcur+ex, ycur+ey) are forbidden with ex= mini∈I0{minr∈PW

i {r :r > xcur}},ey = mini∈I0{y¯i: ¯yi > ycur} and I0 the set of items that are not yet in the bin.

A node is fathomed when the needed empty space is larger than the available empty space. This simple scheme proved the feasibility or infeasibility of every x-check problem after generating only a few nodes in the branching tree.

4 Inequalities

Before describing our inequalities, we need to introduce the concept of conflicting items or, equivalently, conflicting variables. Let Y be the set of variables in our 1CBP. Let alsoyiti and yjtj be two variables in Y. Then, these variables are con- flicting if they cannot cover a commonx-coordinate without overlapping or violating the unloading constraints. Figure 2 b) shows an example where the variables asso- ciated with items 3 and 4 are conflicting. Clearly, at the time of delivery, item 4 needs to be moved to reach item 3, thus violating the unloading constraints. Two variables yiti and yjtj are conflicting if they satisfy one of these two conditions:

• seqi < seqj and ti< tj+hj,

• seqi =seqj and ti< tj+hj andtj < ti+hi,

Two variablesyitare also considered to be conflicting if they are associated with the same itemi∈I. The reason is that only one of these variables should be equal to 1, see equation (11).

A subsetC ⊆Y ismutually conflicting if for every pair of variablesyiti, yjtj ∈C, yitiis conflicting withyjtj. For example, the setC ={y1t1, y2t2, y3t3, y4t4}is mutually conflicting in both Figures 2 a) and b). In the case of Figure 2 b), the solution is not U L-feasible because the summation over the widths of the items in setCexceedsW. Conversely, the same summation is equal toW in Figure 2 a), which is aU L-feasible solution. This observation can be generalized through the following:

Proposition 4.1 In any feasible 2OPP-UL solution, the summation over the widths of the items in every mutually conflicting set is smaller than or equal to W.

Proof. By contradiction, let us assume that we have a setC={yi1t1, yi2t2, ..., yiktk} of mutually conflicting variables in a feasible 2OPP-UL solution such that seqi1

(12)

1

x 0

1

W a)

H

y

0 b)

y

H

W x 6

4 5

7 8 6

7 4 5

3

2 3 2

Figure 2: Mutually conflicting sets

seqi2 ≥...≥ seqik and the summation over the widths of the corresponding items is strictly larger than W (for the sake of simplicity, it is assumed that the ij’s are all different). Since variableyi1t1 is conflicting withyi2t2, the required width for the two corresponding items is wi1+wi2. The same applies to yi3t3 which is conflicting with yi1t1 and yi2t2, thus requiring a width of wi1 +wi2 +wi3. Following the same line of reasoning, the required width is Pk

j=1wij which is strictly larger than W (by hypothesis). This observation contradicts the fact that the 2OPP-UL solution is feasible. This proof can be easily extended to the case where the ij’s are not all different.

These observations led to the conflict inequalities which are descried in the next section.

4.1 Conflict inequalities

Let us consider the following proposition:

Proposition 4.2 In every feasible 2OPP-UL solution, we have:

X

yit∈C

wiyit≤W ∀C∈ Y such that X

i∈I(C)

wi > W, (15)

where Y is the set of all mutually conflicting subsets of Y. Inequalities (15) are classical knapsack constraints. For any given mutually conflicting set C, we can instead use the followingcover inequality:

X

yit∈C

yit≤ |I(C)| −1 (16)

(13)

whereI(C) is the set of items associated with the variables inC. One can observe that inequality (16) is a special case of the classicalGUB cover inequality. We recall thatC is a GUB cover ifP

i∈I(C)wi > W and if no two variables are associated with the same item. SetCcan be transformed into a GUB cover by removing all variables but one that belong to the same item. In addition, setC is a minimal GUB cover if no proper subset ofC is a GUB cover. Assuming thatC is both mutually conflicting and a minimal GUB cover, we can consider an extension E such that C ⊆E,E is mutually conflicting and maxi∈I(C){wi} ≤ mini∈I(E)\I(C){wi}. Inequality (16) can then be extended and dominated by:

X

yit∈E

yit≤ |I(C)| −1 (17)

We prefer here to use a special type of GUB lifted cover inequality because a single weightwi is associated with theyit variables, for any given item i. Let C be a minimal GUB cover andE be a mutually conflicting set such that C ⊆E. Then we can derive the following inequality:

X

yit∈E,i∈I(C)

yit+ X

yit∈E,i6∈I(C)

αiyit≤ |I(C)| −1 (18) We will refer to the αi’s as the lifting coefficients. They can be computed by solving a series of knapsack problems [17]. We will refer to these inequalities as conflict inequalities.

4.2 Max flow inequalities

Another type of inequality is obtained by considering any mutually conflicting set C such that P

i∈I(C)wi ≤W. For example, let us assume that items 1, 5 and 6 in Figure 3 are fixed at their current position. Then, we can identify the feasible areas for all other items. For example, the items to be delivered after 1 but before 5 must be in areasA1, B5, B6 orE.

Let tmini = minyjt∈C{t :j = i} and tmaxi = maxyjt∈C{t :j = i}. A maximum flow problem, defined on an appropriate network, can be solved to know if the remaining free items can lead to a feasible solution given that the items associated with setC are fixed at their current position. More precisely, the network would be as follow:

• a source nodes,

• a destination node t,

• for eachi∈I(C), nodesAi andBi, whereAi stands for the area immediately under item iand Bi for the area immediately above it,

(14)

E

y

H

Wx 0

1 5 6 B6 B5

A1 B1

A6 A5

Figure 3: Areas associated with mutually conflicting sets

• a nodeE for the remaining area,

• for each i∈I\I(C), a nodeki,

• for each i∈I(C), an arc fromstoAi with a capacity equal to tmaxi wi,

• for eachi∈I(C), an arc fromstoBiwith a capacity equal to (H−tmini −hi)wi,

• an arc from stoE with a capacity equal to H(W −P

i∈I(C)wi),

• for each i∈I(C) and j∈I\I(C), an arc fromAi tokj with a capacity equal to min{wi, wj}hj ifhj ≤tmaxi and seqi≤seqj,

• for each i∈I(C) and j∈I\I(C), an arc fromBi tokj with a capacity equal to min{wi, wj}hj ifhj ≤H−tmini −hi and seqi ≥seqj,

• for eachi∈I\I(C), an arc fromEtokiwith a capacity equal tomin{wi, W− P

i∈I(C)wi}hi

• for each i∈I\I(C), an arc fromki totwith a capacity equal to hiwi.

Let maxf low(C) be the maximum flow from s to t in this network. We then have :

Proposition 4.3 If maxf low(C) is strictly smaller than P

i∈I\I(C)hiwi then the mutually conflicting set C leads to an infeasible solution. The partial solution can be forbidden through the following constraints:

X

yit∈C

yit≤ |I(C)| −1 ∀C ∈ Y such that maxf low(C)< X

i∈I\I(C)

hiwi (19)

We will refer to these inequalities as the max flow inequalities.

(15)

4.3 Separation procedures

In the previous section, we introduced some properties of feasible 2OPP-UL so- lutions. In many cases, the 1CBP solution given to the x-check problem will not satisfy these properties. It is thus useful to look for a violated property before calling thex-check problem. The inequality generated from a violated property will also be stronger as it will focus on what truly makes the solution infeasible. Accordingly, at each node of our branch-and-cut algorithm, we first check if the current solution violates inequalities (15) or (19).

A simple heuristic and an exact method have been developed to separate violated inequalities. Given that these inequalities are based on mutually conflicting sets, the first algorithm generates conflicting sets in a heuristic way, while the second one generates all of them.

Starting with an empty set, the heuristic first adds a randomly chosen variable to this set. Then, at each iteration, a new randomly chosen variable in considered and added to the set if it is conflicting with the other variables already in the set.

At the end, we check if the resulting set violates a conflict inequality. If this is the case, the mutually conflicting set is kept. The method is called ntimes, where nis the number of items.

The exact method generates all mutually conflicting sets using a tree search- based algorithm. First, theyitvariables are sorted in ascending order based on item indexiand height positiont. LetOrd(yit) be the order of variableyit. At the root node, for which there is no mutually conflicting set, a child node is created for each variable and the associated conflicting set is a singleton with only this variable. In subsequent nodes, a new variable is added to the set only if it is of higher order than any variable in the set and if the variable is in conflict with all variables in the set.

Each mutually conflicting set produced in this way is checked to see if it violates an inequality. If it does, the conflicting set is kept.

If the number of variables with a positive value is high, there might just be too many mutually conflicting sets. Based on preliminary experiments, the exact method is called only if this number is smaller than or equal to 1.1 times the number of itemsn. Otherwise, the heuristic method is used. Note also that each inequality must be violated by a value greater than or equal to 0.2 and that a maximum of 10 inequalities are added at each call.

The resulting inequalities are strengthened before they are added to the model.

For a conflict inequality of type (15), a corresponding inequality of type (18) is added as it cuts fractional parts of the feasible domain. To generate an inequality of type (18) from an inequality of type (15), set C is first transformed into a minimal GUB cover by removing the variables with the largest weights. Then, variables with a positive value that are in conflict with all variables already in C are added to the set (considering these variables first proved to generate stronger inequalities).

Then, the same procedure is applied to the remaining variables. We then find the

(16)

lifting coefficientsfor the resulting extension by solving a series ofknapsack problems (see [21] for details). As previously mentioned, only one extension is created by considering the variables to be added toC in random order.

For a max-flow inequality (19), the extensionE ={yit ∈Y :i∈I(C) and tmini ≤ t ≤ tmaxi } is used. That is, only the variables associated with the items that are already in C and such thatt is betweentmini and tmaxi are considered.

5 Preprocessing

In this section, the various procedures that are applied during the initial prepro- cessing phase are described.

5.1 Height position restrictions

If the first items to be delivered are at the bottom of the bin, the corresponding solution is likely to be infeasible due to the unloading constraints. Figure 4 a) shows that the items to be delivered before itemi must necessarily be in areas B and C.

That is, if they are in area A, item i must be moved to get to these items, which is forbidden. Similarly, the items to be delivered after imust be in areasA and C.

Figure 4 b) shows that if itemiis at some height positionyi ∈[0, H], the unloading constraints might force some items outside of the bin (we recall that the height position of an item is defined as the height position of its bottom-left corner).

i y1

A

C

W x H

y

0 W

y H

0

b)

x a)

B B

i

Figure 4: Height position restrictions

Motivated by some lower bounds reported in [9], we defineyiminand ymaxi as the minimal and maximal height positions of item i∈I :

(17)

ymin,1i = max

Σ>,W(i) −wi W

, max

j∈Ii>,Wwi

{hj}

(20)

ymin,2i =

&[Σ>(i)−H(W −wi) +P

j∈Ii,wihj(wj−wi)]+ wi

'

(21)

yimax,1=H−max

Σ<,W(i) −wi W

, max

j∈Ii<,Wwi

{hj}

(22)

yimax,2=H−

&[Σ<(i)−H(W −wi) +P

j∈Ii,wihj(wj −wi)]+ wi

'

(23)

yimin= max{yimin,1, yimin,2} (24)

yimax= min{ymax,1i , yimax,2} (25) Equations (20) and (21) are obtained by considering only the items that must lie below some itemi. More precisely, the valueyimin,1corresponds to the maximum between a continuous relaxation over all items that must lie belowiand the item of maximum height that must also lie belowi. The valueyimin,2 is the height position obtained by pushing itemidownward as long as the bottom of the bin is not reached or an item in area A, by moving to area C, does not force an item outside of the bin. Similar values in equations (22) and (23) are obtained by considering the items that must lie abovei.

The obtained valuesymini and yimax in equations (24) and (25) can be improved in two different ways. First, by considering items that cannot be beside i. Let us suppose, for example, that item j is to be delivered after iand that wi+wj > W. In this case, yminj +hj is clearly a lower bound onyimin. The second improvement can be obtained by considering only normal patterns. In fact, the valueyimin should be the minimum height position of itemionly if it corresponds to a normal pattern (i.e., the bottom of item i touches the top of another item or the bottom of the bin). If this is not the case, it can be reset to the minimum height position larger than ymini which corresponds to a normal pattern. The same line of reasoning can be applied to ymaxi . We thus obtain:

ymini = max{yimin,1, ymin,2i , max

j∈Ii>,Wwi

{yjmin+hj}, min{t:t∈PiH}} (26)

(18)

ymaxi = min{ymax,1i , yimax,2, min

j∈Ii<,W−wi

{ymaxj −hi}, max{t:t∈PiH}} (27)

5.2 Lifting

As shown by previous authors [2, 6], if we do not find any combination of widths such that their sum is equal to W, then it is possible to reduce the width W as some unused space will remain. The same idea can be applied to the heightH. The values W and H in equations (28) and (29) can be obtained through dynamic programming. At the end, we resetW toW and H toH.

W= max{X

i∈I

ziwi:X

i∈I

ziwi ≤W, zi∈ {0,1}, i∈I} (28) H = max{X

i∈I

zihi :X

i∈I

zihi ≤H, zi ∈ {0,1}, i∈I} (29) A similar procedure can then be applied to the item sizes. The increase in width and height of itemi∈I is given by the following equations:

∆wi =W −max{wi− X

j∈I\{i}

zjwj : X

j∈I\{i}

zjwj ≤W −wi, zj ∈ {0,1}, j∈I\{i}}

(30)

∆hi =H−max{hi− X

j∈I\{i}

zjhj : X

j∈I\{i}

zjhj ≤H−hi, zj ∈ {0,1}, j∈I\{i}} (31) Clearly, not all items can be found at a given height position t ∈ PH, either because it is not part of their normal patterns or becauseyimin is too large or ymaxi is too small for some itemi∈I. Thus, it might well happen that the width occupied by the set of remaining items It at height position t can only be smaller than W. In this case, we can further reduce the widthW toWt :

Wt= max{X

i∈It

ziwi:X

i∈It

ziwi≤W :zi∈ {0,1}, i∈It} t∈PH (32) We can extend this line of reasoning to individual items. Let us assume that item iis at height positiont. Then, we can consider the other items one by one and use the previously described maximum flow algorithm to detect if it can be beside item i or not (see section 4.2). After removing all items that cannot be beside i, there might always be an empty space besidei. In this case, we can increase the width of wi towit to cover the empty space. The wit values can be obtained by solving (in pseudo-polynomial time) subset sum-like problems using dynamic programming.

(19)

5.3 Precedence relations

Let us consider itemsiand j such thatiis delivered after j (i.e., seqi > seqj). We want to know if there is a feasible solution where height position tj is smaller than ti. If there is no such solution, we have a precedence relation between items i and j, because the height position of imust be smaller than or equal to the the height position ofj for a solution to be feasible.

Formally, we identify two different types of precedence relations : a weak prece- dence relation where ti ≤ tj and a strong precedence relation where ti +hi ≤ tj. Furthermore, we consider a side-by-side relation where ti ≤ tj < ti +hi or tj ≤ ti < tj +hj always holds. The sets of weak precedence, strong precedence and side-by-side relation associated with item i are denoted H(i), H(i)+ and H(i)=, respectively.

In the following, we present conditions for such precedence relations to occur between items iand j.

Condition 1 : Ifyimax+hi ≤yjmin, thenj∈H+(i).

Condition 2 : Ifyimax≤yminj thenj∈H(i).

Condition 3 : If maxf low(C)<P

k∈I\{i,j}hkwk for allti ∈ PiH and tj ∈PjH such thattj < ti and C={yiti, yjtj}is a mutually conflicting set, then j∈H(i).

Condition 4 : Ifwi+wj > W, thenj∈H+(i)..

Condition 5 : If maxf low(C)<P

k∈I\{i,j}hkwk for allti ∈ PiH and tj ∈PjH such that tj < ti+hi and C = {yiti, yjtj} is a mutually conflicting set, then j ∈ H+(i).

Condition 6 : If maxf low(C)<P

k∈I\{i,j}hkwk for allti ∈PiH and tj ∈PjH such that ti > tj or ti < tj and C = {yiti, yjtj} is a mutually conflicting set, then j∈H=(i).

From Conditions 1 to 3, we obtain inequalities (33) where the height position of itemj is forced to be greater than or equal to the height position of item i, wheni is weakly precedingj. From Conditions 4 and 5, we get inequalities (34) where the height position of itemj is forced to be greater than or equal to the height position of item i plus its height hi, when i is strongly preceding j. Finally, Condition 6 leads to inequalities (35) where items iand j are forced to be side-by-side.

yit ≤ X

¯t∈PjH

¯t≥t

yt i∈I, j ∈H(i), t∈PiH (33)

yit≤ X

¯t∈PjH

¯t≥t+hi

yj¯t i∈I, j ∈H+(i), t∈PiH (34)

(20)

yit≤ X

¯t∈PjH(t)

yj¯t i∈I, j ∈H=(i), t∈PiH, (35)

5.4 Reconsidering the normal patterns

In this section, we describe two different ways of reducing the initial set of normal patterns.

5.4.1 Normal pattern dominance

It is possible to reduce the set of normal patterns by considering a dominance relation among the patterns associated with a given item. Letibe an item andti ∈PiH some height position corresponding to a pattern. If iis at height positionti and nothing fits over i, then nothing will fit over i at any height positiont > ti. Let tmini ∈PiH be the lowest height position such that nothing fits over item i. Then every height position t∈PiH such that t≥tmini can be removed. This type of relation is called Normal Pattern Dominance.

5.4.2 Normal pattern reduction

Previously, we introduced a feasibility test based on the solution of a maximum flow problem to know if a partial solution based on a mutually conflicting set of items leads to an infeasible solution. This test can also be used to prove the feasibility of a normal pattern. Suppose that itemiis at height position ti∈PiH. If all mutually conflicting sets that include ti fail the feasibility test then ti can be removed from PiH. But since there might be a huge number of mutually conflicting sets, a more viable approach is the following. For any given itemiand height positionti ∈PiH,ti can be removed fromPiH if there is an itemjsuch that for alltj ∈PjH and mutually conflicting set C = {yiti, yjtj}, maxf low(C) is smaller than P

k∈I\{i,j}hkwk. The value ti is then added to a set IN Fi that contains infeasible height positions for itemi.

By using the previously defined ymini values, ymaxi values and IN Fi sets, an improved procedure can be designed to calculate a reduced set of normal patterns.

The pseudo-code of this procedure is found in Algorithm 1 for the typical case where the bin is filled from the bottom to the top.

The normal patterns are generated by a call to the method Calculate Normal Patterns. Three sets Cur,Prev and Glob are first initialized with position 0 which is the bottom of the bin. Set P rev contains all normal patterns generated up to (but not including) the current customer j. Note that Curis reset to P rev before generating the patterns of each item associated with customer j. The patterns

(21)

for item i ∈ Ij are generated recursively by the method Generate Patterns if the current customer has more than one item. When the set of all patterns associated with itemihas been produced, the global variablePiH is assigned with this set. The newly generated patterns are also added to setGlob. When all items of the current customer are done,P rev is set toGlobjust before handling the next customer. The methodsGenerate Patterns andGenerate Patterns Recursively consider all possible ordered combinations of items in setIand make sure that the corresponding patterns are feasible normal patterns.

The complexity of this algorithm is O(Hn(o−1)!) whereH is the height of the bin, n is the number of items and o = maxj=1,...,R|Ij|. The algorithm performs well when the number of items per customer is small. However, if (o−1)! is larger thann, it is better to use the dynamic algorithm based on equations (1) and (2), as reported in [18], which is in the order of O(Hn2).

Algorithm 1 Calculate Normal Patterns Require: yimin, yimax and IN Fi

P rev ← {0}

Cur← {0}

Glob← {0}

for j=R to 1 do fori∈Ij do

Cur←P rev if Ij\{i} 6=∅ then

Generate Patterns(Ij\{i}, Cur) end if

PiH ← {t∈Cur\IN Fi:yimin ≤t≤ymaxi } fort∈PiH do

Cur←Cur∪ {t+hi} end for

Glob←Glob∪Cur end for

P rev←Glob end for

5.5 Top-fill versus bottom-fill

Typically, a bottom-left approach is used to generate the set of normal patterns (as in Algorithm 1). More precisely, the bottom of every item must be in contact with either the bottom of the bin or the top of another item. Furthermore, the left side of each item must be in contact with the left side of the bin or the right side of another item.

Due to the unloading constraints, solutions to our problem exhibit a special

(22)

Algorithm 2 Generate Patterns

Require: I : set of items,P : set of patterns miny ←min

i∈I yimin maxy ←max

i∈I ymaxi

for t=maxy tominy do if t∈P then

fori∈I do

Generate Patterns Recursively(t+hi, I\{i}, P) end for

end if end for

Algorithm 3 Generate Patterns Recursively

Require: t: a starting position,I : set of items, P : set of patterns if t∈P then

Exit end if P ←P∪ {t}

for i∈I do

if yimin≤t≤yimax and t6∈IN Fi then

Generate Patterns Recursively(t+hi, I\{i}, P) end if

end for

(23)

structure which can be exploited by choosing to fill the bin from the bottom, from the top or from both the bottom and the top (mixed fill), in the hope of reducing the set of normal patterns. With regard to the mixed approach, if the items with delivery orderj(customerj) fill the bin from the bottom, then the items with delivery order k(customerk) withk > jalso fill the bin from the bottom. Conversely, if the items with delivery orderj fill the bin from the top, then the items with delivery order k withk < j also fill the bin from the top.

For a sequence of R customers, there are R+ 1 ways to choose the cut point between the customers whose items will fill the bin from the bottom and the cus- tomers whose items will fill the bin from the top. It is then possible to choose, among theseR+ 1 cut points, the one that leads to the smallest number of normal patterns. Figure 5 presents an example of a mixed fill where the cut point is chosen between customers 3 and 4, that is, items of customers 1, 2 and 3 fill the bin from the top and items of customers 4, 5 and 6 fill the bin from the bottom.

5

0 W x

H y

4 3 2

5

6 1

1

4

Figure 5: Mixed Fill

Proposition 5.1 If a solution is feasible for a given cut point, it is feasible for every cut point.

Proof. Let us assume that a feasible solutions1 is obtained when the cut point is in position 1, that is, just before the first customer (which corresponds to filling the bin from the bottom, as it is typically done). Then, a feasible solution s2 for the cut point in position 2, i.e. between customers 1 and 2, is obtained froms1 by pushing the items of customer 1 up until the top of the bin is reached. Similarly, a feasible solution s3 for the cut point in position 3, i.e. between customers 2 and 3, is obtained from s2 by pushing the items of customer 2 up until the top of the bin or the bottom of another item is reached. The result is obtained by repeating this argument until the cut point is in position R+ 1.

(24)

This proposition also means that if a solution is infeasible for a given cut point, it is infeasible for every cut point. Thus, we are guaranteed not to miss any feasible solution. As indicated in the demonstration of the above proposition, there might also be a gap between the top-filled and bottom-filled items. Inspired by the work in [6], a constraint is associated with each item and each height position to force down (up) a top-filled item so that its bottom (top) touches another item which must be delivered after (before) it. These constraints are the following:

yit

R

X

j=seqi

X

k∈Ij

k6=j

yk(t−hk) t∈PiH, i∈I and iis bottom-filled (36)

yit

seqi

X

j=1

X

k∈Ij

k6=j

yk(t+hk) t∈PiH, i∈I and iis top-filled (37)

6 Lower bounds

In this section we present some lower bounds on the required height of the bin.

6.1 Simple Lower Bounds

First, we can use the lower bound for the SPP reported in [23]. This so-called continuous lower bound, denoted L1, calculates the number of strips of width W and height 1 needed to accommodate all items.

L1 = P

i∈Iwihi W

(38) From the definition of yimin and ymaxi in equations (26) and (27), the following lower bound can also be derived:

L2 = max

i∈P{ymini +hi+ (H−yimax)} (39)

It is worth noting that this bound improves upon the one reported in [9], through the addition of the third term in the numerator of yimin,2 and ymax,2i in equations (21) and (23) and through the consideration of the third and fourth components in the definition of ymini andyimax in equations (26) and (27).

(25)

6.2 Lower Bounds based on the Cutting Stock Problem

The bounds presented in this section are based on the Gilmore-Gomory formulation of the Cutting Stock Problem (CSP). We define a cutting pattern as a subset of items I0 ⊂ I. A pattern is said to be h-feasible if P

i∈I0hi ≤ H and w-feasible if P

i∈I0wi ≤W. Let KH and KW be the sets of all h-feasible andw-feasible cutting patterns. Let also the variable vk be equal to the number of times cutting pattern k appears in a solution with aik = 1 if item i is in cutting pattern k, 0 otherwise.

The CSP based onw-feasible cutting patterns (CSPW) can be formulated as follow :

(CSPW) min X

k∈KW

vk (40)

X

k∈KW

aikvk≥hi i∈I (41)

vk≥0 and integer k∈ KW (42) The optimal solution value of (CSPW) provides a lower bound on the required height of the bin. Thus, an instance is infeasible if the obtained value is larger than H. ACSPH can be defined similarly to obtain a lower bound on the required width.

We will call these two lower bounds LH3 and LW3 , respectively.

The CSP is famous for the strength of its linear relaxation and it is often the case that the round up value of the linear relaxation is optimal. Column (cutting pattern) generation is typically used to solve this problem and it is well known that the pricing subproblem is a knapsack problem (KP), where the item values come from the dual variables. We refer to [4] for more details on this issue in the context of the 2OPP. A column of negative reduced cost generated at a given width or height position often corresponds to subsets of items that cannot be side by side or one over the other because the corresponding KP does not account for any unloading structure. Clearly, integrating some unloading structure can only improveLW3 and LH3 .

For example, we can improve LH3 to obtain LH4 by considering only the items i ∈ I that can be at some height position, based on the current set PH and the valuesyimin and ymaxi . Although we might still end up with infeasible columns, this approach has proven to be very effective.

We can also improveLW3 to obtainLW4 . Here, we must generate a feasiblestack of items of negative reduced cost at some width position, as illustrated in Figure 6.

For generating stacks, an algorithm similar in spirit to the one used for generating normal patterns is applied (see section 5.4). LetV(j, h) be the sum of the item values over all items that are below position h in an optimal stack for customers with a delivery order between j and R. Also, let S be a subset of items associated with

Références

Documents relatifs

Hence the idea: If we saw servers or nodes of the graph as a node in an electrical circuit, and the &#34;distances&#34; between vertices as a resistor values in a circuit, then more

INPUT: 331M owl:sameAs (179.67M terms) Assign each term to an identity set.. (algorithm described in

A solution of the problem consists in assigning each item i to a bin and defining its position, denoted by ( x i , y i ) which corresponds to the coordinates of its bottom

It is motivated by the excellent results pro- duced from both the classical routing problem [2], where the competitive solution time and quality is obtained by genetic algorithm

We de- sign approximation algorithms for 3 variations of the KU problem: a (3 + )- approximation algorithm for the case where the goal is to maximize the profit of squares packed into

Title (EN) : preliminary study on the coupling learning and reasoning for image recognition to enrich the records of in the Joconde database.. Abstract (EN): The MonaLIA 1.0

Mots-clés : Testicule féminisant- syndrome d’insensibilité aux androgènes- diagnostic- prise en charge thérapeutique et psychologique- Statut juridique. Le syndrome

Key-words: Augmented Lagrangian algorithm, augmentation parameter update, closest fea- sible problem, convex quadratic optimization, feasible shift, global linear