Skip to main content

Lazy Constraints and Re-optimization

Ongoing

Comments

3 comments

  • Official comment
    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?.
  • Simon Felix
    Gurobi-versary
    First Question
    Conversationalist

    I just tested this and found that you'll have to re-add the lazy constraints, for every reoptimization. To answer your questions:

    • Gurobi "forgets" lazy constraints right after the optimization
    • There doesn't appear to be a way to automatically add lazy constraints to the model permanently.
    • You should consider using MIPSOL instead of MIPNODE if you're interested in optimal solutions.
    0
  • N. W.
    Gurobi-versary
    First Comment

    Hi,

    I have been asking myself the same. If Gurobi doesn't have memory of past lazy constraints, is there another way to add constraints using a callback such that they stay in the model when re-optimizing?

    0

Post is closed for comments.