Skip to main content

Indicator variable that depends on two other indicator variables



1 comment

  • Ronald van der Velden
    Gurobi Staff Gurobi Staff

    Hi Ludwig,

    Thanks for posting here! I have not fully analyzed your model (we typically try to provide hints that help you take a next step by yourself), but noticed a few things.

    • Just to be sure about the meaning of indicator constraints: When calling addGenConstrIndicator(binary, value, expr) then the meaning is "if binary=value then force expr" where some of your comments suggest the reverse "if expr then force binary=value". The latter is not necessarily true.
    • For restricted[i, t]=0 you define two consequences. Note that those consequences cannot be true at the same time (lines 84-96). From that, it can be concluded restricted[i, t] cannot be 0 ever, so it is forced to be 1. Could this lead to infeasibility?
    • The exact meaning of the start/finish/restricted variables is not entirely clear to me. Usually we have variables that mean the following:
      - Started[t]=1 when an operation has started at or before time t; this series starts at 0 and at some point switches to 1
      Finished[t]=1 when the operation has finished at or before time t (with discrete time buckets, it would mean finished before bucket t); it has a similar pattern to started
      - Busy[t]=1 when the operation is busy (started but not finished); this series starts with 0s, then has 1s when started and becomes 0s when finished
      Do you have the same in mind?

    Hope this helps; otherwise let us know.

    Kind regards,


Please sign in to leave a comment.