Background

A one-dimensional cutting stock problem (1D-CSP) is one of the famous combinatorial optimization problems, which has many applications in industries. In this problem, the amount of residual pieces of processed stock rolls, called trim loss (i.e., wastage) is a significant objective in most studies that should be minimized. A standard one-dimensional cutting stock problem (S1D-CSP) as a kind of the above problem is known as an NP-complete one (Gradisar et al. 2002). Finding solutions for this problem especially for large-sized problems is extremely difficult. In fact, due to the NP-hardness of this problem, it is computationally intractable to obtain its optimum solution in a reasonable time for medium to large-sized problems, and hence researchers have tried to develop meta-heuristic algorithms for solving such a problem. In fact, applying these algorithms is not easy to reliably state that which of these algorithms is best for the given problem. However, it is possible to identify methods that consistently produce better results compared to others for a certain problem. The assumptions of the S1D-CSP are as follows.

  • In this problem, all used stock lengths should be cut to the end in as much as it is possible.

  • All stock lengths are identical and there is no difference between the lengths of them.

In a standard cutting problem, each cutting stock is consumed totally, because the remaining is as cutting waste. While in a general one-dimensional stock cutting problem (G1D-CSP), as another kind of the 1D-CSP, stock cutting residuals can be used later. Also, in a GlD-CSP, the storage stock has different lengths. Reduction of cutting wastes is one of the main goals in the cutting process and also one of the basic purposes in the 1D-CSP. A standard one dimensional cutting stock problem (S1D-CSP) and different procedures have been reviewed by many researchers. (Varela et al. 2009) worked on a practical cutting stock problem from a production plant of plastic rolls as a variant of the well-known one dimensional cutting stock. They proposed a heuristic solution based on a GRASP algorithm in their work.

(Cui 2005) proposed an algorithm to produce T-shape cutting patterns applied in the manufacturing of circular and sectional blanks for stators and rotors. The proposed algorithm uses the knapsack algorithm and an enumeration method to determine the optimal combination of blank rows in the strips, the strip numbers and directions in the pattern. A heuristic algorithm for the one-dimensional cutting stock problem with usable leftover is presented by (Cui & Yang 2010).

Their algorithm consists of two procedures, namely linear programming and sequential heuristic procedures that fulfill the major and remaining portions of the item demands, respectively. This algorithm is able to balance the cost of the consumed bars, the profit from leftovers and the profit from a shorter stocks reduction. (Armbruster 2002) presented a solution approach for the capacitated one-dimensional cutting stock problem under technological constraints by concentrating on solving the pattern sequencing problem occurring from the technological constraints. (Dikili et al. 2007) developed a novel approach for one-dimensional cutting stock problems in ship production via the cutting patterns obtained by the analytical methods at the mathematical modeling stage. The proposed method is able to capture the ideal solution of analytical methods. The main advantage of their proposed method is to guarantee in obtaining an integer solution. Also, the method behaves so that the trim loss is minimized and the stock usage is maximized.

(Liang et al. 2002a) proposed an evolutionary algorithm based on evolutionary programming for cutting stock problems considering contiguity. Two new mutation operators are proposed in their work. Results found by the evolutionary programming are significantly better than or comparable to those found by the genetic algorithm (GA). It is worth to note that evolutionary programming uses mutation as the primary search operator and does not employ any crossover.

(Poldi & Arenales 2009) proposed heuristics for the one-dimensional cutting stock problem with limited multiple stock lengths. They reviewed some existing heuristics and proposed others for solving the integer one-dimensional cutting stock problem with multiple stock lengths. Their study deals with the classical one-dimensional integer cutting stock problem. The given objective function is to minimize the waste (i.e., trim loss).

(Umetani et al. 2003) considered the 1D-CSP, in which the number of different cutting patterns is constrained within a given bound. They proposed a meta-heuristic algorithm incorporated with an adaptive pattern generation technique. The proposed meta-heuristic searches a solution with small deviations from the given demands while using the fixed number of different cutting patterns. (Reinertsen & Vossen 2010) considered the problem of cutting stock problems with due date while addressing common cutting considerations, such as aggregation of orders, multiple stock lengths and cutting different types of material on the same machine. In their work, meeting due dates is more important than reducing the scrap. Also, in condition that there is no feasible production plan, their models find a cutting plan with the minimum weighted tardiness. (Liang et al. 2002b) applied the newest perfect algorithm, which is similar to genetic algorithm, with a mobility function for a cutting stock problem. (Weng et al. 2003) applied the GA to the manufacturing rule oriented cutting of a sectional steel problem for the shipbuilding industry.

