From 8484c85784b84cc3a9257f8d8065b3a8a7800628 Mon Sep 17 00:00:00 2001 From: harpreet Date: Wed, 6 Apr 2016 10:46:05 +0530 Subject: qpiopt updated --- sci_gateway/cpp/.Rhistory | 0 sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so | Bin 194948 -> 194948 bytes sci_gateway/cpp/sci_ipoptfmincon.cpp | 3 ++- sci_gateway/cpp/sci_minconNLP.cpp | 12 +++++++++--- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 sci_gateway/cpp/.Rhistory (limited to 'sci_gateway') diff --git a/sci_gateway/cpp/.Rhistory b/sci_gateway/cpp/.Rhistory new file mode 100644 index 0000000..e69de29 diff --git a/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so b/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so index 9a4caf4..28c2d3b 100755 Binary files a/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so and b/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so differ diff --git a/sci_gateway/cpp/sci_ipoptfmincon.cpp b/sci_gateway/cpp/sci_ipoptfmincon.cpp index 18218a5..f19bbeb 100644 --- a/sci_gateway/cpp/sci_ipoptfmincon.cpp +++ b/sci_gateway/cpp/sci_ipoptfmincon.cpp @@ -140,9 +140,10 @@ int sci_solveminconp(char *fname) ////////// Managing the parameters ////////// - app->Options()->SetNumericValue("tol", 1e-7); + 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"); ///////// Initialize the IpoptApplication and process the options ///////// ApplicationReturnStatus status; diff --git a/sci_gateway/cpp/sci_minconNLP.cpp b/sci_gateway/cpp/sci_minconNLP.cpp index 600aed6..845e983 100644 --- a/sci_gateway/cpp/sci_minconNLP.cpp +++ b/sci_gateway/cpp/sci_minconNLP.cpp @@ -500,9 +500,17 @@ bool minconNLP::eval_h(Index n, const Number* x, bool new_x,Number obj_factor, I finalHessian_[n*row+col]=values[index++]; } } + + index=0; + for (Index col=0;col < numVars_ ;++col) + { + for (Index row=0; row <= col; ++row) + { + finalHessian_[n*row+col]=values[index++]; + } + } } - return true; } @@ -586,5 +594,3 @@ int minconNLP::returnStatus() } - - -- cgit