diff --git a/src/soplex.hpp b/src/soplex.hpp index d52a32d4..60cc15f7 100644 --- a/src/soplex.hpp +++ b/src/soplex.hpp @@ -6555,10 +6555,12 @@ bool SoPlexBase::setRealParam(const RealParam param, const Real value, const // lower limit on objective value is set in solveReal() case SoPlexBase::OBJLIMIT_LOWER: + this->_solver.toggleTerminationValue(true); break; // upper limit on objective value is set in solveReal() case SoPlexBase::OBJLIMIT_UPPER: + this->_solver.toggleTerminationValue(true); break; // working tolerance for feasibility in floating-point solver diff --git a/src/soplex/spxsolver.h b/src/soplex/spxsolver.h index 8be724f3..870f8a8d 100644 --- a/src/soplex/spxsolver.h +++ b/src/soplex/spxsolver.h @@ -255,7 +255,8 @@ class SPxSolverBase : public SPxLPBase, protected SPxBasisBase Real maxTime; ///< maximum allowed time. int nClckSkipsLeft; ///< remaining number of times the clock can be safely skipped long nCallsToTimelim; /// < the number of calls to the method isTimeLimitReached() - R objLimit; ///< objective value limit. + R objLimit; ///< objective value limit. + bool useTerminationValue; ///< true, if objective limit should be used in the next solve. Status m_status; ///< status of algorithm. R m_nonbasicValue; ///< nonbasic part of current objective value @@ -276,7 +277,6 @@ class SPxSolverBase : public SPxLPBase, protected SPxBasisBase int m_maxCycle; ///< maximum steps before cycling is detected. int m_numCycle; ///< actual number of degenerate steps so far. bool initialized; ///< true, if all vectors are setup. - bool useTerminationValue; /// true, if objective limit should be used in the next solve. SSVectorBase* solveVector2; ///< when 2 systems are to be solved at a time; typically for speepest edge weights diff --git a/src/soplex/spxsolver.hpp b/src/soplex/spxsolver.hpp index 83318007..dd072452 100644 --- a/src/soplex/spxsolver.hpp +++ b/src/soplex/spxsolver.hpp @@ -1055,6 +1055,7 @@ void SPxSolverBase::setType(Type tp) , nClckSkipsLeft(0) , nCallsToTimelim(0) , objLimit(R(infinity)) + , useTerminationValue(true) , m_status(UNKNOWN) , m_nonbasicValue(0.0) , m_nonbasicValueUpToDate(false) @@ -1185,6 +1186,7 @@ void SPxSolverBase::setType(Type tp) maxIters = base.maxIters; maxTime = base.maxTime; objLimit = base.objLimit; + useTerminationValue = base.useTerminationValue; m_status = base.m_status; m_nonbasicValue = base.m_nonbasicValue; m_nonbasicValueUpToDate = base.m_nonbasicValueUpToDate; @@ -1385,6 +1387,7 @@ void SPxSolverBase::setType(Type tp) , nClckSkipsLeft(base.nClckSkipsLeft) , nCallsToTimelim(base.nCallsToTimelim) , objLimit(base.objLimit) + , useTerminationValue(base.useTerminationValue) , m_status(base.m_status) , m_nonbasicValue(base.m_nonbasicValue) , m_nonbasicValueUpToDate(base.m_nonbasicValueUpToDate)