# A Mathematical Model for Reduction of Trim Loss in Cutting Reels at a Make-to-Order Paper Mill
## 3 Mathematical Model
#### Decision Variables \begin{tabular}{l l} \(X_{ac}\) & number of master reels of pattern \(c\) associated with width \(W_{a}\) \\ \(X_{bd}\) & number of stocked reels of pattern \(d\) associated with width \(W_{b}\) \\ \end{tabular}   
The problem can verbally be summarized as determining the decision variables that can fill the required orders with minimum trim loss area. Mathematically, the objective function for trim loss minimization for first phase can be stated as follows:  
\[\textbf{Minimize}:Z=\sum_{a=1}^{l}W_{a}\sum_{c=1}^{n}X_{ac}+\sum_{b=1}^{m}W_{b }\sum_{d=1}^{r}X_{bd} \tag{1}\]  
Subject to the constraints which deal directly with satisfying the demand for reels of smaller widths:  
\[\sum_{a=1}^{l}A_{ai}\sum_{c=1}^{n}X_{ac}+\sum_{b=1}^{m}B_{bi}\sum_{d=1}^{r}X_{ bd}\geq D_{i}\ \ \ i=1,2,\ldots,u \tag{2}\]  
\[\sum_{d=1}^{r}X_{bd}=N_{b}\ \ \ if\ w_{i}=W_{b}\ \text{and}\ D_{i}\geq N_{b}\ \ \ i=1,2,\ldots,u\ \ \ b=1,2,\ldots,m \tag{3}\]  
\[\sum_{d=1}^{r}X_{bd}=D_{i}\ \ \ if\ w_{i}=W_{b}\ \text{and}\ D_{i}<N_{b}\ \ \ i=1,2,\ldots,u\ \ \ b=1,2,\ldots,m \tag{4}\]  
\[\sum_{d=1}^{r}X_{bd}\leq N_{b}\ \ \ if\ w_{i}\
eq W_{b}\ \ \ i=1,2,\ldots,u\ \ \ b=1,2,\ldots,m \tag{5}\]  
\[\sum_{i=1}^{u}A_{ai}-1\leq k\ \ \ a=1,2,\ldots,l \tag{6}\]  
\[\sum_{i=1}^{u}B_{bi}-1\leq k\ \ \ b=1,2,\ldots,m \tag{7}\]  
\[X_{ac},X_{bd}\geq 0\ \ \ a=1,2,\ldots,l\ \ \ b=1,2,\ldots,m\ \ \ c=1,2,\ldots,n\ \ \ d=1,2,\ldots,r \tag{8}\]  
The objective function (1) minimizes the trim loss and satisfies an order by cutting master reels of widths \(W_{1},W_{2},\ldots,W_{l}\) and stocked reels of widths \(W_{1},W_{2},\ldots,W_{m}\) into required smaller widths \(w_{1},w_{2},\ldots,w_{u}\). The constraints (2) ensure that the number of required widths of type \(i\) to be cut from the master reels and stocked reels must be greater than or equal to the order requirements while the Equations (3) and (4) are used when a required width in a set of order matches with the width of stocked reels. The inequalities (5) are used in case of non-matching widths in a set of orders and stocked reels, and impose that the quantity of stocked reels of widths \(W_{1},W_{2},\ldots,W_{m}\) chosen for cutting to meet an order must be less than or equal to its maximum number in stock \(N_{1},N_{2},\ldots,N_{m}\). Constraints (6) and (7) satisfy the condition that the available number of knives \(k\) can cut master reels or stocked reels into \(k+1\) pieces simultaneously. Finally, the inequalities (8) are the non-negativity restrictions. In the second phase, all non-integer decision variables, if obtained in the first phase, are converted into integers. However, if there is single non-integer decision variable, it is just rounded up. All non-integer decision variables between two successive integers \(y\) and \(y+1\) are converted into integers by removing the fractional part \(\textit{frac}(y)=y-\lfloor y\rfloor\) from the entire column vector of decision variables resulted in first phase. Consider coefficients of all decision variables in inequalities (2) as matrix of order \(i\times(a+b)\) and the pre-decimal parts of all decision variables as matrix of order \((a+b)\times 1\). The multiplication of these two matrices results in a column vector \(F\) of order \(i\times 1\), which is used to calculate shortages \(S_{i}\) or surpluses \(E_{i}\). Figure 1 shows a simplified flow chart of the algorithm.