solvereal.cpp
Go to the documentation of this file.
34 // solve and store solution; if we have a starting basis, do not apply preprocessing; if we are solving from 77 // in case of infeasibility or unboundedness, we currently can not unsimplify, but have to solve the original LP again 114 // store regular basis if there is no simplifier and the original problem is not in the solver because of 123 _solver.getBasis(_basisStatusRows.get_ptr(), _basisStatusCols.get_ptr(), _basisStatusRows.size(), _basisStatusCols.size()); 158 // preprocessing is always applied to the LP in the solver; hence we have to create a copy of the original LP 181 ///@todo this should not fail even if the basis is invalid (wrong dimension or wrong number of basic 186 // if there is no preprocessing, then the original and the transformed problem are identical and it is more 207 simplificationStatus = _simplifier->simplify(_solver, realParam(SoPlex::EPSILON_ZERO), realParam(SoPlex::FEASTOL), realParam(SoPlex::OPTTOL), keepbounds); 228 /// loads original problem into solver and solves again after it has been solved to optimality with preprocessing 236 // if simplifier is active and LP is solved in presolving or to optimality, then we unsimplify to get the basis 273 _solver.getBasis(_basisStatusRows.get_ptr(), _basisStatusCols.get_ptr(), _basisStatusRows.size(), _basisStatusCols.size()); 278 _simplifier->unsimplify(primal, dual, slacks, redCost, _basisStatusRows.get_ptr(), _basisStatusCols.get_ptr()); 279 _simplifier->getBasis(_basisStatusRows.get_ptr(), _basisStatusCols.get_ptr(), _basisStatusRows.size(), _basisStatusCols.size()); 284 MSG_ERROR( std::cerr << "Caught exception <" << E.what() << "> during unsimplification. Resolving without simplifier and scaler.\n" ); 288 MSG_ERROR( std::cerr << "Caught unknown exception during unsimplification. Resolving without simplifier and scaler.\n" ); 292 // if the original problem is not in the solver because of scaling, we also need to store the basis 300 _solver.getBasis(_basisStatusRows.get_ptr(), _basisStatusCols.get_ptr(), _basisStatusRows.size(), _basisStatusCols.size()); 311 /// stores solution of the real LP; before calling this, the real LP must be loaded in the solver and solved (again) 326 assert(_solver.basis().status() == SPxBasis::UNBOUNDED || _solver.basis().status() == SPxBasis::NO_PROBLEM || status() != SPxSolver::UNBOUNDED); 330 || ((_solver.basis().status() == SPxBasis::PRIMAL || _solver.basis().status() == SPxBasis::UNBOUNDED) 358 assert(_solver.basis().status() == SPxBasis::INFEASIBLE || _solver.basis().status() == SPxBasis::NO_PROBLEM || status() != SPxSolver::INFEASIBLE); 361 || ((_solver.basis().status() == SPxBasis::DUAL || _solver.basis().status() == SPxBasis::INFEASIBLE)
virtual Status getPrimal(Vector &vector) const get solution vector for primal variables. Definition: spxsolve.cpp:1219 void reDim(int newdim, const bool setZero=true) Resets DVectorBase's dimension to newdim. Definition: dvectorbase.h:249 virtual void getBasis(SPxSolver::VarStatus[], SPxSolver::VarStatus[], const int rowsSize=-1, const int colsSize=-1) const =0 get optimal basis. virtual void unsimplify(const Vector &, const Vector &, const Vector &, const Vector &, const SPxSolver::VarStatus[], const SPxSolver::VarStatus[]) reconstructs an optimal solution for the unsimplified LP. Definition: spxsimplifier.h:189 virtual void unscaleSlacks(Vector &s) const unscale dense slack vector given in s. Definition: spxscaler.cpp:279 the problem was so much simplified that it vanished Definition: spxsimplifier.h:87 void setBasis(const VarStatus rows[], const VarStatus cols[]) set the lp solver's basis. Definition: spxsolver.cpp:1795 virtual Result simplify(SPxLP &lp, Real eps, Real delta)=0 simplify SPxLP lp with identical primal and dual feasibility tolerance. virtual Status getRedCost(Vector &vector) const get vector of reduced costs. Definition: spxsolve.cpp:1299 virtual bool isUnsimplified() const specifies whether an optimal solution has already been unsimplified. Definition: spxsimplifier.h:194 bound flipping ratio test for long steps in the dual simplex Definition: soplex.h:1063 virtual void unscaleDual(Vector &pi) const unscale dense dual solution vector given in pi. Definition: spxscaler.cpp:296 LP has been proven to be primal infeasible. Definition: spxsolver.h:208 virtual void changeObjOffset(const R &o) Definition: spxlpbase.h:1611 Real realParam(const RealParam param) const returns real parameter value Definition: soplex.cpp:4866 virtual void start()=0 start timer, resume accounting user, system and real time. DataArray< SPxSolver::VarStatus > _basisStatusCols Definition: soplex.h:1432 virtual Status getDual(Vector &vector) const get current solution vector for dual variables. Definition: spxsolve.cpp:1268 void _solveRealLPAndRecordStatistics() call floating-point solver and update statistics on iterations etc. Definition: soplex.cpp:7109 Status getBasis(VarStatus rows[], VarStatus cols[], const int rowsSize=-1, const int colsSize=-1) const get current basis, and return solver status. Definition: spxsolver.cpp:1722 virtual Status getPrimalray(Vector &vector) const get primal ray in case of unboundedness. Definition: spxsolve.cpp:1342 Class for collecting statistical information. Statistics * _statistics statistics since last call to solveReal() or solveRational() Definition: soplex.h:1308 void _evaluateSolutionReal(SPxSimplifier::Result simplificationStatus) checks result of the solving process and solves again without preprocessing if necessary ... Definition: solvereal.cpp:46 #define MSG_ERROR(x) Prints out message x if the verbosity level is at least SPxOut::ERROR. Definition: spxdefines.h:109 virtual void unscalePrimal(Vector &x) const unscale dense primal solution vector given in x. Definition: spxscaler.cpp:262 #define MSG_INFO1(spxout, x) Prints out message x if the verbosity level is at least SPxOut::INFO1. Definition: spxdefines.h:113 Preconfigured SoPlex LP solver. virtual void unscaleRedCost(Vector &r) const unscale dense reduced cost vector given in r. Definition: spxscaler.cpp:313 Exception base class.This class implements a base class for our SoPlex exceptions We provide a what()... Definition: exceptions.h:32 Everything should be within this namespace. void _preprocessAndSolveReal(bool applyPreprocessing) solves real LP with/without preprocessing Definition: solvereal.cpp:139 solve() aborted due to detection of cycling. Definition: spxsolver.h:197 void _resolveWithoutPreprocessing(SPxSimplifier::Result simplificationStatus) loads original problem into solver and solves again after it has been solved to optimality with prepr... Definition: solvereal.cpp:229 virtual Status getSlacks(Vector &vector) const get vector of slack variables. Definition: spxsolve.cpp:1378 DataArray< SPxSolver::VarStatus > _basisStatusRows Definition: soplex.h:1431 int intParam(const IntParam param) const returns integer parameter value Definition: soplex.cpp:4856 virtual Status getDualfarkas(Vector &vector) const get dual farkas proof of infeasibility. Definition: spxsolve.cpp:1360 void forceRecompNonbasicValue() Definition: spxsolver.h:545 void _enableSimplifierAndScaler() enables simplifier and scaler according to current parameters Definition: soplex.cpp:7017 virtual void setTerminationValue(Real value=infinity) set objective limit. Definition: spxsolver.cpp:1542 void _storeSolutionReal() stores solution of the real LP; before calling this, the real LP must be loaded in the solver and sol... Definition: solvereal.cpp:312 dual infeasibility was detected Definition: spxsimplifier.h:85 |