Skip to main content

Why the second-order cone constraint is classified as a non-convex model?

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff

    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.

  • Riley Clement
    • Gurobi Staff

    Hi Jie,

    While not exactly the same I think there are some similarities to this post:
    https://support.gurobi.com/hc/en-us/community/posts/26748511582481/comments/26865244208529

    Because this constraint represents a squared SOC constraint, it is not a valid SOC in isolation - only while the constraint lhs >= 0 holds.  In your implementation, this is enforced with the constraint B@x >= 0.  For this reason it is better to make lhs a variable and enforce this relationship through bounds, i.e. replace

    lhs = B @ x
    model.addConstr(lhs >= 0)

    with

    lhs = model.addVar() # default lb of 0
    model.addConstr(lhs == B @ x)

    The only other complicating factor seems to be this constraint:

    model.addConstr(x.T @ A @ x >= 0)

    If you make the lhs a variable, as above, then

    - removing this constraint results in the model no longer declared as non-convex, or
    - if presolve is left on, then this constraint will be removed (since it is redundant) and the model is no longer declared non-convex.

    Clearly the region defined by ||x|| >= r is convex when r = 0 but for r > 0 this is not true.  My guess is that if we have a constraint of this form survive the presolve stage then the declaration of non-convexity is automatically triggered.

    - Riley

     

     

    0
  • Jie Zhu
    • Gurobi-versary
    • First Comment
    • First Question

     After making lhs a variable and enforcing this relationship through bounds, the model is no longer classified as non-convex. Thank you very much for your answer!

    0

Post is closed for comments.