Skip to main content

Apply lazy constraint on one constraint only

Answered

Comments

1 comment

  • 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

Please sign in to leave a comment.