Problem with Cuts and CutPasses parameters

125 views
Skip to first unread message

Arthur Kramer

unread,
Jul 20, 2017, 9:06:06 AM7/20/17
to Gurobi Optimization
Hello everyone,

I'm running a huge MIP model (minimization problem) using Gurobi 7.0. I notice that during the optimization process  Gurobi expends a lot of time in the root node with no changes in the lower bound. So, I decided to play with Cuts and CutPasses parameters (GRB_IntParam_Cuts and/or GRB_IntParam_CutPasses).

I attached 4 .log files, namely:
 -Log_1.log: with Cuts and CutsPasses enabled, with default values (-1).
 -Log_2.log: with Cuts set to 0 (disabled) and CutPasses enabled, as default.
 -Log_3.log: with Cuts and CutPasses, both, set to 0 (disabled).
 -Log_4.log: same configuration as Log_3.log, bus with a time limit of 7200s.

By comparing Log_1 with Log_3 (and Log_4), one can see that, surprisingly, without CutPasses Gurobi run slower (reaches the time limit at the root node) than the version with it enabled (finds the opt solution at node 48). Almost the same situation can be seen when comparing Log_2 with Log_3 (and Log_4).
Also, in Log_4.log, without both Cuts and CutPasses (should run faster) after more than 7000s gurobi still in the root node.

Is this behaviour normal? Is there any explanation for that?

Thank you,

Arthur
Log_1.log
Log_2.log
Log_3.log
Log_4.log

Michael Winkler

unread,
Jul 20, 2017, 9:33:44 AM7/20/17
to Gurobi Optimization
Hi Arthur,

first of all let me say that Gurobi runs determistic, that is, with the same parameters and the same OS and same machine it will always produce the same path. Your log file "Log_4.log" (with the introduced time limit) looks to me like it was created on a different machine compared to all other log files. Is it possible to get your model file (in MPS or REW format) and the exact parameters and also the OS where you ran these experiments on.

Changing parameters, a platform or slight model changes can easily have a huge impact on solving MIPs; e.g., there is some literature about this http://pubsonline.informs.org/doi/abs/10.1287/educ.2013.0112, and http://coral.ie.lehigh.edu/mip-2008/talks/danna.pdf. So this is absolutely normal (but log4 indicates that it might be stuck somewhere).

Best,
Michael

Arthur Kramer

unread,
Jul 20, 2017, 12:03:23 PM7/20/17
to Gurobi Optimization
Hi Michael,

First of all, thank you for you response.
Indeed, the results shown in Log_4.log was produced by a different computer (same OS - Ubuntu 14.04), but the same happened with the same computer I used to obtain the other .log files. The model in .mps can be downloaded in the link bellow (in a .rar version). I implemented in C++, run under Ubuntu 14.04.5 LTS, and the parameters I changed are the following:

    Model: https://drive.google.com/open?id=0B1RJFmINAdd-dzRsUlliaVZNd1k

    GRB_IntParam_Seed = 1
    GRB_IntParam_Cuts = 0
    GRB_IntParam_DisplayInterval = 10
    GRB_IntParam_Method = 2
    GRB_DoubleParam_MIPGap = 0.0
    GRB_DoubleParam_MIPGapAbs = 0.99999
    GRB_IntParam_Threads = 1

Thank you about the references.

ps. I use the same post to introduce another question. For this instance gurobi takes approx. 100s to create the model (create and add vars, obj function and constraints using Ubuntu 14.04), but if I run the same code under Ubuntu 16.04 (in a PC slower) the model creation time drops to only 5s. Do you have any idea about this?

Best,

Arthur

Michael Winkler

unread,
Jul 20, 2017, 12:27:09 PM7/20/17
to Gurobi Optimization
Hi Arthur,

thank you for the upload, I will take a look. Is there a reason for setting Threads=1? Also, have you tried 7.5 with your model (also for Model building)?

For the C++ issue two ideas come to mind:

1. on your Ubuntu 14.04 you ran into memory swapping and it took a while to create the model or the whole machine was busy with other tasks.
2. On Ubuntu 14.04 you use the default C++ library and on 16.04 you build it yourself using our included Makefile

Best,
Michael

Arthur Kramer

unread,
Jul 20, 2017, 12:45:46 PM7/20/17
to Gurobi Optimization
Hi Michael,


Is there a reason for setting Threads=1?
 -No special reason, I usually perform my tests using a single thread.


Also, have you tried 7.5 with your model (also for Model building)?
 -Yes, I tried already using Ubuntu 14.04 and 16.04, and the same happens (also for the time to build the model).


For the C++ issue two ideas come to mind:

1. on your Ubuntu 14.04 you ran into memory swapping and it took a while to create the model or the whole machine was busy with other tasks.
    -No, actually I also run using a virtual machine with Ubuntu 16.04 inside the Ubuntu 14.04, so with even less memory available.


2. On Ubuntu 14.04 you use the default C++ library and on 16.04 you build it yourself using our included Makefile
    -In both cases I use the same Makefile made by myself.

About the model time, I also tried VS2015 in Win10-64, and the model building time comparable with the one obtained in Ubuntu 16.04, the small one.

Thank you again.

Best,

Arthur

Michael Winkler

unread,
Jul 20, 2017, 12:56:07 PM7/20/17
to Gurobi Optimization
> 2. On Ubuntu 14.04 you use the default C++ library and on 16.04 you build it yourself using our included Makefile
>    -In both cases I use the same Makefile made by myself.

Hmm, are the compiler versions different that you used to build the lib? Also there could be a difference in what is provided by the libc which makes it run differently.

If you can provide the c++ modeling code + additional data files and could try to reproduce this.

Best,
Michael



Arthur Kramer

unread,
Jul 20, 2017, 1:31:33 PM7/20/17
to Gurobi Optimization
Hi,

Initially, in Ubuntu 14.04, my g++ version was 4.8, than I updated to 5.4 (g++ (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904). The behavior was the same.
In Ubuntu 16.04 I also have g++ 5.4, but I sightly different version (g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609).

Unfortunately, I think I can't provide the c++ source files to you, because it's an working in progress yet, sorry about that.

I also try to create the model in two different ways:
 -1st: by adding the variables one-by-one, using addVar(lb, ub, obj, type, name)
 -2nd: by adding arrays of variables at each call, using addVars(l*b, *ub, *coef, *type, *names, count_cols)

Nothing changed.

Thanks

Michael Winkler

unread,
Jul 20, 2017, 1:36:19 PM7/20/17
to Gurobi Optimization
Ok, then you could try it with the newer compiler on 14.04 but I think it might not be so interesting. Just use Ubuntu 16.04 for model creation :)

addVars() could be slightly faster. Not sure if you can measure it. It certainly depends on the number of variables.

Best,
Michael

Arthur Kramer

unread,
Jul 21, 2017, 7:07:01 AM7/21/17
to Gurobi Optimization
Ok, then you could try it with the newer compiler on 14.04 but I think it might not be so interesting.
 -I tried already, but nothing changed.

Just use Ubuntu 16.04 for model creation :)
 -Yes, I think it is the safest option, but not the simplest one.


addVars() could be slightly faster. Not sure if you can measure it. It certainly depends on the number of variables.
 -I do agree with you.

About the CutPasses parameter, do you thinnk that is normal to saty to many time in the root nodo with this parameter disabled?

Best,
Arthur
Reply all
Reply to author
Forward
0 new messages