Skip to main content

About how to optimize the solver's speed for large optimization.

Answered

Comments

13 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Which version of Gurobi did you use? Please always use the latest version (currently 10.0.1).

    You could try telling Gurobi to focus more on feasible points via the parameters MIPFocus=1 and by using the No Relaxation heuristic controlled by the NoRelHeurTime parameter. From the log, I would try setting NoRelHeurTime=3600 as a first experiment. You could also have a look at the list of Most important parameters for MIPs.

    Please note that your model is really huge with over 17 million binary variables. Thus, it is somewhat expected that solution will take more that usual. Anyway, there is one thing which is suspicious. The big gap without any log output

      0     0  173.08972    0 8385          -  173.08972      -     - 3112s
    27k seconds without log output
    0     0  325.50076    0 21525          -  325.50076      -     - 29949s
    [...]
    0     0  325.50076    0 20915          -  325.50076      -     - 30066s
    -> jump to time limit of 100k seconds, i.e., 70k seconds no output.

    Could you please share this model such that I could have a closer look? Note that uploading files in the Community Forum is not possible but we discuss an alternative in Posting to the Community Forum.

    Best regards, 
    Jaromił

    0
  • whwhwh55
    Gurobi-versary
    Conversationalist
    First Question

    Thank you! Let me first make a saved model to . mps file as soon as I can and then figure out how to share it to community with your link.

    0
  • whwhwh55
    Gurobi-versary
    Conversationalist
    First Question

    Do you expect to see the .mps model or the code to generate the model? The .mps model is 5.5GB. If it is too large, I have to schedule a shorter period so that you may just scan it for potential problems..

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    If you can reproduce the behavior where there is no output for a very long period of time with a smaller model, then a smaller model would definitely suffice.

    Otherwise, you could just compress the .mps file. Size of the model is not a problem on my side as long as I can reproduce the issue, so you don't have to share your code.

    0
  • whwhwh55
    Gurobi-versary
    Conversationalist
    First Question

    Great. the zipped file is around 550MB. I hope I can upload from here.

    0
  • whwhwh55
    Gurobi-versary
    Conversationalist
    First Question

    The mode is uploaded to this dropbox link:

    https://www.dropbox.com/s/yujwy4h6oyu9xzd/workindv_model.zip?dl=0

     

    Many thanks

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Unfortunately, I am not able to expand the file. I get the error

    Unable to expand "workindv_model.zip" into "Downloads"
    (Error 79 - inappropriate file type or format.)

    Also automatic extracting in dropbox results in an error

    1 file couldn't be automatically unzipped.

    Could you please try again?

    0
  • whwhwh55
    Gurobi-versary
    Conversationalist
    First Question

    I apologize for the inconvenience. I put an unzip version and please see if it works. I also set the Dropbox access permission for anyone beyond our university scope.

    https://www.dropbox.com/s/a1c8khi9nw5c6rz/workindv_model.mps?dl=0

    Thank you so much for the great patience with me!

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    I was able to reproduce the issue on my side and am investigating. Unfortunately, at this point I cannot tell whether it is an actual bug or just expected behavior due to the model size. I will let you know here, when I find something.

    It definitely looks like finding a first feasible point is a big issue for this model. You could try running NoRelHeurTime=20000 which will run a special heuristic before solving the root node relaxation for 20k seconds (1/5th of your overall time). Maybe the heuristic is able to find a first feasible solution and the overall optimization run is then better.

    0
  • Thomas Leveringhaus
    Gurobi-versary
    Collaborator
    Investigator

    Reading this topic, it came to my mind that lazy constraints or the partition heuristic might help address the problem?

    0
  • whwhwh55
    Gurobi-versary
    Conversationalist
    First Question

    Thank you, Jaromil, I will try the heuristics. 

    Thoms, do you have any guidance tuning the lazy constraints and partition heuristic?

    0
  • Thomas Leveringhaus
    Gurobi-versary
    Collaborator
    Investigator

    Hi whwhwh55,
    besides the official gurobi articels I don't have additional guidance:

    Lazy constraints:
    https://support.gurobi.com/hc/en-us/articles/360013197972
    https://www.gurobi.com/documentation/10.0/refman/lazy.html#attr:Lazy
    Since your problem has a lot of (linear) constraints, some of them might be inactive and may remain in the lazy constraint pool, for example constraints for rare special cases of your task scheduling. But this is just a guess - I don't know your problem.

    Partition Heuristic:
    https://www.gurobi.com/documentation/10.0/refman/partition.html
    I don't know your problem, so I don't know if your vars can be splitted into different groups.

    Maybe spending more time for presolve could also help:
    https://www.gurobi.com/documentation/10.0/refman/presolve.html#parameter:Presolve

    0
  • whwhwh55
    Gurobi-versary
    Conversationalist
    First Question

    Thank you!

    0

Please sign in to leave a comment.