diff options
Diffstat (limited to 'sci_gateway/cpp/sci_ipoptfmincon.cpp')
-rw-r--r-- | sci_gateway/cpp/sci_ipoptfmincon.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sci_gateway/cpp/sci_ipoptfmincon.cpp b/sci_gateway/cpp/sci_ipoptfmincon.cpp index 51f1cce..803d4f3 100644 --- a/sci_gateway/cpp/sci_ipoptfmincon.cpp +++ b/sci_gateway/cpp/sci_ipoptfmincon.cpp @@ -127,6 +127,7 @@ int sci_solveminconp(char *fname) nVars = x0_cols; nCons = A_rows + Aeq_rows + nonlinCon; + // Starting Ipopt @@ -138,7 +139,7 @@ int sci_solveminconp(char *fname) app->Options()->SetNumericValue("tol", 1e-6); app->Options()->SetIntegerValue("max_iter", (int)*max_iter); app->Options()->SetNumericValue("max_cpu_time", *cpu_time); -// app->Options()->SetStringValue("hessian_approximation", "limited-memory"); + app->Options()->SetStringValue("hessian_approximation", "limited-memory"); ///////// Initialize the IpoptApplication and process the options ///////// ApplicationReturnStatus status; @@ -148,7 +149,7 @@ int sci_solveminconp(char *fname) sciprint("\n*** Error during initialization!\n"); return (int) status; } - + // Ask Ipopt to solve the problem status = app->OptimizeTNLP((SmartPtr<TNLP>&)Prob); //Get the solve statistics @@ -157,7 +158,7 @@ int sci_solveminconp(char *fname) app->Statistics()->Infeasibilities(dual_inf, constr_viol, complementarity, kkt_error); rstatus = Prob->returnStatus(); fobj_eval=(double)int_fobj_eval; - + ////////// Manage the output argument ////////// fX = Prob->getX(); |