pythonoptimizationbinarylinearization

Linearize if statement in MILP constraint


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


Solution