1. Introduction
The cutting stock problem (CSP) consists of cutting a set of objects available in stock to produce the desired items in specified quantities and sizes in order to optimize (maximize or minimize) a given objective function [
1] such as production costs or losses from the cutting process.
Many industry processes are using the CSP, such as the automotive, construction and bicycle manufacturing industries. Considering 16, 16 and 14 m bars in stock and 3, 4 and 6 m items, with demands of 2, 3 and 2, respectively, as in
Figure 1. In this process, the loss and leftover are classified by size of the bar not used, i.e., a bar smaller than a smallest item demanded is considered loss or is otherwise leftover.
Figure 2 shows two possible solutions: in
Figure 2a, only the 16 m bars are used, with 2 m of loss. In
Figure 2b, one 16 m bar and one 14 m bar are used, without loss. In both patterns, leftovers are produced, but in
Figure 2b, there is no loss.
The CSP belongs to an important area of operational research that assists in the decision-making process. There are different types of mathematical models that can formulate the cutting stock problems. One of the possible models is linear programming, which proposes to optimize the objective function, subject to a set of constraints, whose variables are linearly related [
1]. The one-dimensional cutting stock problem in turn involves only one dimension in the cutting process, such as cutting steel bars, paper rolls and tubes [
2,
3].
Gilmore and Gomory were among the first to address the cutting stock problem [
4,
5] and to define the problem as filling an order at minimum cost for specified lengths of material to be cut from given stock lengths of given cost. Also, in [
6], higher-dimensional cutting stock problems are modeled as linear programming problems.
The
usable leftover cutting stock problems [
2] consist of a branch of the cutting stock problem. Its purpose is to determine the cutting patterns and to analyze the leftovers generated by the cutting process. This type of problem can be understood as a one-dimensional cutting stock problem in which the unused material in the cutting process may be used in the future, if large enough [
7]. A review of published studies that consider the solution of the one-dimensional cutting stock problem with the possibility of using leftovers to meet future demands is presented by [
3].
A heuristic algorithm for the one-dimensional cutting stock problem with usable leftovers is proposed in [
8], which consists of two procedures: linear programming that fulfills the major portion of the item demand and a sequential heuristic that fulfills the remaining portion of the item demand. In [
2], it is assumed that leftovers should not remain in stock for a long time. Thus, leftovers have priority-in-use compared to standard objects (objects bought by the industry) in stock, and a heuristic procedure is proposed for this problem.
Addressing more recent papers, Cui et al. [
9] present an integer programming model for the one-dimensional cutting stock problem with limited leftover types and describe a heuristic algorithm based on a column-generation procedure to solve it. The column generation technique is used in [
10], and it is associated with a set of residual cutting patterns. It recombines these residual cutting patterns in different ways and generates new integer-feasible cutting patterns. In [
11], a modification in the constructive greedy heuristic, which builds a cutting pattern by sorting in descending order the paired items or items of odd length, is presented. The only objective is to minimize the quantity of cut objects.
Considering the cutting stock problems and usable leftovers, the objective of this paper is to propose a tree-based heuristic method, named OptimizationTREE, in order to minimize the number of bars needed to cut known item demand, in the one-dimensional cutting process with no stock. The problem presented in this paper considers an unlimited quantity of one type of bar.
These methods are measured in terms of accuracy and runtime. The proposed heuristic method is described in the next section. Its performance was analyzed and compared with a well-known algorithm in the literature: the
algorithm, proposed by [
7]. The accuracy was rated according to: (i) total number of used bars, (ii) the loss and leftover produced in the process. The runtime shows that the algorithms present better computational complexity. The proposed heuristics aim to reduce losses by grouping multiple losses in the same bar (whenever possible), so that the losses (useless) become leftovers (useful), as shown in
Figure 2.
The main contribution is to obtain optimized solutions, similar to those obtained in [
7], for the one-dimensional cutting stock problem, with relevant gains in computational complexity (or runtime) and conversion of loss to leftovers whenever possible. The heuristics can be used in commercial software solutions and provide a reduction in the raw materials used (or manufacturing costs) and, consequently, environment preservation, as was the case for the results obtained by [
12,
13], which address the green manufacturing study topic.
The novelties of this proposal, in relation to existing methods in the literature, are highlighted as follows: (i) the heuristic is based on a tree structure, which provides accessibility and understanding for users, in addition to a reduction in processing time; (ii) multiple losses are grouped on the same bar whenever possible, transforming losses into reusable leftovers and providing loss reduction. The algorithm does not require extra raw material; that is, it uses the same quantity of initial material for cutting.
The remainder of the paper is organized as follows.
Section 2 presents the definition of the problem under study in this paper.
Section 3 describes the initial procedure used in the first step of the proposed heuristic, whose algorithm, named
OptimizationTREE, is presented. The data set for the simulation is provided in
Section 4, followed by analysis of the simulation’s results (
Section 5). Finally, in
Section 6, the conclusions of the paper are given, and aspects of future work are discussed.
3. The Proposed Heuristic: OptimizationTREE
In this section, the proposed heuristic method to solve the problem described in
Section 2 is presented. The heuristic was evaluated in terms of the total number of bars used in the whole cutting process, the loss and leftover provided and also the computational complexity of the solution method.
First of all, a selection of ordered items (SOI) procedure, described in Algorithm 1, must be presented, since this ordering procedure, which is based on the first fit algorithm [
14], is used in the first step of the proposed heuristics.
This procedure uses as input the set of items demanded (
l and
d), sorted in descending order of size. Then, the items are selected to be cut, starting with the largest one; if this is not possible, the next item is tested and so on. Other inputs are the size of the bar (
L) and the total number of items (
n). The outputs are the number of each item
i in the cutting pattern or bar (
x), the size of the bar not used (
) and the updated demand of items (
d).
Algorithm 1: Selection of ordered items (SOI) |
![Materials 16 07133 i001]() |
A tree-based heuristic (OptimizationTREE) is described in Algorithm 2. It has two phases: (i) selection of the items to be cut and (ii) loss reduction. First, the set of demanded items is sorted in descending order of size (l). In the first phase, a set of items is selected according to Algorithm 1. This first set is then used in the second phase to reduce losses as follows: for each selected item, the number of items to be cut is reduced by one unit in an attempt to fill the rest of the bar with larger elements and then with smaller elements. After the next smaller item to be cut is selected, the algorithm verifies whether a larger item can be used; if not, the next smaller item is processed. The inputs, outputs and main variables of Algorithm 2 are described as follows.
The inputs of Algorithm 2 are:
The item size ;
The item demand ;
The size of bar L;
The number of items to be cut n.
The outputs of Algorithm 2 are:
The of all cutting processes;
The , the sum of loss in each bar used;
The with the sum of used bars.
The variables used in Algorithm 2 are described as follows:
: size of the bar not used during the execution of the algorithm;
: the number of items i to be cut in the bar, for .
In this proposed heuristic, the losses of the cutting process are concentrated on the smallest number of bars possible, using a tree structure [
15], in order to convert losses (unusable) into leftovers (usable) and reduce the number of bars needed in the process.
Algorithm 2: Tree-based heuristic (OptimizationTREE) |
![Materials 16 07133 i002]() |
A hypothetical optimal solution can be determined as a parameter to obtain the minimum number of bars required to produce the demanded items. This theoretical minimum number of bars needed to produce the demanded items is defined in Equation (
3). The
lower bound of bars (
) is used to evaluate the performance of the proposed heuristics, i.e., better solutions use bars close to
. If any of the heuristics provide as a solution a minimum number of cutting bars smaller than
, it means that the algorithm has an error, and the solution is impossible.
When this theoretical limit is achieved, the unused material remaining is defined in Equation (
4).
The minimum theoretical limit of unused material (Equation (
4)) can be classified as follows:
4. Data Set for Simulations
The numerical values used in simulations of the proposed heuristics are based on [
16], considering a one-dimensional cutting stock problem for steel roll. In this paper, a
category is a set of
(
) and
n (the number of items). In the simulations of this study, 10 categories, as shown in
Table 1, with 100 instances for each category, were considered.
The data used in the heuristic methods are described below:
L (the size of the bar): 1188 mm;
(length of item i): belongs to the range [20, 444] with uniform distribution;
(demand of item
i): according to [
16], there are two cases: (i) low demand of items,
and (ii) high demand of items,
with uniform distribution.
As mentioned above,
is based on [
16], and
n is generated uniformly in order to verify the heuristics performance, since in practice no example of this magnitude is known in the literature.
The Python language was used for all the heuristics implementation. The heuristic
[
7] was used as the base to analyze the results, and the
scipy library was used for the linear relaxation solution. The heuristic
was also adapted for the case considered in this study, in which there is no reuse of leftovers with stock; that is, the reuse parameter is defined as the smallest item to be produced in each instance. Still, in the heuristic
, the initial cutting patterns (homogeneous),
, are generated from Equation (
5).
In OptimizationTREE and heuristics, the sorting method used is quick sort. The hardware used for the simulations consists of an Intel processor® Core i7 920 Ghz with 16 Gb of RAM. For the heuristic simulations, the Linux operating system Ubuntu 18.04 × 64 is used. The runtime of the presented instances is also considered in this paper and shows that the results are acceptable in practice.
5. Results and Discussion
The execution of the instances on each category provides results that allow the performance of the proposed heuristic to be analyzed in detail in comparison with the
heuristic, proposed by [
7] and well known in the literature. The
heuristic considers a one-dimensional cutting stock problem in which the unused material in the cutting patterns may be used in the future if large enough. The authors of [
7] modified some heuristics of the literature that minimize the trim loss and included the possibility of retails (large leftovers) that are not computed as losses.
It is important to highlight that the model proposed by [
7] is the closest to the problem addressed in this paper. The main purpose of
is to solve the cutting stock problem with usable leftovers. The
algorithm was adapted to the restrictions considered in this study: only one type of bar in unlimited quantity and no stocks. It is also important to mention that other works in the literature that approach mathematical models with the use of leftovers have different objectives and would have to undergo more substantial adaptations, which would cause a mischaracterization of the problem.
Table 2 shows the mean of bars (
) used in the cutting process and its standard deviation
as well as the mean of
(
) and its standard deviation
of the
OptimizationTREE and
heuristics.
Similarly,
Table 3 shows the mean of loss (
) and its standard deviation
, the runtime for each category (in seconds) and its standard deviation for the
OptimizationTREE and
heuristics.
In order to illustrate the performances of the heuristics,
Figure 3 represents: (a) the means of cutting bars resulting from the
OptimizationTREE and
heuristics, referring to the minimum number of bars (“B_bar”) and (b) the standard deviation of cutting bars.
Figure 4 represents: (a) the means of leftovers, also calculated for the two heuristics, and mean of the leftover of the hypothetical cutting pattern and (b) the standard deviation of the leftover.
Figure 5 shows the same for the losses, and
Figure 6 presents the runtime for the heuristics under study.
These statistical measures indicate the performance across categories, considering the number of cutting bars, the leftover, the loss and the runtime of the
OptimizationTREE heuristic and the heuristic proposed by [
7]. Observing the results of
Table 2 and
Table 3, it can be observed that:
The OptimizationTREE heuristic uses fewer bars than , presenting more leftovers and fewer losses.
The OptimizationTREE heuristic has more leftovers and fewer losses when compared to the heuristic.
The heuristic provides more losses, that is, small parts spread over the bars used in the cutting process. The OptimizationTREE heuristic provides fewer losses, which are concentrated in leftovers. Thus, this leftover can be used to address the next demand.
Figure 6 shows that the runtime of the
heuristic is higher than that of the
heuristic, especially for larger examples.
Thus, although both heuristics provide a similar number of cutting bars, the heuristic generates fewer leftovers and more losses than the heuristic proposed in this work, indicating worse performance.
As expected, as shown in
Figure 5, the
OptimizationTREE heuristic generates the smallest number of loss, showing the more desirable performance.
Figure 4 shows that the
OptimizationTREE heuristic generates more leftovers. Generating leftovers is desirable when the number of cutting bars is close to
, since leftovers are used to meet next demands. In the proposed heuristics, the leftovers are concentrated in the last bars. It is important to note that the peaks presented by the
heuristic in
Figure 4 are due to the use of the smallest items. In addition, the smallest item for each instance is fixed according to the smallest value of
. During the execution of the algorithm, the demand for the items is met, and then these items are no longer considered for cutting. The remaining items are larger items since the algorithm removes a unit from the largest item in each iteration. Therefore, from a given bar, more leftovers and very few losses are generated, since the higher demand causes these last cutting patterns to be repeated more often, causing the visible peaks.
Another analysis can be carried out between the hypothetical cutting pattern that presents the minimum number of bars, the leftover and the loss resulting from this hypothetical pattern. The distance of these values and the results of heuristics are presented in the following equations. The
, defined in Equation (
6), presents the mean value of the distance (absolute error) between the lower bound of bars (
), shown in Equation (
3), and the results of the
OptimizationTREE (OptT) and
heuristics. The “
H” in the equation represents the chosen heuristic.
Similarly, the
(Equation (
7)) and the
(Equation (
8)) show the main value of the distance (absolute error) between lower bound of leftovers (
) and of loss (
), and the heuristic result of the leftover (
) and of loss (
), respectively, for each category.
Table 4 and
Table 5 show the values of the GAP obtained by the
OptimizationTREE and
heuristics, respectively, considering the number of cutting bars, the leftover and the loss for each category. The columns present the numeric values provided by Equations (
6), (
7) and (
8), respectively, followed by their respective standard deviations.
Analyzing
Table 4 and
Table 5, the
OptimizationTREE heuristic presents the smallest GAP in relation to the number of cutting bars (
).
OptimizationTREE is closer to
and generates even larger leftovers.
The computational complexity of the proposed algorithms is shown in
Table 6, considering the worst case of the two heuristics proposed and the heuristic
from the literature. The second column presents the number of sorts performed by each algorithm during its execution, and the last column shows the complexity order of the algorithms, considering the worst case.
Table 6 shows that the
algorithm presents, in the worst case, a quadratic order computational complexity (
) but provides more leftovers to be reused, which is desirable, since
OptimizationTREE aims to convert losses into leftovers, providing reuse. The computational complexity of the
heuristic is a polynomial order. The main runtime for all the 10 categories (in seconds) is as follows:
OptimizationTREE = 0.991 and
= 3.4727. Then, for the case that considers unlimited quantity of one type of bar,
is more appropriate than
.
6. Conclusions
In this study, one-dimensional cutting stock problems were considered. These problems minimize the number of cutting bars in the cutting process, satisfying the demand, considering cutting rolls with known demand and using the leftovers provided from the previous roll’s cutting process. In order to accomplish this goal, the
OptimizationTREE heuristic is proposed. It presents a tree-based structure and groups losses in the same bar to transform them into usable leftovers. The performance of the proposed heuristic was compared with the
heuristic, proposed by [
7], to solve the problem considered in this paper (unlimited quantity of one type of bar and no stocks).
Analyzing
Table 4 and
Table 5, which show the values of the GAP obtained by
OptimizationTREE and
heuristics, respectively, we can conclude that the
OptimizationTREE heuristic presents the smallest GAP in relation to the number of cutting bars (
). Therefore,
OptimizationTREE is closer to the theoretical minimum limit, representing the fundamental contribution of this paper. In addition, the results show that the proposed heuristic reduces the processing time and the number of bars needed in the cutting process, while it provides a larger leftover for the one-dimensional cutting stock problem.
Using the OptimizationTREE heuristic proposed in this paper, the leftovers from previous cutting process can be used in the next item’s demands. The number of bars is minimized. Then, fewer losses are produced, and the losses are converted into leftovers. In this paper, a loss is an unused bar smaller than the size of the smallest item demanded. The loss can also be defined by the producer, for example as a fixed value or a minimum acceptable percentage. Therefore, the results offer a possible use for leftovers, reducing the use of raw materials in industrial processes and providing more commercially viable solutions.
Material loss is an important factor for the industry. In the production phase, the cutting process is present in several segments, such as in the production of tubes, profiles and door frames. The best use of materials provides a reduction in investments in production, for example, in actions such as the acquisition and transportation of raw materials and cost reduction for the end consumer, since the better use of materials in production makes it possible to reduce the final value for the consumer.
Finally, the proposed heuristics were implemented as open source (Python language), and the code is freely available in the GitHub package resource (
OptimizationTREE:
github.com/omatheuspimenta/heuristictree, accessed on 8 November 2023), which enables the use of the proposed heuristic in future works.
Inclusion of a third phase in the algorithms, i.e., after defining the all cutting patterns, changing the item distribution with the aim of converting losses in leftovers, is a prospect for continuing this research. This new phase must be carefully designed since it can increase the processing time.