(Sung et al. 2004) applied tabu search (TS) to develop an optimization procedure based on the cutting processes in the shipbuilding industry. (Yang et al. 2006) developed the efficient TS method with a mixed objective function for the one dimensional cutting stock problem under a small amount of various cutting conditions. Their proposed TS method consists of a mixed objective function that helps the algorithm to discover the best solution during the one-by-one neighborhood searching processes. (Gradisar et al. 2002) presented an experimental study of various methods aimed at minimizing trim-loss, in their work they mentioned that the LP-based method is possible only when the stock is of the same length or few groups of standard lengths. When all stock lengths are different frequencies, an approach can be used that treat by each item individually.

In addition, (Chen et al. 1996) proposed a simulated annealing (SA) method for the one-dimensional cutting stock problem. A meta-heuristic method based on ACO was presented to solve a one-dimensional cutting stock problem by (Eshghi & Javanshir 2005). In their work, based on probabilistic laws that designed, ants do select various cuts and then select the best patterns. Also, (Dyckhoff 1990) developed a classification scheme for cutting stock problems through a large variety of applications reported in the literature so that classified problems using four characteristics; namely, dimensionality, kind of assignment, assortment of large objects and assortment of small items. He classified the cutting stock problems solutions into two groups: 1) item-oriented approach that treats each item to be cut separately and 2) pattern-oriented approach. So that in this approach at the beginning order lengths are combined into cutting patterns, for which the frequencies that are necessary to satisfy the demands, are determined in a succeeding step. In the second approach, the classic LP-based namely “delayed pattern generation” proposed (Gilmore & Gomory 1961; Gilmore & Gomory 1963) or any other LP-based method is mostly used. (Javanshir & Shadalooee 3) developed a mathematical model for 1D-CSP by defining the virtual cost for the trim loss of each stock. They solved their developed model with SA algorithm. Also, 1D-CSP considered in their work is taken into account as item-oriented.

It is not easy to define exactly which meta-heuristic algorithm is best for which type of problem. However, it is possible, for a given problem, to identify algorithms that consistently produce better results compared with those results produced by other algorithms. For this reason, in this paper, we compare the efficiency and effectiveness of two well-known meta-heuristic, namely simulated annealing (SA) and tabu search (TS), in producing the cutting plan with the lowest trill loss. In addition, we present a mixed-integer linear programming (MILP) mathematical model for a standard one-dimensional cutting stock problem that minimizes the trim losses of the cutting orders. Because of the NP-hard nature of this problem, the presented mathematical model can find an optimal solution by a standard OR software (e.g., Lingo) for small-sized problems.

This paper is organized as follows. Section 2 presents the mathematical programming model for the S1D-CSP. Simulated annealing (SA) and tabu search (TS) algorithms for the considered problem are proposed in Sections 3 and 4, respectively. The computational experience is represented in Section 5. Finally, conclusion is made in Section 6.

Mathematical model of S1D-CSP

This section presents a mixed-integer linear programming (MILP) model for a standard one-dimensional cutting stock problem (S1D-CSP). Minimizing the sum of cutting wastes or cutting remaining unusable in satisfying of needs (demands) is the objective function of the presented model.

Notations

To formulate the S1D-CSP, the following notations are used.

i    order number (i = 1,…,n).

j    stock number (j = 1,…,m).

d j   stock length.

tl j   stock wastes.

s i   order lengths.

n i   required number of orders with s i length.

T  sum of the cutting wastes in the cutting program.

Decision variables

The following variables are used in the presented MILP model.

x i,j   integer variable, number of orders with s i length that are cut from stock j.

y j     zero–one variable that equals to one if the stock j is applied in the cutting plan otherwise, equals to zero.

Mathematical model

The MILP model for a standard one-dimensional cutting stock problem can be defined as follows.

min T = j = 1 m t l j
(1)

s.t.

j = 1 m x ij = n i i
(2)
i = 1 n x ij . s i + t l j = d j . y j j
(3)
y j ( 0 , 1 )
x i , j integer

Minimizing the total trim loss is the objective function (1) of the model. Constraint (2) guarantees cutting needs of orders with regards to the storage stock. Constraint (3) calculates the cutting waste of each stock in the cutting process.

Due to NP-hard nature of this problem, the computational time increases exponentially and finding optimal solution for large-size problem is extremely difficult. This model is solved by the Lingo software using a branch-and-bound method, and the computational times and the state of the method for 20 randomly generated problems with different sizes are shown in Table 1. Results show finding optimal solution for large-scale problems (15, 16, 17 and 18), in a reasonable time and gradually with increasing the size of the problems (19 and 20), even finding feasible area of solutions, is so hard.

Table 1 NP-hard nature of the S1D-CSP

Since finding the optimal solution in a reasonable time for medium to large-sized problems is intractable, a number of researchers have considered developing meta-heuristics to compute near-optimal solutions. It is noticeable that identifying methods consistently producing better results, as compared to others, for a certain problem is very important and interesting. Among the meta-heuristics, simulated annealing (SA) and tabu search (TS) are the ones whose applications have been widely explored for different combinatorial optimization problems. In this work, effectiveness and efficiency of these meta-heuristics for the given problem are compared.

