# Jointly Production and Correlated Maintenance Optimization for Parallel Leased Machines
## 3 Production and Maintenance Problem Formulation  
In what follows, we develop a mathematical model expressing the total cost including leasing, manufacturing, inventory holding, and maintenance costs over the considered finite horizon H. We give at first the expressions of the different costs separately:  
- Cost of leasing the machines  
Leasing facility has the advantage of low costs comparing to purchasing equipment. Once the number of machines to be leased is established, the company has to pay the fees of leasing per production period as well as a fixed cost of administration settled by the lessor. The cost of leasing the machines for a period \(k\) is given by:  
\[c_{1}\times M_{k}+c_{2} \tag{1}\]  
- Cost of installation/removal of the machines  
Inspired from [PERSON] et al. (2012), where the authors considered a variable level of workforce, we can express the cost of setup and removal of machines as follows:  
\[c_{3}\times(M_{k}-M_{k-1}-c_{4})^{2} \tag{2}\]  
This equation includes the costs due to variation in the number of the machines required for period \(k\) (e.g. : costs of installation/ uninstallation, mobilization/demobilization). The constant term \(c_{d}\) describes the asymmetry in costs of adding and eliminating machines. As in HMMS model, we use here a quadratic formulation for the problem since it allows for a more realistic cost structure in the planning process as explained by [PERSON] et al. (2013). - Manufacturing cost  
\[\left(c_{n}\times u\times\Delta k\times\left(\left(\sum\limits_{i=1}^{M_{k}}X _{ik}^{N}\right)^{2}+(\alpha_{N}\times t_{r}\times N)\right)\right)+\left( \theta_{k}\times c_{0}\times u\times\Delta k\times\left(\left(\sum\limits_{i=1 }^{M_{k}}X_{ik}^{S}\right)^{2}+(\alpha_{S}\times t_{r}\times N)\right)\right) \tag{3}\]  
Figure 1: Problem Description. where \(\theta_{k}\), \(\alpha_{N}\) and \(\alpha_{S}\) are binary variables expressed as follows:  
\[\theta_{k}=\left\{ \begin{array}{ll}1&if\quad d_{k}>u\cdot\Delta k.\sum\limits_ {t=1}^{M_{k}}X_{\max}^{N}\\ 0&otherwise\end{array} \right.\]  
\[\alpha_{N}=\left\{ \begin{array}{ll}1&if\quad\sum\limits_{t=1}^{M_{k}}X_{ik} ^{N}<\sum\limits_{t=1}^{M_{k}}X_{\max}^{N}\\ 0&otherwise\end{array} \right.\]  
\[\alpha_{S}=\left\{ \begin{array}{ll}1&if\quad\sum\limits_{t=1}^{M_{k}}X_{ik} ^{N}\geq\sum\limits_{t=1}^{M_{k}}X_{\max}^{N}\text{ and }\sum\limits_{t=1}^{M_{k}}X_{ik}^{S}<\sum\limits_{t=1}^{M_{k}}X_{\max}^{S}\\ 0&otherwise\end{array} \right.\]  
- Inventory holding cost per period  
We assume that the manufacturer should always maintain an optimal level for inventory as safety stock to hedge against shortages and which is equal to \((a_{1}+a_{2}\times d_{k})\), where \(a_{1}\)_and_\(a_{2}\) are two constants chosen by manufacturer. The inventory cost is calculated as below:  
\[c_{h}\times E\Big{(}[I_{k}-(a_{1}+a_{2}\times d_{k})]^{2}\Big{)} \tag{4}\]  
Otherwise, two cases may take place:  
* If \(I_{k}>(a_{1}+a_{2}\times d_{k})\): the manufacturer should bear more costs due to over-stock (e.g., more space to be rented to hold this stock, more personnel costs, etc.) * If \(I_{k}<(a_{1}+a_{2}\times d_{k})\): the manufacturer may pay costs of holding a stock that he is not really holding (e.g., rented space for stocking without using it, etc.) - Total Maintenance cost  
The global maintenance cost includes group preventive maintenance and corrective maintenance activities costs. It can be expressed as follows:  
\[\Gamma(t)=(M_{c}\times A_{n})+\big{(}M_{p}\times N\big{)} \tag{5}\]  
with  
\[N=\left\lfloor\frac{H-1}{T_{n}}\right\rfloor \tag{6}\]  
The average number of failures is given by the following expression:  
\[A_{n}=\sum\limits_{i=1}^{M_{k}}\left[