Skip to main content

Division between float and grb variable

Answered

Comments

1 comment

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Surya,

    Division of variables is currently not supported.

    You can model the division \(\frac{1}{x}\) with an additional variable \(z\) as
    \[\begin{align*}
    x \cdot z = 1.
    \end{align*}\]

    In the above \(z\) has to be equal to \(\frac{1}{x}\) and can be used throughout your model.

    Please note that you have to provide appropriate bounds for both \(x\) and \(z\) to make the above formulation work properly. For \(x \in [x^L, x^U], x^L>0\), the bounds for \(z\) should be \(z \in [\frac{1}{x^U}, \frac{1}{x^L}]\).

    It is also required to set the NonConvex parameter to 2.

    Best regards,
    Jaromił

    0

Please sign in to leave a comment.