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

Apply lazy constraint on one constraint only

回答済み

コメント

2件のコメント

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

    Hi Mirka,

    What you are trying to set is the Lazy Constraint parameter. This parameter tells Gurobi that you are going to add lazy constraints via a callback. 

    If you want to add a few constraints or just one upfront that should be used as a lazy constraint you need to set the lazy attribute of this specific constraint. Doing so for a constraint called cons1 could for example look like this:

        cons1.lazy=1

    Best,

    Sonja

    1

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