Free Python optimization framework

Saturday, July 19, 2008

New OO class: LLAVP

New OO class is ready: LLAVP - linear least absolute value problem, aka linear least absolute deviation problem

||C*x-d||1 + damp*||x-X||1 -> min

subjected to box-bound constraints:
lb <= x <= ub (some coords of lb and ub can be +/- inf)

(some more constraints are intended to be added)

currently single solver available is converter llavp2nsp. Usage example:
r = p.solve('nsp:ralg')
Recommended solvers to try are ralg, ipopt (using maxIter for ipopt is recommended) and algencan.

However note: ipopt and algencan are NLP solvers and convergence for non-smooth problems like LLAVP is not guarantied. As for Naum Z. Shor r-algorithm implemented in ralg, convergence haven't been proved even for convex NL problems yet.

Also, I intended to connect Fortran-written toms615 but I got f2py error:
$ f2py -c -m toms615 toms615.f
...
File "/usr/lib/python2.5/site-packages/numpy/f2py/f2py2e.py", line 364, in run_main
raise TypeError,'All blocks must be python module blocks but got %s'%(`postlist[i]['block']`)
TypeError: All blocks must be python module blocks but got 'program'

4 comments:

Gaƫl said...

Hey Dmitrey,

You know that a blogpost isn't the right way of report of bug in f2py. I think you should bring this up on the mailing list.

Cheers.

Dmitrey said...

I'm not sure it's f2py bug, mb something should be modified in the fortran file involved. If someone from openopt blog or scipy-planet readers is skilled enough in f2py and/or have willing and/or needs in toms615 solver he is welcome to try fixing the issue.
Regards, D.

Unknown said...

This is perhaps not the right way to report a 'bug' in the OpenOpt blog, but the links for scipy, SAGE, pythonxy, etc.. are prepended by www.blogger.com, and hence are broken.

Hope this was helpful.

Dmitrey said...

The links have been fixed.
Thx, D.