Hi everyone,
I am working on an MIP optimization problem where X is a positive variable with a lower bound of zero and no upper bound and B is a binary variable.
X{0,inf} and B{0,1}
I’m trying to formulate equations such that if X =E= 0 then B =E= 0, else B=E=1. I’ve bound B with the following constraint:
X =L= bigM * B /bigM is a value much larger than any expected value the model can choose based on other constraints/
such that when X is greater than 0, B must equal 1. However, I’m completely lost as to how to formulate the second conditional equation so that when X equals 0, B must equal zero.
I’ve reviewed https://newforum.gams.com/t/logical-equations-binary-variables/2108/1 but the equations don’t force the binary variable to equal 0 when the lower bound is also equal to 0.
Any advice about how I can code this logical condition into my model would be greatly appreciate. Thank you for your help.
Greg