Linearization of a Fractional Expression
Awaiting user inputHow can I linearize the expression (x * l - y) / y when x is a binary variable, l is a parameter, and y is an integer variable with a known range ymin ≤ y ≤ ymax ?
I hope that linearizing this expression will help me solve the problem more efficiently.
-
Hi Lennard,
My first reaction would be that you could separate (x * l)/y from y/y=1. Then the question is where this expression would be used - in a constraint or the objective function? For a constraint, what's on the other side of the (in)equality sign?
Kind regards,
Ronald0 -
It is a constraint that calculates a penalty for placing an item of length l in a box of variable length, where the variable part of the penalty depends on the degree of overfilling of the box. The penalty is represented by c, which is a real-valued variable.
Kind regards,
Lennard0 -
Ah, the fact that there's a variable on the left side does not allow a quick fix. Still, you could try multiplying both sides by \[max_{j,l,k}^{box}\] to see if this improves performance. I'm assuming you've explicitly set the bounds on that variable, which could also help.
Kind regards,
Ronald0
Please sign in to leave a comment.
Comments
3 comments