22 #define ALLOWED_UNSCALE_PERCENTAGE 0.1 23 #define MIN_OPT_CALLS_WITH_SCALING 10 101 switch(simplificationStatus)
111 "simplifier detected infeasibility or unboundedness - solve again without simplifying" << std::endl;
382 "> during unsimplification. Resolving without simplifier and scaler.\n");
423 Real redcostviol = 0;
443 <<
", row violation: " << rowviol
444 <<
", dual violation: " << dualviol
445 <<
", redcost violation: " << redcostviol << std::endl;)
447 " --- detected violations in original problem space -- solve again without presolving/scaling" <<
567 "> during unsimplification. Resolving without simplifier and scaler.\n");
650 "> during unsimplification. Resolving without simplifier and scaler.\n");
706 " solution" << std::endl;)
virtual Real objValue()
get objective value of current solution.
SPxLPBase< Real > SPxLPReal
void _checkScaling(SPxLPReal *origLP) const
check scaling of LP
virtual const Vector & unsimplifiedSlacks()=0
returns a reference to the unsimplified slack values.
virtual Real shift() const
total current shift amount.
virtual void unscaleDualray(const SPxLPBase< Real > &lp, Vector &ray) const
unscale dual ray given in ray.
bool _reapplyPersistentScaling() const
check whether persistent scaling is supposed to be reapplied again after unscaling ...
void reDim(int newdim, const bool setZero=true)
Resets DVectorBase's dimension to newdim.
DVectorBase< R > _dualFarkas
Basis is not known to be dual nor primal feasible.
virtual void unscalePrimal(const SPxLPBase< Real > &lp, Vector &x) const
unscale dense primal solution vector given in x.
int numRowsReal() const
returns number of rows
void _optimizeReal()
solves real LP
virtual Status getPrimal(Vector &vector) const
get solution vector for primal variables.
upper limit on objective value
Result
Result of the simplification.
mode for solution polishing
the problem was so much simplified that it vanished
LP has beed solved to optimality but unscaled solution contains violations.
void setBasis(const VarStatus rows[], const VarStatus cols[])
set the lp solver's basis.
virtual Result simplify(SPxLP &lp, Real eps, Real delta)=0
simplify SPxLP lp with identical primal and dual feasibility tolerance.
type of computational form, i.e., column or row representation
T * get_ptr()
get a C pointer to the data.
void setSolutionPolishing(SolutionPolish _polishObj)
set objective of solution polishing (0: off, 1: max_basic_slack, 2: min_basic_slack) ...
Status getBasis(VarStatus rows[], VarStatus cols[], const int rowsSize=-1, const int colsSize=-1) const
get current basis, and return solver status.
#define ALLOWED_UNSCALE_PERCENTAGE
Real feastol() const
allowed primal feasibility tolerance.
void unscaleLPandReloadBasis()
unscales the LP and reloads the basis
DVectorBase< R > _primalRay
bool isScaled() const
Returns true if and only if the LP is scaled.
DVectorBase< R > _redCost
primal feasibility tolerance
void _storeSolutionRealFromPresol()
stores solution from the simplifier because problem vanished in presolving step
solve() aborted due to iteration limit.
bool hasDualFarkas() const
is a dual farkas ray available?
No Problem has been loaded.
virtual void unscaleRedCost(const SPxLPBase< Real > &lp, Vector &r) const
unscale dense reduced cost vector given in r.
void _unscaleSolutionReal(SPxLPReal &LP, bool persistent=true)
unscales stored solution to remove internal or external scaling of LP
bool getRowViolationReal(Real &maxviol, Real &sumviol)
gets violation of constraints; returns true on success
re-optimize the original problem to get a proof (ray) of infeasibility/unboundedness?
virtual void unscaleDual(const SPxLPBase< Real > &lp, Vector &pi) const
unscale dense dual solution vector given in pi.
void _disableSimplifierAndScaler()
disables simplifier and scaler
unsigned int _hasPrimalRay
LP has been proven to be primal infeasible.
int intParam(const IntParam param) const
returns integer parameter value
bound flipping ratio test for long steps in the dual simplex
virtual void changeObjOffset(const R &o)
virtual const std::string what() const
returns exception message
int nRows() const
Returns number of rows in LP.
virtual void start()=0
start timer, resume accounting user, system and real time.
virtual Real stop()=0
stop timer, return accounted user time.
row representation (lower,lhs) <= (x,Ax) <= (upper,rhs)
void spx_alloc(T &p, int n=1)
Allocate memory.
simplification could be done
virtual Status getDualfarkas(Vector &vector) const
get dual farkas proof of infeasibility.
LP is primal infeasible or unbounded.
DataArray< SPxSolver::VarStatus > _basisStatusCols
SPxStatus status() const
returns current SPxStatus.
void _solveRealLPAndRecordStatistics()
call floating-point solver and update statistics on iterations etc.
Status status() const
Status of solution process.
virtual Real getObjoffset() const
get objective offset.
LP has been solved to optimality.
use bound flipping also for row representation?
bool getDualViolationReal(Real &maxviol, Real &sumviol)
gets violation of dual multipliers; returns true on success
unsigned int _hasDualFarkas
Class for collecting statistical information.
solve() aborted due to time limit.
const T * get_const_ptr() const
get a const C pointer to the data.
Statistics * _statistics
statistics since last call to solveReal() or solveRational()
void _evaluateSolutionReal(SPxSimplifier::Result simplificationStatus)
checks result of the solving process and solves again without preprocessing if necessary ...
bool isPrimalFeasible() const
is the stored solution primal feasible?
virtual void getBasis(SPxSolver::VarStatus[], SPxSolver::VarStatus[], const int rowsSize=-1, const int colsSize=-1) const =0
get optimal basis.
Real realParam(const RealParam param) const
returns real parameter value
primal infeasibility was detected
void _verifySolutionReal()
verify computed solution and resolve if necessary
virtual Real getFastCondition()
void _loadRealLP(bool initBasis)
load original LP and possibly setup a slack basis
virtual const Vector & unsimplifiedPrimal()=0
returns a reference to the unsimplified primal solution.
virtual void loadLP(const SPxLP &LP, bool initSlackBasis=true)
copy LP.
Preconfigured SoPlex LP solver.
#define MSG_INFO3(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO3.
automatic choice according to number of rows and columns
void setScalingInfo(bool scaled)
set whether the LP is scaled or not
apply standard floating-point algorithm
bool isDualFeasible() const
is a dual solution available?
Timer * preprocessingTime
preprocessing time
threshold on number of rows vs. number of columns for switching from column to row representations in...
virtual void scale(SPxLPBase< Real > &lp, bool persistent=true)=0
scale SPxLP.
Exception base class.This class implements a base class for our SoPlex exceptions We provide a what()...
Everything should be within this namespace.
void _preprocessAndSolveReal(bool applyPreprocessing)
solves real LP with/without preprocessing
Real objReal(int i) const
returns objective value of column i
solve() aborted due to detection of cycling.
Saving LPs in a form suitable for SoPlex.Class SPxLPBase provides the data structures required for sa...
primal unboundedness was detected
virtual void unsimplify(const Vector &, const Vector &, const Vector &, const Vector &, const SPxSolver::VarStatus[], const SPxSolver::VarStatus[], bool isOptimal=true)=0
reconstructs an optimal solution for the unsimplified LP.
virtual Result result() const =0
returns result status of the simplification
bool getBoundViolationReal(Real &maxviol, Real &sumviol)
gets violation of bounds; returns true on success
#define MIN_OPT_CALLS_WITH_SCALING
don't perform modifications on optimal basis
void _resolveWithoutPreprocessing(SPxSimplifier::Result simplificationStatus)
loads original problem into solver and solves again after it has been solved to optimality with prepr...
virtual bool isUnsimplified() const
specifies whether an optimal solution has already been unsimplified.
Real finalBasisCondition
condition number estimate of the optimal basis matrix
DataArray< SPxSolver::VarStatus > _basisStatusRows
virtual const Vector & unsimplifiedDual()=0
returns a reference to the unsimplified dual solution.
Timer * solvingTime
solving time
int size() const
return nr. of elements.
bool boolParam(const BoolParam param) const
returns boolean parameter value
virtual Status getRedCost(Vector &vector) const
get vector of reduced costs.
void _storeSolutionReal(bool verify=true)
stores solution of the real LP; before calling this, the real LP must be loaded in the solver and sol...
#define MSG_INFO1(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO1.
int nCols() const
Returns number of columns in LP.
unsigned int _isPrimalFeasible
SPxSolver::Status status() const
returns the current solver status
lower limit on objective value
bool getRedCostViolationReal(Real &maxviol, Real &sumviol)
gets violation of reduced costs; returns true on success
virtual void init()
intialize data structures.
dual feasibility tolerance
void forceRecompNonbasicValue()
void invalidate()
invalidate solution
bool hasPrimalRay() const
is a primal unbounded ray available?
bool setIntParam(const IntParam param, const int value, const bool init=true)
sets integer parameter value; returns true on success
virtual const Vector & unsimplifiedRedCost()=0
returns a reference to the unsimplified reduced costs.
Real opttol() const
allowed optimality, i.e., dual feasibility tolerance.
void _enableSimplifierAndScaler()
enables simplifier and scaler according to current parameters
unsigned int _isDualFeasible
virtual void unscaleSlacks(const SPxLPBase< Real > &lp, Vector &s) const
unscale dense slack vector given in s.
virtual void setTerminationValue(Real value=infinity)
set objective limit.
const SPxBasis & basis() const
Return current basis.
virtual void unscalePrimalray(const SPxLPBase< Real > &lp, Vector &ray) const
unscale primal ray given in ray.
int numColsReal() const
returns number of columns
LP has been proven to be primal unbounded.
void reSize(int newsize)
reset size to newsize.
SPxSolver::Status _status
solve() aborted due to objective limit.
void spx_free(T &p)
Release memory.
SPxSimplifier * _simplifier
virtual Status getDual(Vector &vector) const
get current solution vector for dual variables.
Basis is singular, numerical troubles?
virtual Status getPrimalray(Vector &vector) const
get primal ray in case of unboundedness.
Basis is primal feasible.
LP has a usable Basis (maybe LP is changed).
dual infeasibility was detected
virtual Status getSlacks(Vector &vector) const
get vector of slack variables.
void setBasisStatus(SPxBasis::SPxStatus stat)
set the lp solver's basis status.
LP has been proven to be primal unbounded.
LP has been proven to be primal infeasible.
No Problem has been loaded to the basis.