Assume a mathematical optimization problem with two positive continuous variables:
0 <= x <= 1
0 <= y <= 1000
I am seeking of an efficient way to express in form of linear constraints (possibly with the use of binary/integer variables and big M) the following nonlinear relationship, so the problem can be solved with milp solvers:
when 0 <= y < 200 then x = 0
when y = 200 then 0 <= x <= 1
when 200 < y <= 1000 then x = 1
The numbers 200 and 1000 are indicative.
Are there any direct suggestions or papers/books addressing similar problems?
I think this will work...
Here's how I think of this. You have 3 states that you need to be aware of, which are the 3 partitions on the domain of
y. So, 2 binary variables can capture these 3 states. In order to keep things linear, you will need to work with non-strict inequalities. So define:so now we have our partitions set up in terms of a truth table for
y_lbandy_ub:Now we can easily link that truth table to constrain
x: