Free Python optimization framework

Monday, September 29, 2008

Changes for converters

I have committed lots of changes for (all) converters; also, the issue with splitted funcs (for nlps2nlp and lsp2nlp) has been fixed.

PSwarm v 1.2: bugfixes for Linux

After another one OO user (Nils Wagner) has informed PSwarm developer Ismael Vaz about same bugs ("use -fPIC" and "undefined symbol 'opt'") the bugs have been fixed.

PSwarm v. 1.2 is already available with the bugfixes.

I have removed mention of the bug from GLP docpage entry.

Saturday, September 27, 2008

new converter: nlsp2nlp

I have committed nlsp2nlp converter, see NLSP page for details. It tries to minimize
   ||F(x)||2
and, of course, it is capable of handling constrained problems.

You can try updated nlsp_1.py or nlsp_constrained.py from /examples.

However, a requirement should be satisfied: non-linear functions shouldn't be splitted.

This minor issue is intended to be fixed in future (BTW, splitting can't yield benefits for nlsp2nlp converter with any NLP solver).

Tuesday, September 23, 2008

Some more openopt install issues

Latest NumPy (taken from subversion repository) forced some OO users to inform me about some more openopt's install issues.

First of all, sometimes openopt's "python setup.py install" starts to search and download numpy 1.1.x from internet, while recent numpy from svn is already installed.

At second (it's especially inconvenient to me), modifying any single line in openopt's sources and then running "python setup.py install" now recompiles all openopt's files. Even if there were no changes at all, anyway all OO files are recompiled. Taking into account that I run this dozens times per day it's very annoying, and my increases danger for my HDD. Of course I could use OO without "python setup.py install" but this is inconvenient because of some reasons (I had already tried).

So, please take into account: these issues are not up to me, they are up to numpy.distutils developers. I hope they will fixed it ASAP.

Monday, September 22, 2008

Install issues with latest numpy

Recently some changes have been committed to numpy, and previous openopt versions can't work with those ones.

So I have committed some changes to openopt, and AFAIK now openopt runs with all known to me numpy versions >= 1.1.0 correctly.

Hence, install/update OpenOpt from latest tarball or subversion repository is recommended.

Saturday, September 20, 2008

new converter: lsp2nlp

I have committed lsp2nlp converter, see LSP page for details.

Friday, September 19, 2008

new converter: lp2nlp

I have committed lp2nlp converter, see LP page for details.
See also the remark about ipopt.opt file here

Thursday, September 18, 2008

new converter: qp2nlp

I have committed qp2nlp converter, see QP page for details.
Let me note that if a problem have been converted to NLP from QP, LLSP, LP (latter will be added soon), then the following lines are automatically appended to ipopt.opt file:

jac_c_constant yes
jac_d_constant yes
hessian_constant yes

Also, bugfix for example qp_1.py has been committed:

Instead of
x1^2 + 2x2^2 + 3x3^2 + 15x1 + 8x2 + 80x3 -> min

we have
0.5 * (x1^2 + 2x2^2 + 3x3^2) + 15x1 + 8x2 + 80x3 -> min

I.e. if H = diag((1,2,3)), instead of
xHx + fx -> min

we search for
0.5 * xHx + fx -> min

Monday, September 15, 2008

OpenOpt release 0.19

Hi all,
I'm glad to inform you about new OpenOpt release: v 0.19.

Changes since previous release 0.18 (June 15, 2008):
  • Some changes for NLP/NSP solver ralg (especially related to handling linear constraints Ax <= b, Aeq x = beq, lb <= x <= ub)
  • Bugfix for ralg and IPOPT linear constraints handling
  • ALGENCAN v 2.0.x has been connected (v 1.0 is no longer supported, v 2.0.3 or later is required)
  • Bugfix for constrained NLSP graphic output (constrained nssolve isn't turned to latest ralg version yet)
  • Scale parameter for lpSolve (p.scale = {False} | True | 0 | 1)
  • New OO class LLAVP (linear least absolute values aka linear least deviations)
  • Improved handling of non-linear functions with restricted dom
  • GLP (global) solver galileo now can handle integer problems (via p.useInteger = 1 or True)
  • Another one GLP solver connected: pswarm
  • Lots of work related to oofun concept (see OO Doc page for details)
  • Add converters llsp2nlp, llavp2nsp
  • Convenient handling of maximization problems (via p.goal = 'max' or 'maximum')
  • Some code clean up and bugfixes

Backward incompatibility:
  • Changed objective function in LLSP
  • MATLAB-style gradtol renamed to gtol (for to provide same syntax to scipy.optimize fmin_bfgs, fmin_cg and less-to-type)
Regards, Dmitrey.

changes for ralg and oofun derivatives example

  • some ralg changes, mainly for linear constraints (A, Aeq, lb, ub)
  • example of oofun derivatives has been attached to OO Doc page
  • some code cleanup and minor bugfixes

Monday, September 1, 2008

changes for ralg, oofun, handling NaNs

I have committed some changes related to
  • ralg: change for matrix B rejuvenation criterium, now by default it performs check "cond(b) less than 1e5" each 250th iter or provided a stop criterion has triggered on. However, for large nVars evaluation of numpy.linalg.cond(b) takes a time (for nVars = 1000 I got ~5 seconds at my AMD 3800+ X2). So it would be good to get estimation of cond(b) instead of exact value (like MATLAB's condest for sparse matrices; however, b is dense).
  • oofun: recursive 1st derivatives, appropriate example will be committed soon
  • handling NaNs: if right-derivative (f(x+dx)-f(x))/dx is NaN then left-derivative (f(x)-f(x-dx))/dx will be used; it's valid for both oofun and classic style, however, it doesn't resolve all possible issues. Also, I intend to add double-side derivative possibility in future: (f(x+dx)-f(x-dx))/(2*dx) via an oofun field, for example c2 = oofun(..., useDoubleSideDerivative = True,...)
  • some other (minor) ralg changes