I need to model the constraint that "the machine can be turned off if needed but once it has been turned off, it should stay off during at least 5 hours".
I have created a variable $c_{i}$ s.t. $c_{i}=1$ iff the machine is stopped at time $i+1$ (I know it could seem odd but it's like this) and $e_{i}$ s.t. $e_{i}=1$ if the machine is restarted at time $i+1$. Moreover, $a_{i}=1$ if the machine produces at time $i$. (I have established the correct constraints between $a_{i}$ and $c_{i}$ and $e_{i}$).
However, I don't manage to express in term of linear programming constraints the fact that "the machine can be turned off if needed but once it has been turned off, it should stay off during at least 5 hours"
EDIT: so far, the constraints (among others) look like :
$e_{i}\geq a_{i+1}-a_{i}$
$e_{i} \leq a_{i+1}$
$e_{i} \leq 1-a_i$
$c_{i}\geq a_{i}-a_{i+1}$
$e_{i} \leq a_{i}$
$e_{i} \leq 1-a_{i+1}$
Thanks in advance !
I have found on my own the way to fix that problem :
By calling $q_i$ the quantity produced by the machine at time $i$ and $Q$ the overall quantity to be produced :
$\sum_{k=i+1}^{i+5} q_k \leq Q \cdot (1-c_i) $
By this way, the machine can not produce anything during the 5 following periods after the machine was turned off.
I guess that we can replace $q_k$ by $a_k$ and therefore $Q$ by 5 in this case.
I hope it will help other people ;-)