I have searched for free constrained LLS solvers for some my own purposes - connecting the ones to scikits.openopt and using the ones for solving ralg/lincher subproblems (in future).
So now new LLSP solver is available:bvls. It requires separate installation, see OO LLSP webpage for more details. Other well-known routines - NNLS and WNNLS - are BVLS ancestors.
Thanks to Alan G Isaac and solver authors (Robert L. Parker & Philip B. Stark) who came to agreement of turning bvls license from free-for-non-commercial to GPL and then, moreover, to BSD.
Also, thanks to Pearu Peterson for help with f2py usage.
I have tried some examples with nVars ~ 400...500 and bvls returns better results (r.ff) than translating the problem to NLP and soling via scipy_lbfgsb or scipy_tnc (you could try /examples/llsp_2.py for more details. As for ralg, results are same, but currently time elapsed is much greater).
The solver is intended to be connected to future scipy version. Unfortunately, the BVLS routine is intended for dense problems only (and it's quite bad for my ralg/lincher purposes).
There are other free routines that could be considered - toms/587 (I don't know is the one intended for dense problems only or for sparse ones as well) and BCLS. Latter has GPL (written in ANSI C) and is capable of handling sparse problems, moreover, implicit A matrix via defining funcs Ax and A^T x. BCLS consists of lots files; it has convenient MATLAB API (2 single standalone func for implicit and explicit matrix A) but calling it from C API is very inconvenient, one function is not enough, so I can't connect it to Python via ctypes, the task is too complicated.
As for toms/587, my OS KUBUNTU yields same bug as this one(with ALGENCAN), so I intend to try using the one with next KUBUNTU version.
Friday, March 14, 2008
Sunday, March 9, 2008
maybe ralg-related bug in recent svn changes
Some users inform that recent openopt version from svn yields bug for ralg solver:
OpenOptException: incorrect solver is called, maybe the solver "ralg" is not installed
I can't reproduce the bug in my OS (KUBUNTU 7.10 & Ubuntu 7.04), so I'll try to find and fix the one ASAP.
OpenOptException: incorrect solver is called, maybe the solver "ralg" is not installed
I can't reproduce the bug in my OS (KUBUNTU 7.10 & Ubuntu 7.04), so I'll try to find and fix the one ASAP.
Thursday, February 21, 2008
goldenSection vs scipy.optimize fminbound
For some numerical experiments (intended by our chief Petro I. Stetsyuk and me) with r-algorithm (that is implemented in OO ralg solver) a good line-search optimizer is required.
As you know scipy.optimize has single-variable box-bounded optimization routine "fminbound" (connected to OO as scipy_fminbound). Unfortunately, it has 2 drawbacks:
- it uses mix of golden section and quadratic spline approximation, and latter works very bad for non-smooth and/or noisy funcs, that we deal with
- sometimes solution returned is out of lb-ub bounds.
So I have implemented pure golden section algorithm into OO solver "goldenSection" (nothing special, just several lines of code).
As you know scipy.optimize has single-variable box-bounded optimization routine "fminbound" (connected to OO as scipy_fminbound). Unfortunately, it has 2 drawbacks:
- it uses mix of golden section and quadratic spline approximation, and latter works very bad for non-smooth and/or noisy funcs, that we deal with
- sometimes solution returned is out of lb-ub bounds.
So I have implemented pure golden section algorithm into OO solver "goldenSection" (nothing special, just several lines of code).
Monday, February 11, 2008
"noise" parameter for noisy functions
1. For NSP problems a new parameter has been implemented: noise (currently default value is 0, mb it will be changed in future). Currently ralg can handle the param for objFunc only, not for non-lin constraints c and h.
Also, the parameter can be used with nssolve and nsmm.
examples/nssolveVSfsolve_1.py has been updated (add noise=1e-8 to prob definition).
2. Some more changes to ralg.
Also, the parameter can be used with nssolve and nsmm.
examples/nssolveVSfsolve_1.py has been updated (add noise=1e-8 to prob definition).
2. Some more changes to ralg.
Thursday, February 7, 2008
some changes to NLP/NSP solver ralg
some changes for ralg have been committed, they affect both trajectory and stop criteria (for constrained problems).
Scaling
Possibility to use scale factor(s) is undoubtedly a "MUST HAVE" feature for any advisable optimization solver or framework.
Since now scaling is available in OO (update from svn or tarball is required), and example of scale factor usage (p.scale, "scaleFactor" is too long to type) has been committed to OO Doc page.
Note that using of p.diffInt as vector is also allowed.
However, using scale is more preferred: it affects xtol for those solvers who use native OO stop criteria (ralg, lincher, nssolve, nsmm, mb some else).
Since now scaling is available in OO (update from svn or tarball is required), and example of scale factor usage (p.scale, "scaleFactor" is too long to type) has been committed to OO Doc page.
Note that using of p.diffInt as vector is also allowed.
However, using scale is more preferred: it affects xtol for those solvers who use native OO stop criteria (ralg, lincher, nssolve, nsmm, mb some else).
Tuesday, February 5, 2008
MMP solver nsmm: constraints have been implemented
constraints handling for MMP (minimax problem) solver nsmm has been implemented.
Here's text and graphical output of the updated mmp example
Here's text and graphical output of the updated mmp example
starting solver nsmm (license: BSD) with problem unnamed
Niter ObjFun log10(maxResidual)
0 6.47e+03 1.9
10 6.45e+03 -1.1
20 6.46e+03 -3.6
30 6.46e+03 -5.8
nsmm has finished solving the problem unnamed
istop: 3 (|| X[k] - X[k-1] || < xtol)
Solver: Time Elapsed = 0.26 CPU Time Elapsed = 0.21
Plotting: Time Elapsed = 3.56 CPU Time Elapsed = 2.99
objFunValue: 6461.0983572120513 (feasible, max constraint = 9.66019e-07)
Subscribe to:
Posts (Atom)
