snopt / snopt-interface

C/C++ API for SNOPT7
MIT License
27 stars 12 forks source link

Setting nS when performing a warm start #5

Closed dandezille closed 8 years ago

dandezille commented 8 years ago

The documentation states that for cold starts the value of nS need not be set, but for warm starts it should retain the value from the previous call.

Currently nS is declared within the solve function body and as such there is no way to set it, or for it to retain its value from the previous solve.

If the documentation is correct, it would seem that the C++ interface does not allow for warm starts as nS can not be set, is this correct?

Many thanks

gnowzil commented 8 years ago

It's actually okay if you don't set nS for a warm start. The important info to pass in is x and hs, which give the initial point and the initial basis. That will be enough for the warm start.

dandezille commented 8 years ago

Thanks a lot, that was the answer I was hoping for!