This work proposes a MILP model with a global discrete uniform time grid to solve the scheduling problem described above. This time representation has some advantages compared to continuous time models in handling the types of constraints present in this problem (Floudas and Lin 2004; Harjunkoski et al. 2014). One challenge is that it is not known in advance how many times a die will be changed before its restoration, and in what ratios will its lifespan be subdivided. This would make it very difficult to determine the number of time points in a continuous time formulation. Inventory costs, resource demands and arrivals are also easier to model in discrete time models.
Resources are modeled according to the Resource Task Network (RTN) formulation, which was proposed by Pantelides (1994). It provides a general representation of materials and production equipment, and it is suitable for modeling the durability of the dies and its associated constraints. This modeling method will be discussed in Sect. 3.3 in more detail.
Defining the discrete uniform time grid
To use a discrete uniform time grid, its resolution must be determined. The planning horizon is partitioned into equal-length time slots, indexed by \(\tau \). The length of each time slot, \(t^\tau \) should be chosen based on the values of other timing parameters. In an ideal case, each parameter associated with a time is a multiple of \(t^\tau \). Otherwise, the solution space of the model may not include the optimal schedule. In the following, \(\tilde{t}\) denotes the number of time slots a time parameter t is stretched over: \(\tilde{t} = \lceil \frac{t}{t^\tau }\rceil \).
While shorter time slots can guarantee more precise solutions, having more time slots lead to more variables and hence more complex models. The end of the planning horizon is the latest delivery date among the orders, therefore, the number of required time slots is \(n = \max _{o\in {\mathbf {O}}}\left\{ \tilde{T}^{O}_o\right\} \).
The steel rods arriving in shipments are available at the end of the respective time slot. To simplify the formulation, a computed parameter \(Q^{S}_{\tau ,r}\) is defined for the quantity of steel rod r available from the end of time slot \(\tau \), and at the beginning in the case \(\tau =0\).
$$\begin{aligned} Q^{S}_{\tau ,r} = \sum _{s\in {\mathbf {S}}: (\tau -1) t^\tau < T^S_s \le \tau \cdot t^\tau } Q^{S}_{s,r} \quad \forall r\in {\mathbf {R}}, \tau = 0,\ldots ,n. \end{aligned}$$
Because of the flexibility of the preparation and machining steps, these operations do not need to be scheduled. Instead, the heat treated axles must be delivered before the delivery dates with leaving enough time for the last stages. A computed parameter \(Q^{O}_{\tau ,a}\) is introduced to represent the quantity of heat treated axles required by the end of time slot \(\tau \) from axle type a.
$$\begin{aligned} Q^{O}_{\tau ,a} = \sum _{o\in {\mathbf {O}}: (\tau -1) t^\tau < T^O_o - t^{pm}_a \cdot Q^{O}_{o,a} \le \tau \cdot t^\tau } Q^{O}_{o,a} \quad \forall a\in {\mathbf {A}}, \tau = 0,\ldots ,n. \end{aligned}$$
For the same reasons, storage costs of prepared and machined axles are omitted from the cost function, as the last stages should be executed as late as possible, assuming the storage costs of finished products are higher (otherwise, as early as possible).
Forging and heat treatment processes
The operations of the forge are modeled with 2 binary variables per pairs of time slot and die type. \(x_{\tau ,a}\) denotes whether die for axle type a is being used in time slot \(\tau \), and \(x^{su}_{\tau ,a}\) whether it is being setup. Constraint (1) ensures that the forge cannot work on more than one die at a time.
$$\begin{aligned} \sum _{a\in {\mathbf {A}}}\left( x_{\tau ,a} + x^{su}_{\tau ,a}\right) \le 1 \quad \forall \tau = 1,\ldots ,n. \end{aligned}$$
(1)
The necessary setup time is enforced by (2). A die can only be used in time slot \(\tau \) if it was being setup in the previous required number of time slots, or if it was already in use. Consequently, the die cannot be in use in the first time slot (3).
$$\begin{aligned}&\tilde{t}^{su} \cdot x_{\tau ,a} \le \tilde{t}^{su} \cdot x_{\tau -1,a} + \sum _{\tau '=\max \{1,\tau -\tilde{t}^{su}\}}^{\tau -1} x^{su}_{\tau ',a} \quad \forall a\in {\mathbf {A}}, \tau = 2,\ldots ,n \end{aligned}$$
(2)
$$\begin{aligned}&x_{1,a} = 0 \quad \forall a\in {\mathbf {A}}. \end{aligned}$$
(3)
Heat treatment is modeled with a continuous variable \(y_{\tau ,a}\), which denotes the number of die-forged axles of type a heat treated during time slot \(\tau \).
$$\begin{aligned} y_{\tau ,a} \ge 0 \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,n. \end{aligned}$$
(4)
Multiple types of axles can be processed in the same time slot, only their total quantity is constrained by \(q^{ht}\), the throughput ratio of the furnace. Constraint (5) shows how the furnace capacity can be calculated from its set of active time periods, \(\mathbf {T}^F\). It is assumed that \(\mathbf {T}^F\) is a union of continuous time intervals.
$$\begin{aligned} \sum _{a\in {\mathbf {A}}}y_{\tau ,a} \le \int _{\left[ (\tau -1) t^\tau , \tau \cdot t^\tau \right] \cap \mathbf {T}^F} q^{ht} \quad \forall \tau = 1,\ldots ,n. \end{aligned}$$
(5)
Die-forged intermediates require \(t^{cd}_a\) hours for cooling and grinding before their heat treatment. Constraints (6)–(7) ensure that the axles going into the furnace in time slot \(\tau \) were forged long enough ago. Variable \(r_{\tau ,a}\) will be described in Sect. 3.3.
$$\begin{aligned} y_{\tau ,a}\le & {} r_{\tau -\tilde{t}^{cd}_a,a} \quad \forall a\in {\mathbf {A}}, \tau = \tilde{t}^{cd}_a + 1,\ldots ,n \end{aligned}$$
(6)
$$\begin{aligned} y_{\tau ,a}= & {} 0 \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,\tilde{t}^{cd}_a. \end{aligned}$$
(7)
Material balance
In an RTN representation, both materials and available equipment are treated equally as resources that can be consumed and produced by the processes. The resource levels at the end of each time slot are represented by nonnegative continuous variables. \(r^R_{\tau ,r}, r^{df}_{\tau ,a}\), and \(r^{ht}_{\tau ,a}\) denote the resource levels of steel rods, die-forged, and heat treated axles, respectively. The durabilities of dies are represented similarly by variables \(r^D_{\tau ,a}\).
Starting resource levels are set by the shipments arriving at 0 time unit, and by \(Q^{D,0}_a\) for die durabilities.
$$\begin{aligned} r^R_{0,r}&= Q^{S}_{0,r} \quad \forall r\in {\mathbf {R}}\end{aligned}$$
(8)
$$\begin{aligned} r^{df}_{0,a}&= 0 \quad \forall a\in {\mathbf {A}}\end{aligned}$$
(9)
$$\begin{aligned} r^D_{0,a}&= Q^{D,0}_a \quad \forall a\in {\mathbf {A}}. \end{aligned}$$
(10)
Material levels at the end of time slots are calculated from the previous levels and the changes caused by production processes (11) and (12).
$$\begin{aligned} r^R_{\tau ,r}= & {} r^R_{\tau -1,r} + Q^{S}_{\tau ,r} - \sum _{a\in {\mathbf {A}}:r_a=r} \left( \frac{Q^{D,su}_a}{\tilde{t}^{su}} x^{su}_{\tau ,a} + \frac{t^\tau }{t^{df}_a} x_{\tau ,a} \right) \quad \forall r\in {\mathbf {R}}, \tau = 1,\ldots ,n \nonumber \\ \end{aligned}$$
(11)
$$\begin{aligned} r^{df}_{\tau ,a}= & {} r^{df}_{\tau -1,a} - Q^{O}_{\tau ,a} - \frac{Q^{D,su}_a}{\tilde{t}^{su}} x^{su}_{\tau ,a} - \frac{t^\tau }{t^{df}_a} x_{\tau ,a} \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,n. \end{aligned}$$
(12)
Die durabilities are calculated similarly but restorations make it more complex, as the regained amount of durability depends on the current durability, which would introduce a non-linear term into the equation, as shown in (13). Restoration of die for axle a is represented by the binary variable \(w_{\tau ,a}\), which equals to 1 if the restoration is finished upon the end of time slot \(\tau \).
$$\begin{aligned} r^D_{\tau ,a} = r^D_{\tau -1,a} - \left( 1-w_{\tau ,a}\right) \left( \frac{Q^{D,su}_a}{\tilde{t}^{su}} x^{su}_{\tau ,a} +\frac{t^\tau }{t^{df}_a} x_{\tau ,a} \right) + w_{\tau ,a} \cdot Q^{D,max}_a \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,n. \end{aligned}$$
(13)
This constraint is linearized with the following inequalities (14)–(16), replacing (13) in the model. The lower bound (14) is similar to the material balance equations. The upper bound (15) includes the restored durability as a big-M term, and a constant upper bound (16) limits the durability to its maximum to prevent exceeding it with an early restoration.
$$\begin{aligned} r^D_{\tau ,a}\ge & {} r^D_{\tau -1,a} - \frac{Q^{D,su}_a}{\tilde{t}^{su}} x^{su}_{\tau ,a} - \frac{t^\tau }{t^{df}_a} x_{\tau ,a} \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,n \end{aligned}$$
(14)
$$\begin{aligned} r^D_{\tau ,a}\le & {} r^D_{\tau -1,a} - \frac{Q^{D,su}_a}{\tilde{t}^{su}} x^{su}_{\tau ,a} - \frac{t^\tau }{t^{df}_a} x_{\tau ,a} + w_{\tau ,a} \cdot Q^{D,max}_a \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,n \end{aligned}$$
(15)
$$\begin{aligned} r^D_{\tau ,a}\le & {} Q^{D,max}_a \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,n. \end{aligned}$$
(16)
The restoration time is enforced in Constraint (17) similarly as the setup time in (2). While a die is being restored, it cannot be in use, therefore, a restoration can finish only after enough idle time of the die.
$$\begin{aligned} w_{\tau ,a} \cdot \tilde{t}^{re}_a\le & {} \tilde{t}^{re}_a - \sum _{\tau '=\tau -\tilde{t}^{re}_a+1}^{\tau } \left( x_{\tau ',a} + x^{su}_{\tau ',a} \right) \quad \forall a\in {\mathbf {A}}, \tau = \tilde{t}^{re}_a+2,\ldots ,n \end{aligned}$$
(17)
$$\begin{aligned} w_{\tau ,a}= & {} 0 \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,\tilde{t}^{re}_a. \end{aligned}$$
(18)
Objective
The goal is to minimize the total cost of the production. As (19) shows, with the discrete time grid, costs can be calculated easily by multiplying the cost factors with their associated variables, and summing the costs imposed in each time slot.
$$\begin{aligned} \min z = \sum _{\tau =1}^{n}\left( \sum _{r\in {\mathbf {R}}} c^{st,r}_r \cdot r^R_{\tau ,r} + \sum _{a\in {\mathbf {A}}} \left( \begin{array}{rll} &{}c^{st,df}_a &{}\cdot r^{df}_{\tau ,a} \\ + &{}c^{st,ht}_a &{}\cdot r^{ht}_{\tau ,a} \\ + &{}c^{df} \cdot t^\tau &{}\cdot x_{\tau ,a} \\ + &{}\frac{C^{su}}{\tilde{t}^{su}} &{}\cdot x^{su}_{\tau ,a} \\ + &{}C^{re} &{}\cdot w_{\tau ,a} \end{array} \right) \right) . \end{aligned}$$
(19)
Model improvements
The previous constraints are enough to model the scheduling problem and obtain the optimal schedule. However, there is room to improve solution quality and performance.
Floudas and Lin (2005) summarized the possible techniques for accelerating the solution process of MILP models. Here, improvement of the model is attempted by adding tightening constraints to decrease the search space.
The inequalities introduced in (14)–(16) to model the durability changes of dies allow solutions where a die is not fully restored to \(Q^{D,max}_a\). There is no benefit in partially restoring a die, unless it has less cost or time requirement, which would require a different model. Apart from the practical reasons, this may also make it more difficult to solve the model. To enforce that dies are always fully restored, Constraint (20) is added to the model.
$$\begin{aligned} r^D_{\tau ,a} \ge w_{\tau ,a} \cdot Q^{D,max}_a \quad \forall a\in {\mathbf {A}}, \tau = 1,\ldots ,n. \end{aligned}$$
(20)
Another simplification can be made for scheduling die restoration. It can be observed that the restoration can be carried out anytime between two uses of a die with the timing having no effect on the objective value. Therefore, forcing the restoration to end directly before it is used again with Constraint (21) will tighten the solution space without loss of optimality.
$$\begin{aligned} w_{\tau -1,a} \le x^{su}_{\tau ,a} \quad \forall a\in {\mathbf {A}}, \tau = 2,\ldots ,n. \end{aligned}$$
(21)
Further practical considerations can be made about allowing a die to be restored even if it still has enough durability to be used further. The unused durabilities are wasted, which could be handled by introducing a cost parameter for it, or a constraint like (22) can be added to the model that prevents restoration if the remaining durability is over a given minimum. In (22), the minimum is computed to be the durability used up during a whole time slot.
$$\begin{aligned} w_{\tau ,a} \le 1 + \frac{\frac{t^\tau }{t^{df}_a} - r^D_{\tau -1,a}}{Q^{D,max}_a - \frac{t^\tau }{t^{df}_a}} \quad \forall a\in {\mathbf {A}}, \tau = 2,\ldots ,n. \end{aligned}$$
(22)
Adding this constraint may remove the optimal solution of the original model from the solution space. However, it eliminates the waste caused by not utilizing the full durabilities of dies. A better solution would be to add the associated costs of this wasted capacity to the objective function, but determining the cost factor is difficult, and it would make the model more complex.
The original model also allows to start setting up a die but not using it after setup. Solutions like this would be suboptimal because of the added costs of the unnecessary setup, so they can be eliminated from the search space without loss of optimality. Constraint (23) solves this by ensuring that if a setup is started in time slot \(\tau \), it is continued until setup is finished, then forging must be started.
$$\begin{aligned} (x^{su}_{\tau ,a} - x^{su}_{\tau -1,a}) (\tilde{t}^{su}+1) \le x_{\tau +\tilde{t}^{su},a} + \sum _{\tau '=\tau }^{\tau +\tilde{t}^{su}-1} x^{su}_{\tau ',a} \quad \forall a\in {\mathbf {A}}, \tau = 2,\ldots ,n-\tilde{t}^{su}. \end{aligned}$$
(23)