[R] Nloptr vs Excel GRG optimization result

Narendra Modi bjpmodi2016 at gmail.com
Mon Jul 11 16:38:01 CEST 2016


Hi All,
For a non-linear minimization optimization problem that I have, I am
getting better objective function value in Excel(15) as compared to
nloptr (73).

the nloptr is setup as:

opts = list("algorithm"="NLOPT_LN_COBYLA",
            "xtol_rel"=1.0e-8, "maxeval"= 10000)
lb = vector("numeric",length= length(my.data.var))

result <- nloptr(my.data.var,eval_f = Error.func,lb=lb,
                 ub =
c(Inf,1,1,1,1,1,Inf,1,1,1,1,1,Inf,1,1,1,1,1,Inf,1,1,1,1,1),eval_g_ineq=constraint.func,opts
= opts)


As observed even with 10000 as maximum evaluations, the objective
function is way off as compared to Excel's GRG which solved it in 200
iterations.

Is there a way to improve the objective function value from nloptr? OR
is there any excel's GRG equivalent package in R.

Thanks for your time!

PD



More information about the R-help mailing list