bin packing related problems general arc flow formulation
play

Bin Packing & Related Problems: General Arc-flow Formulation - PowerPoint PPT Presentation

Bin Packing & Related Problems: General Arc-flow Formulation with Graph Compression Filipe Brand ao fdabrandao@dcc.fc.up.pt 20th Combinatorial Optimization Workshop Aussois, January 4-8, 2016 This work is financed by the FCT - Funda


  1. Bin Packing & Related Problems: General Arc-flow Formulation with Graph Compression Filipe Brand˜ ao fdabrandao@dcc.fc.up.pt 20th Combinatorial Optimization Workshop Aussois, January 4-8, 2016 This work is financed by the FCT - Funda¸ c˜ ao para a Ciˆ encia e a Tecnologia (Portuguese Foundation for Science and Technology) within project UID/EEA/50014/2013 and the Ph.D. Grant SFRH/BD/91538/2012. Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 1 / 20

  2. Bin Packing and related problems • 1D-Bin Packing Problem (BPP) ⋄ n objects of m different weights must be packed into a finite number of bins, each with capacity W , in a way that minimizes the number of bins used. Objective: Pack a set of items into as few bins as possible x3 x5 x4 x2 Bins Items Solution • 1D-Cutting Stock Problem (CSP) ⋄ items of equal size (which are usually ordered in large quantities) are grouped into orders with a required level of demand. • p-Dimensional Vector Packing Problem ⋄ items and bins have p independent dimensions corresponding to different resources. Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 2 / 20

  3. Bin Packing and related problems • 1D-Bin Packing Problem (BPP) ⋄ n objects of m different weights must be packed into a finite number of bins, each with capacity W , in a way that minimizes the number of bins used. Objective: Pack a set of items into as few bins as possible x3 x5 x4 x2 Bins Items Solution • 1D-Cutting Stock Problem (CSP) ⋄ items of equal size (which are usually ordered in large quantities) are grouped into orders with a required level of demand. • p-Dimensional Vector Packing Problem ⋄ items and bins have p independent dimensions corresponding to different resources. Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 2 / 20

  4. Bin Packing and related problems • 1D-Bin Packing Problem (BPP) ⋄ n objects of m different weights must be packed into a finite number of bins, each with capacity W , in a way that minimizes the number of bins used. Objective: Pack a set of items into as few bins as possible x3 x5 x4 x2 Bins Items Solution • 1D-Cutting Stock Problem (CSP) ⋄ items of equal size (which are usually ordered in large quantities) are grouped into orders with a required level of demand. • p-Dimensional Vector Packing Problem ⋄ items and bins have p independent dimensions corresponding to different resources. Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 2 / 20

  5. Gilmore-Gomory’s Formulation Let column vectors a j = ( a j 1 , ..., a j m ) represent all possible cutting patterns; The element a j i represents the number of items i obtained in cutting pattern j . � min x j j ∈ J � x j a j s.t. i ≥ b i i = 1 , ..., m j ∈ J x j ≥ 0 integer ∀ j ∈ J where J is the set of valid cutting patterns that satisfy: m � a j i w d i ≤ W d d = 1 , ..., p i =1 a j i ≥ 0 integer Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 3 / 20

  6. Gilmore-Gomory’s Formulation (generalized) Let column vectors a j = ( a j 1 , ..., a j m ) represent all possible cutting patterns; The element a j i represents the number of items i obtained in cutting pattern j . � min x j j ∈ J � x j a j s.t. i ≥ b i i = 1 , ..., m j ∈ J x j ≥ 0 integer ∀ j ∈ J where J is the set of valid cutting patterns that satisfy: m � a j i w d i ≤ W d d = 1 , ..., p i =1 a j i ≥ 0 integer Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 3 / 20

  7. General Arc-flow Graph Wolsey proposed in 1977 the use of arc-flow graphs to obtain models equivalent to Gilmore-Gomory’s model but much smaller. Consider an instance with bins of capacity W = 7 and items of sizes 5, 3, 2. A possible graph with all valid packing patterns for this instance is the following: i = 1 i = 3 i = 3 i = 3 s 2 3 4 5 7 t i = 3 i = 2 It is also easy to add more constraints (such as a cardinality constraint) to this type of graph: i = 3 2 , 1 4 , 2 ewns ewns i = 3 i = 2 i = 3 i = 3 s 3 , 1 5 , 2 7 , 3 t ewns ewns ewns i = 1 i = 3 5 , 1 7 , 2 ewns ewns Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 4 / 20

  8. General Arc-flow Formulation Given a directed acyclic multigraph G = ( V , A ) containing every valid packing pattern represented as a path from the source ( s ) to the target ( t ), the corresponding cutting/packing problem can be modelled as follows: min z  − z if k = s ,  � � s.t. f uvi − f vri = z if k = t , 0 for k ∈ V \ { s , t } ,  ( u , v , i ) ∈ A : v = k ( v , r , i ) ∈ A : v = k � f uvj ≥ b i , i ∈ { 1 , . . . , m } , ( u , v , j ) ∈ A : j = i f uvi ≥ 0 , integer , ∀ ( u , v , i ) ∈ A , where ( u , v , i ) denotes an arc between u and v associated with items of type i , arcs ( u , v , i = 0) are loss arcs, and f uvi is the amount of flow along the arc ( u , v , i ). Problem: large number of variables and constraints Solution: graph compression! Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 5 / 20

  9. General Arc-flow Formulation Given a directed acyclic multigraph G = ( V , A ) containing every valid packing pattern represented as a path from the source ( s ) to the target ( t ), the corresponding cutting/packing problem can be modelled as follows: min z  − z if k = s ,  � � s.t. f uvi − f vri = z if k = t , 0 for k ∈ V \ { s , t } ,  ( u , v , i ) ∈ A : v = k ( v , r , i ) ∈ A : v = k � f uvj ≥ b i , i ∈ { 1 , . . . , m } , ( u , v , j ) ∈ A : j = i f uvi ≥ 0 , integer , ∀ ( u , v , i ) ∈ A , where ( u , v , i ) denotes an arc between u and v associated with items of type i , arcs ( u , v , i = 0) are loss arcs, and f uvi is the amount of flow along the arc ( u , v , i ). Problem: large number of variables and constraints Solution: graph compression! Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 5 / 20

  10. General Arc-flow Formulation Given a directed acyclic multigraph G = ( V , A ) containing every valid packing pattern represented as a path from the source ( s ) to the target ( t ), the corresponding cutting/packing problem can be modelled as follows: min z  − z if k = s ,  � � s.t. f uvi − f vri = z if k = t , 0 for k ∈ V \ { s , t } ,  ( u , v , i ) ∈ A : v = k ( v , r , i ) ∈ A : v = k � f uvj ≥ b i , i ∈ { 1 , . . . , m } , ( u , v , j ) ∈ A : j = i f uvi ≥ 0 , integer , ∀ ( u , v , i ) ∈ A , where ( u , v , i ) denotes an arc between u and v associated with items of type i , arcs ( u , v , i = 0) are loss arcs, and f uvi is the amount of flow along the arc ( u , v , i ). Problem: large number of variables and constraints Solution: graph compression! Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 5 / 20

  11. Break symmetry with levels Graph corresponding to a cardinality constrained bin packing instance with bins of capacity W = 9, cardinality limit 3 and items of sizes 4, 3, 2 with demands 1, 3, 1: i = 2 i = 2 i = 2 i = 2 s i = 3 2 , 1 3 , 1 4 , 1 5 , 2 6 , 2 7 , 2 8 , 3 9 , 3 i = 3 i = 3 i = 3 i = 3 i = 1 Figure : Initial graph/Step 1 graph. The following graph represents every valid packing pattern for the same instance, but without symmetry. i = 3 i = 3 i = 3 i = 3 i =3 0 , 0 , 3 2 , 1 , 3 3 , 1 , 3 4 , 1 , 3 5 , 2 , 3 6 , 2 , 3 7 , 2 , 3 8 , 3 , 3 9 , 3 , 3 i = 2 i = 2 0 , 0 , 2 3 , 1 , 2 4 , 1 , 2 6 , 2 , 2 7 , 2 , 2 9 , 3 , 2 i = 2 i = 2 i = 1 0 , 0 , 1 4 , 1 , 1 Figure : Graph with levels/Step 2 graph (without symmetry). Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 6 / 20

  12. Main compression step We use the longest paths to the target in each dimension to relabel the nodes. We relabel each node u with ( ϕ 1 ( u ), ϕ 2 ( u ), . . . , ϕ p ( u )) as follows:  0 if u = s ,  ϕ d ( u ) = W d if u = t , min ( u ′ , v , i ) ∈ A : u ′ = u { ϕ d ( v ) − w d i } otherwise.  The following graph results from applying the main compression step to the Step 2 graph. i = 1 i = 2 i = 2 i = 2 i = 2 i = 3 s 3 , 1 4 , 1 5 , 2 6 , 2 7 , 2 9 , 3 i = 3 Figure : Step 3 graph (after the main compression step). Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 7 / 20

  13. Final compression step We use the longest paths from the source in each dimension to relabel the nodes. We relabel each node v with ( ψ 1 ( v ), ψ 2 ( v ), . . . , ψ p ( v )) as follows: � 0 if v = s , ψ d ( v ) = max ( u , v ′ , i ) ∈ A : v ′ = v { ψ d ( u ) + w d i } otherwise. The following graph results from applying the final compression step to the Step 3 graph. i = 2 i = 2 i = 2 i = 1 i = 2 i = 3 s 3 , 1 4 , 1 6 , 2 7 , 2 9 , 3 i = 3 Figure : Step 4 graph (after the final compression step). Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 8 / 20

  14. Graph size reduction: #vertices 4e+05 Number of vertices in the Final Graph #Vertices in the Final Graph 1/10 3e+05 1/3 2e+05 2e+05 2e+05 1e+05 5e+04 0e+00 0e+00 5e+04 1e+05 2e+05 2e+05 2e+05 3e+05 4e+05 Number of vertices in the Inicial Graph Instances with more than two dimensions are not considered in this chart since it is usually not possible to build the initial graphs for these instances. Filipe Brand˜ ao (FCUP) General Arc-flow Formulation (VPSolver) January 4-8, 2016 9 / 20

Recommend


More recommend