Linear program with ceiling or floor functions (HOW?)
AnsweredHow I can linearize a constraint with ceiling or floor functions in gurobi.
0
-
You could model the expression \(\lfloor x\rfloor\) for a decision variable \(x\) by introducing a new integer variable \(y\) and adding the constraints
$$y <= x$$
$$y + 1 >= x + \epsilon$$
where \(\epsilon\) should a little bigger than the feasibility tolerance and the integer feasibility tolerance.
Of course, \(\lceil x\rceil\) can be modeled similarly.
Silke
1 -
Thank you this help me a lot
0 -
This is the best article I could have found in Gurobi! Thank you!
0
Please sign in to leave a comment.
Comments
3 comments