If we let $x_i$ = 1 if a machine is on during hour $i$, and 0 if the machine is off, how would we enforce a constraint that requires the machine to be “on” for a minimum of at least $M$ hours?
For example, if a machine turns on at hour 5, then that means at least $x_5$ through $x_{5+M}$ all equal 1. I was thinking about introducing an auxiliary variable such that $y_i$ = 1 if machine turns on at hour $i$, but I cannot bridge how to use this to enforce a minimum run time.
I would also like to enforce a minimum down time for the machine, but I imagine a similar logic can be applied.