Tutorial 10: Solving Cutting Stock Problem Using Column Generation Technique
Tutorial 10: Solving Cutting Stock Problem Using Column Generation Technique
Tutorial 10: Solving Cutting Stock Problem Using Column Generation Technique
Minimize c T x,
Subject to Ax = b,
x ≥ 0.
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.
3 / 13
For feasibility, A(x + θd j ) = b and
Ad j = BdBj + NdNj = 0,
BdBj + Aj = 0,
dBj = −B −1 Aj .
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
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
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
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
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
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;
};