The algorithm DPS3UK (dynamic programming for the k-staged
3UK) described in Algorithm 2 ... computes, for each stage b, the
best solution for cuts done only in one direction
However the pseudo code does NOT do this. Instead it changes the cut orientation each time a cut is made.
The reason this happens is that the update of previous occurs in the wrong place, after each iteration among the dimensions, instead of after each iteration along the stages.
The lines at 2.25, 2,36 and unnumbered must be removed abd replace with a single update at the end of the dody of the loop through stages.
Since this algorithm is unbounded ( creates as many duplicate orders as will fit and permits some order to be ignored ) we will not be using it for timber allocation. So closing this issue.
However the pseudo code does NOT do this. Instead it changes the cut orientation each time a cut is made.
The reason this happens is that the update of
previous
occurs in the wrong place, after each iteration among the dimensions, instead of after each iteration along the stages.The lines at 2.25, 2,36 and unnumbered must be removed abd replace with a single update at the end of the dody of the loop through stages.