I would like to express a linear program having a variable that can only be greater or equal than a constant P or equal to 0. Like :
x≥P or x=0
I know I could express it as a
mixed integer problem but I really need to stay in a pure LP.
Anyone know a kind of trick to workaround it on JuMP?
Unfortunately no. It is not LP representable.
ok, thanks. Do you know if there’s the same limitation for a constraint like that:
if x1 == 0
x2 are variables of a LP problem ?
The only way to achieve something like that is as follows:
model = Model()
@variable(model, x1 >= 0)
@variable(model, x2 >= 0)
@constraint(model, x2 <= x1)
if <condition> type constraints are not LP representable. You may want to consult a linear programming textbook, e.g., http://www.athenasc.com/linoptbook.html.
I see. The only problem is that I can maybe have a x1>=x2 according to the project. So,I ended up with the same limitation of the LP problem
Do you know how I could express it by using the workaround with binary variables and a large number M? I have tried to think but I don’t have a good math background…x1 and x2 are not binary.
Yes, but this question is not related to Julia or JuMP.
The OR StackExchange will have an answer to these kinds of modeling questions.