[SciPy-user] [OpenOpt] problem with ralg (latest SVN)
Nils Wagner
nwagner at iam.uni-stuttgart.de
Fri Sep 5 15:53:05 EDT 2008
On Fri, 05 Sep 2008 22:40:12 +0300
dmitrey <dmitrey.kroshko at scipy.org> wrote:
> Hi Nils,
> after some my modifications the file nlp_1.py become
>hard to be solved
> by any solver (I mean connected to OO) - you can try
>solving it by
> algencan or ipopt and see results (output).
>
> So I have committed some changes to nlp_1.py. As for
>other tests (like
> nlp_bench_1, nlp_3) they work ok (nlp_2 for ralg
>requires p.maxIter = 2000).
>
> Regards, D.
>
> Nils Wagner wrote:
>> On Fri, 05 Sep 2008 20:28:50 +0300
>> dmitrey <dmitrey.kroshko at scipy.org> wrote:
>>
>>> Hi Emanuele,
>>> as it is mentioned in openopt install webpage and
>>> README.txt numpy v
>>>
>>>> = 1.1.0 is recommended. Some other oo users informed of
>>>>
>>> bugs due to
>>> older versions.
>>>
>>> Could you inform what will be outputed if you set
>>> p.debug = 1? (either
>>> directly or via p = NLP(..., debug=1,...))
>>>
>>> If the problem with numpy versions is critical for users
>>> of your soft,
>>> you'd better to put more recent numpy into Debian soft
>>> channel.
>>>
>>> Regards, D.
>>>
>>> Emanuele Olivetti wrote:
>>>
>>>> Same problem with numpy 1.0.4 + scipy 0.6.0
>>>> (shipped with ubuntu 8.04 hardy heron).
>>>>
>>>> E.
>>>>
>>>> Emanuele Olivetti wrote:
>>>>
>>>>
>>>>> Dear all and Dmitrey,
>>>>>
>>>>> I've just updated to latest openopt (SVN). When using
>>>>> numpy 1.0.3
>>>>> and scipy 0.5.2 (standard in Ubuntu 7.10 gutsy gibbon)
>>>>> openopt says
>>>>> that "ralg" (NLP) algorithm is missing! With more recent
>>>>> numpy
>>>>> and scipy it seems to work reliably. But what happened
>>>>> with respect
>>>>> to older numpy+scipy? In that case even running
>>>>> examples/nlp_1.py
>>>>> returns:
>>>>> ----
>>>>> $ python nlp_1.py
>>>>> OpenOpt checks user-supplied gradient df (shape: (150,)
>>>>> )
>>>>> according to:
>>>>> prob.diffInt = [ 1.00000000e-07]
>>>>> |1 - info_user/info_numerical| <= prob.maxViolation
>>>>> = 0.01
>>>>> derivatives are equal
>>>>> ========================
>>>>> OpenOpt checks user-supplied gradient dc (shape: (2,
>>>>> 150) )
>>>>> according to:
>>>>> prob.diffInt = [ 1.00000000e-07]
>>>>> |1 - info_user/info_numerical| <= prob.maxViolation
>>>>> = 0.01
>>>>> derivatives are equal
>>>>> ========================
>>>>> OpenOpt checks user-supplied gradient dh (shape: (2,
>>>>> 150) )
>>>>> according to:
>>>>> prob.diffInt = [ 1.00000000e-07]
>>>>> |1 - info_user/info_numerical| <= prob.maxViolation
>>>>> = 0.01
>>>>> derivatives are equal
>>>>> ========================
>>>>> OO Error:incorrect solver is called, maybe the solver
>>>>> "ralg" is not
>>>>> installed. Maybe setting p.debug=1 could specify the
>>>>> matter more precisely
>>>>> Traceback (most recent call last):
>>>>> File "nlp_1.py", line 110, in <module>
>>>>> r = p.solve('ralg')
>>>>> File
>>>>> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/BaseProblem.py",
>>>>> line 185, in solve
>>>>> return runProbSolver(self, solvers, *args, **kwargs)
>>>>> File
>>>>> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/runProbSolver.py",
>>>>> line 48, in runProbSolver
>>>>> p.err('incorrect solver is called, maybe the solver
>>>>> "' + solver_str
>>>>> +'" is not installed. Maybe setting p.debug=1 could
>>>>> specify the matter
>>>>> more precisely')
>>>>> File
>>>>> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/oologfcn.py",
>>>>> line 16, in ooerr
>>>>> raise OpenOptException(msg)
>>>>> scikits.openopt.Kernel.oologfcn.OpenOptException:
>>>>> incorrect solver is
>>>>> called, maybe the solver "ralg" is not installed. Maybe
>>>>> setting
>>>>> p.debug=1 could specify the matter more precisely
>>>>> ----
>>>>>
>>>>> This did not happen before so I guess it is due to a
>>>>> recent
>>>>> commit. It is possible to solve the problem?
>>>>>
>>>>> Kind Regards,
>>>>>
>>>>> Emanuele
>>>>>
>>>>> _______________________________________________
>>>>> SciPy-user mailing list
>>>>> SciPy-user at scipy.org
>>>>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>>>>
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> SciPy-user mailing list
>>>> SciPy-user at scipy.org
>>>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>>>
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> SciPy-user mailing list
>>> SciPy-user at scipy.org
>>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>>
>>
>>
>> Dmitrey,
>>
>> I am using
>>
>>>>> numpy.__version__
>>>>>
>> '1.3.0.dev5790'
>>
>> Cheers,
>> Nils
>>
>> Here comes the output of nlp_1.py:
>>
>> OpenOpt checks user-supplied gradient df (shape: (150,)
>>)
>> according to:
>> prob.diffInt = [ 1.00000000e-07]
>> |1 - info_user/info_numerical| <= prob.maxViolation
>>=
>> 0.01
>> derivatives are equal
>> ========================
>> OpenOpt checks user-supplied gradient dc (shape: (2,
>>150)
>> )
>> according to:
>> prob.diffInt = [ 1.00000000e-07]
>> |1 - info_user/info_numerical| <= prob.maxViolation
>>=
>> 0.01
>> derivatives are equal
>> ========================
>> OpenOpt checks user-supplied gradient dh (shape: (2,
>>150)
>> )
>> according to:
>> prob.diffInt = [ 1.00000000e-07]
>> |1 - info_user/info_numerical| <= prob.maxViolation
>>=
>> 0.01
>> derivatives are equal
>> ========================
>> -----------------------------------------------------
>> solver: ralg problem: unnamed goal: minimum
>> iter objFunVal log10(maxResidual)
>> 0 8.596e+03 3.91
>> OpenOpt debug msg: hs: 4.0
>> OpenOpt debug msg: ls: 2
>> 50 2.800e+03 0.79
>> 100 1.754e+03 0.52
>> 150 9.075e+02 0.31
>> 200 4.455e+02 -0.03
>> 250 3.682e+02 -0.48
>> 300 3.465e+02 -1.15
>> 350 3.409e+02 -1.81
>> 400 1.911e+02 -3.14
>> 450 1.373e+02 -3.07
>> OO info: debug msg: matrix B restoration in ralg solver
>> 500 1.065e+03 1.20
>> 550 2.224e+03 1.21
>> 600 1.822e+03 0.43
>> 650 2.178e+03 0.45
>> 700 2.576e+03 0.48
>> 750 2.840e+03 0.53
>> 800 3.068e+03 0.59
>> 850 7.958e+03 1.37
>> 900 2.174e+04 1.54
>> 950 3.341e+04 1.37
>> 1000 7.463e+04 2.17
>> 1050 3.692e+05 2.50
>> 1100 1.940e+05 2.16
>> 1150 1.482e+05 1.77
>> 1200 1.719e+05 1.86
>> 1250 2.963e+05 2.52
>> 1300 1.603e+05 2.27
>> 1350 2.299e+05 2.56
>> 1400 3.243e+05 2.63
>> 1450 2.663e+05 2.51
>> 1500 3.064e+05 2.55
>> 1550 4.297e+05 2.74
>> 1600 1.629e+05 2.80
>> 1650 2.379e+05 2.33
>> 1700 2.086e+05 2.28
>> 1750 1.214e+05 2.22
>> 1800 4.913e+04 1.58
>> 1850 3.862e+04 1.65
>> 1900 1.610e+05 2.53
>> 1950 3.576e+04 1.44
>> OO info: debug msg: matrix B restoration in ralg solver
>> 2000 7.286e+05 2.42
>> 2050 5.268e+05 2.50
>> 2100 1.403e+05 2.01
>> 2150 1.029e+05 1.96
>> 2200 9.997e+04 2.15
>> 2250 7.424e+05 2.92
>> 2300 5.514e+04 1.55
>> 2350 2.518e+05 2.66
>> 2400 5.051e+04 1.78
>> 2450 5.006e+04 2.05
>> 2500 4.279e+04 1.44
>> 2550 4.509e+04 1.62
>> 2600 1.331e+05 2.45
>> 2650 4.061e+04 1.41
>> 2700 5.198e+04 1.90
>> 2750 3.489e+09 4.77
>> 2800 6.938e+04 2.22
>> 2850 2.474e+10 5.20
>> 2900 4.259e+07 3.81
>> 2950 1.044e+05 2.40
>> 3000 6.411e+10 5.40
>> 3050 6.232e+07 3.89
>> 3100 1.830e+06 3.13
>> 3150 4.635e+04 1.45
>> 3200 1.770e+09 4.62
>> OO info: debug msg: matrix B restoration in ralg solver
>> 3250 1.764e+11 5.57
>> 3300 3.792e+09 4.01
>> 3350 1.554e+10 5.05
>> 3400 7.294e+09 4.81
>> 3450 7.227e+09 4.81
>> OO info: debug msg: matrix B restoration in ralg solver
>> 3500 1.415e+11 5.56
>> 3550 1.795e+10 6.16
>> 3600 5.205e+09 4.40
>> 3650 1.641e+10 5.04
>> 3700 1.408e+10 5.01
>> OO info: debug msg: matrix B restoration in ralg solver
>> 3750 1.277e+10 4.96
>> 3800 5.576e+09 3.89
>> 3850 5.008e+09 3.97
>> 3900 4.475e+09 4.04
>> 3950 3.993e+09 4.11
>> 4000 3.558e+09 4.17
>> 4050 3.237e+09 4.24
>> 4100 2.844e+09 4.24
>> 4150 1.077e+10 4.83
>> 4200 9.891e+09 4.82
>> OO info: debug msg: matrix B restoration in ralg solver
>> 4250 4.720e+09 4.12
>> 4300 3.411e+09 4.02
>> 4350 1.768e+09 6.43
>> 4400 1.851e+09 4.31
>> 4450 1.448e+09 3.99
>> 4500 1.248e+09 3.84
>> 4550 1.099e+09 3.80
>> 4600 6.053e+09 4.85
>> 4650 8.905e+08 3.86
>> 4700 1.446e+09 4.43
>> OO info: debug msg: matrix B restoration in ralg solver
>> 4750 6.292e+09 4.14
>> 4800 2.558e+09 3.96
>> 4850 2.898e+09 4.53
>> 4900 1.581e+09 4.21
>> 4950 1.272e+09 4.28
>> 5000 5.860e+09 6.34
>> 5050 4.163e+09 4.56
>> 5100 3.478e+09 4.22
>> 5150 3.238e+09 4.31
>> 5200 2.862e+09 3.92
>> OO info: debug msg: matrix B restoration in ralg solver
>> 5250 3.259e+09 4.36
>> 5300 2.207e+09 3.91
>> 5350 1.760e+09 3.74
>> 5400 1.560e+09 3.93
>> 5450 1.925e+09 4.41
>> 5500 1.739e+09 4.41
>> 5550 1.640e+09 4.42
>> 5600 8.408e+10 4.93
>> 5650 9.792e+10 4.69
>> 5700 1.303e+11 4.75
>> 5750 2.450e+11 5.44
>> 5800 4.913e+11 5.33
>> 5850 2.536e+11 6.00
>> 5900 3.098e+11 5.70
>> 5950 8.987e+10 5.37
>> OO info: debug msg: matrix B restoration in ralg solver
>> 6000 1.037e+12 6.00
>> 6050 3.448e+11 8.99
>> 6100 8.307e+12 6.40
>> 6150 1.589e+12 5.87
>> 6200 1.213e+12 5.27
>> OO info: debug msg: matrix B restoration in ralg solver
>> 6250 1.224e+12 5.45
>> 6300 7.495e+11 5.00
>> 6350 3.998e+11 15.67
>> 6400 3.987e+11 5.00
>> 6450 3.127e+11 5.02
>> 6500 2.419e+11 5.27
>> 6550 3.691e+11 5.13
>> 6600 6.414e+11 5.74
>> 6650 1.329e+12 5.92
>> 6700 3.528e+11 5.18
>> 6750 2.981e+11 4.78
>> 6800 5.060e+11 5.51
>> 6850 4.760e+11 5.09
>> 6900 4.499e+11 5.10
>> 6950 1.069e+12 5.86
>> 7000 6.326e+11 5.26
>> 7050 5.217e+11 5.18
>> 7100 5.029e+11 5.16
>> 7150 8.043e+12 6.43
>> 7200 1.073e+13 6.51
>> 7250 2.658e+12 6.18
>> 7300 2.053e+11 4.81
>> 7350 1.040e+12 5.45
>> 7400 2.030e+12 6.08
>> 7450 2.131e+12 6.11
>> 7500 3.493e+11 5.17
>> 7550 2.420e+11 5.04
>> 7600 2.344e+12 6.17
>> 7650 3.515e+11 5.62
>> 7700 2.135e+11 5.35
>> 7750 1.411e+11 4.78
>> 7800 8.295e+12 6.46
>> 7850 7.406e+12 6.39
>> 7900 9.030e+12 6.45
>> 7950 1.677e+12 6.04
>> OO info: debug msg: matrix B restoration in ralg solver
>> 8000 3.579e+12 6.23
>> 8050 1.109e+12 10.92
>> 8100 5.111e+12 5.80
>> 8150 7.521e+12 6.08
>> 8200 7.199e+12 5.85
>> OO info: debug msg: matrix B restoration in ralg solver
>> 8250 7.812e+12 6.05
>> 8300 5.366e+12 8.57
>> 8350 5.689e+12 5.97
>> 8400 5.140e+12 5.97
>> 8450 3.909e+12 5.38
>> OO info: debug msg: matrix B restoration in ralg solver
>> 8500 5.130e+12 6.12
>> 8550 3.753e+12 6.36
>> 8600 2.963e+12 5.43
>> 8650 2.528e+12 5.44
>> 8700 2.134e+12 5.46
>> OO info: debug msg: matrix B restoration in ralg solver
>> 8750 1.760e+12 5.46
>> 8800 1.467e+12 5.27
>> 8850 2.764e+12 12.53
>> 8900 2.152e+12 5.63
>> 8950 2.532e+12 5.86
>> OO info: debug msg: matrix B restoration in ralg solver
>> 9000 1.884e+12 5.67
>> 9050 4.073e+12 12.35
>> 9100 1.709e+12 5.38
>> 9150 1.398e+12 5.57
>> 9200 1.248e+12 5.60
>> OO info: debug msg: matrix B restoration in ralg solver
>> 9250 1.044e+12 5.14
>> 9300 7.844e+11 5.21
>> 9350 6.360e+11 5.47
>> 9400 6.253e+11 5.67
>> 9450 3.557e+11 4.91
>> 9500 3.400e+11 5.29
>> 9550 3.160e+11 5.30
>> 9600 2.601e+11 4.94
>> 9650 2.199e+11 4.85
>> 9700 5.335e+12 13.48
>> OO info: debug msg: matrix B restoration in ralg solver
>> 9750 5.933e+12 6.24
>> 9800 4.174e+12 8.76
>> 9850 3.803e+12 5.52
>> 9900 2.854e+12 5.50
>> 9950 2.014e+12 5.47
>> 10000 3.285e+12 6.13
>> 10001 3.285e+12 6.13
>> istop: -7 (Max Iter has been reached)
>> Solver: Time Elapsed = 56.05 CPU Time Elapsed = 31.82
>> Plotting: Time Elapsed = 62.35 CPU Time Elapsed = 32.57
>> NO FEASIBLE SOLUTION is obtained (max residual =
>>1.4e+06,
>> objFunc = 3.2852899e+12)
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user at scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>
>>
>>
>>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
Now it works for me
------------------------------------------------------------------------
r1270 | dmitrey.kroshko | 2008-09-05 21:33:49 +0200 (Fri,
05 Sep 2008) | 1 line
some changes in nlp_1.py
OpenOpt checks user-supplied gradient df (shape: (150,) )
according to:
prob.diffInt = [ 1.00000000e-07]
|1 - info_user/info_numerical| <= prob.maxViolation =
0.01
derivatives are equal
========================
OpenOpt checks user-supplied gradient dc (shape: (2, 150)
)
according to:
prob.diffInt = [ 1.00000000e-07]
|1 - info_user/info_numerical| <= prob.maxViolation =
0.01
derivatives are equal
========================
OpenOpt checks user-supplied gradient dh (shape: (2, 150)
)
according to:
prob.diffInt = [ 1.00000000e-07]
|1 - info_user/info_numerical| <= prob.maxViolation =
0.01
derivatives are equal
========================
-----------------------------------------------------
solver: ralg problem: unnamed goal: minimum
iter objFunVal log10(maxResidual)
0 8.596e+03 5.73
OpenOpt debug msg: hs: 16.0
OpenOpt debug msg: ls: 4
50 5.237e+03 1.08
100 7.347e+03 1.04
150 2.248e+04 1.24
200 7.588e+03 1.24
250 3.281e+03 0.74
300 2.780e+03 0.59
350 2.328e+03 0.52
400 1.748e+03 0.39
450 1.433e+03 0.27
500 9.347e+02 0.10
550 5.696e+02 -0.17
600 4.870e+02 -0.46
650 3.879e+02 -0.84
700 3.319e+02 -1.35
750 1.433e+02 -1.42
800 1.444e+02 -1.46
850 1.380e+02 -3.10
900 1.337e+02 -3.03
950 1.294e+02 -3.10
OO info: debug msg: matrix B restoration in ralg solver
1000 1.282e+02 -3.10
1050 1.281e+02 -3.10
1100 1.281e+02 -2.91
1135 1.281e+02 -3.10
/usr/local/lib64/python2.5/site-packages/matplotlib/axes.py:4827:
DeprecationWarning: replace "faceted=False" with
"edgecolors='none'"
DeprecationWarning) #2008/04/18
istop: 3 (|| X[k] - X[k-1] || < xtol)
Solver: Time Elapsed = 7.71 CPU Time Elapsed = 5.33
Plotting: Time Elapsed = 13.29 CPU Time Elapsed = 7.63
objFunValue: 128.08949 (feasible, max constraint =
0.0008)
Cheers,
Nils
More information about the SciPy-User
mailing list