Dear OR experts, I have this equation in my model: X_it + Y_it - Z_it - N_i = 0 where all of these variables are continues. The problem is that Y_it and Z_it cannot have values greater than zero in the same time step (t). In other words, if Y_it is greater than zero, Z_it has to be zero and vise versa. Could you please give me your idea about how to formulate this condition in my model. Thanks Kam
asked
Kam |

Florian's solution certainly handles it, at the cost of turning something that might have been a linear program into an integer program. Depending on how Y and Z are used otherwise, do you need to force the "one is zero" constraint or might it happen naturally? If Z measures the negative amount for X_it-N_i and Y is the positive amount, a lot of formulations will naturally have only one be positive (for instance, in a linear program where Y and Z don't occur otherwise except in the objective function).
answered
Mike Trick ♦♦ |

As an alternative to Florian's solution, you can declare \(Y_{it}\) and \(Z_{it}\) to be a type 1 special ordered set (SOS1). If you know a tight, valid bound M, I suspect you are better off with Florian's approach. (This assumes that Mike's approach does not work.)
answered
Paul Rubin ♦♦ |