## 2 Materials and Methods
### Description of the System
\[s_{Ar}(t)=s_{Ar}(t-\Delta t)+u_{Ar}(t-\Delta t)-V_{Ar}(t) \tag{6}\]  
The demands \(d_{A}(t)/d_{Ar}(t)\) are satisfied respectively by the stock level in the previous time \(s_{A}(t-\Delta t)/s_{Ar}(t-\Delta t)\) if stock levels are higher or equal to \(d_{A}(t)/d_{Ar}(t))\), otherwise the number of the sold products is equal to the stock levels at \(t-\Delta t\). The numbers of new/reconditioned products sold at time \(t\) are expressed by by the Equations (7) and (8). \[V_{A}(t)= \begin{cases}d_{A}(t)&if\ s_{A}(t-\Delta t)\geq d_{A}(t)\\ s_{A}(t-\Delta t)&otherwise\end{cases}  \tag{7}\]  
\[V_{Ar}(t)= \begin{cases}d_{A}(t)&if\ s_{A}(t-\Delta t)\geq d_{A}(t)\\ s_{A}(t-\Delta t)&otherwise\end{cases}  \tag{8}\]  
The numbers of unmet demand \(P_{A}(t)\) and \(P_{Ar}(t)\) equal the demand at time \(t\) minus the number of sold products at time \(t\). We assume that unmet demands generate a lost cost. This assumption is considered in practice. Indeed, when the customer is not satisfied, a lost cost equivalent to the loss of the business relevance is considered. The Equations (9) and (10) show the number of lost demands at time \(t\):  
\[P_{A}(t)=d_{A}(t)-V_{A}(t) \tag{9}\]  
\[P_{Ar}(t)=d_{Ar}(t)-V_{Ar}(t) \tag{10}\]  
The number of worn products that are returned at time \(t\) is proportional to the quantity of satisfied demand after their lifetime. The number of used products equals a percentage of the number of the products sold at \(t-\alpha\), where \(\alpha\) is the lifetime of the products and \(p\) represents the percentage of returned products (\(0<p<1\)). Thus, when \(t-\alpha<0\), there is no return. Therefore, the quantities of returned products are given by the Equation (11). \[R(t)= \begin{cases}p\cdot V_{A}(t-\alpha)&if(t-\alpha)\geq 0\\ 0&otherwise\end{cases}  \tag{11}\]  
The Equation (12) represents the level of the recovery inventory at time \(t\), which equals the number of the recovery inventory at \(t-\Delta t\) plus the number of worn products that are returned at time \(t\), minus the number of products reconditioned by the machine at \(t-\Delta t\). \[s_{r}(t)=s_{r}(t-\Delta t)+R(t)-u_{r}(t-\Delta t) \tag{12}\]  
For the machine \(M_{1}\), the production rate at time \(t\) (see Equation (13)) depends on the machine state \(\theta(t)\) and on the stock level of new products at time \(t\). We assumed that the machine is never starved from raw materials. The production rate follows these constraints:  
* Equal to the maximum rate production when the state of the machine is up and the stock level capacity is lower than its maximum level. * Equal to difference between the stock level capacity and its maximum level, when the state of the machine is up and the stock level at time \(t\) is between zero and its maximum level. * Equal to the demand when the state of the machine is up or the stock level at time \(t\) has reached its maximum. * Is null when the state of the machine is down. \[u_{A}(t)= \begin{cases}U_{A}&if\ \theta(t)=1\ and\ s_{A}(t)+U_{A}\leq S_{A}\\ S_{A}-s_{A}(t)&if\ \theta(t)=1\ and\ S_{A}-U_{A}<s_{A}(t)<S_{A}\\ d_{A}(t)&if\ \theta(t)=1\ or\ s_{A}(t)=S_{A}\\ 0&if\ \theta(t)=0\end{cases} \] (13)  
For the reconditioned products, the machine \(M_{2}\) is supplied by the recovery inventory. Then, when it is empty or very low, the machine starves. The production rate for reconditioned items looks like the previous one, but also depends on the recovery inventory \(R(t)\). Indeed, the production rate for reconditioned products at time \(t\) is given the Equation (14). \[u_{Ar}(t)=\begin{cases}U_{Ar}&if\beta(t)=1\ and\ s_{AR}(t)+U_{Ar}\leq S_{Ar}\ and\ s_{r}(t)\geq U_{Ar}\\ S_{Ar}-s_{AR}(t)&if\beta(t)=1\ and\ S_{AR}-U_{Ar}\leq s_{Ar}(t)<S_{AR}\ and\ s_{r}(t)\geq S_{AR}-s_{Ar}(t)\\ d_{Ar}(t)&if\beta(t)=1\ and\ s_{AR}(t)=S_{Ar}\ and\ s_{r}(t)\geq d_{Ar}(t)\\ s_{r}(t)&\left\{