NLSCON

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NLSCON

Pascal A. Dupuis
Hello,

I've found on the following site: http://elib.zib.de/pub/elib/codelib/
a non-linear constrained optimisation routine, codename: nlscon.m.tar.

There were a few typos which are silently ignored by MatLab and cause
Octave to fail, as well as the need to adapt a construct to Octave
varargout syntax. No fundamental change thus, the test case gives the
same results in both environement, which are similar to the ones
accompagning the software. Patch attached. And the file problem.m is
encoded with Mac (\r) convention, requiring to be 'fixed' as:
recode mac problem.m

Now, about the licence: its belongs to a society whose name is ZIB,
and reads:

%    You may use or modify this code for your own non commercial
%    purposes for an unlimited time.
%    In any case you should not deliver this code without a special
%    permission of ZIB.
%    In case you intend to use the code commercially, we oblige you
%    to sign an according licence agreement with ZIB.


It's not open source (you may not redistribute), and restricted:
if you optimise, let's say an engine, using this package, and make
money from the optimised engine, is it a commercial use ? OTOH, this
product is not recent, because the log latest date is 2001.

So,
1) would it be interesting to add somewhere in the doc of
octave/octave-forge, a link to the base files and distribute the
required patch to make it work under Octave ?
2) would there be some interest if some octave maintainers contact the
authors of this software and try to convince them to put it under the
GPL ? Foreseen advantages: more scrutinity, more bugfixes, more
testcases, ...
3) are there other plans to support constrained, non-linear optimisation
techniques ?

TIA

Pascal

--
Dr. ir. Pascal Dupuis
K. U. Leuven, ESAT/ELECTA (formerly ELEN):  http://www.esat.kuleuven.ac.be/
Kasteelpark Arenberg, 10; B-3001 Leuven-Heverlee, Belgium
Tel. +32-16-32 10 21 -- Fax +32-16-32 19 85

nlscon_octave.pat (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NLSCON

Joseph P. Skudlarek
> 3) are there other plans to support constrained, non-linear
> optimisation techniques ?

Yes, there are two I know about.

(1) SQP: John has a sequential quadratic programming solution already
    integrated into Octave (cf. optimization/sqp.m).  sqp doc states

    ## Solve the nonlinear program
    ##      min phi (x)
    ##       x
    ## subject to
    ##      g(x)  = 0
    ##      h(x) >= 0
    ## using a successive quadratic programming method.

