[SciPy-user] [optimization] 10X speedup example for scipy.optimize solver, via using oofun

dmitrey dmitrey.kroshko@scipy....
Sat Oct 11 06:15:52 CDT 2008


So now Python 2.5 is required (as it is informed in oo install page). Mb 
I could fix it and commit  (mb I'll do this today) but IIRC this is not 
a single place where I use Python 2.5 features.

to run the example, use
iprint = -1(line 23)
and to check the time elapsed add the lines after r=p.solve(...):
print r.elapsed['solver_time']
print r.elapsed['solver_cputime']

Regards, D.

Nils Wagner wrote:
> On Fri, 10 Oct 2008 20:25:56 +0300
>   dmitrey <dmitrey.kroshko@scipy.org> wrote:
>   
>> Hi all,
>> if anyone is interested here's 10X speedup example for 
>> scipy fmin_ncg 
>> using openopt oofun. Other solvers (from or beyond 
>> scipy.optimize) can 
>> yield similar speedup.
>>
>> http://openopt.blogspot.com/2008/10/example-of-10x-speedup-for-nlp-via.html
>>
>> Regards, D.
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>     
>
>
> python -i 
> svn/openopt/scikits/openopt/examples/oofun/speedup.py
> Traceback (most recent call last):
>    File 
> "svn/openopt/scikits/openopt/examples/oofun/speedup.py", 
> line 25, in ?
>      from scikits.openopt import NLP,  oofun,  oovar
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/__init__.py", 
> line 6, in ?
>      from oo import LP, NLP, NSP, MILP, QP, NLSP, LSP, 
> GLP, LLSP,  MMP, LLAVP
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/oo.py", 
> line 6, in ?
>      from Kernel.BaseProblem import *
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
> line 11, in ?
>      from ooIterPrint import ooTextOutput
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/ooIterPrint.py", 
> line 6
>      'isFeasible': lambda p: ('+' if p.rk<p.contol else 
> '-')
>                                    ^
> SyntaxError: invalid syntax
>
> Nils
>   
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
>
>   



More information about the SciPy-user mailing list