Skip to main content

Lazy constraints and cuts in the same model callback

Answered

Comments

1 comment

  • Mario Ruthmair
    • Gurobi Staff

    Hi Lorenzo,

    The recommended way is to add all cuts that might cut off integer solutions via cbLazy(), even during a user cut callback (which is your option 2).
    This also ensures that more cuts are kept in the model and actually considered by the solver, while cuts added by cbCut() might be discarded if they do not meet the solver's conditions (numerics, density, etc.).

    Best regards,
    Mario

    0

Please sign in to leave a comment.