# Jointly Production and Correlated Maintenance Optimization for Parallel Leased Machines
## Appendix A  
_Net Inventory Transformation_  
We recall that:  
\[P_{k}=u\times\sum_{i=1}^{M_{k}}\left(X_{ik}^{N}+X_{ik}^{S}\right)\]  
\[E(I_{k})=\hat{I}_{k};E(d_{k})=\mu_{k}^{d};E(M_{k})=M_{k};E(P_{k})=P_{k};\]  
\[V(d_{k})=\sigma_{d}^{2}.\]  
We have:  
\[l_{k}=l_{k-1}+p_{k}-d_{k}\]  
So, \(E(I_{k})=\hat{I}_{k}=\hat{I}_{k-1}+p_{k}-\mu_{k}^{d}\)  
\[\left(\hat{I}_{k}-I_{k}\right)^{2}=\left(\left(\hat{I}_{k-1}-I_{k-1}\right)- \left(\mu_{k}^{d}-d_{k}\right)\right)^{2}\]  
\[E(\hat{I}_{k}-I_{k})^{2}=E(\left(\hat{I}_{k-1}-I_{k-1}\right)-\left(\mu_{k}^{d }-d_{k}\right))^{2}\]  
\[E(\hat{I}_{k}-I_{k})^{2}=E(\left(\hat{I}_{k-1}-I_{k-1}\right)^{2})+E(\mu_{k}^{ d}-d_{k})^{2})-2\times E(\hat{I}_{k-1}-I_{k-1})\times E(\mu_{k}^{d}-d_{k})\]  
\[E(\hat{I}_{k}-I_{k})^{2}=E(\hat{I}_{k-1}-I_{k-1})^{2}+E(\mu_{k}^{d}-d_{k})^{2}\]  
Since:  
\[E(\hat{I}_{k-1}-I_{k-1})=E(\hat{I}_{k})-E(I_{k})=0\]  
\[E(\mu_{k}^{d}-d_{k})=\mu_{k}^{d}-E(d_{k})=0\]  
Thus, using the variance expression, we obtain:  
\[V(I_{k})=V(I_{0})+\sigma_{d}^{2}\]  
Assuming that \(V(I_{0})=0\) and using this equality and by iterations, we can easily proof that:  
\[V(I_{k})=k\cdot\sigma_{d}^{2}\]  
Since the variance expression of \(I_{k}\) can be written as follows:  
\[V(I_{k})=E\left(I_{k}^{2}\right)-\left[E(I_{k})\right]^{2}\]  
So, we obtain:  
\[E\left(I_{k}^{2}\right)=V(I_{0})+k\cdot\sigma_{d}^{2}+I_{k}^{2}\]  
On the other hand, we have  
\[I_{k}=I_{k-1}+p_{k}-d_{k}\text{ is equivalent to }d_{k}=I_{k-1}-I_{k}+p_{k}\]  
So,  
\[I_{k}-a_{1}-a_{2}\cdot d_{k}=(1+a_{2})\cdot I_{k}-a_{1}-a_{2}\cdot I_{k-1}-a_ {2}\cdot p_{k}\]  
And  
\[\hat{I}_{k}-a_{1}-a_{2}\cdot\mu_{k}^{d}=(1+a_{2})\cdot\hat{I}_{k}-a_{1}-a_{2} \cdot\hat{I}_{k-1}-a_{2}\cdot p_{k}\]  
Using both equalities above, we can conclude the following expected expression:  
\[E[\left((\hat{I}_{k}-a_{1}-a_{2}\cdot\mu_{k}^{d})-(I_{k}-a_{1}-a_{2}\cdot d_ {k})\right)^{2}]\]  
\[=(1+a_{2})^{2}.E[(\hat{I}_{k}-I_{k})^{2}]+a_{2}^{2}.E[(\hat{I}_{k-1}-I_{k-1})^{ 2}]\]  
\[=(1+a_{2})^{2}.(V(I_{0})+k\sigma_{d}^{2})+a_{2}^{2}.(V(I_{0})+(k-1)\sigma_{d}^ {2})\]  
Also, we can write:  
\[E\left[\left(\left(\hat{I}_{k}-a_{1}-a_{2}\cdot\mu_{k}^{d}\right)-(I_{k}-a_{1} -a_{2}\cdot d_{k})\right)^{2}\right]\]  
\[=V(I_{k}-a_{1}-a_{2}\cdot d_{k})\]  
\[=E\left[(I_{k}-a_{1}-a_{2}\cdot d_{k})^{2}\right]-(E[I_{k}-a_{1}-a_{2}\cdot d_ {k}])^{2}\]Regarding the two above equations, we obtain:  
\[E\Big{[}(I_{k}-a_{1}-a_{2}\cdot d_{k})^{2}\Big{]}\] \[=\Big{(}I_{k}-a_{1}-a_{2}\cdot\mu_{k}^{d}\Big{)}^{2}+(1+a_{2})^{2} \cdot\big{(}V(I_{0})+k\cdot\sigma_{d}^{2}\big{)}+a_{2}^{2}\cdot\big{(}V(I_{0})+ (k-1)\cdot\sigma_{d}^{2}\big{)}\]  
We assume that V(\(I_{0}\)) = 0, therefore in the objective function we can make the following transformation:  
\[\begin{array}{l}\sum\limits_{k=1}^{H}E\Big{[}(I_{k}-a_{1}-a_{2}\cdot d_{k}) ^{2}\Big{]}=\sum\limits_{k=1}^{H}\Big{(}I_{k}-a_{1}-a_{2}\cdot\mu_{t}^{d}\Big{)} ^{2}+(1+a_{2})^{2}\cdot\sigma_{D}^{2}\cdot\sum\limits_{k=1}^{H}k+a_{2}^{2} \cdot\sigma_{d}^{2}\cdot\sum\limits_{k=1}^{H}(k-1)\\ =\sum\limits_{k=1}^{H}\Big{(}I_{k}-a_{1}-a_{2}\cdot\mu_{k}^{d}\Big{)}^{2}+(1+a _{2})^{2}\cdot\sigma_{d}^{2}\cdot\frac{H}{2}\cdot(H+1)+a_{2}^{2}\cdot\sigma_{ d}^{2}\cdot\frac{H}{2}\cdot(H-1)\end{array}\]