Hi,
I want to model the following typical GDP logic:
- If y = 1, then 0<=x<=u;
- If y = 0, then x == 0.
How should I write this pattern in DisjunctiveProgramming.jl syntax?
I did not find an example of this in the documentation.
A minimal example of what I want:
using DisjunctiveProgramming
model = GDPModel()
@variable(model, y, Logical)
@variable(model, x >= 0)
u = 10.0
# How to write the following two branches?
# (y = 1) --> 0<=x<=u
# (y = 0) --> x == 0