diff options
author | harpreet | 2016-07-01 00:11:55 +0530 |
---|---|---|
committer | harpreet | 2016-07-01 00:11:55 +0530 |
commit | 89b96cb79cbe75ba8c1afea61b3caca37a083f62 (patch) | |
tree | 1b879fb0dce2406c1c49bf5bdabcedfb12ff020c /sci_gateway/cpp/sci_minbndNLP.cpp | |
parent | 10e2e4d8b4a7592a8631ddac8e8d1664d6f0b9e3 (diff) | |
download | symphony-89b96cb79cbe75ba8c1afea61b3caca37a083f62.tar.gz symphony-89b96cb79cbe75ba8c1afea61b3caca37a083f62.tar.bz2 symphony-89b96cb79cbe75ba8c1afea61b3caca37a083f62.zip |
Windows Included
Diffstat (limited to 'sci_gateway/cpp/sci_minbndNLP.cpp')
-rw-r--r-- | sci_gateway/cpp/sci_minbndNLP.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/sci_gateway/cpp/sci_minbndNLP.cpp b/sci_gateway/cpp/sci_minbndNLP.cpp index 9a7024e..481a796 100644 --- a/sci_gateway/cpp/sci_minbndNLP.cpp +++ b/sci_gateway/cpp/sci_minbndNLP.cpp @@ -11,7 +11,6 @@ #include "minbndNLP.hpp" -#include "IpIpoptData.hpp" #include "sci_iofunc.hpp" extern "C" @@ -23,7 +22,6 @@ extern "C" #include <sciprint.h> #include <string.h> #include <assert.h> -#include <iostream> using namespace std; using namespace Ipopt; @@ -98,7 +96,7 @@ bool minbndNLP::eval_f(Index n, const Number* x, bool new_x, Number& obj_value) } char name[20]="f"; double obj=0; - double *xNew=x; + const Number *xNew=x; createMatrixOfDouble(pvApiCtx, 3, 1, numVars_, xNew); int positionFirstElementOnStackForScilabFunction = 3; int numberOfRhsOnScilabFunction = 1; @@ -137,7 +135,7 @@ bool minbndNLP::eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f { return 1; } - double *xNew=x; + const Number *xNew=x; Index i; double t=1; createMatrixOfDouble(pvApiCtx, 3, 1, numVars_, xNew); @@ -230,7 +228,7 @@ bool minbndNLP::eval_h(Index n, const Number* x, bool new_x,Number obj_factor, I return 1; } - double *xNew=x; + const Number *xNew=x; Index i; double t=2; @@ -312,10 +310,7 @@ void minbndNLP::finalize_solution(SolverReturn status,Index n, const Number* x, finalObjVal_ = obj_value; status_ = status; - if (status_ == 0 | status_ == 1 | status_ == 2) - { - iter_ = ip_data->iter_count(); - } + } @@ -339,11 +334,6 @@ const double * minbndNLP::getZu() return finalZu_; } -double minbndNLP::iterCount() -{ - return (double)iter_; -} - int minbndNLP::returnStatus() { return status_; |