(2) SOLNP: I have secured permission from Yinyu Ye to release his
    self-contained "SOLNP" dense constrained nonlinear solver, under
    GPL.  The problem formulation for it is as follows.

    ##         min f(x)
    ##          x
    ## subject to
    ##             g(x) = 0
    ##     lo_h <= h(x) <= hi_h
    ##     lo_x <=   x  <= hi_x
    ##
    ## In general, $f$, $g$ and $h$ are any nonlinear smooth functions
    ## that may be specified and computed in Octave.

    SOLNP is just two functions, written entirely in Octave.  It is
    simpler to use, works well, and ran twice as fast as a
    reimplementation of the method-of-multipliers I wrote.

    I've heavily commented and restructured the code, added diagnostics,
    added references, corrected confusing typo's, and made minor changes
    to avoid globals (but as far as I can tell, the code was bug free,
    so what's out there is safe to use), and created a
    developer-friently test suite for it.

    And, due largely to my daughter, the port of the (substantial) SOLNP
    documentation to txi is almost done (info done, going back and
    adding the TeX specific stuff); also still need to create some
    automatic validation to run as part of a build.

    I expect to release SOLNP into the Octave source stream by 30Sep05.

Hope this helps.

/Jskud

Reply | Threaded
Open this post in threaded view
|

Re: NLSCON

Bill Denney
In addition to this, there are free solutions available from netlib like
nnls that could probably be rather easily added (I know that we already
have lsode).

Bill

On Thu, 18 Aug 2005, [hidden email] wrote:

>> 3) are there other plans to support constrained, non-linear
>> optimisation techniques ?
>
> Yes, there are two I know about.
>
> (1) SQP: John has a sequential quadratic programming solution already
>    integrated into Octave (cf. optimization/sqp.m).  sqp doc states
>
>    ## Solve the nonlinear program
>    ##      min phi (x)
>    ##       x
>    ## subject to
>    ##      g(x)  = 0
>    ##      h(x) >= 0
>    ## using a successive quadratic programming method.
>
> (2) SOLNP: I have secured permission from Yinyu Ye to release his
>    self-contained "SOLNP" dense constrained nonlinear solver, under
>    GPL.  The problem formulation for it is as follows.
>
>    ##         min f(x)
>    ##          x
>    ## subject to
>    ##             g(x) = 0
>    ##     lo_h <= h(x) <= hi_h
>    ##     lo_x <=   x  <= hi_x
>    ##
>    ## In general, $f$, $g$ and $h$ are any nonlinear smooth functions
>    ## that may be specified and computed in Octave.
>
>    SOLNP is just two functions, written entirely in Octave.  It is
>    simpler to use, works well, and ran twice as fast as a
>    reimplementation of the method-of-multipliers I wrote.
>
>    I've heavily commented and restructured the code, added diagnostics,
>    added references, corrected confusing typo's, and made minor changes
>    to avoid globals (but as far as I can tell, the code was bug free,
>    so what's out there is safe to use), and created a
>    developer-friently test suite for it.
>
>    And, due largely to my daughter, the port of the (substantial) SOLNP
>    documentation to txi is almost done (info done, going back and
>    adding the TeX specific stuff); also still need to create some
>    automatic validation to run as part of a build.
>
>    I expect to release SOLNP into the Octave source stream by 30Sep05.
>
> Hope this helps.
>
> /Jskud
>

--
"When it comes time for college, I promise that my daughter can go to the
finest school there is-- in South Carolina."
   -- Homer Simpson

Reply | Threaded
Open this post in threaded view
|

Re: NLSCON

John W. Eaton-6
On 18-Aug-2005, Bill Denney wrote:

| In addition to this, there are free solutions available from netlib like
| nnls that could probably be rather easily added (I know that we already
| have lsode).

The comments at the top of the NNLS subroutine say:

  C     GIVEN AN M BY N MATRIX, A, AND AN M-VECTOR, B,  COMPUTE AN
  C     N-VECTOR, X, THAT SOLVES THE LEAST SQUARES PROBLEM  
  C  
  C                      A * X = B  SUBJECT TO X .GE. 0

so this is a very limited type op optimization.  We would like to have
a general NLP solver that is also free software.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: NLSCON

Bill Denney
Sorry, I didn't mean to say that it would solve the problem, I meant to
point out that there were options for nonlinear regression in netlib.
NNLS is just one that I'd used before.  More are available here:
http://netlib.org/lawson-hanson/all
and I know that in the Lawson-Hanson book that they have what he was
looking for.

Bill

On Thu, 18 Aug 2005, John W. Eaton wrote:

> On 18-Aug-2005, Bill Denney wrote:
>
> | In addition to this, there are free solutions available from netlib like
> | nnls that could probably be rather easily added (I know that we already
> | have lsode).
>
> The comments at the top of the NNLS subroutine say:
>
>  C     GIVEN AN M BY N MATRIX, A, AND AN M-VECTOR, B,  COMPUTE AN
>  C     N-VECTOR, X, THAT SOLVES THE LEAST SQUARES PROBLEM
>  C
>  C                      A * X = B  SUBJECT TO X .GE. 0
>
> so this is a very limited type op optimization.  We would like to have
> a general NLP solver that is also free software.
>
> jwe
>

--
"Facts do not cease to exist because they are ignored."
   -- Aldous Huxley