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

Callback for nonconvex QCP/MIQCP

回答済み

コメント

3件のコメント

  • 正式なコメント
    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?.
  • Silke Horn
    • Gurobi Staff Gurobi Staff

    Hi,

    There are two issues with your code:

    Firstly, because of Gurobi's lazy update approach, model.getVars() returns an empty list at this point. This is one of the rare occasions where you need to call model.update() first.

    Secondly, if you want to add lazy constraints through a callback, you need to set the LazyConstraints parameter to 1.

    1
  • Can Li
    • Gurobi-versary
    • First Comment
    • First Question

    Thanks. It works

    0

投稿コメントは受け付けていません。