Cutting_Stock
Cutting_Stock
• Note:
minimize number of pieces ≡ minimize total waste
• Cutting pattern Pj (j = 1, 2, …, NJ) corresponds to a specific way of cutting
a piece of material:
NJ
Subject to ∑a
j =1
ij x j ≥ ni i = 1, ⋯ , I
x j ≥ 0, integer j = 1, ⋯ , NJ
where xj represents the number of pieces of material cut with the pattern j
NJ
(CSP) min ∑x
j =1
j
NJ
Subject to ∑a
j =1
ij x j ≥ ni i = 1, ⋯ , I
x j ≥ 0, integer j = 1, ⋯ , NJ
NJ
(CSP) min ∑x j =1
j
NJ
Subject to ∑a j =1
ij x j ≥ ni i = 1, ⋯ , I
x j ≥ 0, j = 1, ⋯ , NJ
• The number NJ of patterns may be very large.
For problems where the piece of material have length l = 800 cm., and
where there are demands for 40 different lengths li from 20 cm. to 80 cm.,
the number of admissible patterns can easily reach 10 to 100 millions.
{ }
• At each iteration, a subset of patterns P1 , P2 , ⋯ , Pj are available to
specify a restricted problem of (CSP)
NJ
(CSP) min ∑x
j =1
j
NJ
Subject to ∑a
j =1
ij x j ≥ ni i = 1, ⋯ , I
x j ≥ 0, j = 1, ⋯ , NJ
NJ
Subject to ∑a
j =1
ij x j ≥ ni i = 1, ⋯ , I
x j ≥ 0, j = 1, ⋯ , j
xj =0 j = j + 1, ⋯ , NJ
Restricted Problem of (CSP) :
j
NJ
min ∑x
j =1
j
j
NJ
Subject to ∑a
j =1
ij x j ≥ ni i = 1, ⋯ , I πi
x j ≥ 0, j = 1, ⋯ , j
xj =0 j = j + 1, ⋯ , NJ
Solve the restricted problem.
Denote x an optimal solution.
T
Denote also π = π 1 , π 2 ,⋯ , π I the vector of optimal simplex multipliers.
c = 1− ∑π a ≥ 0
j i
ij
j = 1, ⋯ , j
i =1
Now x is feasible for CSP( )
NJ
(CSP ) min ∑x
j =1
j
NJ
Subject to ∑a
j =1
ij x j ≥ ni i = 1, ⋯ , I
x j ≥ 0, j = 1, ⋯ , NJ
( )
To verify if x is optimal for CSP , we have to verify that
the relative cost is non negative for each variable:
I
c j = 1 − ∑ π i aij ≥ 0 j = 1,⋯ , NJ
i =1
or if
I
min 1 − ∑ π i aij ≥ 0.
j =1,⋯, NJ
i =1
But recall that the cutting patterns Pj are not known for j = j + 1,⋯ , NJ .
In order to be able to verify if
{ I
min 1 − ∑ π i aij ≥ 0,
j =1,⋯, NJ i =1
}
recall that any cutting pattern P is characterized by
∑a l
i −1
i i ≤ l.
Hence
I
min 1 − ∑ π i a ij
j =1,⋯ , NJ
i =1
is equivalent to determine an optimal solution a T = a1 , a 2, ⋯ , a I of
= 1 + min −
I I
∑ ∑
I
min 1 − ∑ π i a i π i a i = 1 − max π i a i
i =1 i =1 i =1
I
Subject to ∑al
i =1
i i ≤l
a i ≥ 0, integer i = 1, ⋯ , I .
Hence
I
min 1 − ∑ π i a ij
j =1,⋯ , NJ
i =1
is equivalent to determine an optimal solution a T = a1 , a 2, ⋯ , a I of
I
I I
min 1 − ∑ π i a i = 1 + min − ∑ ∑
π i a i = 1 − max π i a i
i =1 i =1 i =1
I
Subject to ∑al
i =1
i i ≤l
a i ≥ 0, integer i = 1, ⋯ , I .
The problem is then equivalent to solve the knapsack problem
I
(KP) max ∑ π i ai
i =1
I
Subject to ∑a l
i =1
i i ≤l
ai ≥ 0, integer i = 1,⋯ , I .
T
= a1 , a2 , ⋯ , a I be an optimal solution of ( KP ) ,
* * * *
Let a
*
and denote P the associated cutting pattern.
I
1 − ∑ π i ai ≥ 0,
*
If
i =1
I
1 − ∑ π i ai < 0,
*
If
i =1