Skip to main content

Gurobi and second- order cone constraints.

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Ed Klotz
    Gurobi Staff Gurobi Staff

    I stumbled onto this 6 months after the initial post.   You might have gotten a faster response if you'd simplified the expression above by setting all your constraint values and your index sets to single items.   If that doesn't fit Gurobi's SOC constraint format, then surely the more complicated expression above won't either.   If I understand the above correctly, the simplest example would be something like this:

     

    y^2 + s^2 + a +t <= vz

    Looking at the accepted SOC/quadratic constraints listed in https://www.gurobi.com/documentation/9.0/refman/constraints.html, it looks like the problem is the two linear variables.    Perhaps I've overlooked the appropriate transformation, but I don't see how to turn this into a second order cone.   Yes, you could do some additional transformations:

    w = a+t 

    y^2 + s^2 + w*r <= vz

    r=1

    But this is not a rotated cone, nor a second order cone.   Are you sure you constraint is a true SOC?   And note that SOCs also have some specific requirements on the nonnegativity of some of the variables.

    Ed

     

    0

Post is closed for comments.