-
-
Save abelsiqueira/2098fd39adb32cfe46bd310acffa5f63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AKIVA no errors | |
BEALE type1 errors: 46 3.15434924e+02 | |
BEALE type2 errors: 48 1.02281112e+20 | |
BOXBODLS type1 errors: 1 3.26285242e+03 | |
BOXBODLS type2 errors: 3 4.27834196e+04 | |
BQP1VAR no errors | |
BRKMCC no errors | |
BROWNBS type1 errors: 5 3.53420000e+01 | |
BROWNBS type2 errors: 33 1.21212081e+19 | |
CAMEL6 type1 errors: 10 9.99999668e+18 | |
CAMEL6 type2 errors: 10 9.99999668e+18 | |
CLIFF no errors | |
CUBE no errors | |
DANWOODLS type1 errors: 4982 7.28354576e+13 | |
DANWOODLS type2 errors: 3042 Inf | |
DENSCHNA no errors | |
DENSCHNB type1 errors: 260 7.69230515e+17 | |
DENSCHNB type2 errors: 254 5.34924888e+04 | |
DENSCHNC no errors | |
DENSCHNF type1 errors: 4949 2.53798284e+11 | |
DENSCHNF type2 errors: 7299 6.93197242e+17 | |
DJTL no errors | |
EXPFIT type1 errors: 6540 8.96381237e+12 | |
EXPFIT type2 errors: 4604 1.25507137e+13 | |
HAIRY type1 errors: 1441 1.06243982e+11 | |
HAIRY type2 errors: 2081 1.23143818e+11 | |
HILBERTA type1 errors: 10000 3.02384822e+10 | |
HILBERTA type2 errors: 10000 7.23186919e+10 | |
HIMMELBB type1 errors: 5979 Inf | |
HIMMELBB type2 errors: 5990 Inf | |
HIMMELBG type1 errors: 10000 4.13693028e+03 | |
HIMMELBG type2 errors: 9998 2.25810501e+09 | |
HIMMELBH no errors | |
HIMMELP1 type1 errors: 9276 1.64900432e+08 | |
HIMMELP1 type2 errors: 6983 2.19048006e+08 | |
HS1 no errors | |
HS2 no errors | |
HS3 no errors | |
HS3MOD no errors | |
HS4 no errors | |
HS5 no errors | |
HUMPS type1 errors: 1 3.94727414e+05 | |
HUMPS type2 errors: 7 1.40974053e+22 | |
JENSMP no errors | |
LOGHAIRY type1 errors: 29 1.68125432e+19 | |
LOGHAIRY type2 errors: 40 1.21890938e+19 | |
LOGROS type1 errors: 2655 1.10205082e+06 | |
LOGROS type2 errors: 3581 8.80494450e+05 | |
MARATOSB no errors | |
MDHOLE no errors | |
MEXHAT type1 errors: 10000 5.50422265e+15 | |
MEXHAT type2 errors: 10000 2.21982396e+24 | |
MISRA1ALS type1 errors: 2079 Inf | |
MISRA1ALS type2 errors: 2182 Inf | |
MISRA1BLS type1 errors: 9997 5.03265096e+35 | |
MISRA1BLS type2 errors: 10000 2.32792001e+41 | |
MISRA1CLS type1 errors: 10000 Inf | |
MISRA1CLS type2 errors: 10000 Inf | |
MISRA1DLS type1 errors: 10000 3.78687762e+48 | |
MISRA1DLS type2 errors: 10000 2.96378847e+41 | |
POWELLBSLS type1 errors: 9997 1.89796903e+52 | |
POWELLBSLS type2 errors: 9999 3.22608916e+52 | |
ROSENBR no errors | |
S308 type1 errors: 10000 7.55221549e+47 | |
S308 type2 errors: 10000 1.44311163e+49 | |
SIM2BQP no errors | |
SIMBQP no errors | |
SINEVAL no errors | |
SISSER type1 errors: 8 7.14770614e+34 | |
SISSER type2 errors: 6 2.93108387e+22 | |
SNAIL type1 errors: 6027 6.00302786e+47 | |
SNAIL type2 errors: 3623 3.45045649e+46 | |
ZANGWIL2 type1 errors: 9998 6.08973663e+48 | |
ZANGWIL2 type2 errors: 9996 Inf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CUTEst, Base.Test, NLPModels | |
function foo() | |
problems = CUTEst.select(max_var=2, max_con=0) | |
sort!(problems) | |
for p in problems | |
nlp = CUTEstModel(p) | |
x0 = nlp.meta.x0 | |
n = nlp.meta.nvar | |
goth = Cint[0] | |
io_err = Cint[0] | |
N = 10_000 | |
nnzs = Cint[1] | |
Is = Array{Cint}(1) | |
Is[1] = 1 | |
s = zeros(1) | |
s[1] = 1.0 | |
err_count1 = 0 | |
err_count2 = 0 | |
err_sum1 = 0.0 | |
err_sum2 = 0.0 | |
nnzr, Ir, r = Cint[0], Array{Cint}(n), zeros(n) | |
ushprod(io_err, Cint[n], goth, x0, Cint[1], Cint[1], Cdouble[1.0], nnzr, Ir, r) | |
CUTEst.@cutest_error | |
for i = 1:N | |
nnzr2, Ir2, r2 = Cint[0], Array{Cint}(n), zeros(n) | |
ushprod(io_err, Cint[n], goth, x0, Cint[1], Cint[1], Cdouble[1.0], nnzr2, Ir2, r2) | |
CUTEst.@cutest_error | |
if norm(r - r2) > 1e-6 | |
err_count1 += 1 | |
err_sum1 += norm(r - r2) | |
end | |
end | |
for i = 1:N | |
Hx = hess(nlp, x0) | |
end | |
for i = (N+1):2N | |
nnzr2, Ir2, r2 = Cint[0], Array{Cint}(n), zeros(n) | |
ushprod(io_err, Cint[n], goth, x0, Cint[1], Cint[1], Cdouble[1.0], nnzr2, Ir2, r2) | |
CUTEst.@cutest_error | |
if norm(r - r2) > 1e-6 | |
err_count2 += 1 | |
err_sum2 += norm(r - r2) | |
end | |
end | |
if err_count1 > 0 | |
err_sum1 /= err_count1 | |
@printf("%-12s type1 errors: %8d %14.8e\n", p, err_count1, err_sum1) | |
end | |
if err_count2 > 0 | |
err_sum2 /= err_count2 | |
@printf("%-12s type2 errors: %8d %14.8e\n", p, err_count2, err_sum2) | |
elseif err_count1 == 0 && err_count2 == 0 | |
@printf("%-12s no errors\n", p) | |
end | |
finalize(nlp) | |
end | |
end | |
foo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment