warm_start

115 views
Skip to first unread message

green...@pobox.com

unread,
Jul 21, 2017, 10:07:51 AM7/21/17
to OSQP

I see warm_start is on by default. How does warm start work - does it cache the solution from the last solve, or does one provide an initial guess? If the latter, how is this done?

Paul Goulart

unread,
Jul 21, 2017, 10:23:25 AM7/21/17
to green...@pobox.com, OSQP
The warm_start options uses the primal and dual variables from a previous solution if one exists.   

If you have warm_start enabled and solve your problem more than once (e.g. after changing some parameter) the solver will restart from the primal/dual iterate where it left off.  Otherwise it starts over from 0.

If you have warm_start enabled but do not provide an initial condition, the solve just starts from 0 (i.e. same behaviour as without warm start).   

If you want to provide an initial guess, you can use (through the matlab interface) the ‘warm_start’ method implemented in the solver object.  See "help osqp/warm_start” in matlab.     Usage in the python interface is similar.  See here:  http://osqp.readthedocs.io/en/latest/interfaces/

PG


On 21 Jul 2017, at 15:07, <green...@pobox.com> <green...@pobox.com> wrote:


I see warm_start is on by default. How does warm start work - does it cache the solution from the last solve, or does one provide an initial guess? If the latter, how is this done?

--
You received this message because you are subscribed to the Google Groups "OSQP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osqp+uns...@googlegroups.com.
To post to this group, send email to os...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osqp/1f9c8cf3-8b09-489c-ab5f-eb9ab697837e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

green...@pobox.com

unread,
Jul 21, 2017, 10:44:48 AM7/21/17
to OSQP, green...@pobox.com, paul.g...@eng.ox.ac.uk

I should mention we are using C++. What variable of what structure to set an initial guess?  

Paul Goulart

unread,
Jul 21, 2017, 10:48:07 AM7/21/17
to green...@pobox.com, OSQP
In that case you should do it through the C interface defined for this purpose, i.e. one of

: osqp_warm_start
: osqp_warm_start_x
: osqp_warm_start_y

which are included via osqp.h.

PG
Reply all
Reply to author
Forward
0 new messages