Quadratic constraint accuracy

Answered

Comments

1 comment

  • Jaromił Najman

    Hi Dominique,

    In your code, the line

    m.addConstr(y - radius <= -bd, "ellipsoid_UBy ")

    should read

    m.addConstr(y - radius >= -bd, "ellipsoid_UBy ")

    Moreover, the default lower bound for optimization variables is \(0\). Once you make your coordinate variables \(x,y\) free variables by setting

    x = m.addVar(lb=-GRB.INFINITY,name="x")
    y = m.addVar(lb=-GRB.INFINITY,name="y")

    you get the desired solution.

    Best regards,
    Jaromił

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk