I am trying to solve an optimization problem in which one of the constraints is : x*y=0, where x and y are decision variables and only x or y can be positive. In other words, if x!=0 then y=0 and if y!=0 then x=0. Please help
Asked
Active
Viewed 215 times
1 Answers
0
Assumption:
x
andy
are nonnegativeInfer upper-bounds
UB_x
andUB_y
forx
,y
Introduce new boolean variable
b
Add constraints:
x <= (1-b) * UB_x y <= b * UB_y

sascha
- 32,238
- 6
- 68
- 110
-
how to define the UB_x and the UB_y? – amal nammouchi Oct 07 '21 at 19:43
-
You must limit them a-priori building your model. Those are constants. – sascha Oct 07 '21 at 19:50