Search code examples
optimizationpyomo

How to implement shutdown, start-up, ramp-up and ramp-down in a MILP if capacity is optimized as well and minimum power exists


I am currently trying to solve a problem with Mixed-Integer linear problems. I have a component, which capacity and operation I want to optimize. This component has a lower limit of operation, p_low. The optimization can either run the component between its upper limit (the capacity) or p_low, but it should also be able to shut-down the component.

Here starts the issue: I have no idea how to implement both possibilities, as a shut-down would violate the minimal power constraint.

I thought about using binary variables for decision (b_status), but I have a problem with the the capacity of the component, because it is optimized as well and combining the capacity variable with the binary variable:

p >= p_low * capacity * b_status -> if b_status is 0 -> p >= 0; else: p >= p_low * capacity

... would result in a non-linear problem as the combination of capacity and b_status is not allowed in linear models (both variables).

Does someone know a way to implement this? I know this is not the main topic here, but it might be worth the try asking.


Solution

  • You are almost there...

    You are correct, you will need 2 variables to model this equipment. Let:

    x_on = {0, 1} a binary variable to indicate whether system is on/off
    x_load = {x: x >= 0 } a continuous, non-negative variable to indicate the current load
    

    Then you will need to creatively use x_on as an indicator variable within the constraints to either set x_load at zero or between the low-high limits...

    High constraint:  x_load <= x_on * high_limit
    Low constraint:   x_load >= x_on * low_limit
    

    Those are linear. Plug in some values to ensure you believe them. :). Presumably somewhere in your model you are minimizing x_load and this will get it done.

    ================= Edit for variable capacity

    I misread your problem. Per your comment, I think you are again on the right track and using a big-M constraint can do this.

    In addition to the above variables x_on and x_load let

    C = {x : x >=0} a continuous non-negative variable to represent the capacity of the machine
    M = any reasonable upper bound on C
    

    You have a workable solution for the low limit. By using 2 constraints for the high (3 constraints total), you can incorp the big-M for the high also

    Low:   x_load >= low_lim * C - M * (1 - x_on)
    High:  x_load <= C
    Off:   x_load <= M * x_on