Simulated annealing for S1D-CSP

(Kirkpatrick et al. 1983) introduced simulated annealing (SA) as a meta-heuristic algorithm in 1983. It draws its inspiration from physical annealing of solids. In this algorithm, it may become stuck in a local optimum. To prevent this from happening and trapping in a local optimum, the algorithm occasionally makes a random change to the solution even through the change does not immediately improve the result. This may allow the program to break free of a local optimum and find a better solution later. If the change does not lead to a better solution, the algorithm will probably undo the change in a short time anyway. SA consists of internal and external loops. Task of the internal loop controls the attaining balance in each temperature and updating temperature.

The Metropolis decision-making loop (i.e., possibility of acceptance of non-improvement) is inserted in the internal loop. According to the decision-making loop, if the current solution S current cannot improve the objective function comparing with the new neighboring solution S new ; then, if y < e Δ T (i.e., Δ= E(S new )-E(S current ) > 0 and y ∈[0,1]), the new solution will be accepted. In fact, the acceptance possibility of a neighboring solution is dependent on changing the amount of the objective function, and current temperature. The value of T starts at initial temperature T 0 and is slowly reduce according to the cooling ratio a <1(i.e., T k+1 = a.T k ).

Also, the external loop controls the stopping condition of SA. A given SA may iterate for a number of times at each temperature, called the Markov chain length. The neighborhood search structure generates a new solution from the current candidate solution by slightly changing it. How move from one solution to another one in the solution space is dependent on the structure of designing operators. Attaining to the undiscovered area of exploration space pertain to design efficient operators. The generic flow of SA is given below.

Select an initial temperature T 0 > 0;

Generate an initial solution, S 0 , and make it the current solution, S current , and the current best solution, S best ;

repeat

set repetition counter n = 1;

repeat

Generates the solution S new in the neighborhood of S current ;

Calculate Δ = f(S current )-f(S new );

If (Δ ≤ 0) then S current = S new ;

else S current = Snew with the probability P( Δ,T);

if (S new < S best ) then S best = Snew ;

n = n + 1;

until n > Markov chain length;

Reduce the temperature T;

until the stopping criterion is met.

Solution representation

The first step in developing of a meta-heuristic procedure is to design the solution representation. In this paper, with regards to the problem nature, the initial solution is created randomly. This solution is constructed as a (1 × m)-array, so that m equal to the number of orders. Each order placed in a cell randomly as illustrated in Figure 1.

Figure 1
figure 1

Representation of a solution with four orders.

Neighborhood generation (perturbation)

To search solution space, attaining to undiscovered areas and finding the best solutions, using suitable neighborhood search operators is required. As stated before, designing this operator is dependent on the solution representation. Mechanism of the neighborhood generation should be able to construct the entire solution space. In this paper, in order to generate the neighboring solution, the algorithm randomly changes the place of two orders in the current solution in its array, as shown in Figure 2. This strategy is very simple and guarantees searching the whole of the solution space.

Figure 2
figure 2

Neighborhood generation.

Fitness function

The objective function considered in this paper minimizes the total trim loss. It is assumed that the stock length is standard with the equal length (e.g., 12 meters considered in this paper). By considering the position of each order in the array from the first (i.e., leftmost) to the end (i.e., rightmost), the total waste is computed. So that all the orders, which the summation of their length is lesser than (or equal to) the length of stock, are assigned to it for cutting and the difference between them considered as the trill loss of that stock and so on, till all orders are assigned.

Temperature decreasing function

Temperature is used to compute the acceptance probability of a solution that is worse than the previous one. In the proposed SA algorithm, a geometric function is used as follows.

T k = α T k 1
(4)

where, α is a constant less than 1, but it is very close to 1 (i.e., a typical value for α is chosen between 0.85 and o.95). k is the temperature transformations counter. The high amount of α is as the slow temperature reduction that leads to the best search of neighbors; but, the solution time increases. Adversely, less amount of α is an indicator of the quick temperature reduction and leads to quicker search in neighbors and sooner coverage in the algorithm.

Markov chain length

One of the most important parameters in determining the quality of resultant solutions of SA is the number of searched points in solution space at each temperature, called Markov chain length. In our proposed SA, this counter is denoted by MarChain_Length and used in the inner loop of SA as a counter. The Markov chain length considered in our proposed SA depends on the problem size (i.e., number of orders).

Outer counter variable

The outer counter variable is increased by one, whenever a solution is not selected by probability and shows the number of rejection of perturbed solutions. In fact, if this variable reaches to a pre-determined fixed value as input parameter, the search procedure is stopped or started again depending on the other criteria. Because there is no superior solution exists in the neighborhood, and the search is reached to a near optimal/optimal solution.

