diff options
author | Harpreet | 2016-08-31 10:22:01 +0530 |
---|---|---|
committer | Harpreet | 2016-08-31 10:22:01 +0530 |
commit | 356c6215f4872911205dcb2d155e7687ae4dd2a8 (patch) | |
tree | 63222841367ae36ed0bdf52dd30aabf8e5b21049 /build/cpp/sci_minuncTMINLP.cpp | |
parent | d8fca69f239a275f5ffdbd870508c86b6e69c678 (diff) | |
download | FOSSEE-Optim-toolbox-development-356c6215f4872911205dcb2d155e7687ae4dd2a8.tar.gz FOSSEE-Optim-toolbox-development-356c6215f4872911205dcb2d155e7687ae4dd2a8.tar.bz2 FOSSEE-Optim-toolbox-development-356c6215f4872911205dcb2d155e7687ae4dd2a8.zip |
intfminimax added and fmincon updated
Diffstat (limited to 'build/cpp/sci_minuncTMINLP.cpp')
-rw-r--r-- | build/cpp/sci_minuncTMINLP.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build/cpp/sci_minuncTMINLP.cpp b/build/cpp/sci_minuncTMINLP.cpp index b02ab8e..696c5ef 100644 --- a/build/cpp/sci_minuncTMINLP.cpp +++ b/build/cpp/sci_minuncTMINLP.cpp @@ -30,7 +30,7 @@ using namespace Bonmin; minuncTMINLP::~minuncTMINLP() { - free(finalX_); + if(finalX_) delete[] finalX_; } // Set the type of every variable - CONTINUOUS or INTEGER @@ -212,7 +212,7 @@ void minuncTMINLP::finalize_solution(SolverReturn status,Index n, const Number* status_ = status; if(status==0 ||status== 3) { - finalX_ = (double*)malloc(sizeof(double) * numVars_ * 1); + finalX_ = new double[n]; for (Index i=0; i<numVars_; i++) { finalX_[i] = x[i]; |