[SciPy-dev] openopt example mmp_1.py

dmitrey dmitrey.kroshko@scipy....
Sat Feb 2 16:21:45 CST 2008


I don't know what's the matter, everything works well for me, including 
latest revision checked out from svn into separate dir & python setup.py 
install + python mmp_1.py.

Could anyone else check the example?

Nils, could you add line "print type(ind)" before objFunRelated.py line 
358, run "python setup.py install" and run "python mmp_1.py"? Maybe it 
will help to fix the bug.
However, I guess it could be solved via simple cleanup and checkout OO 
from svn repository.

Regards, D.

------------------------------
starting solver nsmm (license: BSD)  with problem  unnamed
Niter   F
    0       6.47e+03
   42       1.45e+03
nsmm has finished solving the problem unnamed
istop:  4 (|| F[k] - F[k-1] || < ftol)
Solver:   Time Elapsed = 0.24   CPU Time Elapsed = 0.25
Plotting: Time Elapsed = 1.01   CPU Time Elapsed = 0.86
objFunValue: 1449.79080254 (feasible, max constraint =  0)
MMP result: 1449.79080254
------------------------------


Nils Wagner wrote:
> Hi Dmitrey,
>
> the example mmp_1.py is broken.
>
> /usr/bin/python 
> svn/openopt/scikits/openopt/examples/mmp_1.py
> starting solver nsmm (license: BSD)  with problem  unnamed
> incorrect func index type!
> Traceback (most recent call last):
>    File "svn/openopt/scikits/openopt/examples/mmp_1.py", 
> line 22, in ?
>      r = p.solve('nsmm')
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
> line 207, in solve
>      return runProbSolver(self, solvers, *args, **kwargs)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/runProbSolver.py", 
> line 156, in runProbSolver
>      solver(p)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/solvers/UkrOpt/nsmm.py", 
> line 54, in __solver__
>      r2 = p2.solve('ralg')
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
> line 207, in solve
>      return runProbSolver(self, solvers, *args, **kwargs)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/runProbSolver.py", 
> line 156, in runProbSolver
>      solver(p)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/solvers/UkrOpt/ralg.py", 
> line 62, in __solver__
>      g,  fname,  ind = self.getRalgDirection(x, p)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/solvers/UkrOpt/ralg.py", 
> line 230, in getRalgDirection
>      d = p.df(x)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/objFunRelated.py", 
> line 138, in user_df
>      df = user_df_func(*(x,) + p.args.f)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/solvers/UkrOpt/nsmm.py", 
> line 31, in df
>      return p.df(x, ind)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/objFunRelated.py", 
> line 105, in user_df
>      if IND is not None: ind = p.getCorrectInd(IND)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/objFunRelated.py", 
> line 358, in getCorrectInd
>      p.err('incorrect func index type!')
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/oologfcn.py", 
> line 12, in ooerr
>      raise OpenOptException(msg)
> oologfcn.OpenOptException: <oologfcn.OpenOptException 
> instance at 0x42cc0bcc>
>
> Cheers
>
>              Nils
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
>
>
>   



More information about the Scipy-dev mailing list