Skip to main content

How to use multiple MIP starts with only some variables?

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • Gurobi Staff

    Hi,

    At a first glance, your code looks correct. Could you try calling the update method after you set the NumStart parameter? Or run the \(\texttt{for}\)-loop over \(\texttt{range(2)}\) instead of \(\texttt{range(model.NumStart)}\)?

    # first try
    model.NumStart = 2
    model.update()

    # if this does not help try

    for s in range(2):
    #...

     

    If the above does not help, could you please share the corresponding model for which you are trying to set multiple MIPStarts? If possible, please try to generate a minimal reproducible example.

    Best regards, 
    Jaromił

    0
  • Sun Ju Lee
    • Gurobi-versary
    • First Comment
    • First Question

    Hello,

    Calling model.update() after setting NumStart helped. I also had to call model.update() after setting StartNumber in the loop.

    Thank you for your help!

    0

Post is closed for comments.