Tutorial 10: Solving Cutting Stock Problem Using Column Generation Technique

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Tutorial 10: Solving Cutting Stock Problem

Using Column Generation Technique


GIAN Short Course on Optimization:
Applications, Algorithms, and Computation

Devanand, Meenarli, Prashant, and Sven

IIT Bombay & Argonne National Laboratory

September 12-24, 2016


Linear Program in standard form:

Minimize c T x,
Subject to Ax = b,
x ≥ 0.

P is the corresponding feasible set, matrix Am×n has full row


rank
Aj is the j th column of the matrix A.
x be a ‘basic’ feasible solution and B(1), . . . , B(m) be the
indices of basic variables.
NB = {NB(1), . . . , NB(n − m)} be the indices of nonbasic
variables.
 
B = AB(1) . . . AB(m) is basis
 matrix and
N = ANB(1) . . . ANB(n−m) be the nonbasis matrix.

2 / 13
Optimality conditions

Vector xN = xNB(1) , . . . , xNB(n−m) for nonbasic variables is
0 and vector xB = xB(1) , . . . , xB(m) of basic variables is
obtained as
 
T xB
Ax = [B N] = b,
xN
BxB + NxN = b,
xB = B −1 b.

Consider moving away from x to x + θd j , θ > 0 by selecting a


nonbasic variable xj , j ∈ N.
Algebraically, djj = 1 and dij = 0, ∀i ∈ NB, i 6= j.
 
xB becomes xB + θdBj , where dBj = dB(1)j j
, . . . , dB(m)

3 / 13
For feasibility, A(x + θd j ) = b and

Ad j = BdBj + NdNj = 0,
BdBj + Aj = 0,
dBj = −B −1 Aj .

Objective value at the new point is c T (x + θd j ) and per unit


change along basic direction d j (reduced cost of nonbasic variable
xj ) is
c j = c T d j = cj − cBT B −1 Aj

Theorem (Optimality conditions)


Consider a basic feasible solution x associated with a matrix B,
and let c be the corresponding vector of reduced costs. If c ≥ 0,
then x is optimal.

4 / 13
Column Generation

Motivation:
Column generation first suggested in the context of
multi-commodity network flow problem (Ford and Fulkerson,
1958).
Dantzig and Wolfe (1960) adapted it to LP with a
decomposable structure.
Gilmore and Gomory (1961) demonstrated its effectiveness in
a cutting stock problem.
Other applications: Vehicle routing, crew scheduling,
integer-constrained problems etc.

5 / 13
Column Generation

Recall
number of nonzero variables (basic variables) is equal to the
number of constraints.
Hence even though the number of possible variables
(columns) may be large, we only need a small subset of these
(in basis B) in the optimal solution.
Crucial insight
If a problem has many variables (or columns) but fewer
constraints, work with a partial A matrix.

6 / 13
Example: Cutting Stock Problem

Size of the item demanded 5-ft 7-ft 9-ft


Number of items demanded 25 20 15

Width of standard stock is 20 feet.


Demand is met by cutting up standard stocks into items of required
widths (refer figure).
Objective is to minimize the number of standard stocks to meet the
customer demands.
7 / 13
Cutting Stock Problem (CSP)

Problem description:
Stock width WS , and a set of items I.
Width of items denotd by wi , and their demand di .
Cost of using a stock per unit width is 1
Set of cutting patterns P
aip : number of pieces of item i ∈ I cut in pattern p ∈ P
Minimize total cost (number of stocks used)

Decision variables:
xp ∈ P: number of times a cutting pattern p is used

8 / 13
Mathematical formulation (master)
Objective: Minimize total cost
X
Min xp ,
i∈P

Constraints
1 Demand of each item must be fulfilled
X
aip xp >= di , ∀i ∈ I,
p∈P

2 Non-negativity and integrality constraints

xp ∈ Z+ , ∀p ∈ P.

Check: X
aip wi <= WS . ∀p ∈ P,
i∈I

9 / 13
The Knapsack (sub) Problem
Problem description:
Pick a new ‘pattern’ from P with most negative ‘reduced cost’
‘Value’ of item vi , i ∈ I (multiplier of demand constraint)
Decision variables:
ui ∈ I: number of times an item i is cut in the (new) pattern
Objective: Minimize reduced cost
X
Min 1 − ui vi
i∈I

Constraints
1 The generated pattern must be valid

X
ui wi <= WS ,
i∈I

2 Non-negativity and integrality constraints


ui ∈ Z+ , ∀i ∈ I.
10 / 13
Column Generation

repeat
Start with a set of ‘initial’ patterns (m) and solve the master
problem.
Find the multipliers corresponding to the demand constraints:
get vi .
Solve the subproblem (knapsack) and obtain a new cutting
pattern.
until the subproblem has a negative objective value;

11 / 13
AMPL Modeling Tip 1: Master and subproblem
Master problem
var Cut {PATTERNS} integer >= 0; # stocks cut using a pattern

minimize Number: # minimize total stock rolls


sum {p in PATTERNS} Cut[p];

subject to Fill {i in ITEMS}:


sum {p in PATTERNS} a[i,p] * Cut[p] >= demand[i];

Subproblem
var Use {ITEMS} integer >= 0;

minimize Reduced_Cost:
1 - sum {i in ITEMS} price[i] * Use[i];

subj to Width_Limit:
sum {i in ITEMS} i * Use[i] <= W_S;
12 / 13
AMPL Modeling Tip 2: Run File

model csp.mod; data csp.dat;


problem Cutting_Opt: Cut, Number, Fill;
problem Pattern_Gen: Use, Reduced_Cost, Width_Limit;

repeat {
solve Cutting_Opt;
let {i in WIDTHS} price[i] := Fill[i].dual;

solve Pattern_Gen;
if Reduced_Cost < -0.00001 then {
let nPAT := nPAT + 1;
let {i in WIDTHS} nbr[i,nPAT] := Use[i];
}
else break;
};

See csp.mod, csp.dat and colgen.ampl


13 / 13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy