pyipopt icon indicating copy to clipboard operation
pyipopt copied to clipboard

Warm Start in NLP Solve

Open andrewcron opened this issue 9 years ago • 4 comments

Hi Everyone,

I've added a new feature to allow the appropriate parameters to be passed to solve to perform warm start optimization. (See http://www.coin-or.org/Ipopt/documentation/node49.html.) I've also included a new example variant of hs071_PY3.py to demonstrate the process.

The primary change is the option to pass the various bound multipliers returned from a previous optimization to the solve function as keyword only arguments along with some error checking. If they are passed mL, mU, and lambda in solve are initialized instead of passed as empty arrays. When the nlp.str_option('warm_start_init_point', 'yes') option is set, these arrays will be read and the optimization will pretty much pick up where it left off.

This helps solve a very common problem where the objective only changes slightly between runs of the optimizer, so we don't want to completely reinitialize if the optimization is expensive.

Thoughts?

Thanks!

andrewcron avatar May 03 '16 17:05 andrewcron

Nice. Let me take a closer look. Definitely in love with this patch/PR!!!

xuy avatar May 03 '16 20:05 xuy

It's been a year since I did this, but I'm pretty sure this is why I put "PY3" in the script name. I imagine someone could modify to support Python 2.

andrewcron avatar May 13 '17 19:05 andrewcron

Has this already been merged into the master branch, @xuy ? Thank you very much!

economoser avatar Apr 21 '18 18:04 economoser

@andrewcron I merged your pull request (with some changes) into my fork g-braeunlich/pyipopt

g-braeunlich avatar Oct 19 '18 13:10 g-braeunlich