Specifying initial vector for Gurobi Quadratic Programming solver

822 views
Skip to first unread message

Ahmad

unread,
May 23, 2012, 10:22:58 AM5/23/12
to Gurobi Optimization
Dear Gurobi google group,

I am a PhD student and have the immense pleasure of using Gurobi via
MatLab to help solver linear and quadratic programming problems.

I run many iterations over a problem where I solve a linear
programming problem, change the constraints on the lower and upper
bounds of some select variables, and solve a linear programming to
obtain the changed solution. However, my linear programming model
system is ill-posed and so I could have a span of different solutions
in the next iteration. I would like to choose/find the closest
solution to the previous solution vector.

To do this I use quadratic programming instead. However, convergence
is relatively poor!

From my understanding, all optimization solvers need an initial vector
or initial starting point to initiate the solver's search for the
maximum or minimum solution. Is there a way of specifying this initial
vector in Gurobi, to help it converge to the previous solution space?
Alternatively, is there a way of manually 'warm starting' the
quadratic programming solver?

By the way, I am using Gurobi version 4.6.0.

Any tips or solutions are greatly appreciated!
Thanks very much for all your time, help and guidance!

Very best of regards,
Ahmad

Greg Glockner

unread,
May 31, 2012, 4:40:57 PM5/31/12
to gur...@googlegroups.com
> To do this I use quadratic programming instead. However, convergence
> is relatively poor!

Quadratic programming is typically more difficult than linear programming.


> From my understanding, all optimization solvers need an initial vector
> or initial starting point to initiate the solver's search for the
> maximum or minimum solution.

This is incorrect.


> Is there a way of specifying this initial
> vector in Gurobi, to help it converge to the previous solution space?
> Alternatively, is there a way of manually 'warm starting' the
> quadratic programming solver?

Yes; this capability was added in version 5.0.0.

Christopher Maes

unread,
Jun 1, 2012, 10:46:14 AM6/1/12
to gur...@googlegroups.com
> I use MatLab as my interface to the Gurobi solver. I understand that Gurobi
> 5.0 also has a MatLab interface, which is excellent news!
> However, after looking in the Gurobi MatLab Reference Manual online, I
> cannot find the Gurobi attribute/parameter which will allow me to
> input/specify the initial vector, specifically for the MatLab interface!
>
> I would be very grateful if you would please guide me as to how I can input
> the initial vector for a Gurobi quadratic programming problem, via the
> MatLab interface, i.e. which parameter of the solver input would it be?!

Hi Ahmad,

If you don't alter the constraints too much, you might be able to warm
start using an advanced basis from a previous solve. This can be done
in the MATLAB interface with the VBasis and CBasis attributes. These
are described in the MATLAB reference manual and the Attribute page of
the documentation:
http://www.gurobi.com/documentation/5.0/reference-manual/node652#sec:Attributes

Note that this approach is different than specifying an initial input vector.

This MATLAB example shows how to use VBasis and CBasis with an LP:
http://www.gurobi.com/documentation/5.0/example-tour/node159

Since you are solving a QP you will have to use the simplex method to
get VBasis and CBasis. That is, you must set the Method parameter to 1
or 0. Note that it may be faster to solve each QP from scratch using
barrier than to warm start simplex. You'll have to experiment
yourself.

You might also consider switching to Python (or one of the other
programming language interfaces). These interfaces allow you to more
easily modify a model.

Chris
Reply all
Reply to author
Forward
0 new messages