Skip to main content

How to model the constraint for a minimum consecutive running time of a machine?



1 comment

  • Ronald van der Velden
    Gurobi Staff Gurobi Staff

    Hi San,

    Here's a general idea - let me know if you get stuck figuring out the details.

    You could add another binary for each hour, indicating whether the plant is switched on at the start of that hour. Each of those binaries can then be linked to the five existing binaries for the corresponding hours (e.g. link the "switch on at t=4" to "plant on at t=4,5,6,7,8"). Most likely while you try and come up with the right constraints, you'll notice that you need binaries for switching off at a specific hour too... but it's more fun if you find out for yourself, why that variable might be necessary.

    You can find inspiration here in our modeling example for power generation.

    Kind regards,


Please sign in to leave a comment.