Does gurobi do minimum changes (minimal perturbation) when starting from a partial solution?

316 views Asked by At

I know that in gurobi I can start from an initial solution. i.e. after solving an LP using

   m.optimize() 

for model m, I can change some constraints and either use

   m.reset()
   m.optimize() 

to find a new solution for the LP from scratch or just call

   m.optimize() 

to find a new solution from the initial solution.

My question is that when gurobi starts from an initial solution does it do minimal changes (to the variables) required to get the new solution?

I think this is a minimal perturbation problem. If gurobi does not do this by default, is there any-way to inform gurobi to do minimal changes?

FURTHER COMMENTS: I understand that warm start could be faster but will the changes in variables be minimal. For example, the objective function is

  maximize(i1+i2+i3+i4)

and the initial set of constraint is such that only

  i1,i2 can be set as 1 and i3,i4 as 0.

Now the constraints change and the new solution (still only 2 variables can be set as 1) can be either

  i1, i3 as 1 (or) i3, i4 as 1.

Could gurobi optimizer end up selecting the solution with minimal change i1, i3 as 1?

Also if another solution was

   i1,i2 as 1 

will gurobi choose that as that solution is exactly the same as existing?

1

There are 1 answers

4
Greg Glockner On

Yes, this is known as a warm start. Most modern linear programming solvers, including Gurobi Optimizer, use a warm start when you modify a model and call the optimize() function. With minor changes, it is usually much faster to solve the model using the warm start. However, if you make substantial changes, a warm start may be slower than solving the model from scratch. Gurobi Optimizer also uses a warm start for MIP models.

With Gurobi Optimizer, you can also specify start values via the Start attribute, or for LP models via the primal and dual start attributes (PStart and DStart, respectively).