## 2 Materials and Methods
### Proposed Mathematical Model  
This mathematical model is intended to solve the problem described below. The problem is to create a production plan for \(P\) periods, that is, from \(t=1\) to \(t=P\). For these \(P\) periods, the shipping department has issued a tentative delivery schedule for \(K\) containers, each of which contains \(L\) products. It is called tentative because there are three possible delivery schedules for a container. Some containers must be shipped within a specific time frame, such as the 3 rd period. There are also containers that can be shipped within a specific time frame, for example between the 5 th and the 8 th period. Finally, there are also containers that can be sent at any time during the span. The contents of each container have already been determined by the shipping department. In other words, the data input for this problem is the quantity of product \(i\) inside container \(j\), denoted as \(Q_{ij}\). This problem has two sets of decision variables: the delivery schedule and the production schedule. The delivery schedule set the shipping delivery time for each container. The delivery schedule is specified in this mathematical model as binary variable \(x_{ji}\), which is defined as  
\[x_{ji}= \begin{cases}1,&\text{if container $j$ is scheduled at period $t$}\\ 0,&\text{otherwise}\end{cases}  \tag{1}\]  
The production schedule details which products are manufactured during each period, as well as the quantity produced for each product. In this problem, it is assumed that the completed product within a specified time is shipped immediately in the same time period. The production schedule is also specified as binary variable \(y_{it}\), which is defined as  
\[y_{it}= \begin{cases}1,&\text{if product $i$ is scheduled at period $t$}\\ 0,&\text{otherwise}\end{cases}  \tag{2}\]  
The company wants to minimize product variation in each period of the planning horizon. Therefore, the sum of decision variables \(y_{ii}\) is being set to be minimized. The quantity of product \(i\) to be shipped at period \(t\) can be calculated as \(Q_{ij}x_{ji}\). Based on the assumption, this quantity is also equal to the quantity of product \(i\) to be manufactured at period \(t\). The load factor is also defined for product \(i\) or the total production time for one item product \(i\) as \(l_{i}\). Therefore, the production load at period \(t\) can be calculated as  
\[\sum_{i=1}^{L}l_{i}\sum_{j=1}^{K}Q_{ij}x_{ji} \tag{3}\]  
The production load for each period needs to be balanced. If the total balance condition can be satisfied, then the production load in each period is equivalent to the average overall production load. The parameter \(\alpha\) is introduced here to anticipate the variety of possible cases and to provide production planners with flexibility, in which the production load at a certain period is set within \(\alpha\) fraction from the average. Mathematically, it is written as the following two equations. \[\sum_{i=1}^{L}l_{i}\sum_{j=1}^{K}Q_{ij}x_{ji}\leq(1+\alpha)\frac{1}{P}\sum_{i =1}^{L}l_{i}\sum_{j=1}^{K}Q_{ij} \tag{4}\]\[\sum_{i=1}^{L}l_{i}\sum_{j=1}^{K}Q_{ij}x_{ji}\geq(1-\alpha)\frac{1}{P}\sum_{i=1}^{ L}l_{i}\sum_{j=1}^{K}Q_{ij} \tag{5}\]  
It is anticipated that by providing greater flexibility to the production load balance, i.e., a greater value of \(\alpha\), the problem is more relaxed, thereby increasing the likelihood of achieving a better objective function value, i.e., a smaller sum of decision variables \(y_{it}\). In the results section, these effects will be studied and discussed in detail. The complete mathematical programming formulation is presented below. Equation (6) is the objective function, while Equations (7)-(12) are the constraints. Equations (7) and (8) are the constraint for balancing the production load for each period. Equation (9) is defined to ensure that each container is only being scheduled to be delivered in only a single period.