Forbidden range for a variable of a LP

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 
then x2==0

where x1 and x2 are variables of a LP problem ?
Thanks.

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)

In general, if <condition> type constraints are not LP representable. You may want to consult a linear programming textbook, e.g., Textbook: Introduction to Linear Optimization.

1 Like

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 :confused:

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.