![](bg4.png)
activation level cuts. The f illingPattern function is
implemented to insert unplaced items in empty sec-
tions, given the residual demand and the value of cuts
of the chosen pattern. Subsequently, prices λ
i
are up-
dated by promoting items with high current demand
d
0
i
and small multiplicity in a. A complete CSP so-
lution s is finally obtained by combining the partial
solution computed for demand d
0
with the one found
for the residual demand r
0
.
In general, open stacks are not an objective to be
minimized, but are limited by the number of unload-
ing stations that equip the cutting machine. Although
the pattern generation procedure already respects the
limited availability of unloading stations, an attempt
at reducing the stacks opened by the current solution
s is made by the patternSeq procedure. The function
patternSeq implements a simple pattern sequencing
heuristic that compares each pattern with all the sub-
sequent ones, and swaps pattern pairs that allow the
largest decrease of open stacks.
The current solution is added to a pool (Sol) if it
fulfills all the constraints and is not dominated by any
other. The process is iterated a prescribed number N
of times unless certain halting conditions hold (e.g.,
user stop or minimum used area reached). Finally, the
pool Sol is filtered and reduced to a frontier of non-
dominated solutions.
It may happen that Sol consists of partial solu-
tions only, due to insufficient stock availability. In that
case, non dominated solutions are limited to those that
fulfills the largest demand.
For the sake of conciseness, in the following we
shall assume c = h j,Hi, i.e., the cut of the first stage is
always parallel to the height H
j
of the stock item: the
arguments presented maintain validity when replac-
ing ”horizontal” with ”vertical” and ”H
j
” with ”L
j
”.
3.2 Patterns Generation and Selection
For a given configuration c = h j,Hi ∈ C, function get-
Pattern creates a pattern that depends on the current
prices λ and demands d
0
. First, for each part type i ∈ I
0
a vertical section of width l
i
is defined, and a bounded
integer knapsack problem is solved. The knapsack ca-
pacity is set equal to the stock height H
j
and element
sizes correspond to the heights h
i
of the part types
selected. Clearly, only part types k ∈ I
0
with l
k
≤ l
i
,
demand d
0
k
> 0 and prices λ
k
> 0 are considered. Ac-
tually, each knapsack element describes a horizontal
strip containing a single item k (2-stage patterns), or
multiple copies of the same part-type (3-stage pat-
terns) wide at most l
i
. In the latter case, the maxi-
mum multiplicity m
k
is given by
b
l
i
/l
k
c
, and prices
are computed accordingly.
Let Q
c
be the set of sections generated so far, each
one provided with a certain activation level defined
with respect to the current part type demand d
0
. The
pattern is obtained by solving a further bounded knap-
sack problem that optimally selects sections in Q
c
. In
particular, the knapsack capacity is equal to L
j
and
knapsack elements correspond to sections, where the
size and value of element q are respectively equal to
the width and price of section q (the price of a sec-
tion is the sum of the prices of items it contains).
The resulting solution provides a subset of sections
¯
Q
c
that may present overproduction. In order to preserve
the structure of the knapsack problem, only activation
levels of the elements (sections) are explicitly con-
sidered, whereas part type multiplicities in sections
are neglected; moreover, the simultaneous presence
of part types and rotated part types is not accounted
for. It follows that part types overproduction is not
prevented and a post-processing may be required to
exactly fulfill part type demands. Sections q ∈
¯
Q
c
are
sorted by non-increasing order of the ratio
V
q
S
q
, where
V
q
and S
q
are respectively the price and the area of
section q.
Sections are possibly added to the pattern p fol-
lowing the prescribed order, and demand d
0
is accord-
ingly updated. In particular, a section is discarded
if it causes demand overproduction, or overflow of
the allowed limit on open stacks. In that case, the
resulting pattern p may present a residual stock area
of length R
j
that can be further filled. Therefore the
whole procedure, i.e., sections generation and selec-
tion, is repeated in order to generate a sub-pattern for
the configuration c = h
¯
j, Hi ∈ C, where stock item
¯
j
has length R
j
and height H
j
. The sub-pattern is placed
next to p and merged with it, and the process reiter-
ated until the residual stock area cannot be filled any
longer. Pattern p is then added to the set P.
Once patterns are generated for each c ∈ C, the
procedure getBestPattern selects the most profitable
pattern a ∈ P, that is, a pattern that maximizes the
total price of the sections it contains. Pattern a is fi-
nally added to the partial CSP solution s with acti-
vation level cuts, computed according to the current
demand d
0
and stock items availability. The pattern
generation process is iterated until the whole demand
is fulfilled.
Since the presence of real-valued prices, all the
above bounded integer knapsack are solved by en-
coding the integer variables as binary variables and
then by using an own implementation of the algorithm
for the 0-1 knapsack described in (Martello and Toth,
1990).
ICORES 2018 - 7th International Conference on Operations Research and Enterprise Systems
34