[SciPy-user] openopt: which NLP solver?
Fri Jan 25 04:33:40 CST 2008
I've just installed openopt and need to minimize a function
of many variables (100 to 10000, depending on the configuration)
I need some help to find the correct solver among the many
available in this very interesting openopt package.
My case is a non-linear problem with simple constraints
(all variables >0). The function is smooth according to what
I know and I have worked out the analytical gradient. I already
implemented everything (f and fprime) in python and tested using
standard scipy.optimize.fmin_cg solver . It works somewhat but:
- it is not stable, i.e. there are sudden jumps sometimes after many
many iterations in which it seems to converge (and in those cases
the final solution is usually worse than before the jump)
- it has no memory: the value returned by fmin_cg is the one of the last
step and not the minimum value of all attempts made (and the different
is quite relevant in my case)
- it is possible that the evaluation of my function and gradient suffers
some numerical instabilities
- evaluation of the function takes seconds and evaluation of the
gradient takes many seconds (even minutes) so I cannot wait for
a huge number of iterations that fmin_cg seems to require
- starting from different intial points I got different (local?)
minima quite each time when the number of variables increases. Could
it be that fmin_cg becomes unstable on large problems?
If someone (dmitrey?) could help selecting most appropriate solver
in openopt it would be much appreciated.
In the meawhile I'll try 'ralg'.
Thanks in advance,
P.S.: I'm having some troubles building openopt in ubuntu gutsy.
"sudo python setup.py install" works but "python setup.py build"
does not, requiring a previously installed "scikits" package. How
can I install openopt in a custom path instead of /usr/local/lib/... ?
: by the way fmin_cg does not handle constraints, at least in
standard scipy, which forced me to use abs() in many places. This
could be a source of instabilities when computing gradient.
More information about the SciPy-user