Stopping criterion

In our proposed SA, the stopping criterion is a number of consecutive times in the cooling process that does not lead to improvement of the objective function as input data.

Tabu search for S1D-CSP

(Glover 1990) first proposed tabu search (TS) as a higher-level heuristic algorithm used for solving optimization problems. It avoids entrapment in cycles by forbidding or penalizing moves that take the solution, in the next iteration, to points in the solution space previously visited by using the list of prohibited neighboring solutions known as tabu list. Aspiration defined in the tabu search restricts the search from being trapped into a solution surrounded by tabu neighbors. Thus, it helps in the checking condition for the acceptance of solutions, known as a main feature of TS. It also allows search to override the tabu status of the solution and provides backtracking of the recent solutions as they lead to a new path towards a better solution. The generic structure of the TS algorithm is given below.

Step 1. (initialization)

(A). Generate initial solution S initial

(B). S current = S initial

(C). Record the current best known solution by setting S best = S current , define best_cost = f(S best )

(D). Set tabu list (H) to empty.

Step 2. (choice and termination)

Determine Candidate-N(S current ) as subset of N(H, S current ).

Select S new from Candidate-N(S current ).

(S new is called a highest evaluation element of Candidate-N(S current ).

Terminate by a chosen iteration cut-off rule.

Step 3. (update)

Re-set S current = S new .

If f(S current ) < best_cost or f(S current ) < Aspiration perform Step 1(B)

Update the tabu list (H) and Aspiration conditions.

Return to Step 2.

Tabu list

A tabu list is a set of recently visited solutions and keeps tracking the previously visited solutions in order to restrict the algorithm to revisit the pre-visited solutions. In fact, at every step, the algorithm checks for verifying whether the newly generated solution is lately visited. The tabu list task helps the algorithm to visit more new neighboring solutions.

Aspiration

Aspiration is a tabu search variable whose function is to restrict the search from being trapped at a solution surrounded by tabu neighbors. If a solution has a neighborhood of only tabu solutions, the one with objective function value better than aspiration will be chosen to explore further.

Computational experience

As mentioned earlier, it is not easy to reliably determine which meta-heuristic method is the best for which problem; but, it is possible to identify methods consistently producing better results, as compared to others for a certain problem. In this section, effectiveness and efficiency of the SA and TS algorithms for the 1D-CSP are considered.

The proposed SA and TS algorithms are coded in Microsoft C#.Net and executed on a Pentium processor running at 2.5 GHz and 2 GB of RAM. The results of solving the 14 small and medium-size test problems solved by branch-and-bound (B&B), SA and TS algorithms are shown in Table 2. This table shows the objective function value (OFV) and the gap between solutions obtained from SA and TS with optimal solutions of the B&B method. The results show that SA and TS algorithms are suitable and both of them even are capable to obtain an optimal solution for small-sized problems. Also, these algorithms can find good results for the medium-sized problems so that the gap between them and optimal solution is lower that 20% (the first 14 randomly generated problems are in the small to medium range of size).

Table 2 Result obtained from SA and TS and branch-and-bound methods

To compare the efficiency of these algorithms with each other, the six large-scale problems (15, 16, 17, 18, 19 and 20) are solved and the total stocks used in each solution, the total trim losses and total trim loss ratio of each algorithm are represented in Table 3. The total trim loss ratio can be defined by:

Total trim loss ratio = Sum of trim loss of all used stocks Stocks used × standard length × 100 %
(5)
Table 3 Comparison between SA and TS algorithms

It is obvious that SA outperforms TS to get a better minimum number of stocks used or less total trim loss (i.e., total trim loss ratio) so that the mean of the total trim loss ratio of SA for the problems is 6.49 percent while it is 7.45 percent in TS. Figure 3 shows CPU times of two algorithms for the twenty mentioned problems. It is noticeable that more CPU times of the SA algorithm in comparative with TS is due to the internal and external loops and extremely depends on the Markov chain length.

Figure 3
figure 3

CPU times of the proposed SA and TS algorithms.

Conclusions

In this paper, a mixed-integer linear programming (MILP) model for a standard one-dimensional cutting stock problem (S1D-CSP) has been presented. Due to its NP-hardness, finding feasible solution in a reasonable time, especially for medium to large size problems, is impossible. To solve such a hard problem, two well-known meta-heuristics based on simulated annealing (SA) and tabu search (TS) have been proposed and developed. To compare the efficiency of these algorithms, a number of test problems have been solved, and the associated results in terms of the objective function (i.e., trim loss) and CPU time have been compared. The results show the efficiency of our proposed SA in finding cutting plan as its output with lesser trim loss rather than TS. In addition, the results show that TS outperforms SA in terms of the CPU time.