メインコンテンツへスキップ

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

回答済み

コメント

2件のコメント

  • Riley Clement
    Gurobi Staff 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
    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

サインインしてコメントを残してください。