Branching variable removed by presolve

178 views
Skip to first unread message

Dr Michael F

unread,
Dec 1, 2016, 5:06:00 AM12/1/16
to Gurobi Optimization
I am solving a variant of the vehicle routing problem modelled as a network flow model with side constraints, using Gurobi 7.0.0.  The aim is to minimise the number of vehicles used and then minimise the distance travelled.  This is done by having the vehicle cost set to 10000 in a context where the total travel cost is around 2000.

In many examples the LP relaxation uses a fractional number of vehicles.  For example, 4.5 vehicles with an objective value of around 46500.  Gurobi takes a long time (around an hour) to branch this up to the solution of around 51500.  Clearly it would be nice to branch on the total number of vehicles used.  So I added an integer variable, with a constraint to define it, and set its branching priority above zero.  There was absolutely no change to the run time.  Then I set Presolve=0 and ran the model again from scratch.  Now the run time is about 50 seconds.  And it is obvious from the log file that Gurobi forces the vehicle count variable to be >= 5 during the root node processing.

In this particular case I'm not too worried - Presolve only removes a handful of variables and columns, so turning it off is a reasonable workaround.  But that's not always going to be the case.

Is there any parameter I can set that will absolutely ensure high priority branching variables are not removed, without actually turning off Presolve?

If it helps I can provide an MPS file (around 25M) and command line instructions to reproduce this problem.

Michael Winkler

unread,
Dec 1, 2016, 6:51:30 AM12/1/16
to Gurobi Optimization
Thanks for your detailed information. If you could provide us with an MPS file that would be great. (Can you use bzip2, or 7zip to compress the file before you attach it.)

Cheers,
Michael

Dr Michael F

unread,
Dec 6, 2016, 2:52:50 AM12/6/16
to Gurobi Optimization
The attached mps file illustrates the problem.

If I run the following commands:
gurobi> m = read('bvtest.mps')
gurobi> m.getVarByName('YT').BranchPriority = 1000
gurobi> m.setParam('Presolve',  0)
gurobi> m.optimize()

Then the run time is around 45 seconds on my laptop and 5 nodes are explored.

If I don't do the setParam, then the run time is much much longer, with many thousands of nodes explored to gradually push the lower bound up.

Regards,

Michael F
bvtest.zip

Michael Winkler

unread,
Jan 14, 2017, 4:05:22 AM1/14/17
to Gurobi Optimization
Sorry for the late reply and your example. Instead of disabling presolve you can set m.setParam('GURO_PAR_MINBPFORBID', val) which will prevent variables with branching priority >= "val" not to be presolved away. 

Michael

Dr Michael F

unread,
Jan 25, 2017, 12:33:16 AM1/25/17
to Gurobi Optimization
Thanks, that works.  Is the plan to document this parameter in future versions?

Michael Winkler

unread,
Jan 27, 2017, 6:35:18 AM1/27/17
to Gurobi Optimization
Great. Currently there is no plan to make it a documented parameter.

Michael
Reply all
Reply to author
Forward
0 new messages