Sequential object-oriented SimPlex.SPxSolver is an LP solver class using the revised Simplex algorithm. It provides two basis representations, namely a column basis and a row basis (see Representation). For both representations, a primal and dual algorithm is available (see Type). More...
#include <spxsolver.h>
Public Member Functions | |
void | setOutstream (SPxOut &newOutstream) |
void | setNonzeroFactor (Real f) |
set refactor threshold for nonzeros in last factorized basis matrix compared to updated basis matrix More... | |
void | setFillFactor (Real f) |
set refactor threshold for fill-in in current factor update compared to fill-in in last factorization More... | |
void | setMemFactor (Real f) |
set refactor threshold for memory growth in current factor update compared to the last factorization More... | |
UpdateVector & | fVec () const |
feasibility vector. More... | |
const Vector & | fRhs () const |
right-hand side vector for fVec More... | |
const Vector & | ubBound () const |
upper bound for fVec. More... | |
Vector & | ubBound () |
upper bound for fVec, writable. More... | |
const Vector & | lbBound () const |
lower bound for fVec. More... | |
Vector & | lbBound () |
lower bound for fVec, writable. More... | |
const Vector & | fTest () const |
Violations of fVec. More... | |
UpdateVector & | coPvec () const |
copricing vector. More... | |
const Vector & | coPrhs () const |
Right-hand side vector for coPvec. More... | |
const Vector & | ucBound () const |
Vector & | ucBound () |
upper bound for coPvec. More... | |
const Vector & | lcBound () const |
Vector & | lcBound () |
lower bound for coPvec. More... | |
const Vector & | coTest () const |
violations of coPvec. More... | |
UpdateVector & | pVec () const |
pricing vector. More... | |
const Vector & | upBound () const |
Vector & | upBound () |
upper bound for pVec. More... | |
const Vector & | lpBound () const |
Vector & | lpBound () |
lower bound for pVec. More... | |
const Vector & | test () const |
Violations of pVec. More... | |
Real | computePvec (int i) |
compute and return pVec()[i]. More... | |
void | computePvec () |
compute entire pVec(). More... | |
Real | computeTest (int i) |
compute and return test()[i] in ENTERing Simplex. More... | |
void | computeTest () |
compute test vector in ENTERing Simplex. More... | |
void | testVecs () |
Access | |
int | version () const |
return the version of SPxSolver as number like 123 for 1.2.3 More... | |
int | subversion () const |
return the internal subversion of SPxSolver as number More... | |
Representation | rep () const |
return the current basis representation. More... | |
Type | type () const |
return current Type. More... | |
Pricing | pricing () const |
return current Pricing. More... | |
SPxStarter * | starter () const |
return current starter. More... | |
Setup | |
Before solving an LP with an instance of SPxSolver, the following steps must be performed:
Now the solver is ready for execution. If the loaded LP is to be solved again from scratch, this can be done with method reLoad(). Finally, clear() removes the LP from the solver. | |
virtual bool | read (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
read LP from input stream. More... | |
virtual void | loadLP (const SPxLP &LP, bool initSlackBasis=true) |
copy LP. More... | |
virtual void | setBasisSolver (SLinSolver *slu, const bool destroy=false) |
setup linear solver to use. If destroy is true, slusolver will be freed in destructor. More... | |
virtual void | setPricer (SPxPricer *pricer, const bool destroy=false) |
setup pricer to use. If destroy is true, pricer will be freed in destructor. More... | |
virtual void | setTester (SPxRatioTester *tester, const bool destroy=false) |
setup ratio-tester to use. If destroy is true, tester will be freed in destructor. More... | |
virtual void | setStarter (SPxStarter *starter, const bool destroy=false) |
setup starting basis generator to use. If destroy is true, starter will be freed in destructor. More... | |
virtual void | loadBasis (const SPxBasis::Desc &) |
set a start basis. More... | |
void | initRep (Representation p_rep) |
initialize ROW or COLUMN representation. More... | |
void | setRep (Representation p_rep) |
switch to ROW or COLUMN representation if not already used. More... | |
void | setType (Type tp) |
set LEAVE or ENTER algorithm. More... | |
void | setPricing (Pricing pr) |
set FULL or PARTIAL pricing. More... | |
void | setDecompStatus (DecompStatus decomp_stat) |
turn on or off the improved dual simplex. More... | |
virtual void | reLoad () |
reload LP. More... | |
virtual void | clear () |
clear all data in solver. More... | |
void | unscaleLPandReloadBasis () |
unscales the LP and reloads the basis More... | |
virtual bool | readBasisFile (const char *filename, const NameSet *rowNames, const NameSet *colNames) |
virtual bool | writeBasisFile (const char *filename, const NameSet *rowNames, const NameSet *colNames, const bool cpxFormat=false) const |
virtual bool | writeState (const char *filename, const NameSet *rowNames=NULL, const NameSet *colNames=NULL, const bool cpxFormat=false) const |
Solving LPs | |
virtual Status | solve () |
solve loaded LP. More... | |
void | performSolutionPolishing () |
void | setSolutionPolishing (SolutionPolish _polishObj) |
set objective of solution polishing (0: off, 1: max_basic_slack, 2: min_basic_slack) More... | |
SolutionPolish | getSolutionPolishing () |
return objective of solution polishing More... | |
Status | status () const |
Status of solution process. More... | |
virtual Real | value () |
current objective value. More... | |
bool | updateNonbasicValue (Real objChange) |
void | forceRecompNonbasicValue () |
virtual Status | getPrimal (Vector &vector) const |
get solution vector for primal variables. More... | |
virtual Status | getSlacks (Vector &vector) const |
get vector of slack variables. More... | |
virtual Status | getDual (Vector &vector) const |
get current solution vector for dual variables. More... | |
virtual Status | getRedCost (Vector &vector) const |
get vector of reduced costs. More... | |
virtual Status | getPrimalray (Vector &vector) const |
get primal ray in case of unboundedness. More... | |
virtual Status | getDualfarkas (Vector &vector) const |
get dual farkas proof of infeasibility. More... | |
virtual void | printDisplayLine (const bool force=false, const bool forceHead=false) |
print display line of flying table More... | |
virtual bool | terminate () |
Termination criterion. More... | |
Control Parameters | |
Real | epsilon () const |
values \(|x| < \epsilon\) are considered to be 0. More... | |
Real | entertol () const |
feasibility tolerance maintained by ratio test during ENTER algorithm. More... | |
Real | leavetol () const |
feasibility tolerance maintained by ratio test during LEAVE algorithm. More... | |
Real | feastol () const |
allowed primal feasibility tolerance. More... | |
Real | opttol () const |
allowed optimality, i.e., dual feasibility tolerance. More... | |
Real | delta () const |
guaranteed primal and dual bound violation for optimal solution, returning the maximum of feastol() and opttol(), i.e., the less tight tolerance. More... | |
void | setFeastol (Real d) |
set parameter feastol . More... | |
void | setOpttol (Real d) |
set parameter opttol . More... | |
void | setDelta (Real d) |
set parameter delta , i.e., set feastol and opttol to same value. More... | |
void | setTiming (Timer::TYPE ttype) |
set timing type More... | |
Timer::TYPE | getTiming () |
set timing type More... | |
void | setDisplayFreq (int freq) |
set display frequency More... | |
int | getDisplayFreq () |
get display frequency More... | |
void | setConditionInformation (int condInfo) |
print condition number within the usual output More... | |
void | setSparsePricingFactor (Real fac) |
void | hyperPricing (bool h) |
enable or disable hyper sparse pricing More... | |
int | maxCycle () const |
maximum number of degenerate simplex steps before we detect cycling. More... | |
int | numCycle () const |
actual number of degenerate simplex steps encountered so far. More... | |
void | useFullPerturbation (bool full) |
perturb entire problem or only the bounds relevant to the current pivot More... | |
virtual Real | getFastCondition () |
Modification | |
virtual void | changeObj (const Vector &newObj, bool scale=false) |
scale determines whether the new data needs to be scaled according to the existing LP (persistent scaling) More... | |
virtual void | changeObj (int i, const Real &newVal, bool scale=false) |
virtual void | changeObj (SPxColId p_id, const Real &p_newVal, bool scale=false) |
virtual void | changeMaxObj (const Vector &newObj, bool scale=false) |
virtual void | changeMaxObj (int i, const Real &newVal, bool scale=false) |
virtual void | changeMaxObj (SPxColId p_id, const Real &p_newVal, bool scale=false) |
virtual void | changeRowObj (const Vector &newObj, bool scale=false) |
virtual void | changeRowObj (int i, const Real &newVal, bool scale=false) |
virtual void | changeRowObj (SPxRowId p_id, const Real &p_newVal, bool scale=false) |
virtual void | clearRowObjs () |
virtual void | changeLowerStatus (int i, Real newLower, Real oldLower=0.0) |
virtual void | changeLower (const Vector &newLower, bool scale=false) |
virtual void | changeLower (int i, const Real &newLower, bool scale=false) |
virtual void | changeLower (SPxColId p_id, const Real &p_newLower, bool scale=false) |
virtual void | changeUpperStatus (int i, Real newUpper, Real oldLower=0.0) |
virtual void | changeUpper (const Vector &newUpper, bool scale=false) |
virtual void | changeUpper (int i, const Real &newUpper, bool scale=false) |
virtual void | changeUpper (SPxColId p_id, const Real &p_newUpper, bool scale=false) |
virtual void | changeBounds (const Vector &newLower, const Vector &newUpper, bool scale=false) |
virtual void | changeBounds (int i, const Real &newLower, const Real &newUpper, bool scale=false) |
virtual void | changeBounds (SPxColId p_id, const Real &p_newLower, const Real &p_newUpper, bool scale=false) |
virtual void | changeLhsStatus (int i, Real newLhs, Real oldLhs=0.0) |
virtual void | changeLhs (const Vector &newLhs, bool scale=false) |
virtual void | changeLhs (int i, const Real &newLhs, bool scale=false) |
virtual void | changeLhs (SPxRowId p_id, const Real &p_newLhs, bool scale=false) |
virtual void | changeRhsStatus (int i, Real newRhs, Real oldRhs=0.0) |
virtual void | changeRhs (const Vector &newRhs, bool scale=false) |
virtual void | changeRhs (int i, const Real &newRhs, bool scale=false) |
virtual void | changeRhs (SPxRowId p_id, const Real &p_newRhs, bool scale=false) |
virtual void | changeRange (const Vector &newLhs, const Vector &newRhs, bool scale=false) |
virtual void | changeRange (int i, const Real &newLhs, const Real &newRhs, bool scale=false) |
virtual void | changeRange (SPxRowId p_id, const Real &p_newLhs, const Real &p_newRhs, bool scale=false) |
virtual void | changeRow (int i, const LPRow &newRow, bool scale=false) |
virtual void | changeRow (SPxRowId p_id, const LPRow &p_newRow, bool scale=false) |
virtual void | changeCol (int i, const LPCol &newCol, bool scale=false) |
virtual void | changeCol (SPxColId p_id, const LPCol &p_newCol, bool scale=false) |
virtual void | changeElement (int i, int j, const Real &val, bool scale=false) |
virtual void | changeElement (SPxRowId rid, SPxColId cid, const Real &val, bool scale=false) |
virtual void | changeSense (SPxSense sns) |
Dimension and codimension | |
int | dim () const |
dimension of basis matrix. More... | |
int | coDim () const |
codimension. More... | |
Variables and Covariables | |
SPxId | id (int i) const |
id of i 'th vector. More... | |
SPxId | coId (int i) const |
id of i 'th covector. More... | |
bool | isId (const SPxId &p_id) const |
Is p_id an SPxId ? More... | |
bool | isCoId (const SPxId &p_id) const |
Is p_id a CoId. More... | |
Vectors and Covectors | |
const SVector & | vector (int i) const |
i 'th vector. More... | |
const SVector & | vector (const SPxRowId &rid) const |
const SVector & | vector (const SPxColId &cid) const |
const SVector & | vector (const SPxId &p_id) const |
vector associated to p_id . More... | |
const SVector & | coVector (int i) const |
i 'th covector of LP. More... | |
const SVector & | coVector (const SPxRowId &rid) const |
const SVector & | coVector (const SPxColId &cid) const |
const SVector & | coVector (const SPxId &p_id) const |
coVector associated to p_id . More... | |
const SVector & | unitVector (int i) const |
return i 'th unit vector. More... | |
Variable status | |
The Simplex basis assigns a Status to each variable and covariable. Depending on the representation, the status indicates that the corresponding vector is in the basis matrix or not. | |
SPxBasis::Desc::Status | varStatus (int i) const |
Status of i 'th variable. More... | |
SPxBasis::Desc::Status | covarStatus (int i) const |
Status of i 'th covariable. More... | |
bool | isBasic (SPxBasis::Desc::Status stat) const |
does stat describe a basic index ? More... | |
bool | isBasic (const SPxId &p_id) const |
is the p_id 'th vector basic ? More... | |
bool | isBasic (const SPxRowId &rid) const |
is the rid 'th vector basic ? More... | |
bool | isBasic (const SPxColId &cid) const |
is the cid 'th vector basic ? More... | |
bool | isRowBasic (int i) const |
is the i 'th row vector basic ? More... | |
bool | isColBasic (int i) const |
is the i 'th column vector basic ? More... | |
bool | isBasic (int i) const |
is the i 'th vector basic ? More... | |
bool | isCoBasic (int i) const |
is the i 'th covector basic ? More... | |
Shifting | |
The task of the ratio test (implemented in SPxRatioTester classes) is to select a variable for the basis update, such that the basis remains priced (i.e. both, the pricing and copricing vectors satisfy their bounds) or feasible (i.e. the feasibility vector satisfies its bounds). However, this can lead to numerically instable basis matrices or – after accumulation of various errors – even to a singular basis matrix. The key to overcome this problem is to allow the basis to become "a bit" infeasible or unpriced, in order provide a better choice for the ratio test to select a stable variable. This is equivalent to enlarging the bounds by a small amount. This is referred to as shifting. These methods serve for shifting feasibility bounds, either in order to maintain numerical stability or initially for computation of phase 1. The sum of all shifts applied to any bound is stored in theShift. The following methods are used to shift individual bounds. They are mainly intended for stable implenentations of SPxRatioTester. | |
void | shiftFvec () |
Perform initial shifting to optain an feasible or pricable basis. More... | |
void | shiftPvec () |
Perform initial shifting to optain an feasible or pricable basis. More... | |
void | shiftUBbound (int i, Real to) |
shift i 'th ubBound to to . More... | |
void | shiftLBbound (int i, Real to) |
shift i 'th lbBound to to . More... | |
void | shiftUPbound (int i, Real to) |
shift i 'th upBound to to . More... | |
void | shiftLPbound (int i, Real to) |
shift i 'th lpBound to to . More... | |
void | shiftUCbound (int i, Real to) |
shift i 'th ucBound to to . More... | |
void | shiftLCbound (int i, Real to) |
shift i 'th lcBound to to . More... | |
void | testBounds () const |
virtual Real | shift () const |
total current shift amount. More... | |
virtual void | unShift (void) |
remove shift as much as possible. More... | |
virtual void | qualConstraintViolation (Real &maxviol, Real &sumviol) const |
get violation of constraints. More... | |
virtual void | qualBoundViolation (Real &maxviol, Real &sumviol) const |
get violations of bounds. More... | |
virtual void | qualSlackViolation (Real &maxviol, Real &sumviol) const |
get the residuum |Ax-b|. More... | |
virtual void | qualRedCostViolation (Real &maxviol, Real &sumviol) const |
get violation of optimality criterion. More... | |
SPxRowId | rowId (int i) const |
RowId of i 'th inequality. More... | |
SPxColId | colId (int i) const |
ColId of i 'th column. More... | |
SPxSolver (Type type=LEAVE, Representation rep=ROW, Timer::TYPE ttype=Timer::USER_TIME) | |
default constructor. More... | |
virtual | ~SPxSolver () |
bool | isConsistent () const |
check consistency. More... | |
SPxSolver & | operator= (const SPxSolver &base) |
assignment operator More... | |
SPxSolver (const SPxSolver &base) | |
copy constructor More... | |
Public Member Functions inherited from SPxLPBase< R > | |
void | setOutstream (SPxOut &newOutstream) |
void | unscaleLP () |
unscales the lp and clears basis More... | |
template<> | |
void | unscaleLP () |
template<> | |
void | computePrimalActivity (const VectorBase< Real > &primal, VectorBase< Real > &activity, const bool unscaled) const |
template<> | |
void | computeDualActivity (const VectorBase< Real > &dual, VectorBase< Real > &activity, const bool unscaled) const |
template<> | |
Real | maxAbsNzo (bool unscaled) const |
template<> | |
Real | minAbsNzo (bool unscaled) const |
template<> | |
void | getObjUnscaled (VectorBase< Real > &pobj) const |
template<> | |
void | getRowVectorUnscaled (int i, DSVectorBase< Real > &vec) const |
template<> | |
void | getRhsUnscaled (VectorBase< Real > &vec) const |
template<> | |
Real | rhsUnscaled (int i) const |
template<> | |
Real | rhsUnscaled (const SPxRowId &id) const |
template<> | |
void | getLhsUnscaled (VectorBase< Real > &vec) const |
template<> | |
Real | lhsUnscaled (int i) const |
template<> | |
Real | lhsUnscaled (const SPxRowId &id) const |
template<> | |
void | getColVectorUnscaled (int i, DSVectorBase< Real > &vec) const |
template<> | |
void | getColVectorUnscaled (const SPxColId &id, DSVectorBase< Real > &vec) const |
template<> | |
Real | objUnscaled (int i) const |
template<> | |
Real | objUnscaled (const SPxColId &id) const |
template<> | |
void | maxObjUnscaled (VectorBase< Real > &vec) const |
template<> | |
Real | maxObjUnscaled (int i) const |
template<> | |
Real | maxObjUnscaled (const SPxColId &id) const |
template<> | |
void | getUpperUnscaled (DVector &vec) const |
template<> | |
Real | upperUnscaled (int i) const |
template<> | |
Real | upperUnscaled (const SPxColId &id) const |
template<> | |
void | getLowerUnscaled (DVector &vec) const |
template<> | |
Real | lowerUnscaled (int i) const |
template<> | |
Real | lowerUnscaled (const SPxColId &id) const |
template<> | |
void | changeMaxObj (const VectorBase< Real > &newObj, bool scale) |
template<> | |
void | changeLower (const VectorBase< Real > &newLower, bool scale) |
template<> | |
void | changeUpper (const VectorBase< Real > &newUpper, bool scale) |
template<> | |
void | changeLhs (const VectorBase< Real > &newLhs, bool scale) |
template<> | |
void | changeRhs (const VectorBase< Real > &newRhs, bool scale) |
template<> | |
void | changeElement (int i, int j, const Real &val, bool scale) |
template<> | |
bool | readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars) |
template<> | |
bool | readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars) |
template<> | |
void | writeLPF (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const |
template<> | |
void | writeMPS (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const |
template<> | |
void | buildDualProblem (SPxLPBase< Real > &dualLP, SPxRowId primalRowIds[], SPxColId primalColIds[], SPxRowId dualRowIds[], SPxColId dualColIds[], int *nprimalrows, int *nprimalcols, int *ndualrows, int *ndualcols) |
template<> | |
void | computePrimalActivity (const VectorBase< Rational > &primal, VectorBase< Rational > &activity, const bool unscaled) const |
template<> | |
void | computeDualActivity (const VectorBase< Rational > &dual, VectorBase< Rational > &activity, const bool unscaled) const |
template<> | |
Rational | maxAbsNzo (bool) const |
template<> | |
Rational | minAbsNzo (bool) const |
template<> | |
bool | readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars) |
Read LP in "CPLEX LP File Format". More... | |
template<> | |
bool | readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars) |
template<> | |
void | writeLPF (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const |
Write LP in LP Format. More... | |
template<> | |
void | writeMPS (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const |
Write LP in MPS format. More... | |
template<> | |
void | buildDualProblem (SPxLPBase< Rational > &dualLP, SPxRowId primalRowIds[], SPxColId primalColIds[], SPxRowId dualRowIds[], SPxColId dualColIds[], int *nprimalrows, int *nprimalcols, int *ndualrows, int *ndualcols) |
Building the dual problem from a given LP. More... | |
template<> | |
void | unscaleLP () |
template<> | |
void | computePrimalActivity (const VectorBase< Real > &primal, VectorBase< Real > &activity, const bool unscaled) const |
template<> | |
void | computeDualActivity (const VectorBase< Real > &dual, VectorBase< Real > &activity, const bool unscaled) const |
template<> | |
Real | maxAbsNzo (bool unscaled) const |
template<> | |
Real | minAbsNzo (bool unscaled) const |
template<> | |
void | getObjUnscaled (VectorBase< Real > &pobj) const |
Gets unscaled objective vector. More... | |
template<> | |
void | getRowVectorUnscaled (int i, DSVectorBase< Real > &vec) const |
Gets unscaled row vector of row i . More... | |
template<> | |
void | getRhsUnscaled (VectorBase< Real > &vec) const |
Gets unscaled right hand side vector. More... | |
template<> | |
Real | rhsUnscaled (int i) const |
Returns unscaled right hand side of row number i . More... | |
template<> | |
Real | rhsUnscaled (const SPxRowId &id) const |
Returns unscaled right hand side of row with identifier id . More... | |
template<> | |
void | getLhsUnscaled (VectorBase< Real > &vec) const |
Returns unscaled left hand side vector. More... | |
template<> | |
Real | lhsUnscaled (int i) const |
Returns unscaled left hand side of row number i . More... | |
template<> | |
Real | lhsUnscaled (const SPxRowId &id) const |
Returns left hand side of row with identifier id . More... | |
template<> | |
void | getColVectorUnscaled (int i, DSVectorBase< Real > &vec) const |
Gets column vector of column i . More... | |
template<> | |
void | getColVectorUnscaled (const SPxColId &id, DSVectorBase< Real > &vec) const |
Gets column vector of column with identifier id . More... | |
template<> | |
Real | objUnscaled (int i) const |
Returns unscaled objective value of column i . More... | |
template<> | |
Real | objUnscaled (const SPxColId &id) const |
Returns unscaled objective value of column with identifier id . More... | |
template<> | |
void | maxObjUnscaled (VectorBase< Real > &vec) const |
Returns unscaled objective vector for maximization problem. More... | |
template<> | |
Real | maxObjUnscaled (int i) const |
Returns unscaled objective value of column i for maximization problem. More... | |
template<> | |
Real | maxObjUnscaled (const SPxColId &id) const |
Returns unscaled objective value of column with identifier id for maximization problem. More... | |
template<> | |
void | getUpperUnscaled (DVector &vec) const |
Returns unscaled upper bound vector. More... | |
template<> | |
Real | upperUnscaled (int i) const |
Returns unscaled upper bound of column i . More... | |
template<> | |
Real | upperUnscaled (const SPxColId &id) const |
Returns unscaled upper bound of column with identifier id . More... | |
template<> | |
void | getLowerUnscaled (DVector &vec) const |
Returns unscaled lower bound vector. More... | |
template<> | |
Real | lowerUnscaled (int i) const |
Returns unscaled lower bound of column i . More... | |
template<> | |
Real | lowerUnscaled (const SPxColId &id) const |
Returns unscaled lower bound of column with identifier id . More... | |
template<> | |
void | changeMaxObj (const VectorBase< Real > &newObj, bool scale) |
Changes objective vector to newObj . More... | |
template<> | |
void | changeLower (const VectorBase< Real > &newLower, bool scale) |
Changes vector of lower bounds to newLower . More... | |
template<> | |
void | changeUpper (const VectorBase< Real > &newUpper, bool scale) |
Changes vector of upper bounds to newUpper . More... | |
template<> | |
void | changeLhs (const VectorBase< Real > &newLhs, bool scale) |
Changes left hand side vector for constraints to newLhs . More... | |
template<> | |
void | changeRhs (const VectorBase< Real > &newRhs, bool scale) |
Changes right hand side vector for constraints to newRhs . More... | |
template<> | |
void | changeElement (int i, int j, const Real &val, bool scale) |
Changes LP element (i , j ) to val . scale determines whether the new data should be scaled. More... | |
template<> | |
bool | readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars) |
Read LP in "CPLEX LP File Format". More... | |
template<> | |
bool | readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars) |
template<> | |
void | writeLPF (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const |
Write LP in LP Format. More... | |
template<> | |
void | writeMPS (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const |
Write LP in MPS format. More... | |
template<> | |
void | buildDualProblem (SPxLPBase< Real > &dualLP, SPxRowId primalRowIds[], SPxColId primalColIds[], SPxRowId dualRowIds[], SPxColId dualColIds[], int *nprimalrows, int *nprimalcols, int *ndualrows, int *ndualcols) |
Building the dual problem from a given LP. More... | |
bool | isScaled () const |
Returns true if and only if the LP is scaled. More... | |
void | setScalingInfo (bool scaled) |
set whether the LP is scaled or not More... | |
int | nRows () const |
Returns number of rows in LP. More... | |
int | nCols () const |
Returns number of columns in LP. More... | |
int | nNzos () const |
Returns number of nonzeros in LP. More... | |
virtual R | minAbsNzo (bool unscaled=true) const |
Absolute smallest non-zero element in (possibly scaled) LP. More... | |
virtual R | maxAbsNzo (bool unscaled=true) const |
Absolute biggest non-zero element in (in rational case possibly scaled) LP. More... | |
void | getRow (int i, LPRowBase< R > &row) const |
Gets i 'th row. More... | |
void | getRow (const SPxRowId &id, LPRowBase< R > &row) const |
Gets row with identifier id . More... | |
void | getRows (int start, int end, LPRowSetBase< R > &set) const |
Gets rows start , ... end . More... | |
const SVectorBase< R > & | rowVector (int i) const |
Gets row vector of row i . More... | |
const SVectorBase< R > & | rowVector (const SPxRowId &id) const |
Gets row vector of row with identifier id . More... | |
void | getRowVectorUnscaled (int i, DSVectorBase< Real > &vec) const |
Gets unscaled row vector of row i . More... | |
const VectorBase< R > & | rhs () const |
Returns right hand side vector. More... | |
const R & | rhs (int i) const |
Returns right hand side of row number i . More... | |
const R & | rhs (const SPxRowId &id) const |
Returns right hand side of row with identifier id . More... | |
void | getRhs (VectorBase< R > &vec) const |
Gets (internal and possibly scaled) right hand side vector. More... | |
void | getRhsUnscaled (VectorBase< Real > &vec) const |
Gets unscaled right hand side vector. More... | |
R | rhsUnscaled (int i) const |
Returns unscaled right hand side of row number i . More... | |
R | rhsUnscaled (const SPxRowId &id) const |
Returns unscaled right hand side of row with identifier id . More... | |
const VectorBase< R > & | lhs () const |
Returns left hand side vector. More... | |
const R & | lhs (int i) const |
Returns left hand side of row number i . More... | |
const R & | lhs (const SPxRowId &id) const |
Returns left hand side of row with identifier id . More... | |
void | getRowObj (VectorBase< R > &prowobj) const |
Gets row objective function vector. More... | |
R | rowObj (int i) const |
R | rowObj (const SPxRowId &id) const |
Returns row objective function value of row with identifier id . More... | |
const VectorBase< R > & | maxRowObj () const |
const R & | maxRowObj (int i) const |
const R & | maxRowObj (const SPxRowId &id) const |
Returns row objective function value of row with identifier id . More... | |
void | getLhsUnscaled (VectorBase< Real > &vec) const |
Returns unscaled left hand side vector. More... | |
R | lhsUnscaled (int i) const |
Returns unscaled left hand side of row number i . More... | |
R | lhsUnscaled (const SPxRowId &id) const |
Returns left hand side of row with identifier id . More... | |
LPRowBase< R >::Type | rowType (int i) const |
Returns the inequality type of the i'th LPRow. More... | |
LPRowBase< R >::Type | rowType (const SPxRowId &id) const |
Returns the inequality type of the row with identifier key . More... | |
void | getCol (int i, LPColBase< R > &col) const |
Gets i 'th column. More... | |
void | getCol (const SPxColId &id, LPColBase< R > &col) const |
Gets column with identifier id . More... | |
void | getCols (int start, int end, LPColSetBase< R > &set) const |
Gets columns start , ..., end . More... | |
const SVectorBase< R > & | colVector (int i) const |
Returns column vector of column i . More... | |
const SVectorBase< R > & | colVector (const SPxColId &id) const |
Returns column vector of column with identifier id . More... | |
void | getColVectorUnscaled (int i, DSVectorBase< Real > &vec) const |
Gets column vector of column i . More... | |
void | getColVectorUnscaled (const SPxColId &id, DSVectorBase< Real > &vec) const |
Gets column vector of column with identifier id . More... | |
void | getObjUnscaled (VectorBase< Real > &pobj) const |
Gets unscaled objective vector. More... | |
void | getObj (VectorBase< R > &pobj) const |
Gets objective vector. More... | |
R | obj (int i) const |
Returns objective value of column i . More... | |
R | obj (const SPxColId &id) const |
Returns objective value of column with identifier id . More... | |
R | objUnscaled (int i) const |
Returns unscaled objective value of column i . More... | |
R | objUnscaled (const SPxColId &id) const |
Returns unscaled objective value of column with identifier id . More... | |
const VectorBase< R > & | maxObj () const |
Returns objective vector for maximization problem. More... | |
const R & | maxObj (int i) const |
Returns objective value of column i for maximization problem. More... | |
const R & | maxObj (const SPxColId &id) const |
Returns objective value of column with identifier id for maximization problem. More... | |
void | maxObjUnscaled (VectorBase< Real > &vec) const |
Returns unscaled objective vector for maximization problem. More... | |
R | maxObjUnscaled (int i) const |
Returns unscaled objective value of column i for maximization problem. More... | |
R | maxObjUnscaled (const SPxColId &id) const |
Returns unscaled objective value of column with identifier id for maximization problem. More... | |
const VectorBase< R > & | upper () const |
Returns upper bound vector. More... | |
const R & | upper (int i) const |
Returns upper bound of column i . More... | |
const R & | upper (const SPxColId &id) const |
Returns upper bound of column with identifier id . More... | |
void | getUpperUnscaled (DVector &vec) const |
Gets unscaled upper bound vector. More... | |
R | upperUnscaled (int i) const |
Returns unscaled upper bound of column i . More... | |
R | upperUnscaled (const SPxColId &id) const |
Returns unscaled upper bound of column with identifier id . More... | |
const VectorBase< R > & | lower () const |
Returns (internal and possibly scaled) lower bound vector. More... | |
const R & | lower (int i) const |
Returns (internal and possibly scaled) lower bound of column i . More... | |
const R & | lower (const SPxColId &id) const |
Returns (internal and possibly scaled) lower bound of column with identifier id . More... | |
void | getLowerUnscaled (DVector &vec) const |
Gets unscaled lower bound vector. More... | |
R | lowerUnscaled (int i) const |
Returns unscaled lower bound of column i . More... | |
R | lowerUnscaled (const SPxColId &id) const |
Returns unscaled lower bound of column with identifier id . More... | |
SPxSense | spxSense () const |
Returns the optimization sense. More... | |
const R & | objOffset () const |
Returns the objective function value offset. More... | |
int | number (const SPxRowId &id) const |
Returns the row number of the row with identifier id . More... | |
int | number (const SPxColId &id) const |
Returns the column number of the column with identifier id . More... | |
int | number (const SPxId &id) const |
Returns the row or column number for identifier id . More... | |
bool | has (const SPxRowId &id) const |
Returns the row number of the row with identifier id . More... | |
bool | has (const SPxColId &id) const |
Returns the column number of the column with identifier id . More... | |
bool | has (const SPxId &id) const |
Returns the row or column number for identifier id . More... | |
SPxRowId | rId (int n) const |
Returns the row identifier for row n . More... | |
SPxColId | cId (int n) const |
Returns the column identifier for column n . More... | |
virtual void | addRow (const LPRowBase< R > &row, bool scale=false) |
virtual void | addRow (const R &lhsValue, const SVectorBase< R > &rowVec, const R &rhsValue, bool scale=false) |
template<class S > | |
void | addRow (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue) |
virtual void | addRow (SPxRowId &id, const LPRowBase< R > &row, bool scale=false) |
Adds row to LPRowSetBase. More... | |
virtual void | addRows (const LPRowSetBase< R > &pset, bool scale=false) |
template<class S > | |
void | addRows (const S *lhsValues, const S *rowValues, const int *rowIndices, const int *rowStarts, const int *rowLengths, const int numRows, const int numValues, const S *rhsValues) |
virtual void | addRows (SPxRowId id[], const LPRowSetBase< R > &set, bool scale=false) |
adds all LPRowBases of pset to LPRowSetBase. More... | |
virtual void | addCol (const LPColBase< R > &col, bool scale=false) |
virtual void | addCol (const R &objValue, const R &lowerValue, const SVectorBase< R > &colVec, const R &upperValue, bool scale=false) |
template<class S > | |
void | addCol (const S *objValue, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue) |
virtual void | addCol (SPxColId &id, const LPColBase< R > &col, bool scale=false) |
Adds col to LPColSetVBase. More... | |
virtual void | addCols (const LPColSetBase< R > &pset, bool scale=false) |
template<class S > | |
void | addCols (const S *objValue, const S *lowerValues, const S *colValues, const int *colIndices, const int *colStarts, const int *colLengths, const int numCols, const int numValues, const S *upperValues) |
virtual void | addCols (SPxColId id[], const LPColSetBase< R > &set, bool scale=false) |
Adds all LPColBases of set to LPColSetBase. More... | |
virtual void | removeRow (int i) |
Removes i 'th row. More... | |
virtual void | removeRow (SPxRowId id) |
Removes row with identifier id . More... | |
virtual void | removeRows (int perm[]) |
Removes multiple rows. More... | |
virtual void | removeRows (SPxRowId id[], int n, int perm[]=0) |
virtual void | removeRows (int nums[], int n, int perm[]=0) |
Removes n LPRowBases. More... | |
virtual void | removeRowRange (int start, int end, int perm[]=0) |
Removes rows from start to end (including both). More... | |
virtual void | removeCol (int i) |
Removes i 'th column. More... | |
virtual void | removeCol (SPxColId id) |
Removes column with identifier id . More... | |
virtual void | removeCols (int perm[]) |
Removes multiple columns. More... | |
virtual void | removeCols (SPxColId id[], int n, int perm[]=0) |
virtual void | removeCols (int nums[], int n, int perm[]=0) |
Removes n LPCols. More... | |
virtual void | removeColRange (int start, int end, int perm[]=0) |
Removes columns from start to end (including both). More... | |
virtual bool | readLPF (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
Reads LP in LP format from input stream in . More... | |
virtual bool | readMPS (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
Reads an LP in MPS format from input stream in . More... | |
virtual bool | readFile (const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
Reads LP from a file. More... | |
virtual void | writeLPF (std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=0) const |
virtual void | writeMPS (std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=0) const |
Writes a file in MPS format to out . More... | |
virtual void | writeFile (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const DIdxSet *p_intvars=0) const |
Write loaded LP to filename . More... | |
void | printProblemStatistics (std::ostream &os) |
virtual void | changeObj (const VectorBase< R > &newObj, bool scale=false) |
Changes objective vector to newObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeObj (int i, const R &newVal, bool scale=false) |
changes i 'th objective vector element to newVal . scale determines whether the new data should be scaled More... | |
template<class S > | |
void | changeObj (int i, const S *newVal) |
changes i 'th objective vector element to newVal . More... | |
virtual void | changeObj (SPxColId id, const R &newVal, bool scale=false) |
Changes objective value of column with identifier id to newVal . scale determines whether the new data should be scaled. More... | |
virtual void | changeMaxObj (const VectorBase< R > &newObj, bool scale=false) |
Changes objective vector to newObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeMaxObj (int i, const R &newVal, bool scale=false) |
changes i 'th objective vector element to newVal . scale determines whether the new data should be scaled More... | |
template<class S > | |
void | changeMaxObj (int i, const S *newVal) |
changes i 'th objective vector element to newVal . More... | |
virtual void | changeMaxObj (SPxColId id, const R &newVal, bool scale=false) |
Changes objective value of column with identifier id to newVal . scale determines whether the new data should be scaled. More... | |
virtual void | changeLower (const VectorBase< R > &newLower, bool scale=false) |
Changes vector of lower bounds to newLower . scale determines whether the new data should be scaled. More... | |
virtual void | changeLower (int i, const R &newLower, bool scale=false) |
changes i 'th lower bound to newLower . scale determines whether the new data should be scaled More... | |
template<class S > | |
void | changeLower (int i, const S *newLower) |
changes i 'th lower bound to newLower . More... | |
virtual void | changeLower (SPxColId id, const R &newLower, bool scale=false) |
changes lower bound of column with identifier id to newLower . scale determines whether the new data should be scaled More... | |
virtual void | changeUpper (const VectorBase< R > &newUpper, bool scale=false) |
Changes vector of upper bounds to newUpper . scale determines whether the new data should be scaled. More... | |
virtual void | changeUpper (int i, const R &newUpper, bool scale=false) |
Changes i 'th upper bound to newUpper . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeUpper (int i, const S *newUpper) |
Changes i 'th upper bound to newUpper . More... | |
virtual void | changeUpper (SPxColId id, const R &newUpper, bool scale=false) |
Changes upper bound of column with identifier id to newLower . scale determines whether the new data should be scaled. More... | |
virtual void | changeBounds (const VectorBase< R > &newLower, const VectorBase< R > &newUpper, bool scale=false) |
Changes variable bounds to newLower and newUpper . scale determines whether the new data should be scaled. More... | |
virtual void | changeBounds (int i, const R &newLower, const R &newUpper, bool scale=false) |
Changes bounds of column i to newLower and newUpper . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeBounds (int i, const S *newLower, const S *newUpper) |
Changes bounds of column i to newLower and newUpper . More... | |
virtual void | changeBounds (SPxColId id, const R &newLower, const R &newUpper, bool scale=false) |
Changes bounds of column with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeLhs (const VectorBase< R > &newLhs, bool scale=false) |
Changes left hand side vector for constraints to newLhs . scale determines whether the new data should be scaled. More... | |
virtual void | changeLhs (int i, const R &newLhs, bool scale=false) |
Changes i 'th left hand side value to newLhs . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeLhs (int i, const S *newLhs) |
Changes i 'th left hand side value to newLhs . More... | |
virtual void | changeLhs (SPxRowId id, const R &newLhs, bool scale=false) |
Changes left hand side value for row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeRhs (const VectorBase< R > &newRhs, bool scale=false) |
Changes right hand side vector for constraints to newRhs . scale determines whether the new data should be scaled. More... | |
virtual void | changeRhs (int i, const R &newRhs, bool scale=false) |
Changes i 'th right hand side value to newRhs . scale determines whether the new data should be scaled. More... | |
virtual void | changeRhs (SPxRowId id, const R &newRhs, bool scale=false) |
Changes right hand side value for row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeRange (const VectorBase< R > &newLhs, const VectorBase< R > &newRhs, bool scale=false) |
Changes left and right hand side vectors. scale determines whether the new data should be scaled. More... | |
virtual void | changeRange (int i, const R &newLhs, const R &newRhs, bool scale=false) |
Changes left and right hand side of row i . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeRange (int i, const S *newLhs, const S *newRhs) |
Changes left and right hand side of row i . More... | |
virtual void | changeRange (SPxRowId id, const R &newLhs, const R &newRhs, bool scale=false) |
Changes left and right hand side of row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeRowObj (const VectorBase< R > &newRowObj, bool scale=false) |
Changes row objective function vector to newRowObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeRowObj (int i, const R &newRowObj, bool scale=false) |
Changes i 'th row objective function value to newRowObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeRowObj (SPxRowId id, const R &newRowObj, bool scale=false) |
Changes row objective function value for row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeRow (int n, const LPRowBase< R > &newRow, bool scale=false) |
Replaces i 'th row of LP with newRow . scale determines whether the new data should be scaled. More... | |
virtual void | changeRow (SPxRowId id, const LPRowBase< R > &newRow, bool scale=false) |
Replaces row with identifier id with newRow . scale determines whether the new data should be scaled. More... | |
virtual void | changeCol (int n, const LPColBase< R > &newCol, bool scale=false) |
Replaces i 'th column of LP with newCol . scale determines whether the new data should be scaled. More... | |
virtual void | changeCol (SPxColId id, const LPColBase< R > &newCol, bool scale=false) |
Replaces column with identifier id with newCol . scale determines whether the new data should be scaled. More... | |
virtual void | changeElement (int i, int j, const R &val, bool scale=false) |
Changes LP element (i , j ) to val . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeElement (int i, int j, const S *val) |
Changes LP element (i , j ) to val . More... | |
virtual void | changeElement (SPxRowId rid, SPxColId cid, const R &val, bool scale=false) |
Changes LP element identified by (rid , cid ) to val . scale determines whether the new data should be scaled. More... | |
virtual void | changeObjOffset (const R &o) |
virtual void | computePrimalActivity (const VectorBase< R > &primal, VectorBase< R > &activity, const bool unscaled=true) const |
Computes activity of the rows for a given primal vector; activity does not need to be zero. More... | |
virtual void | addPrimalActivity (const SVectorBase< R > &primal, VectorBase< R > &activity) const |
Updates activity of the rows for a given primal vector; activity does not need to be zero. More... | |
virtual void | computeDualActivity (const VectorBase< R > &dual, VectorBase< R > &activity, const bool unscaled=true) const |
Computes "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More... | |
virtual void | addDualActivity (const SVectorBase< R > &dual, VectorBase< R > &activity) const |
Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More... | |
virtual void | subDualActivity (const VectorBase< R > &dual, VectorBase< R > &activity) const |
Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More... | |
virtual void | buildDualProblem (SPxLPBase< R > &dualLP, SPxRowId primalRowIds[]=0, SPxColId primalColIds[]=0, SPxRowId dualRowIds[]=0, SPxColId dualColIds[]=0, int *nprimalrows=0, int *nprimalcols=0, int *ndualrows=0, int *ndualcols=0) |
Building the dual problem from a given LP. More... | |
bool | isConsistent () const |
Consistency check. More... | |
SPxLPBase () | |
Default constructor. More... | |
virtual | ~SPxLPBase () |
Destructor. More... | |
SPxLPBase (const SPxLPBase< R > &old) | |
Copy constructor. More... | |
template<class S > | |
SPxLPBase (const SPxLPBase< S > &old) | |
Copy constructor. More... | |
SPxLPBase< R > & | operator= (const SPxLPBase< R > &old) |
Assignment operator. More... | |
template<class S > | |
SPxLPBase< R > & | operator= (const SPxLPBase< S > &old) |
Assignment operator. More... | |
Public Attributes | |
Random | random |
The random number generator used throughout the whole computation. Its seed can be modified. More... | |
DIdxSet | infeasibilities |
DIdxSet | infeasibilitiesCo |
DIdxSet | updateViols |
store indices that were changed in the previous iteration and must be checked in hyper pricing More... | |
DIdxSet | updateViolsCo |
DataArray< int > | isInfeasible |
0: index not violated, 1: index violated, 2: index violated and among candidate list More... | |
DataArray< int > | isInfeasibleCo |
0: index not violated, 1: index violated, 2: index violated and among candidate list More... | |
bool | sparsePricingLeave |
These values enable or disable sparse pricing. More... | |
bool | sparsePricingEnter |
true if sparsePricing is turned on in the entering Simplex for slack variables More... | |
bool | sparsePricingEnterCo |
true if sparsePricing is turned on in the entering Simplex More... | |
bool | hyperPricingLeave |
true if hyper sparse pricing is turned on in the leaving Simplex More... | |
bool | hyperPricingEnter |
true if hyper sparse pricing is turned on in the entering Simplex More... | |
int | remainingRoundsLeave |
number of dense rounds/refactorizations until sparsePricing is enabled again More... | |
int | remainingRoundsEnter |
int | remainingRoundsEnterCo |
DVector | weights |
dual pricing norms More... | |
DVector | coWeights |
store dual norms More... | |
bool | weightsAreSetup |
are the dual norms already set up? More... | |
SPxOut * | spxout |
message handler More... | |
DataArray< int > | integerVariables |
supplementary variable information, 0: continous variable, 1: integer variable More... | |
Public Attributes inherited from SPxLPBase< R > | |
SPxOut * | spxout |
Protected Member Functions | |
Precision | |
virtual bool | precisionReached (Real &newpricertol) const |
is the solution precise enough, or should we increase delta() ? More... | |
void | calculateProblemRanges () |
determine ranges of problem values for bounds, sides and objective to assess numerical difficulties More... | |
Protected helpers | |
virtual void | addedRows (int n) |
virtual void | addedCols (int n) |
virtual void | doRemoveRow (int i) |
virtual void | doRemoveRows (int perm[]) |
virtual void | doRemoveCol (int i) |
virtual void | doRemoveCols (int perm[]) |
void | clearDualBounds (SPxBasis::Desc::Status, Real &, Real &) const |
void | setDualColBounds () |
void | setDualRowBounds () |
void | setPrimalBounds () |
setup feasibility bounds for entering algorithm More... | |
void | setEnterBound4Col (int, int) |
void | setEnterBound4Row (int, int) |
virtual void | setEnterBounds () |
void | setLeaveBound4Row (int i, int n) |
void | setLeaveBound4Col (int i, int n) |
virtual void | setLeaveBounds () |
void | computePrimalray4Col (Real direction, SPxId enterId) |
void | computePrimalray4Row (Real direction) |
void | computeDualfarkas4Col (Real direction) |
void | computeDualfarkas4Row (Real direction, SPxId enterId) |
Protected Member Functions inherited from SPxLPBase< R > | |
R & | rhs_w (int i) |
Returns right hand side of row i . More... | |
R & | lhs_w (int i) |
Returns left hand side of row i . More... | |
R & | maxRowObj_w (int i) |
Returns objective function value of row i . More... | |
R & | maxObj_w (int i) |
Returns objective value of column i for maximization problem. More... | |
R & | upper_w (int i) |
Returns upper bound of column i . More... | |
R & | lower_w (int i) |
Returns lower bound of column i . More... | |
const LPRowSetBase< R > * | lprowset () const |
Returns the LP as an LPRowSetBase. More... | |
const LPColSetBase< R > * | lpcolset () const |
Returns the LP as an LPColSetBase. More... | |
void | added2Set (SVSetBase< R > &set, const SVSetBase< R > &addset, int n) |
Protected Member Functions inherited from LPRowSetBase< R > | |
const SVSetBase< R > * | rowSet () const |
Returns the complete SVSet. More... | |
int | num () const |
Returns the number of LPRowBases in LPRowSetBase. More... | |
int | max () const |
Returns the maximum number of LPRowBases that fit. More... | |
const VectorBase< R > & | lhs () const |
Returns the vector of lhs values. More... | |
VectorBase< R > & | lhs_w () |
Returns the vector of lhs values. More... | |
const R & | lhs (int i) const |
Returns the lhs of the i 'th LPRowBase. More... | |
R & | lhs_w (int i) |
Returns the lhs of the i 'th LPRowBase. More... | |
const R & | lhs (const DataKey &k) const |
Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | lhs_w (const DataKey &k) |
Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
const VectorBase< R > & | rhs () const |
Returns the vector of rhs values. More... | |
VectorBase< R > & | rhs_w () |
Returns the vector of rhs values (writeable). More... | |
const R & | rhs (int i) const |
Returns the rhs of the i 'th LPRowBase. More... | |
R & | rhs_w (int i) |
Returns the rhs of the i 'th LPRowBase (writeable). More... | |
const R & | rhs (const DataKey &k) const |
Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | rhs_w (const DataKey &k) |
Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase (writeable). More... | |
const VectorBase< R > & | obj () const |
Returns the vector of objective coefficients. More... | |
VectorBase< R > & | obj_w () |
Returns the vector of objective coefficients (writeable). More... | |
const R & | obj (int i) const |
Returns the objective coefficient of the i 'th LPRowBase. More... | |
R & | obj_w (int i) |
Returns the objective coefficient of the i 'th LPRowBase (writeable). More... | |
const R & | obj (const DataKey &k) const |
Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | obj_w (const DataKey &k) |
Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase (writeable). More... | |
SVectorBase< R > & | rowVector_w (int i) |
Returns a writable rowVector of the i 'th LPRowBase. More... | |
const SVectorBase< R > & | rowVector (int i) const |
Returns the rowVector of the i 'th LPRowBase. More... | |
SVectorBase< R > & | rowVector_w (const DataKey &k) |
Returns a writable rowVector of the LPRowBase with DataKey k . More... | |
const SVectorBase< R > & | rowVector (const DataKey &k) const |
Returns the rowVector of the LPRowBase with DataKey k . More... | |
LPRowBase< R >::Type | type (int i) const |
Returns the inequalitiy type of the i 'th LPRowBase. More... | |
LPRowBase< R >::Type | type (const DataKey &k) const |
Returns the inequality type of the LPRowBase with DataKey k . More... | |
void | setType (int i, typename LPRowBase< R >::Type t) |
Changes the inequality type of row i to type . More... | |
const R & | value (int i) const |
Returns the value of the i'th LPRowBase. More... | |
const R & | value (const DataKey &k) const |
Returns the value of the LPRowBase with DataKey k . More... | |
DataKey | key (int i) const |
Returns the DataKey of the i 'th LPRowBase in LPRowSetBase. More... | |
int | number (const DataKey &k) const |
Returns the number of the LPRowBase with DataKey k in LPRowSetBase. More... | |
bool | has (const DataKey &k) const |
does DataKey k belong to LPRowSetBase ? More... | |
void | add (const LPRowBase< R > &row) |
void | add (DataKey &pkey, const LPRowBase< R > &prow) |
Adds row to LPRowSetBase. More... | |
void | add (const R &plhs, const SVectorBase< R > &prowVector, const R &prhs, const R &pobj=0, const int &pscaleExp=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase. More... | |
template<class S > | |
void | add (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase. More... | |
template<class S > | |
void | add (DataKey &newkey, const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase, with DataKey key . More... | |
void | add (DataKey &newkey, const R &newlhs, const SVectorBase< R > &newrowVector, const R &newrhs, const R &newobj=0, const int &newscaleExp=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase, with DataKey key . More... | |
void | add (const LPRowSetBase< R > &newset) |
void | add (DataKey keys[], const LPRowSetBase< R > &set) |
Adds all LPRowBases of set to LPRowSetBase. More... | |
void | xtend (int n, int newmax) |
Extends row n to fit newmax nonzeros. More... | |
void | xtend (const DataKey &pkey, int pnewmax) |
Extends row with DataKey key to fit newmax nonzeros. More... | |
void | add2 (const DataKey &k, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to rowVector with DataKey k . More... | |
void | add2 (int i, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to i 'th rowVector. More... | |
template<class S > | |
void | add2 (int i, int n, const int idx[], const S val[]) |
Adds n nonzero (idx , val )-pairs to i 'th rowVector. More... | |
SVectorBase< R > & | create (int pnonzeros=0, const R &plhs=0, const R &prhs=1, const R &pobj=0, const int &pscaleExp=0) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector. More... | |
SVectorBase< R > & | create (DataKey &newkey, int nonzeros=0, const R &newlhs=0, const R &newrhs=1, const R &newobj=0, const int &newscaleExp=0) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector. More... | |
void | remove (int i) |
Removes i 'th LPRowBase. More... | |
void | remove (const DataKey &k) |
Removes LPRowBase with DataKey k . More... | |
void | remove (int perm[]) |
Removes multiple LPRowBases. More... | |
void | remove (const int nums[], int n) |
Removes n LPRowBases with row numbers given by nums . More... | |
void | remove (const int nums[], int n, int *perm) |
Removes n LPRowBases with row numbers given by nums , Stores permutation of row indices in perm . More... | |
void | clear () |
Removes all LPRowBases. More... | |
void | reMax (int newmax=0) |
Reallocates memory to be able to store newmax LPRowBases. More... | |
int | memSize () const |
Returns number of used nonzero entries. More... | |
int | memMax () const |
Returns length of nonzero memory. More... | |
void | memRemax (int newmax) |
Reallocates memory to be able to store newmax nonzeros. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
bool | isConsistent () const |
Checks consistency. More... | |
LPRowSetBase (int pmax=-1, int pmemmax=-1) | |
Default constructor. More... | |
LPRowSetBase< R > & | operator= (const LPRowSetBase< R > &rs) |
Assignment operator. More... | |
template<class S > | |
LPRowSetBase< R > & | operator= (const LPRowSetBase< S > &rs) |
Assignment operator. More... | |
LPRowSetBase (const LPRowSetBase< R > &rs) | |
Copy constructor. More... | |
template<class S > | |
LPRowSetBase (const LPRowSetBase< S > &rs) | |
Copy constructor. More... | |
virtual | ~LPRowSetBase () |
Destructor. More... | |
Protected Member Functions inherited from SVSetBase< R > | |
void | add (const SVectorBase< R > &svec) |
Adds svec to the set. More... | |
void | add (DataKey &nkey, const SVectorBase< R > &svec) |
Adds svec to SVSetBase. More... | |
template<class S > | |
void | add (DataKey &nkey, const S *rowValues, const int *rowIndices, int rowSize) |
Adds svec to SVSetBase. More... | |
void | add (const SVectorBase< R > svec[], int n) |
Adds all n SVectorBases in the array svec to the set. More... | |
void | add (DataKey nkey[], const SVectorBase< R > svec[], int n) |
Adds n SVectorBases to SVSetBase. More... | |
template<class S > | |
void | add (const SVSetBase< S > &pset) |
Adds all SVectorBases in pset to SVSetBase. More... | |
template<class S > | |
void | add (DataKey nkey[], const SVSetBase< S > &pset) |
Adds all SVectorBases of pset to SVSetBase. More... | |
SVectorBase< R > * | create (int idxmax=0) |
Creates new SVectorBase in set. More... | |
SVectorBase< R > * | create (DataKey &nkey, int idxmax=-1) |
Creates new SVectorBase in set. More... | |
void | xtend (SVectorBase< R > &svec, int newmax) |
Extends svec to fit newmax nonzeros. More... | |
void | add2 (SVectorBase< R > &svec, int idx, R val) |
Adds nonzero (idx , val ) to svec of this SVSetBase. More... | |
void | add2 (SVectorBase< R > &svec, int n, const int idx[], const R val[]) |
Adds n nonzeros to svec of this SVSetBase. More... | |
template<class S > | |
void | add2 (SVectorBase< R > &svec, int n, const int idx[], const S val[]) |
Adds n nonzeros to svec of this SVSetBase. More... | |
void | remove (const DataKey &removekey) |
Removes the vector with key removekey from the set. More... | |
void | remove (int removenum) |
Removes the vector with number removenum from the set. More... | |
void | remove (const SVectorBase< R > *svec) |
Removes one SVectorBase from set. More... | |
void | remove (int perm[]) |
Removes multiple elements. More... | |
void | remove (const DataKey keys[], int n) |
Removes n SVectorBases from set. More... | |
void | remove (const int nums[], int n) |
Removes n SVectorBases from set. More... | |
void | remove (const DataKey keys[], int n, int *perm) |
void | remove (const int nums[], int n, int *perm) |
void | clear (int minNewSize=-1) |
Removes all SVectorBases from set. More... | |
SVectorBase< R > & | operator[] (int n) |
Gets SVectorBase by number, writeable. More... | |
const SVectorBase< R > & | operator[] (int n) const |
Gets SVectorBase by number. More... | |
SVectorBase< R > & | operator[] (const DataKey &k) |
Gets SVectorBase by DataKey, writeable. More... | |
const SVectorBase< R > & | operator[] (const DataKey &k) const |
Gets SVectorBase by DataKey. More... | |
int | num () const |
Current number of SVectorBases. More... | |
int | max () const |
Current maximum number of SVectorBases. More... | |
DataKey | key (int n) const |
Gets DataKey of vector number. More... | |
DataKey | key (const SVectorBase< R > *svec) const |
Gets DataKey of SVectorBase. More... | |
int | number (const DataKey &k) const |
Gets vector number of DataKey. More... | |
int | number (const SVectorBase< R > *svec) const |
Gets vector number of SVectorBase. More... | |
bool | has (const DataKey &k) const |
True iff SVSetBase contains a SVectorBase for DataKey k . More... | |
bool | has (int n) const |
True iff SVSetBase contains a SVectorBase for vector number n. More... | |
bool | has (const SVectorBase< R > *svec) const |
Is an SVectorBase in the set? More... | |
int | memSize () const |
Used nonzero memory. More... | |
int | memMax () const |
Length of nonzero memory. More... | |
void | memRemax (int newmax) |
Reset length of nonzero memory. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
void | reMax (int newmax=0) |
Resets maximum number of SVectorBases. More... | |
bool | isConsistent () const |
Consistency check. More... | |
SVSetBase (int pmax=-1, int pmemmax=-1, double pfac=1.1, double pmemFac=1.2) | |
Default constructor. More... | |
virtual | ~SVSetBase () |
Destructor. More... | |
SVSetBase< R > & | operator= (const SVSetBase< R > &rhs) |
Assignment operator. More... | |
template<class S > | |
SVSetBase< R > & | operator= (const SVSetBase< S > &rhs) |
Assignment operator. More... | |
SVSetBase (const SVSetBase< R > &old) | |
Copy constructor. More... | |
template<class S > | |
SVSetBase (const SVSetBase< S > &old) | |
Copy constructor. More... | |
Protected Member Functions inherited from ClassArray< Nonzero< R > > | |
Nonzero< R > & | operator[] (int n) |
Reference to n 'th element. More... | |
const Nonzero< R > & | operator[] (int n) const |
Reference to n 'th const element. More... | |
Nonzero< R > & | last () |
Reference to last element. More... | |
const Nonzero< R > & | last () const |
Reference to last const element. More... | |
Nonzero< R > * | get_ptr () |
Gets a C pointer to the data. More... | |
const Nonzero< R > * | get_const_ptr () const |
Gets a const C pointer to the data. More... | |
void | append (const Nonzero< R > &t) |
Appends element t . More... | |
void | append (int n, const Nonzero< R > t[]) |
Appends n elements from t . More... | |
void | append (const ClassArray< Nonzero< R > > &t) |
Appends all elements from t . More... | |
void | insert (int i, int n) |
Inserts n uninitialized elements before i 'th element. More... | |
void | insert (int i, int n, const Nonzero< R > t[]) |
Inserts n elements from t before i 'the element. More... | |
void | insert (int i, const ClassArray< Nonzero< R > > &t) |
Inserts all elements from t before i 'th element. More... | |
void | remove (int n=0, int m=1) |
Removes m elements starting at n . More... | |
void | removeLast (int m=1) |
Removes m last elements. More... | |
void | clear () |
Removes all elements. More... | |
int | size () const |
Returns number of elements. More... | |
void | reSize (int newsize) |
Resets size to newsize . More... | |
int | max () const |
Returns maximum number of elements. More... | |
ptrdiff_t | reMax (int newMax=1, int newSize=-1) |
Resets maximum number of elements. More... | |
ClassArray & | operator= (const ClassArray &rhs) |
Assignment operator. More... | |
bool | isConsistent () const |
Consistency check. More... | |
ClassArray (const ClassArray &old) | |
Copy constructor. More... | |
ClassArray (int p_size=0, int p_max=0, double p_fac=1.2) | |
Default constructor. More... | |
virtual | ~ClassArray () |
Destructor. More... | |
Protected Member Functions inherited from LPColSetBase< R > | |
const SVSetBase< R > * | colSet () const |
Returns the complete SVSetBase. More... | |
int | num () const |
Returns the number of LPColBases currently in LPColSetBase. More... | |
int | max () const |
Returns maximum number of LPColBases currently fitting into LPColSetBase. More... | |
const VectorBase< R > & | maxObj () const |
VectorBase< R > & | maxObj_w () |
Returns vector of objective values w.r.t. maximization. More... | |
const R & | maxObj (int i) const |
R & | maxObj_w (int i) |
Returns objective value (w.r.t. maximization) of i 'th LPColBase in LPColSetBase. More... | |
const R & | maxObj (const DataKey &k) const |
R & | maxObj_w (const DataKey &k) |
Returns objective value (w.r.t. maximization) of LPColBase with DataKey k in LPColSetBase. More... | |
const VectorBase< R > & | lower () const |
VectorBase< R > & | lower_w () |
Returns vector of lower bound values. More... | |
const R & | lower (int i) const |
R & | lower_w (int i) |
Returns lower bound of i 'th LPColBase in LPColSetBase. More... | |
const R & | lower (const DataKey &k) const |
R & | lower_w (const DataKey &k) |
Returns lower bound of LPColBase with DataKey k in LPColSetBase. More... | |
const VectorBase< R > & | upper () const |
VectorBase< R > & | upper_w () |
Returns vector of upper bound values. More... | |
const R & | upper (int i) const |
R & | upper_w (int i) |
Returns upper bound of i 'th LPColBase in LPColSetBase. More... | |
const R & | upper (const DataKey &k) const |
R & | upper_w (const DataKey &k) |
Returns upper bound of LPColBase with DataKey k in LPColSetBase. More... | |
SVectorBase< R > & | colVector_w (int i) |
const SVectorBase< R > & | colVector (int i) const |
Returns colVector of i 'th LPColBase in LPColSetBase. More... | |
SVectorBase< R > & | colVector_w (const DataKey &k) |
Returns writeable colVector of LPColBase with DataKey k in LPColSetBase. More... | |
const SVectorBase< R > & | colVector (const DataKey &k) const |
Returns colVector of LPColBase with DataKey k in LPColSetBase. More... | |
DataKey | key (int i) const |
Returns DataKey of i 'th LPColBase in LPColSetBase. More... | |
int | number (const DataKey &k) const |
Returns number of LPColBase with DataKey k in LPColSetBase. More... | |
bool | has (const DataKey &k) const |
Does DataKey k belong to LPColSetBase ? More... | |
void | add (const LPColBase< R > &pcol) |
void | add (DataKey &pkey, const LPColBase< R > &pcol) |
Adds p pcol to LPColSetBase. More... | |
void | add (const R &pobj, const R &plower, const SVectorBase< R > &pcolVector, const R &pupper, const int &pscaleExp=0) |
void | add (DataKey &newkey, const R &obj, const R &newlower, const SVectorBase< R > &newcolVector, const R &newupper, const int &newscaleExp=0) |
Adds LPColBase consisting of objective value obj , lower bound lower , column vector colVector and upper bound upper to LPColSetBase. More... | |
template<class S > | |
void | add (const S *obj, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue) |
Adds LPColBase consisting of left hand side lhs , column vector colVector , and right hand side rhs to LPColSetBase. More... | |
template<class S > | |
void | add (DataKey &newkey, const S *objValue, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue) |
Adds LPColBase consisting of left hand side lhs , column vector colVector , and right hand side rhs to LPColSetBase, with DataKey key . More... | |
void | add (const LPColSetBase< R > &newset) |
void | add (DataKey keys[], const LPColSetBase< R > &newset) |
Adds all LPColBases of set to LPColSetBase. More... | |
void | xtend (int n, int newmax) |
Extends column n to fit newmax nonzeros. More... | |
void | xtend (const DataKey &pkey, int pnewmax) |
Extends column with DataKey key to fit newmax nonzeros. More... | |
void | add2 (const DataKey &k, int n, const int idx[], const R val[]) |
void | add2 (int i, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to i 'th colVector. More... | |
template<class S > | |
void | add2 (int i, int n, const int idx[], const S val[]) |
Adds n nonzero (idx , val )-pairs to i 'th colVector. More... | |
SVectorBase< R > & | create (int pnonzeros=0, const R &pobj=1, const R &plw=0, const R &pupp=1, const int &pscaleExp=0) |
SVectorBase< R > & | create (DataKey &newkey, int nonzeros=0, const R &obj=1, const R &newlow=0, const R &newup=1, const int &newscaleExp=0) |
Creates new LPColBase with specified arguments and returns a reference to its column vector. More... | |
void | remove (int i) |
Removes i 'th LPColBase. More... | |
void | remove (const DataKey &k) |
Removes LPColBase with DataKey k . More... | |
void | remove (int perm[]) |
Removes multiple elements. More... | |
void | remove (const int nums[], int n) |
Removes LPColBases with numbers nums , where n is the length of the array nums . More... | |
void | remove (const int nums[], int n, int *perm) |
Removes LPColBases with numbers nums , where n is the length of the array nums , and stores the index permutation in array perm . More... | |
void | clear () |
Removes all LPColBases from the set. More... | |
void | reMax (int newmax=0) |
Reallocates memory to be able to store newmax LPColBases. More... | |
int | memSize () const |
Returns used nonzero memory. More... | |
int | memMax () const |
Returns length of nonzero memory. More... | |
void | memRemax (int newmax) |
Resets length of nonzero memory. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
bool | isConsistent () const |
Checks consistency. More... | |
LPColSetBase (int pmax=-1, int pmemmax=-1) | |
Default constructor. More... | |
LPColSetBase< R > & | operator= (const LPColSetBase< R > &rs) |
Assignment operator. More... | |
template<class S > | |
LPColSetBase< R > & | operator= (const LPColSetBase< S > &rs) |
Assignment operator. More... | |
LPColSetBase (const LPColSetBase< R > &rs) | |
Copy constructor. More... | |
template<class S > | |
LPColSetBase (const LPColSetBase< S > &rs) | |
Copy constructor. More... | |
virtual | ~LPColSetBase () |
Destructor. More... | |
Protected Member Functions inherited from SPxBasis | |
void | loadMatrixVecs () |
loads matrix according to the SPxIds stored in theBaseId. More... | |
void | reDim () |
resizes internal arrays. More... | |
void | setRep () |
sets descriptor representation according to loaded LP. More... | |
SPxStatus | status () const |
returns current SPxStatus. More... | |
void | setStatus (SPxStatus stat) |
sets basis SPxStatus to stat . More... | |
void | setMaxUpdates (int maxUp) |
change maximum number of iterations until a refactorization is performed More... | |
int | getMaxUpdates () const |
returns maximum number of updates before a refactorization is performed More... | |
const Desc & | desc () const |
Desc & | desc () |
returns current basis Descriptor. More... | |
Desc::Status | dualColStatus (int i) const |
dual Status for the i'th column variable of the loaded LP. More... | |
Desc::Status | dualStatus (const SPxColId &id) const |
dual Status for the column variable with ID id of the loaded LP. More... | |
Desc::Status | dualRowStatus (int i) const |
dual Status for the i'th row variable of the loaded LP. More... | |
Desc::Status | dualStatus (const SPxRowId &id) const |
dual Status for the row variable with ID id of the loaded LP. More... | |
Desc::Status | dualStatus (const SPxId &id) const |
dual Status for the variable with ID id of the loaded LP. More... | |
SPxId & | baseId (int i) |
SPxId | baseId (int i) const |
returns the Id of the i'th basis vector. More... | |
const SVector & | baseVec (int i) const |
returns the i'th basic vector. More... | |
SPxId | lastEntered () const |
returns SPxId of last vector included to the basis. More... | |
SPxId | lastLeft () const |
returns SPxId of last vector that left the basis. More... | |
int | lastIndex () const |
returns index in basis where last update was done. More... | |
int | lastUpdate () const |
returns number of basis changes since last refactorization. More... | |
int | iteration () const |
returns number of basis changes since last load(). More... | |
int | prevIteration () const |
returns the number of iterations prior to the last break in execution More... | |
int | lastDegenCheck () const |
returns the number of iterations since the last degeneracy check More... | |
SPxSolver * | solver () const |
returns loaded solver. More... | |
Vector & | multBaseWith (Vector &x) const |
Basis-vector product. More... | |
void | multBaseWith (SSVector &x, SSVector &result) const |
Basis-vector product. More... | |
Vector & | multWithBase (Vector &x) const |
Vector-basis product. More... | |
void | multWithBase (SSVector &x, SSVector &result) const |
Vector-basis product. More... | |
Real | condition (int maxiters=10, Real tolerance=1e-6) |
Real | getEstimatedCondition () |
Real | getExactCondition () |
Real | getFastCondition (int type=0) |
Real | stability () const |
returns the stability of the basis matrix. More... | |
void | solve (Vector &x, const Vector &rhs) |
void | solve (SSVector &x, const SVector &rhs) |
void | solve4update (SSVector &x, const SVector &rhs) |
solves linear system with basis matrix. More... | |
void | solve4update (SSVector &x, Vector &y, const SVector &rhsx, SSVector &rhsy) |
solves two systems in one call. More... | |
void | solve4update (SSVector &x, SSVector &y, const SVector &rhsx, SSVector &rhsy) |
solves two systems in one call using only sparse data structures More... | |
void | solve4update (SSVector &x, Vector &y, Vector &y2, const SVector &rhsx, SSVector &rhsy, SSVector &rhsy2) |
solves three systems in one call. More... | |
void | solve4update (SSVector &x, SSVector &y, SSVector &y2, const SVector &rhsx, SSVector &rhsy, SSVector &rhsy2) |
solves three systems in one call using only sparse data structures More... | |
void | coSolve (Vector &x, const Vector &rhs) |
Cosolves linear system with basis matrix. More... | |
void | coSolve (SSVector &x, const SVector &rhs) |
Sparse version of coSolve. More... | |
void | coSolve (SSVector &x, Vector &y, const SVector &rhsx, SSVector &rhsy) |
solves two systems in one call. More... | |
void | coSolve (SSVector &x, SSVector &y, const SVector &rhsx, SSVector &rhsy) |
Sparse version of solving two systems in one call. More... | |
void | coSolve (SSVector &x, Vector &y, Vector &z, const SVector &rhsx, SSVector &rhsy, SSVector &rhsz) |
solves three systems in one call. May be improved by using just one pass through the basis. More... | |
void | coSolve (SSVector &x, SSVector &y, SSVector &z, const SVector &rhsx, SSVector &rhsy, SSVector &rhsz) |
Sparse version of solving three systems in one call. More... | |
void | addedRows (int n) |
inform SPxBasis, that n new rows had been added. More... | |
void | removedRow (int i) |
inform SPxBasis that row i had been removed. More... | |
void | removedRows (const int perm[]) |
inform SPxBasis that rows in perm with negative entry were removed. More... | |
void | addedCols (int n) |
inform SPxBasis that n new columns had been added. More... | |
void | removedCol (int i) |
inform SPxBasis that column i had been removed. More... | |
void | removedCols (const int perm[]) |
inform SPxBasis that columns in perm with negative entry were removed. More... | |
void | changedRow (int) |
inform SPxBasis that a row had been changed. More... | |
void | changedCol (int) |
inform SPxBasis that a column had been changed. More... | |
void | changedElement (int, int) |
inform SPxBasis that a matrix entry had been changed. More... | |
virtual void | change (int i, SPxId &id, const SVector *enterVec, const SSVector *eta=0) |
performs basis update. More... | |
virtual bool | readBasis (std::istream &in, const NameSet *rowNames, const NameSet *colNames) |
virtual void | writeBasis (std::ostream &os, const NameSet *rownames, const NameSet *colnames, const bool cpxFormat=false) const |
virtual void | printMatrix () const |
void | printMatrixMTX (int number) |
virtual bool | isDescValid (const Desc &ds) |
checks if a Descriptor is valid for the current LP w.r.t. its bounds More... | |
virtual void | loadDesc (const Desc &) |
sets up basis. More... | |
virtual void | loadBasisSolver (SLinSolver *solver, const bool destroy=false) |
sets up linear solver to use. More... | |
virtual void | load (SPxSolver *lp, bool initSlackBasis=true) |
loads the LP lp to the basis. More... | |
virtual void | unLoad () |
unloads the LP from the basis. More... | |
void | invalidate () |
invalidates actual basis. More... | |
void | restoreInitialBasis () |
Restores initial basis. More... | |
void | dump () |
output basis entries. More... | |
bool | isConsistent () const |
consistency check. More... | |
Real | getTotalUpdateTime () const |
time spent in updates More... | |
int | getTotalUpdateCount () const |
number of updates performed More... | |
std::string | statistics () const |
returns statistical information in form of a string. More... | |
void | setOutstream (SPxOut &newOutstream) |
SPxBasis (Timer::TYPE ttype=Timer::USER_TIME) | |
default constructor. More... | |
SPxBasis (const SPxBasis &old) | |
copy constructor More... | |
SPxBasis & | operator= (const SPxBasis &rhs) |
assignment operator More... | |
virtual | ~SPxBasis () |
destructor. More... | |
Protected Attributes | |
Protected data | |
Array< UnitVector > | unitVecs |
array of unit vectors More... | |
const SVSet * | thevectors |
the LP vectors according to representation More... | |
const SVSet * | thecovectors |
the LP coVectors according to representation More... | |
DVector | primRhs |
rhs vector for computing the primal vector More... | |
UpdateVector | primVec |
primal vector More... | |
DVector | dualRhs |
rhs vector for computing the dual vector More... | |
UpdateVector | dualVec |
dual vector More... | |
UpdateVector | addVec |
storage for thePvec = &addVec More... | |
DVector | theURbound |
Upper Row Feasibility bound. More... | |
DVector | theLRbound |
Lower Row Feasibility bound. More... | |
DVector | theUCbound |
Upper Column Feasibility bound. More... | |
DVector | theLCbound |
Lower Column Feasibility bound. More... | |
DVector | theUBbound |
Upper Basic Feasibility bound. More... | |
DVector | theLBbound |
Lower Basic Feasibility bound. More... | |
DVector * | theFrhs |
UpdateVector * | theFvec |
DVector * | theCoPrhs |
UpdateVector * | theCoPvec |
UpdateVector * | thePvec |
UpdateVector * | theRPvec |
row pricing vector More... | |
UpdateVector * | theCPvec |
column pricing vector More... | |
DVector * | theUbound |
Upper bound for vars. More... | |
DVector * | theLbound |
Lower bound for vars. More... | |
DVector * | theCoUbound |
Upper bound for covars. More... | |
DVector * | theCoLbound |
Lower bound for covars. More... | |
DVector | theCoTest |
DVector | theTest |
DSVector | primalRay |
stores primal ray in case of unboundedness More... | |
DSVector | dualFarkas |
stores dual farkas proof in case of infeasibility More... | |
int | leaveCount |
number of LEAVE iterations More... | |
int | enterCount |
number of ENTER iterations More... | |
int | primalCount |
number of primal iterations More... | |
int | polishCount |
number of solution polishing iterations More... | |
int | boundflips |
number of performed bound flips More... | |
int | totalboundflips |
total number of bound flips More... | |
int | enterCycles |
the number of degenerate steps during the entering algorithm More... | |
int | leaveCycles |
the number of degenerate steps during the leaving algorithm More... | |
int | enterDegenCand |
the number of degenerate candidates in the entering algorithm More... | |
int | leaveDegenCand |
the number of degenerate candidates in the leaving algorithm More... | |
Real | primalDegenSum |
the sum of the primal degeneracy percentage More... | |
Real | dualDegenSum |
the sum of the dual degeneracy percentage More... | |
SPxPricer * | thepricer |
SPxRatioTester * | theratiotester |
SPxStarter * | thestarter |
Real | boundrange |
absolute range of all bounds in the problem More... | |
Real | siderange |
absolute range of all side in the problem More... | |
Real | objrange |
absolute range of all objective coefficients in the problem More... | |
Protected Attributes inherited from LPRowSetBase< R > | |
DataArray< int > | scaleExp |
row scaling factors (stored as bitshift) More... | |
Protected Attributes inherited from ClassArray< Nonzero< R > > | |
int | thesize |
number of used elements in array data More... | |
int | themax |
the length of array data and More... | |
Nonzero< R > * | data |
the array of elements More... | |
double | memFactor |
memory extension factor. More... | |
Protected Attributes inherited from LPColSetBase< R > | |
DataArray< int > | scaleExp |
column scaling factors (stored as bitshift) More... | |
Protected Attributes inherited from SPxBasis | |
SPxSolver * | theLP |
the LP More... | |
DataArray< SPxId > | theBaseId |
SPxIds of basic vectors. More... | |
DataArray< const SVector *> | matrix |
pointers to the vectors of the basis matrix. More... | |
bool | matrixIsSetup |
true iff the pointers in matrix are set up correctly. More... | |
SLinSolver * | factor |
bool | factorized |
true iff factor = matrix \(^{-1}\). More... | |
int | maxUpdates |
number of updates before refactorization. More... | |
Real | nonzeroFactor |
allowed increase of nonzeros before refactorization. More... | |
Real | fillFactor |
allowed increase in relative fill before refactorization More... | |
Real | memFactor |
allowed total increase in memory consumption before refactorization More... | |
int | iterCount |
number of calls to change() since last manipulation More... | |
int | lastIterCount |
number of calls to change() before halting the simplex More... | |
int | iterDegenCheck |
number of calls to change() since last degeneracy check More... | |
int | updateCount |
number of calls to change() since last factorize() More... | |
int | totalUpdateCount |
number of updates More... | |
int | nzCount |
number of nonzeros in basis matrix More... | |
int | lastMem |
memory needed after last fresh factorization More... | |
Real | lastFill |
fill ratio that occured during last factorization More... | |
int | lastNzCount |
number of nonzeros in basis matrix after last fresh factorization More... | |
Timer * | theTime |
time spent in updates More... | |
Timer::TYPE | timerType |
type of timer (user or wallclock) More... | |
SPxId | lastin |
lastEntered(): variable entered the base last More... | |
SPxId | lastout |
lastLeft(): variable left the base last More... | |
int | lastidx |
lastIndex(): basis index where last update was done More... | |
Real | minStab |
minimum stability More... | |
Private Member Functions | |
Private helpers | |
void | localAddRows (int start) |
void | localAddCols (int start) |
void | setPrimal (Vector &p_vector) |
void | setSlacks (Vector &p_vector) |
void | setDual (Vector &p_vector) |
void | setRedCost (Vector &p_vector) |
Perturbation | |
void | perturbMin (const UpdateVector &vec, Vector &low, Vector &up, Real eps, Real delta, int start=0, int incr=1) |
void | perturbMax (const UpdateVector &vec, Vector &low, Vector &up, Real eps, Real delta, int start=0, int incr=1) |
Real | perturbMin (const UpdateVector &uvec, Vector &low, Vector &up, Real eps, Real delta, const SPxBasis::Desc::Status *stat, int start, int incr) |
Real | perturbMax (const UpdateVector &uvec, Vector &low, Vector &up, Real eps, Real delta, const SPxBasis::Desc::Status *stat, int start, int incr) |
Private Attributes | |
Private data | |
Type | theType |
entering or leaving algortihm. More... | |
Pricing | thePricing |
full or partial pricing. More... | |
Representation | theRep |
row or column representation. More... | |
SolutionPolish | polishObj |
objective of solution polishing More... | |
Timer * | theTime |
time spent in last call to method solve() More... | |
Timer::TYPE | timerType |
type of timer (user or wallclock) More... | |
Real | theCumulativeTime |
cumulative time spent in all calls to method solve() More... | |
int | maxIters |
maximum allowed iterations. More... | |
Real | maxTime |
maximum allowed time. More... | |
int | nClckSkipsLeft |
remaining number of times the clock can be safely skipped More... | |
long | nCallsToTimelim |
Real | objLimit |
< the number of calls to the method isTimeLimitReached() More... | |
Status | m_status |
status of algorithm. More... | |
Real | m_nonbasicValue |
nonbasic part of current objective value More... | |
bool | m_nonbasicValueUpToDate |
true, if the stored objValue is up to date More... | |
Real | m_pricingViol |
maximal feasibility violation of current solution More... | |
bool | m_pricingViolUpToDate |
true, if the stored violation is up to date More... | |
Real | m_pricingViolCo |
maximal feasibility violation of current solution in coDim More... | |
bool | m_pricingViolCoUpToDate |
true, if the stored violation in coDim is up to date More... | |
Real | m_entertol |
feasibility tolerance maintained during entering algorithm More... | |
Real | m_leavetol |
feasibility tolerance maintained during leaving algorithm More... | |
Real | theShift |
sum of all shifts applied to any bound. More... | |
Real | lastShift |
for forcing feasibility. More... | |
int | m_maxCycle |
maximum steps before cycling is detected. More... | |
int | m_numCycle |
actual number of degenerate steps so far. More... | |
bool | initialized |
true, if all vectors are setup. More... | |
SSVector * | solveVector2 |
when 2 systems are to be solved at a time; typically for speepest edge weights More... | |
SSVector * | solveVector2rhs |
when 2 systems are to be solved at a time; typically for speepest edge weights More... | |
SSVector * | solveVector3 |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!) More... | |
SSVector * | solveVector3rhs |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!) More... | |
SSVector * | coSolveVector2 |
when 2 systems are to be solved at a time; typically for speepest edge weights More... | |
SSVector * | coSolveVector2rhs |
when 2 systems are to be solved at a time; typically for speepest edge weights More... | |
SSVector * | coSolveVector3 |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!) More... | |
SSVector * | coSolveVector3rhs |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!) More... | |
bool | freePricer |
true iff thepricer should be freed inside of object More... | |
bool | freeRatioTester |
true iff theratiotester should be freed inside of object More... | |
bool | freeStarter |
true iff thestarter should be freed inside of object More... | |
int | instableLeaveNum |
bool | instableLeave |
Real | instableLeaveVal |
SPxId | instableEnterId |
bool | instableEnter |
Real | instableEnterVal |
bool | recomputedVectors |
flag to perform clean up step to reduce numerical errors only once More... | |
int | displayLine |
int | displayFreq |
Real | sparsePricingFactor |
enable sparse pricing when viols < factor * dim() More... | |
bool | getStartingDecompBasis |
flag to indicate whether the simplex is solved to get the starting improved dual simplex basis More... | |
bool | computeDegeneracy |
int | degenCompIterOffset |
the number of iterations performed before the degeneracy level is computed More... | |
int | decompIterationLimit |
the maximum number of iterations before the decomposition simplex is aborted. More... | |
bool | fullPerturbation |
whether to perturb the entire problem or just the bounds relevant for the current pivot More... | |
int | printCondition |
printing the current condition number in the log (0 - off, 1 - estimate,exact, 2 - exact)";ratio estimate , 3 - sum estimate, 4 - product estimate) More... | |
Friends | |
class | SPxFastRT |
class | SPxBoundFlippingRT |
The Simplex Loop | |
We now present a set of methods that may be usefull when implementing own SPxPricer or SPxRatioTester classes. Here is, how SPxSolver will call methods from its loaded SPxPricer and SPxRatioTester. For the entering Simplex: For the leaving Simplex: | |
void | setup4solve (SSVector *p_y, SSVector *p_rhs) |
Setup vectors to be solved within Simplex loop. More... | |
void | setup4solve2 (SSVector *p_y2, SSVector *p_rhs2) |
Setup vectors to be solved within Simplex loop. More... | |
void | setup4coSolve (SSVector *p_y, SSVector *p_rhs) |
Setup vectors to be cosolved within Simplex loop. More... | |
void | setup4coSolve2 (SSVector *p_z, SSVector *p_rhs) |
Setup vectors to be cosolved within Simplex loop. More... | |
virtual Real | maxInfeas () const |
maximal infeasibility of basis More... | |
virtual bool | noViols (Real tol) const |
check for violations above tol and immediately return false w/o checking the remaining values More... | |
const SPxBasis & | basis () const |
Return current basis. More... | |
SPxBasis & | basis () |
const SPxPricer * | pricer () const |
return loaded SPxPricer. More... | |
const SLinSolver * | slinSolver () const |
return loaded SLinSolver. More... | |
const SPxRatioTester * | ratiotester () const |
return loaded SPxRatioTester. More... | |
virtual void | factorize () |
Factorize basis matrix. More... | |
bool | leave (int i, bool polish=false) |
bool | enter (SPxId &id, bool polish=false) |
Real | coTest (int i, SPxBasis::Desc::Status stat) const |
test coVector i with status stat . More... | |
void | computeCoTest () |
compute coTest vector. More... | |
void | updateCoTest () |
recompute coTest vector. More... | |
Real | test (int i, SPxBasis::Desc::Status stat) const |
test vector i with status stat . More... | |
void | updateTest () |
recompute test vector. More... | |
void | computeFtest () |
compute basis feasibility test vector. More... | |
void | updateFtest () |
update basis feasibility test vector. More... | |
Parallelization | |
In this section we present the methods, that are provided in order to allow a parallel version to be implemented as a derived class, thereby inheriting most of the code of SPxSolver.
| |
bool | isInitialized () const |
has the internal data been initialized? More... | |
void | resetClockStats () |
resets clock average statistics More... | |
virtual void | unInit () |
uninitialize data structures. More... | |
virtual void | reinitializeVecs () |
setup all vecs fresh More... | |
virtual void | reDim () |
reset dimensions of vectors according to loaded LP. More... | |
void | computeFrhs () |
compute feasibility vector from scratch. More... | |
virtual void | computeFrhsXtra () |
virtual void | computeFrhs1 (const Vector &, const Vector &) |
void | computeFrhs2 (Vector &, Vector &) |
virtual void | computeEnterCoPrhs () |
compute theCoPrhs for entering Simplex. More... | |
void | computeEnterCoPrhs4Row (int i, int n) |
void | computeEnterCoPrhs4Col (int i, int n) |
virtual void | computeLeaveCoPrhs () |
compute theCoPrhs for leaving Simplex. More... | |
void | computeLeaveCoPrhs4Row (int i, int n) |
void | computeLeaveCoPrhs4Col (int i, int n) |
Real | nonbasicValue () |
Compute part of objective value. More... | |
virtual const SVector * | enterVector (const SPxId &p_id) |
Get pointer to the id 'th vector. More... | |
virtual void | getLeaveVals (int i, SPxBasis::Desc::Status &leaveStat, SPxId &leaveId, Real &leaveMax, Real &leavebound, int &leaveNum, StableSum< Real > &objChange) |
virtual void | getLeaveVals2 (Real leaveMax, SPxId enterId, Real &enterBound, Real &newUBbound, Real &newLBbound, Real &newCoPrhs, StableSum< Real > &objChange) |
virtual void | getEnterVals (SPxId id, Real &enterTest, Real &enterUB, Real &enterLB, Real &enterVal, Real &enterMax, Real &enterPric, SPxBasis::Desc::Status &enterStat, Real &enterRO, StableSum< Real > &objChange) |
virtual void | getEnterVals2 (int leaveIdx, Real enterMax, Real &leaveBound, StableSum< Real > &objChange) |
virtual void | ungetEnterVal (SPxId enterId, SPxBasis::Desc::Status enterStat, Real leaveVal, const SVector &vec, StableSum< Real > &objChange) |
virtual void | rejectEnter (SPxId enterId, Real enterTest, SPxBasis::Desc::Status enterStat) |
virtual void | rejectLeave (int leaveNum, SPxId leaveId, SPxBasis::Desc::Status leaveStat, const SVector *newVec=0) |
virtual void | setupPupdate (void) |
virtual void | doPupdate (void) |
virtual void | clearUpdateVecs (void) |
virtual void | perturbMinEnter (void) |
virtual void | perturbMaxEnter (void) |
perturb basis bounds. More... | |
virtual void | perturbMinLeave (void) |
virtual void | perturbMaxLeave (void) |
perturb nonbasic bounds. More... | |
virtual void | init () |
intialize data structures. More... | |
VarStatus | basisStatusToVarStatus (SPxBasis::Desc::Status stat) const |
converts basis status to VarStatus More... | |
SPxBasis::Desc::Status | varStatusToBasisStatusRow (int row, VarStatus stat) const |
converts VarStatus to basis status for rows More... | |
SPxBasis::Desc::Status | varStatusToBasisStatusCol (int col, VarStatus stat) const |
converts VarStatus to basis status for columns More... | |
virtual void | setTerminationTime (Real time=infinity) |
set time limit. More... | |
virtual Real | terminationTime () const |
return time limit. More... | |
virtual void | setTerminationIter (int iteration=-1) |
set iteration limit. More... | |
virtual int | terminationIter () const |
return iteration limit. More... | |
virtual void | setTerminationValue (Real value=infinity) |
set objective limit. More... | |
virtual Real | terminationValue () const |
return objective limit. More... | |
virtual Real | objValue () |
get objective value of current solution. More... | |
Status | getResult (Real *value=0, Vector *primal=0, Vector *slacks=0, Vector *dual=0, Vector *reduCost=0) |
get all results of last solve. More... | |
VarStatus | getBasisRowStatus (int row) const |
gets basis status for a single row More... | |
VarStatus | getBasisColStatus (int col) const |
gets basis status for a single column More... | |
Status | getBasis (VarStatus rows[], VarStatus cols[], const int rowsSize=-1, const int colsSize=-1) const |
get current basis, and return solver status. More... | |
SPxBasis::SPxStatus | getBasisStatus () const |
gets basis status More... | |
bool | isBasisValid (DataArray< VarStatus > rows, DataArray< VarStatus > cols) |
check a given basis for validity. More... | |
void | setBasis (const VarStatus rows[], const VarStatus cols[]) |
set the lp solver's basis. More... | |
void | setBasisStatus (SPxBasis::SPxStatus stat) |
set the lp solver's basis status. More... | |
void | setSolverStatus (SPxSolver::Status stat) |
setting the solver status external from the solve loop. More... | |
Real | getDegeneracyLevel (Vector degenvec) |
get level of dual degeneracy More... | |
void | getNdualNorms (int &nnormsRow, int &nnormsCol) const |
get number of dual norms More... | |
bool | getDualNorms (int &nnormsRow, int &nnormsCol, Real *norms) const |
get dual norms More... | |
bool | setDualNorms (int nnormsRow, int nnormsCol, Real *norms) |
set dual norms More... | |
void | setIntegralityInformation (int ncols, int *intInfo) |
pass integrality information about the variables to the solver More... | |
void | resetCumulativeTime () |
reset cumulative time counter to zero. More... | |
int | boundFlips () const |
get number of bound flips. More... | |
int | dualDegeneratePivots () |
get number of dual degenerate pivots More... | |
int | primalDegeneratePivots () |
get number of primal degenerate pivots More... | |
Real | sumDualDegeneracy () |
get the sum of dual degeneracy More... | |
Real | sumPrimalDegeneracy () |
get the sum of primal degeneracy More... | |
int | iterations () const |
get number of iterations of current solution. More... | |
int | primalIterations () |
return number of iterations done with primal algorithm More... | |
int | dualIterations () |
return number of iterations done with primal algorithm More... | |
int | polishIterations () |
return number of iterations done with primal algorithm More... | |
Real | time () const |
time spent in last call to method solve(). More... | |
bool | isTimeLimitReached (const bool forceCheck=false) |
returns whether current time limit is reached; call to time() may be skipped unless forceCheck is true More... | |
Real | getMaxTime () |
the maximum runtime More... | |
Real | cumulativeTime () const |
cumulative time spent in all calls to method solve(). More... | |
int | getMaxIters () |
the maximum number of iterations More... | |
const LPRowSet & | rows () const |
return const lp's rows if available. More... | |
const LPColSet & | cols () const |
return const lp's cols if available. More... | |
void | getLower (Vector &p_low) const |
copy lower bound vector to p_low . More... | |
void | getUpper (Vector &p_up) const |
copy upper bound vector to p_up . More... | |
void | getLhs (Vector &p_lhs) const |
copy lhs value vector to p_lhs . More... | |
void | getRhs (Vector &p_rhs) const |
copy rhs value vector to p_rhs . More... | |
SPxSense | sense () const |
optimization sense. More... | |
std::string | statistics () const |
returns statistical information in form of a string. More... | |
DecompStatus | getDecompStatus () const |
returns whether a basis needs to be found for the improved dual simplex More... | |
void | setComputeDegenFlag (bool computeDegen) |
sets whether the degeneracy is computed at each iteration More... | |
bool | getComputeDegeneracy () const |
returns whether the degeneracy is computed in each iteration More... | |
void | setDegenCompOffset (int iterOffset) |
sets the offset for the number of iterations before the degeneracy is computed More... | |
int | getDegenCompOffset () const |
gets the offset for the number of iterations before the degeneracy is computed More... | |
void | setDecompIterationLimit (int iterationLimit) |
sets the iteration limit for the decomposition simplex initialisation More... | |
int | getDecompIterationLimit () const |
returns the iteration limit for the decomposition simplex initialisation More... | |
Additional Inherited Members | |
Protected Types inherited from SPxBasis | |
enum | SPxStatus { NO_PROBLEM = -2, SINGULAR = -1, REGULAR = 0, DUAL = 1, PRIMAL = 2, OPTIMAL = 3, UNBOUNDED = 4, INFEASIBLE = 5 } |
basis status. More... | |
Sequential object-oriented SimPlex.
SPxSolver is an LP solver class using the revised Simplex algorithm. It provides two basis representations, namely a column basis and a row basis (see Representation). For both representations, a primal and dual algorithm is available (see Type).
In addition, SPxSolver can be customized with various respects:
SPxSolver is derived from SPxLP that is used to store the LP to be solved. Hence, the LPs solved with SPxSolver have the general format
\[ \begin{array}{rl} \hbox{max} & \mbox{maxObj}^T x \\ \hbox{s.t.} & \mbox{lhs} \le Ax \le \mbox{rhs} \\ & \mbox{low} \le x \le \mbox{up} \end{array} \]
Also, SPxLP provide all manipulation methods for the LP. They allow SPxSolver to be used within cutting plane algorithms.
Definition at line 85 of file spxsolver.h.
enum DecompStatus |
Improved dual simplex status.
The improved dual simplex requires a starting basis to perform the problem partitioning. This flag sets the status of the improved dual simplex to indicate whether the starting basis must be found or not.
Enumerator | |
---|---|
FINDSTARTBASIS | Starting basis has not been found yet. |
DONTFINDSTARTBASIS | Starting basis has been found and the simplex can be executed as normal. |
Definition at line 181 of file spxsolver.h.
enum Pricing |
Pricing type.
In case of the ENTERing Simplex algorithm, for performance reasons it may be advisable not to compute and maintain up to date vectors pVec() and test() and instead compute only some of its elements explicitely. This is controled by the Pricing type.
Enumerator | |
---|---|
FULL | Full pricing. If FULL pricing in selected for the ENTERing Simplex, vectors pVec() and test() are kept up to date by SPxSolver. An SPxPricer only needs to select an Id such that the test() or coTest() value is < 0. |
PARTIAL | Partial pricing. When PARTIAL pricing in selected for the ENTERing Simplex, vectors pVec() and test() are not set up and updated by SPxSolver. However, vectors coPvec() and coTest() are still kept up to date by SPxSolver. An SPxPricer object needs to compute the values for pVec() and test() itself in order to select an appropriate pivot with test() < 0. Methods computePvec(i) and computeTest(i) will assist the used to do so. Note that it may be feasible for a pricer to return an Id with test() > 0; such will be rejected by SPxSolver. |
Definition at line 152 of file spxsolver.h.
enum Representation |
LP basis representation.
Solving LPs with the Simplex algorithm requires the definition of a basis. A basis can be defined as a set of column vectors or a set of row vectors building a nonsingular matrix. We will refer to the first case as the columnwise representation and the latter case will be called the rowwise representation.
Type Representation determines the representation of SPxSolver, i.e. a columnwise (COLUMN == 1) or rowwise (ROW == -1) one.
Enumerator | |
---|---|
ROW | rowwise representation. |
COLUMN | columnwise representation. |
Definition at line 105 of file spxsolver.h.
enum SolutionPolish |
objective for solution polishing
Definition at line 228 of file spxsolver.h.
enum Status |
Enumerator | |
---|---|
ERROR | an error occured. |
NO_RATIOTESTER | No ratiotester loaded. |
NO_PRICER | No pricer loaded. |
NO_SOLVER | No linear solver loaded. |
NOT_INIT | not initialised error |
ABORT_EXDECOMP | solve() aborted to exit decomposition simplex |
ABORT_DECOMP | solve() aborted due to commence decomposition simplex |
ABORT_CYCLING | solve() aborted due to detection of cycling. |
ABORT_TIME | solve() aborted due to time limit. |
ABORT_ITER | solve() aborted due to iteration limit. |
ABORT_VALUE | solve() aborted due to objective limit. |
SINGULAR | Basis is singular, numerical troubles? |
NO_PROBLEM | No Problem has been loaded. |
REGULAR | LP has a usable Basis (maybe LP is changed). |
RUNNING | algorithm is running |
UNKNOWN | nothing known on loaded problem. |
OPTIMAL | LP has been solved to optimality. |
UNBOUNDED | LP has been proven to be primal unbounded. |
INFEASIBLE | LP has been proven to be primal infeasible. |
INForUNBD | LP is primal infeasible or unbounded. |
OPTIMAL_UNSCALED_VIOLATIONS | LP has beed solved to optimality but unscaled solution contains violations. |
Definition at line 202 of file spxsolver.h.
enum Type |
Algorithmic type.
SPxSolver uses the reviesed Simplex algorithm to solve LPs. Mathematically, one distinguishes the primal from the dual algorihm. Algorithmically, these relate to the two types ENTER or LEAVE. How they relate, depends on the chosen basis representation. This is desribed by the following table:
ENTER | LEAVE | |
ROW | DUAL | PRIMAL |
COLUMN | PRIMAL | DUAL |
Enumerator | |
---|---|
ENTER | Entering Simplex. The Simplex loop for the entering Simplex can be sketched as follows: |
LEAVE | Leaving Simplex. The Simplex loop for the leaving Simplex can be sketched as follows: |
Definition at line 124 of file spxsolver.h.
enum VarStatus |
Definition at line 189 of file spxsolver.h.
|
explicit |
default constructor.
Constructors / destructors
Definition at line 1026 of file spxsolver.cpp.
References TimerFactory::createTimer(), DEFAULT_BND_VIOL, SPxSolver::initRep(), SPxSolver::setDelta(), SPxBasis::theLP, SPxSolver::theTime, and SPxSolver::timerType.
|
virtual |
Definition at line 1106 of file spxsolver.cpp.
References SPxSolver::freePricer, SPxSolver::freeRatioTester, SPxSolver::freeStarter, soplex::spx_free(), SPxSolver::thepricer, SPxSolver::theratiotester, SPxSolver::thestarter, SPxSolver::theTime, and Timer::~Timer().
copy constructor
Definition at line 1334 of file spxsolver.cpp.
References SPxSolver::addVec, SPxRatioTester::clear(), SPxPricer::clear(), SPxStarter::clone(), SPxRatioTester::clone(), SPxPricer::clone(), LPColSetBase< R >::colSet(), SPxSolver::COLUMN, TimerFactory::createTimer(), SPxSolver::dualRhs, SPxSolver::dualVec, SPxSolver::freePricer, SPxSolver::freeRatioTester, SPxSolver::freeStarter, SPxSolver::isConsistent(), SPxRatioTester::load(), SPxPricer::load(), SPxSolver::primRhs, SPxSolver::primVec, SPxSolver::ROW, LPRowSetBase< R >::rowSet(), SPxSolver::theCoLbound, SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoUbound, SPxSolver::thecovectors, SPxSolver::theCPvec, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLbound, SPxSolver::theLCbound, SPxBasis::theLP, SPxSolver::theLRbound, SPxSolver::thepricer, SPxSolver::thePvec, SPxSolver::theratiotester, SPxSolver::theRep, SPxSolver::theRPvec, SPxSolver::thestarter, SPxSolver::theTime, SPxSolver::theUbound, SPxSolver::theUCbound, SPxSolver::theURbound, SPxSolver::thevectors, and SPxSolver::timerType.
|
protectedvirtual |
Reimplemented from SPxLPBase< R >.
Definition at line 45 of file changesoplex.cpp.
References SPxBasis::addedCols(), SPxLPBase< Real >::addedCols(), SPxBasis::NO_PROBLEM, SPxSolver::reDim(), SPxBasis::status(), and SPxSolver::unInit().
|
protectedvirtual |
Reimplemented from SPxLPBase< R >.
Definition at line 28 of file changesoplex.cpp.
References SPxBasis::addedRows(), SPxLPBase< Real >::addedRows(), SPxBasis::NO_PROBLEM, SPxSolver::reDim(), SPxBasis::status(), and SPxSolver::unInit().
const SPxBasis& basis | ( | ) | const |
Return current basis.
Definition at line 1761 of file spxsolver.h.
Referenced by SoPlex::_addColReal(), SoPlex::_addColsReal(), SoPlex::_addRowReal(), SoPlex::_addRowsReal(), SoPlex::_changeBoundsReal(), SoPlex::_changeColReal(), SoPlex::_changeElementReal(), SoPlex::_changeLhsReal(), SoPlex::_changeLowerReal(), SoPlex::_changeRangeReal(), SoPlex::_changeRhsReal(), SoPlex::_changeRowReal(), SoPlex::_changeUpperReal(), SoPlex::_computeReducedProbObjCoeff(), SoPlex::_ensureRealLPLoaded(), SoPlex::_evaluateSolutionDecomp(), SoPlex::_formDecompReducedProblem(), SoPlex::_getCompatibleBoundCons(), SoPlex::_getCompatibleColumns(), SoPlex::_getZeroDualMultiplierIndices(), SoPlex::_identifyComplementaryDualFixedPrimalVars(), SoPlex::_identifyComplementaryPrimalFixedPrimalVars(), SoPlex::_optimizeRational(), SoPlex::_performOptIRStable(), SoPlex::_removeColReal(), SoPlex::_removeColsReal(), SoPlex::_removeRowReal(), SoPlex::_removeRowsReal(), SoPlex::_restoreLPReal(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_storeSolutionReal(), SoPlex::_updateDecompComplementaryDualProblem(), SoPlex::_updateDecompComplementaryPrimalProblem(), SoPlex::_updateDecompReducedProblemViol(), SoPlex::checkBasisDualFeasibility(), SPxWeightPR::computeLeavePenalty(), SPxSteepPR::entered4(), SPxBoundFlippingRT::flipAndUpdate(), SoPlex::getBasisInd(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SoPlex::getBasisInverseTimesVecReal(), SoPlex::getEstimatedCondition(), SoPlex::getExactCondition(), SoPlex::getExpectedDualVariableSign(), SoPlex::getFastCondition(), SoPlex::getOriginalProblemBasisColStatus(), SoPlex::getOriginalProblemBasisRowStatus(), SoPlex::getOrigVarFixedDirection(), SPxSteepPR::isConsistent(), SPxSolver::leave(), SPxSteepPR::left4(), SoPlex::multBasis(), SoPlex::multBasisTranspose(), SPxSolver::printDisplayLine(), SoPlex::readBasisFile(), SPxWeightPR::selectEnter(), SPxSteepPR::selectEnter(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxDevexPR::selectEnterX(), SPxSteepPR::selectEnterX(), SPxDevexPR::selectLeave(), SPxSteepPR::selectLeave(), SPxFastRT::selectLeave(), SPxBoundFlippingRT::selectLeave(), SoPlex::setBasis(), soplex::setDualStatus(), SoPlex::setIntParam(), SPxSteepPR::setupWeights(), SPxSolver::solve(), and SPxSolver::writeState().
SPxBasis& basis | ( | ) |
Definition at line 1766 of file spxsolver.h.
|
protected |
converts basis status to VarStatus
Definition at line 1708 of file spxsolver.cpp.
References SPxSolver::BASIC, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxSolver::FIXED, MSG_ERROR, SPxSolver::ON_LOWER, SPxSolver::ON_UPPER, SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, and SPxSolver::ZERO.
Referenced by SPxSolver::getBasis(), SPxSolver::getBasisColStatus(), and SPxSolver::getBasisRowStatus().
int boundFlips | ( | ) | const |
get number of bound flips.
Definition at line 2088 of file spxsolver.h.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
|
protected |
determine ranges of problem values for bounds, sides and objective to assess numerical difficulties
Definition at line 74 of file spxsolve.cpp.
References SPxSolver::boundrange, soplex::infinity, SPxLPBase< R >::lhs(), SPxLPBase< R >::lower(), MAXIMUM, MINIMUM, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), LPRowSetBase< R >::obj(), SPxSolver::objrange, SPxLPBase< R >::rhs(), SPxSolver::siderange, and soplex::spxAbs().
Referenced by SPxSolver::solve().
Definition at line 495 of file changesoplex.cpp.
References SPxSolver::changeLower(), and SPxSolver::changeUpper().
Referenced by SoPlex::_deleteAndUpdateRowsComplementaryProblem(), SoPlex::_updateComplementaryPrimalFixedPrimalVars(), SoPlex::_updateDecompComplementaryDualProblem(), and SPxSolver::changeBounds().
|
virtual |
Definition at line 501 of file changesoplex.cpp.
References SPxSolver::changeLower(), and SPxSolver::changeUpper().
|
virtual |
Definition at line 1009 of file spxsolver.h.
References SPxSolver::changeBounds(), SPxSolver::changeLhs(), SPxSolver::changeLhsStatus(), and SPxLPBase< R >::number().
|
virtual |
Definition at line 800 of file changesoplex.cpp.
References SPxLPBase< Real >::changeCol(), SPxBasis::changedCol(), SPxSolver::forceRecompNonbasicValue(), SPxBasis::NO_PROBLEM, SPxBasis::status(), and SPxSolver::unInit().
Referenced by SoPlex::_updateDecompComplementaryPrimalProblem().
Definition at line 1056 of file spxsolver.h.
|
virtual |
Definition at line 815 of file changesoplex.cpp.
References SPxBasis::changedElement(), SPxLPBase< Real >::changeElement(), SPxSolver::forceRecompNonbasicValue(), SPxBasis::NO_PROBLEM, SPxBasis::status(), and SPxSolver::unInit().
|
virtual |
Definition at line 1063 of file spxsolver.h.
|
virtual |
Definition at line 598 of file changesoplex.cpp.
References SPxLPBase< Real >::changeLhs(), SPxSolver::changeLhsStatus(), SPxSolver::forceRecompNonbasicValue(), SPxLPBase< R >::lhs(), SPxBasis::NO_PROBLEM, SPxLPBase< R >::nRows(), SPxBasis::status(), and SPxSolver::unInit().
Referenced by SoPlex::_deleteAndUpdateRowsComplementaryProblem(), SoPlex::_performOptIRStable(), SoPlex::_setComplementaryDualOriginalObjective(), SoPlex::_updateDecompComplementaryPrimalProblem(), and SPxSolver::changeBounds().
|
virtual |
Definition at line 614 of file changesoplex.cpp.
References SPxLPBase< Real >::changeLhs(), SPxSolver::changeLhsStatus(), SPxLPBase< R >::lhs(), SPxLPBase< R >::lhsUnscaled(), SPxBasis::NO_PROBLEM, SPxBasis::status(), and SPxSolver::unInit().
Definition at line 1021 of file spxsolver.h.
Definition at line 507 of file changesoplex.cpp.
References SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxBasis::dualRowStatus(), soplex::EQ(), SPxSolver::forceRecompNonbasicValue(), soplex::infinity, SPxSolver::isInitialized(), SPxSolver::m_nonbasicValueUpToDate, SPxLPBase< R >::maxRowObj(), MSG_DEBUG, soplex::NE(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theLRbound, SPxSolver::theShift, SPxSolver::theURbound, and SPxSolver::updateNonbasicValue().
Referenced by SPxSolver::changeBounds(), SPxSolver::changeLhs(), and SPxSolver::changeRange().
|
virtual |
Definition at line 340 of file changesoplex.cpp.
References SPxLPBase< Real >::changeLower(), SPxSolver::changeLowerStatus(), VectorBase< R >::dim(), SPxSolver::forceRecompNonbasicValue(), SPxLPBase< R >::lower(), SPxBasis::NO_PROBLEM, SPxBasis::status(), and SPxSolver::unInit().
Referenced by SoPlex::_performOptIRStable(), SoPlex::_updateComplementaryDualSlackColCoeff(), and SPxSolver::changeBounds().
|
virtual |
Definition at line 356 of file changesoplex.cpp.
References SPxLPBase< Real >::changeLower(), SPxSolver::changeLowerStatus(), SPxLPBase< R >::lower(), SPxLPBase< R >::lowerUnscaled(), SPxBasis::NO_PROBLEM, SPxBasis::status(), and SPxSolver::unInit().
Definition at line 989 of file spxsolver.h.
Definition at line 249 of file changesoplex.cpp.
References SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxBasis::dualColStatus(), soplex::EQ(), SPxSolver::forceRecompNonbasicValue(), soplex::infinity, SPxSolver::isInitialized(), SPxSolver::m_nonbasicValueUpToDate, SPxLPBase< R >::maxObj(), MSG_DEBUG, soplex::NE(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::theLCbound, SPxSolver::theShift, SPxSolver::theUCbound, SPxSolver::updateNonbasicValue(), and SPxLPBase< R >::upper().
Referenced by SPxSolver::changeLower().
|
virtual |
Definition at line 201 of file changesoplex.cpp.
References SPxLPBase< Real >::changeMaxObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().
|
virtual |
Definition at line 213 of file changesoplex.cpp.
References SPxLPBase< Real >::changeMaxObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().
Definition at line 963 of file spxsolver.h.
|
virtual |
scale
determines whether the new data needs to be scaled according to the existing LP (persistent scaling)
Definition at line 176 of file changesoplex.cpp.
References SPxLPBase< Real >::changeObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().
Referenced by SoPlex::_deleteAndUpdateRowsComplementaryProblem(), SoPlex::_performOptIRStable(), SoPlex::_setComplementaryPrimalOriginalObjective(), SoPlex::_solveDecompositionDualSimplex(), and SoPlex::_updateDecompComplementaryDualProblem().
|
virtual |
Definition at line 188 of file changesoplex.cpp.
References SPxLPBase< Real >::changeObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().
Definition at line 954 of file spxsolver.h.
Definition at line 752 of file changesoplex.cpp.
References SPxLPBase< Real >::changeLhs(), SPxSolver::changeLhsStatus(), SPxLPBase< Real >::changeRhs(), SPxSolver::changeRhsStatus(), SPxSolver::forceRecompNonbasicValue(), SPxLPBase< R >::lhs(), SPxBasis::NO_PROBLEM, SPxLPBase< R >::nRows(), SPxLPBase< R >::rhs(), SPxBasis::status(), and SPxSolver::unInit().
Referenced by SPxSolver::changeRange().
Definition at line 772 of file changesoplex.cpp.
References SPxLPBase< Real >::changeLhs(), SPxSolver::changeLhsStatus(), SPxLPBase< Real >::changeRhs(), SPxSolver::changeRhsStatus(), SPxLPBase< R >::lhs(), SPxBasis::NO_PROBLEM, SPxLPBase< R >::rhs(), SPxBasis::status(), and SPxSolver::unInit().
|
virtual |
Definition at line 1041 of file spxsolver.h.
References SPxSolver::changeRange(), SPxSolver::changeRow(), and SPxLPBase< R >::number().
|
virtual |
Definition at line 721 of file changesoplex.cpp.
References SPxLPBase< Real >::changeRhs(), SPxSolver::changeRhsStatus(), SPxSolver::forceRecompNonbasicValue(), SPxBasis::NO_PROBLEM, SPxLPBase< R >::nRows(), SPxLPBase< R >::rhs(), SPxBasis::status(), and SPxSolver::unInit().
Referenced by SoPlex::_performOptIRStable(), SoPlex::_setComplementaryDualOriginalObjective(), and SoPlex::_updateDecompComplementaryPrimalProblem().
|
virtual |
Definition at line 737 of file changesoplex.cpp.
References SPxLPBase< Real >::changeRhs(), SPxSolver::changeRhsStatus(), SPxBasis::NO_PROBLEM, SPxLPBase< R >::rhs(), SPxLPBase< R >::rhsUnscaled(), SPxBasis::status(), and SPxSolver::unInit().
Definition at line 1032 of file spxsolver.h.
Definition at line 629 of file changesoplex.cpp.
References SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxBasis::dualRowStatus(), soplex::EQ(), SPxSolver::forceRecompNonbasicValue(), soplex::infinity, SPxSolver::isInitialized(), SPxLPBase< R >::lhs(), SPxSolver::m_nonbasicValueUpToDate, SPxLPBase< R >::maxRowObj(), MSG_DEBUG, soplex::NE(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theLRbound, SPxSolver::theShift, SPxSolver::theURbound, and SPxSolver::updateNonbasicValue().
Referenced by SPxSolver::changeRange(), and SPxSolver::changeRhs().
|
virtual |
Definition at line 788 of file changesoplex.cpp.
References SPxBasis::changedRow(), SPxLPBase< Real >::changeRow(), SPxSolver::forceRecompNonbasicValue(), SPxBasis::NO_PROBLEM, SPxBasis::status(), and SPxSolver::unInit().
Referenced by SoPlex::_updateDecompComplementaryDualProblem(), and SPxSolver::changeRange().
Definition at line 1049 of file spxsolver.h.
|
virtual |
Definition at line 225 of file changesoplex.cpp.
References SPxLPBase< Real >::changeRowObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().
Referenced by SoPlex::_performOptIRStable().
|
virtual |
Definition at line 237 of file changesoplex.cpp.
References SPxLPBase< Real >::changeRowObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().
Definition at line 972 of file spxsolver.h.
|
virtual |
Reimplemented from SPxLPBase< R >.
Definition at line 830 of file changesoplex.cpp.
References SPxLPBase< Real >::changeSense(), and SPxSolver::unInit().
Referenced by SoPlex::_solveDecompositionDualSimplex().
|
virtual |
Definition at line 464 of file changesoplex.cpp.
References SPxLPBase< Real >::changeUpper(), SPxSolver::changeUpperStatus(), VectorBase< R >::dim(), SPxSolver::forceRecompNonbasicValue(), SPxBasis::NO_PROBLEM, SPxBasis::status(), SPxSolver::unInit(), and SPxLPBase< R >::upper().
Referenced by SoPlex::_performOptIRStable(), and SPxSolver::changeBounds().
|
virtual |
Definition at line 480 of file changesoplex.cpp.
References SPxLPBase< Real >::changeUpper(), SPxSolver::changeUpperStatus(), SPxBasis::NO_PROBLEM, SPxBasis::status(), SPxSolver::unInit(), SPxLPBase< R >::upper(), and SPxLPBase< R >::upperUnscaled().
Definition at line 1000 of file spxsolver.h.
Definition at line 373 of file changesoplex.cpp.
References SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxBasis::dualColStatus(), soplex::EQ(), SPxSolver::forceRecompNonbasicValue(), soplex::infinity, SPxSolver::isInitialized(), SPxLPBase< R >::lower(), SPxSolver::m_nonbasicValueUpToDate, SPxLPBase< R >::maxObj(), MSG_DEBUG, soplex::NE(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::theLCbound, SPxSolver::theShift, SPxSolver::theUCbound, and SPxSolver::updateNonbasicValue().
Referenced by SPxSolver::changeUpper().
|
virtual |
clear all data in solver.
Reimplemented from SPxLPBase< R >.
Definition at line 503 of file spxsolver.cpp.
References SPxSolver::addVec, UpdateVector::clear(), IdxSet::clear(), DataArray< T >::clear(), VectorBase< R >::clear(), SPxLPBase< Real >::clear(), SPxSolver::dualRhs, SPxSolver::dualVec, SPxSolver::forceRecompNonbasicValue(), SPxSolver::infeasibilities, SPxSolver::infeasibilitiesCo, SPxSolver::isInfeasible, SPxSolver::isInfeasibleCo, SPxBasis::NO_PROBLEM, SPxSolver::primRhs, SPxSolver::primVec, SPxBasis::reDim(), SPxSolver::setBasisStatus(), SPxSolver::theCoTest, SPxSolver::theLCbound, SPxBasis::theLP, SPxSolver::theLRbound, SPxSolver::theTest, SPxSolver::theUCbound, SPxSolver::theURbound, SPxSolver::unInit(), and SPxSolver::unitVecs.
Referenced by SPxSolver::loadLP(), and SPxSolver::read().
|
protected |
The following methods serve for initializing the bounds for dual or primal Simplex algorithm of entering or leaving type.
Setting up the basis for dual simplex requires to install upper and lower feasibility bounds for dual variables (|Lbound| and |Ubound|). Here is a list of how these must be set for inequalities of type \(l \le a^Tx \le u\):
\[ \begin{tabular}{cccc} $l$ & $u$ & |Lbound| & |Ubound| \\ \hline $-\infty=l$ & $u=\infty$ & 0 & 0 \\ $-\infty<l$ & $u=\infty$ & 0 & $\infty$ \\ $-\infty=l$ & $u<\infty$ & $-\infty$ & 0 \\ \multicolumn{2}{c}{ $-\infty<l \ne u<\infty$} & 0 & 0 \\ \multicolumn{2}{c}{ $-\infty<l = u<\infty$} & $-\infty$ & $\infty$ \\ \end{tabular} \]
The case \(l = -\infty\), \(u = \infty\) occurs for unbounded primal variables. Such must be treated differently from the general case.
Given possible upper and lower bounds to a dual variable with |Status stat|, this function clears the bounds according to |stat| by setting them to \(\infty\) or \(-\infty\), respectively.
Definition at line 76 of file spxbounds.cpp.
References SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, soplex::infinity, SPxBasis::Desc::P_ON_LOWER, and SPxBasis::Desc::P_ON_UPPER.
Referenced by SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), and SPxSolver::unShift().
|
virtual |
Reimplemented from SPxLPBase< R >.
Definition at line 977 of file spxsolver.h.
Referenced by SoPlex::_performOptIRStable().
|
protectedvirtual |
Definition at line 542 of file spxsolver.cpp.
References UpdateVector::clearUpdate(), SPxSolver::coSolveVector2, SPxSolver::coSolveVector3, SPxSolver::solveVector2, SPxSolver::solveVector3, SPxSolver::theCoPvec, SPxSolver::theFvec, and SPxSolver::thePvec.
Referenced by SPxSolver::init(), SPxSolver::performSolutionPolishing(), and SPxSolver::solve().
int coDim | ( | ) | const |
codimension.
Definition at line 1080 of file spxsolver.h.
Referenced by SPxDevexPR::addedVecs(), SPxSteepPR::addedVecs(), SPxSolver::computeFrhs1(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxWeightST::generate(), SPxSolver::getDualNorms(), SPxSolver::getNdualNorms(), SPxSolver::hyperPricing(), SPxSolver::init(), SPxDevexPR::isConsistent(), SPxSteepPR::isConsistent(), SPxSolver::isConsistent(), SPxParMultPR::load(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::qualRedCostViolation(), SPxSolver::reDim(), SPxSteepPR::removedVec(), SPxSteepPR::removedVecs(), SPxParMultPR::selectEnter(), SPxDantzigPR::selectEnterDenseCoDim(), SPxSteepPR::selectEnterDenseCoDim(), SPxSolver::setDualNorms(), SPxDevexPR::setRep(), SPxHybridPR::setType(), SPxDevexPR::setType(), SPxSteepPR::setType(), SPxSteepPR::setupWeights(), SPxDevexPR::setupWeights(), SPxSolver::shiftPvec(), SPxSolver::solve(), SPxSolver::testBounds(), and SPxSolver::testVecs().
SPxId coId | ( | int | i | ) | const |
id of i
'th covector.
The i
'th coId() is the i
'th SPxColId for a rowwise and the i
'th SPxRowId for a columnwise basis represenation. Hence, 0 <= i < dim().
Definition at line 1117 of file spxsolver.h.
References SPxLPBase< Real >::cId(), SPxSolver::isId(), and SPxLPBase< Real >::rId().
Referenced by SPxDevexPR::buildBestPriceVectorEnterDim(), SPxSteepPR::buildBestPriceVectorEnterDim(), SPxWeightST::generate(), SPxBoundFlippingRT::getData(), SPxSolver::id(), SPxFastRT::maxDelta(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minSelect(), SPxSolver::performSolutionPolishing(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxParMultPR::selectEnter(), SPxDantzigPR::selectEnterDenseDim(), SPxDevexPR::selectEnterDenseDim(), SPxSteepPR::selectEnterDenseDim(), SPxDevexPR::selectEnterHyperDim(), SPxSteepPR::selectEnterHyperDim(), SPxDantzigPR::selectEnterSparseDim(), SPxDevexPR::selectEnterSparseDim(), SPxSteepPR::selectEnterSparseDim(), and SPxSolver::shiftPvec().
SPxColId colId | ( | int | i | ) | const |
ColId of i
'th column.
Definition at line 2281 of file spxsolver.h.
Referenced by SoPlex::_updateDecompComplementaryDualProblem(), and SPxBasis::readBasis().
const LPColSet& cols | ( | ) | const |
return const lp's cols if available.
Definition at line 2177 of file spxsolver.h.
|
private |
compute coTest vector.
Definition at line 243 of file enter.cpp.
References DIdxSet::addIdx(), IdxSet::clear(), SPxBasis::Desc::coStatus(), SPxSolver::coTest(), DENSEROUNDS, SPxBasis::desc(), SPxSolver::dim(), SPxSolver::hyperPricingEnter, SPxSolver::infeasibilities, SPxSolver::isBasic(), SPxSolver::isInfeasible, SPxSolver::leavetol(), SPxSolver::m_pricingViol, SPxSolver::m_pricingViolUpToDate, IdxSet::max(), MSG_INFO2, SPxPricer::NOT_VIOLATED, SPxOut::precision(), SPxSolver::remainingRoundsEnter, IdxSet::size(), SPxSolver::sparsePricingEnter, SPxSolver::sparsePricingFactor, SPxSolver::spxout, SPxSolver::theCoTest, and SPxPricer::VIOLATED.
Referenced by SPxSolver::enter(), SPxSolver::factorize(), SPxSolver::init(), SPxSolver::reinitializeVecs(), SPxSolver::setPricing(), and SPxSolver::solve().
|
protected |
Definition at line 705 of file leave.cpp.
References DSVectorBase< R >::add(), SVectorBase< R >::clear(), SPxSolver::coPvec(), UpdateVector::delta(), SPxSolver::delta(), SPxSolver::dualFarkas, DSVectorBase< R >::setMax(), soplex::sign(), SSVectorBase< R >::size(), ClassArray< Nonzero< R > >::size(), and SPxSolver::value().
Referenced by SPxSolver::leave().
Definition at line 1184 of file enter.cpp.
References DSVectorBase< R >::add(), SPxBasis::baseId(), SVectorBase< R >::clear(), UpdateVector::delta(), SPxSolver::delta(), SPxSolver::dualFarkas, SPxSolver::fVec(), SPxId::isSPxRowId(), SPxLPBase< R >::number(), DSVectorBase< R >::setMax(), soplex::sign(), SSVectorBase< R >::size(), ClassArray< Nonzero< R > >::size(), and SPxSolver::value().
Referenced by SPxSolver::enter().
|
protectedvirtual |
compute theCoPrhs for entering Simplex.
Definition at line 426 of file spxvecs.cpp.
References SPxBasis::baseId(), SPxSolver::computeEnterCoPrhs4Col(), SPxSolver::computeEnterCoPrhs4Row(), SPxSolver::dim(), SPxSolver::ENTER, SPxId::isSPxRowId(), SPxLPBase< R >::number(), and SPxSolver::type().
Referenced by SPxSolver::init(), SPxSolver::reinitializeVecs(), SPxSolver::solve(), and SPxSolver::terminate().
|
protected |
Definition at line 385 of file spxvecs.cpp.
References SPxBasis::baseId(), SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), soplex::EQ(), soplex::infinity, SPxLPBase< Real >::lower(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxSolver::ROW, and SPxLPBase< Real >::upper().
Referenced by SPxSolver::computeEnterCoPrhs().
|
protected |
Computing the right hand side vector for |theCoPvec| depends on the type of the simplex algorithm. In entering algorithms, the values are taken from the inequality's right handside or the column's objective value.
In contrast to this leaving algorithms take the values from vectors |theURbound| and so on.
We reflect this difference by providing two pairs of methods |computeEnterCoPrhs(n, stat)| and |computeLeaveCoPrhs(n, stat)|. The first pair operates for entering algorithms, while the second one is intended for leaving algorithms. The return value of these methods is the right hand side value for the \(n\)-th row or column id, respectively, if it had the passed |Status| for both.
Both methods are again split up into two methods named |...4Row(i,n)| and |...4Col(i,n)|, respectively. They do their job for the |i|-th basis variable, being the |n|-th row or column.
Definition at line 352 of file spxvecs.cpp.
References SPxBasis::baseId(), SPxBasis::desc(), soplex::EQ(), soplex::infinity, SPxLPBase< R >::lhs(), SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), and SPxSolver::ROW.
Referenced by SPxSolver::computeEnterCoPrhs().
|
protected |
compute feasibility vector from scratch.
Initialize Vectors
Computing the right hand side vector for the feasibility vector depends on the chosen representation and type of the basis.
In columnwise case, |theFvec| = \(x_B = A_B^{-1} (- A_N x_N)\), where \(x_N\) are either upper or lower bounds for the nonbasic variables (depending on the variables |Status|). If these values remain unchanged throughout the simplex algorithm, they may be taken directly from LP. However, in the entering type algorith they are changed and, hence, retreived from the column or row upper or lower bound vectors.
In rowwise case, |theFvec| = \(\pi^T_B = (c^T - 0^T A_N) A_B^{-1}\). However, this applies only to leaving type algorithm, where no bounds on dual variables are altered. In entering type algorithm they are changed and, hence, retreived from the column or row upper or lower bound vectors.
Definition at line 42 of file spxvecs.cpp.
References VectorBase< R >::clear(), SPxSolver::COLUMN, SPxSolver::computeFrhs1(), SPxSolver::computeFrhs2(), SPxSolver::computeFrhsXtra(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::desc(), SPxSolver::ENTER, soplex::EQ(), soplex::infinity, SPxSolver::isBasic(), SPxSolver::LEAVE, SPxLPBase< R >::lhs(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), MSG_ERROR, VectorBase< R >::multAdd(), SPxLPBase< R >::nRows(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theCoLbound, SPxSolver::theCoUbound, SPxSolver::theFrhs, SPxSolver::theLbound, SPxSolver::theUbound, SPxSolver::type(), and SPxSolver::vector().
Referenced by SPxSolver::factorize(), SPxSolver::init(), SPxSolver::leave(), SPxSolver::reinitializeVecs(), SPxSolver::solve(), and SPxSolver::terminate().
This methods subtracts \(A_N x_N\) or \(\pi_N^T A_N\) from |theFrhs| as specified by the |Status| of all nonbasic variables. The values of \(x_N\) or \(\pi_N\) are taken from the passed arrays.
ufb | upper feasibility bound for variables |
lfb | lower feasibility bound for variables |
Definition at line 205 of file spxvecs.cpp.
References SPxSolver::coDim(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), soplex::EQ(), soplex::infinity, SPxSolver::isBasic(), MSG_ERROR, VectorBase< R >::multAdd(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxBasis::Desc::status(), SPxSolver::theFrhs, and SPxSolver::vector().
Referenced by SPxSolver::computeFrhs().
This methods subtracts \(A_N x_N\) or \(\pi_N^T A_N\) from |theFrhs| as specified by the |Status| of all nonbasic variables. The values of \(x_N\) or \(\pi_N\) are taken from the passed arrays.
coufb | upper feasibility bound for covariables |
colfb | lower feasibility bound for covariables |
Definition at line 265 of file spxvecs.cpp.
References SPxBasis::Desc::coStatus(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxSolver::dim(), soplex::EQ(), soplex::infinity, SPxSolver::isBasic(), soplex::isZero(), MSG_ERROR, MSG_WARNING, SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, and SPxSolver::spxout.
Referenced by SPxSolver::computeFrhs().
|
protectedvirtual |
Definition at line 152 of file spxvecs.cpp.
References SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::desc(), soplex::EQ(), soplex::infinity, SPxSolver::isBasic(), SPxSolver::LEAVE, SPxLPBase< Real >::lower(), MSG_ERROR, VectorBase< R >::multAdd(), SPxLPBase< R >::nCols(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxSolver::theFrhs, SPxSolver::type(), SPxLPBase< Real >::upper(), and SPxSolver::vector().
Referenced by SPxSolver::computeFrhs().
|
private |
compute basis feasibility test vector.
Definition at line 39 of file leave.cpp.
References DIdxSet::addIdx(), IdxSet::clear(), DENSEROUNDS, SPxSolver::dim(), SPxSolver::entertol(), SPxSolver::hyperPricingLeave, SPxSolver::infeasibilities, SPxSolver::isInfeasible, SPxSolver::LEAVE, SPxSolver::m_pricingViol, SPxSolver::m_pricingViolCo, SPxSolver::m_pricingViolCoUpToDate, SPxSolver::m_pricingViolUpToDate, MSG_INFO2, SPxPricer::NOT_VIOLATED, SPxOut::precision(), SPxSolver::remainingRoundsLeave, SPxSolver::sparsePricingFactor, SPxSolver::sparsePricingLeave, SPxSolver::spxout, SPxSolver::theCoTest, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theUBbound, SPxSolver::type(), and SPxPricer::VIOLATED.
Referenced by SPxSolver::factorize(), SPxSolver::init(), SPxSolver::leave(), SPxSolver::reinitializeVecs(), and SPxSolver::solve().
|
protectedvirtual |
compute theCoPrhs for leaving Simplex.
Definition at line 505 of file spxvecs.cpp.
References SPxBasis::baseId(), SPxSolver::computeLeaveCoPrhs4Col(), SPxSolver::computeLeaveCoPrhs4Row(), SPxSolver::dim(), SPxId::isSPxRowId(), SPxSolver::LEAVE, SPxLPBase< R >::number(), and SPxSolver::type().
Referenced by SPxSolver::init(), SPxSolver::reinitializeVecs(), SPxSolver::solve(), and SPxSolver::terminate().
|
protected |
Definition at line 472 of file spxvecs.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), soplex::EQ(), soplex::infinity, SPxLPBase< R >::maxObj(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::theLCbound, and SPxSolver::theUCbound.
Referenced by SPxSolver::computeLeaveCoPrhs().
|
protected |
Definition at line 441 of file spxvecs.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::desc(), soplex::EQ(), soplex::infinity, SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::theLRbound, and SPxSolver::theURbound.
Referenced by SPxSolver::computeLeaveCoPrhs().
Compute the primal ray or the farkas proof in case of unboundedness or infeasibility.
Definition at line 1164 of file enter.cpp.
References DSVectorBase< R >::add(), SPxBasis::baseId(), SVectorBase< R >::clear(), UpdateVector::delta(), SPxSolver::delta(), SPxSolver::fVec(), SPxId::isSPxColId(), SPxLPBase< R >::number(), SPxSolver::primalRay, DSVectorBase< R >::setMax(), soplex::sign(), SSVectorBase< R >::size(), ClassArray< Nonzero< R > >::size(), and SPxSolver::value().
Referenced by SPxSolver::enter().
|
protected |
Definition at line 694 of file leave.cpp.
References DSVectorBase< R >::add(), SVectorBase< R >::clear(), SPxSolver::coPvec(), UpdateVector::delta(), SPxSolver::delta(), SPxSolver::primalRay, DSVectorBase< R >::setMax(), soplex::sign(), SSVectorBase< R >::size(), ClassArray< Nonzero< R > >::size(), and SPxSolver::value().
Referenced by SPxSolver::leave().
Real computePvec | ( | int | i | ) |
compute and return pVec()[i].
Definition at line 183 of file enter.cpp.
References SPxSolver::thePvec, and SPxSolver::vector().
Referenced by SPxParMultPR::selectEnter().
void computePvec | ( | ) |
compute entire pVec().
When computing the copricing vector, we expect the pricing vector to be setup correctly. Then computing the copricing vector is nothing but computing all scalar products of the pricing vector with the vectors of the LPs constraint matrix.
Definition at line 526 of file spxvecs.cpp.
References SPxSolver::coDim(), SPxSolver::thePvec, and SPxSolver::vector().
Referenced by SPxSolver::enter(), SPxSolver::factorize(), SPxSolver::getEnterVals(), SPxSolver::init(), SPxSolver::reinitializeVecs(), SPxSolver::setPricing(), SPxSolver::solve(), and SPxSolver::terminate().
Real computeTest | ( | int | i | ) |
compute and return test()[i] in ENTERing Simplex.
Definition at line 189 of file enter.cpp.
References SPxBasis::desc(), SPxSolver::isBasic(), SPxBasis::Desc::status(), SPxSolver::test(), and SPxSolver::theTest.
Referenced by SPxParMultPR::selectEnter().
void computeTest | ( | ) |
compute test vector in ENTERing Simplex.
Definition at line 108 of file enter.cpp.
References DIdxSet::addIdx(), IdxSet::clear(), SPxSolver::coDim(), DENSEROUNDS, SPxBasis::desc(), SPxSolver::hyperPricingEnter, SPxSolver::infeasibilitiesCo, SPxSolver::isBasic(), SPxSolver::isInfeasibleCo, SPxSolver::leavetol(), SPxSolver::m_pricingViolCo, SPxSolver::m_pricingViolCoUpToDate, IdxSet::max(), MSG_INFO2, SPxPricer::NOT_VIOLATED, SPxOut::precision(), SPxSolver::remainingRoundsEnterCo, IdxSet::size(), SPxSolver::sparsePricingEnterCo, SPxSolver::sparsePricingFactor, SPxSolver::spxout, SPxBasis::Desc::status(), SPxSolver::test(), SPxSolver::theTest, and SPxPricer::VIOLATED.
Referenced by SPxSolver::enter(), SPxSolver::factorize(), SPxSolver::getEnterVals(), SPxSolver::init(), SPxSolver::reinitializeVecs(), SPxSolver::setPricing(), SPxSolver::solve(), and SPxSolver::terminate().
const Vector& coPrhs | ( | ) | const |
Right-hand side vector for coPvec.
The vector coPvec is computed by solving a linear system with the basis matrix and coPrhs as the right-hand side vector. For column basis representation, coPrhs is build up of the objective vector elements of all basic variables. For a row basis, it consists of the tight bounds of all basic constraints.
Definition at line 1411 of file spxsolver.h.
Referenced by SPxSolver::factorize(), and SPxSolver::value().
UpdateVector& coPvec | ( | ) | const |
copricing vector.
The copricing vector coPvec along with the pricing vector pVec are used for pricing in the ENTERing Simplex algorithm, i.e. one variable is selected, that violates its bounds. In contrast to this, the LEAVEing Simplex algorithm keeps both vectors within their bounds.
Definition at line 1398 of file spxsolver.h.
Referenced by SPxSolver::computeDualfarkas4Col(), SPxSolver::computePrimalray4Row(), SPxDevexPR::entered4(), SPxSteepPR::entered4(), SPxSolver::factorize(), SPxBoundFlippingRT::flipAndUpdate(), SPxBoundFlippingRT::getData(), SPxSolver::getPrimal(), SPxDevexPR::left4(), SPxSteepPR::left4(), SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxSteepPR::selectLeave(), SPxSolver::setDual(), SPxSolver::setPrimal(), SPxFastRT::shortEnter(), and SPxSolver::value().
const Vector& coTest | ( | ) | const |
violations of coPvec.
In entering Simplex pricing selects checks vectors coPvec() and pVec() for violation of its bounds. coTest() contains the violations for coPvec() which are indicated by a negative value. That is, if coTest()[i] < 0, the i
'th element of coPvec() is violated by -coTest()[i].
Definition at line 1465 of file spxsolver.h.
Referenced by SPxDevexPR::buildBestPriceVectorEnterDim(), SPxSteepPR::buildBestPriceVectorEnterDim(), SPxSolver::computeCoTest(), SPxSolver::getEnterVals(), SPxSolver::qualRedCostViolation(), SPxParMultPR::selectEnter(), SPxWeightPR::selectEnter(), SPxDantzigPR::selectEnterDenseDim(), SPxDevexPR::selectEnterDenseDim(), SPxSteepPR::selectEnterDenseDim(), SPxDevexPR::selectEnterHyperDim(), SPxSteepPR::selectEnterHyperDim(), SPxDantzigPR::selectEnterSparseDim(), SPxDevexPR::selectEnterSparseDim(), SPxSteepPR::selectEnterSparseDim(), and SPxSolver::updateCoTest().
|
private |
test coVector i
with status stat
.
Definition at line 203 of file enter.cpp.
References SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxSolver::ENTER, SPxSolver::isBasic(), SPxLPBase< Real >::lower(), SPxLPBase< R >::maxRowObj(), SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::theCoPvec, SPxSolver::type(), and SPxLPBase< Real >::upper().
SPxBasis::Desc::Status covarStatus | ( | int | i | ) | const |
Status of i
'th covariable.
Definition at line 1257 of file spxsolver.h.
const SVector& coVector | ( | int | i | ) | const |
i
'th covector of LP.
i
'th, 0 <= i < dim(), covector of the loaded LP (with respect to the chosen representation). Definition at line 1201 of file spxsolver.h.
Referenced by SPxWeightST::generate().
Definition at line 1206 of file spxsolver.h.
Definition at line 1214 of file spxsolver.h.
coVector associated to p_id
.
p_id
(with respect to the chosen representation). If p_id
is a coid, a covector of the constraint matrix is returned, otherwise the corresponding unit vector is returned. Definition at line 1228 of file spxsolver.h.
Real cumulativeTime | ( | ) | const |
cumulative time spent in all calls to method solve().
Definition at line 2159 of file spxsolver.h.
Referenced by SPxSolver::isTimeLimitReached().
Real delta | ( | ) | const |
guaranteed primal and dual bound violation for optimal solution, returning the maximum of feastol() and opttol(), i.e., the less tight tolerance.
Definition at line 819 of file spxsolver.h.
Referenced by SPxSolver::computeDualfarkas4Col(), SPxSolver::computeDualfarkas4Row(), SPxSolver::computePrimalray4Col(), SPxSolver::computePrimalray4Row(), and SPxHarrisRT::degenerateEps().
int dim | ( | ) | const |
dimension of basis matrix.
Definition at line 1075 of file spxsolver.h.
Referenced by SPxDevexPR::addedCoVecs(), SPxSteepPR::addedCoVecs(), SPxSolver::computeCoTest(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeFrhs2(), SPxSolver::computeFtest(), SPxSolver::computeLeaveCoPrhs(), SPxBasis::dump(), SPxSolver::enter(), SPxBoundFlippingRT::flipAndUpdate(), SPxWeightST::generate(), SPxSolver::getDualNorms(), SPxSolver::getNdualNorms(), SPxSolver::getPrimal(), SPxSolver::getRedCost(), SPxSolver::getSlacks(), SPxSolver::hyperPricing(), SPxSolver::init(), SPxSolver::isBasisValid(), SPxDevexPR::isConsistent(), SPxSteepPR::isConsistent(), SPxBasis::isConsistent(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxParMultPR::load(), SPxSteepPR::load(), SPxBasis::loadDesc(), SPxBasis::loadMatrixVecs(), SPxSolver::maxInfeas(), SPxBasis::multBaseWith(), SPxBasis::multWithBase(), SPxSolver::noViols(), SPxSolver::performSolutionPolishing(), SPxSolver::qualRedCostViolation(), SPxBasis::reDim(), SPxSolver::reDim(), SPxBasis::removedCol(), SPxSteepPR::removedCoVec(), SPxSteepPR::removedCoVecs(), SPxBasis::removedRow(), SPxParMultPR::selectEnter(), SPxDantzigPR::selectEnterDenseDim(), SPxSteepPR::selectEnterDenseDim(), SPxDantzigPR::selectLeave(), SPxParMultPR::selectLeave(), SPxWeightPR::selectLeave(), SPxSteepPR::selectLeaveX(), SPxSolver::setDualNorms(), SPxSolver::setEnterBounds(), SPxSolver::setLeaveBounds(), SPxSolver::setPrimal(), SPxSolver::setRedCost(), SPxDevexPR::setRep(), SPxSteepPR::setRep(), SPxSolver::setSlacks(), SPxHybridPR::setType(), SPxDevexPR::setType(), SPxWeightPR::setType(), SPxSteepPR::setType(), SPxSteepPR::setupWeights(), SPxDevexPR::setupWeights(), SPxSolver::shiftFvec(), SPxSolver::shiftPvec(), SPxSolver::solve(), SPxSolver::terminate(), SPxSolver::testBounds(), SPxSolver::testVecs(), and SPxSolver::unShift().
|
protectedvirtual |
Definition at line 554 of file spxvecs.cpp.
References SPxSolver::FULL, SPxSolver::pricing(), SPxSolver::theCoPvec, SPxSolver::thePvec, and UpdateVector::update().
Referenced by SPxSolver::enter(), and SPxSolver::leave().
|
protectedvirtual |
Reimplemented from SPxLPBase< R >.
Definition at line 118 of file changesoplex.cpp.
References SPxLPBase< Real >::doRemoveCol(), SPxBasis::DUAL, SPxSolver::forceRecompNonbasicValue(), SPxBasis::NO_PROBLEM, SPxBasis::OPTIMAL, SPxBasis::PRIMAL, SPxBasis::REGULAR, SPxBasis::removedCol(), SPxSolver::setBasisStatus(), SPxBasis::status(), SPxBasis::UNBOUNDED, and SPxSolver::unInit().
|
protectedvirtual |
Reimplemented from SPxLPBase< R >.
Definition at line 147 of file changesoplex.cpp.
References SPxLPBase< Real >::doRemoveCols(), SPxBasis::DUAL, SPxSolver::forceRecompNonbasicValue(), SPxBasis::NO_PROBLEM, SPxBasis::OPTIMAL, SPxBasis::PRIMAL, SPxBasis::REGULAR, SPxBasis::removedCols(), SPxSolver::setBasisStatus(), SPxBasis::status(), SPxBasis::UNBOUNDED, and SPxSolver::unInit().
|
protectedvirtual |
Reimplemented from SPxLPBase< R >.
Definition at line 62 of file changesoplex.cpp.
References SPxLPBase< Real >::doRemoveRow(), SPxBasis::DUAL, SPxBasis::INFEASIBLE, SPxBasis::NO_PROBLEM, SPxBasis::OPTIMAL, SPxBasis::PRIMAL, SPxBasis::REGULAR, SPxBasis::removedRow(), SPxSolver::setBasisStatus(), SPxBasis::status(), and SPxSolver::unInit().
|
protectedvirtual |
Reimplemented from SPxLPBase< R >.
Definition at line 90 of file changesoplex.cpp.
References SPxLPBase< Real >::doRemoveRows(), SPxBasis::DUAL, SPxBasis::INFEASIBLE, SPxBasis::NO_PROBLEM, SPxBasis::OPTIMAL, SPxBasis::PRIMAL, SPxBasis::REGULAR, SPxBasis::removedRows(), SPxSolver::setBasisStatus(), SPxBasis::status(), and SPxSolver::unInit().
int dualDegeneratePivots | ( | ) |
get number of dual degenerate pivots
Definition at line 2094 of file spxsolver.h.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
int dualIterations | ( | ) |
return number of iterations done with primal algorithm
Definition at line 2131 of file spxsolver.h.
|
private |
let id enter the basis and manage leaving of another one.
false
if LP is unbounded/infeasible. Definition at line 1204 of file enter.cpp.
References SPxBasis::baseId(), SPxBasis::baseVec(), SPxSolver::boundflips, SPxBasis::change(), SPxSolver::COLUMN, SPxSolver::computeCoTest(), SPxSolver::computeDualfarkas4Row(), SPxSolver::computePrimalray4Col(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxBasis::coSolve(), SPxSolver::coSolveVector2, SPxSolver::coSolveVector2rhs, SPxSolver::coSolveVector3, SPxSolver::coSolveVector3rhs, SPxBasis::Desc::D_FREE, UpdateVector::delta(), SPxBasis::desc(), SSVectorBase< R >::dim(), SPxSolver::dim(), SPxSolver::doPupdate(), SPxSolver::ENTER, SPxSolver::enterCycles, SPxSolver::entertol(), SPxSolver::enterVector(), SPxSolver::epsilon(), SPxSolver::factorize(), SPxSolver::FULL, SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxBasis::INFEASIBLE, soplex::infinity, SPxSolver::initialized, SPxSolver::instableEnter, SPxSolver::instableEnterId, SPxSolver::instableEnterVal, UpdateVector::isConsistent(), SSVectorBase< R >::isConsistent(), SSVectorBase< R >::isSetup(), SPxId::isSPxColId(), SPxId::isValid(), SPxBasis::lastUpdate(), VectorBase< R >::length(), SPxSolver::m_maxCycle, SPxSolver::m_numCycle, MSG_DEBUG, MSG_INFO2, MSG_INFO3, VectorBase< R >::multAdd(), SPxBasis::multBaseWith(), soplex::NE(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxSolver::perturbMaxEnter(), SPxSolver::perturbMinEnter(), SPxSolver::pricing(), SPxSolver::recomputedVectors, SPxSolver::rejectEnter(), SPxSolver::rep(), SPxSolver::ROW, SPxRatioTester::selectLeave(), SPxSolver::setBasisStatus(), SPxSolver::setupPupdate(), SPxBasis::SINGULAR, SSVectorBase< R >::size(), SPxBasis::solve4update(), soplex::spxAbs(), SPxSolver::spxout, SPxBasis::status(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::thecovectors, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::thePvec, SPxSolver::theratiotester, SPxSolver::theUBbound, SPxSolver::totalboundflips, SPxSolver::type(), SPxBasis::UNBOUNDED, SPxSolver::ungetEnterVal(), SPxSolver::unitVecs, UpdateVector::update(), SPxSolver::updateCoTest(), SPxSolver::updateNonbasicValue(), SPxSolver::updateTest(), UpdateVector::value(), and SPxException::what().
Referenced by SPxSolver::performSolutionPolishing(), and SPxSolver::solve().
Real entertol | ( | ) | const |
feasibility tolerance maintained by ratio test during ENTER algorithm.
Definition at line 789 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::enter(), SPxSolver::factorize(), SPxSolver::init(), SPxSolver::leave(), SPxSolver::performSolutionPolishing(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMinEnter(), SPxSolver::shiftFvec(), SPxSolver::solve(), SPxSolver::terminate(), SPxSolver::testBounds(), SPxSolver::testVecs(), SPxSolver::unShift(), and SPxSolver::updateFtest().
Get pointer to the id
'th vector.
Definition at line 1896 of file spxsolver.h.
Referenced by SPxSolver::enter(), and SPxSolver::leave().
Real epsilon | ( | ) | const |
values \(|x| < \epsilon\) are considered to be 0.
if you want another value for epsilon, use Param::setEpsilon().
Definition at line 784 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxDevexPR::entered4(), SPxSteepPR::entered4(), SPxSteepPR::isConsistent(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinEnter(), SPxSolver::perturbMinLeave(), SPxSolver::qualBoundViolation(), SPxSolver::qualConstraintViolation(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxDefaultRT::selectLeave(), SPxHarrisRT::selectLeave(), SPxFastRT::selectLeave(), SPxWeightST::setPrimalStatus(), SPxSteepPR::setType(), SPxSteepPR::setupWeights(), SPxVectorST::setupWeights(), SPxWeightST::setupWeights(), SPxSolver::shiftFvec(), SPxSolver::shiftPvec(), SPxSolver::solve(), SPxSolver::terminate(), SPxSolver::updateFtest(), and SPxSolver::writeState().
|
virtual |
Factorize basis matrix.
SPxStatusException | if loaded matrix is singular |
Reimplemented from SPxBasis.
Definition at line 557 of file spxsolver.cpp.
References SPxSolver::computeCoTest(), SPxSolver::computeFrhs(), SPxSolver::computeFtest(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxSolver::coPrhs(), SPxSolver::coPvec(), SPxBasis::coSolve(), DEFAULT_BND_VIOL, SPxSolver::ENTER, SPxSolver::entertol(), SPxBasis::factorize(), SPxSolver::feastol(), SPxSolver::fRhs(), SPxSolver::FULL, SPxSolver::fVec(), SPxSolver::init(), SPxSolver::initialized, SPxBasis::iteration(), SPxSolver::LEAVE, VectorBase< R >::length(), SPxSolver::m_pricingViol, SPxSolver::m_pricingViolCo, SPxSolver::m_status, MSG_DEBUG, MSG_INFO1, MSG_INFO3, SPxBasis::multBaseWith(), SPxBasis::multWithBase(), SPxSolver::opttol(), SPxSolver::pricing(), SPxSolver::pVec(), SPxBasis::REGULAR, SPxSolver::rep(), SPxSolver::ROW, SPxBasis::SINGULAR, SPxSolver::SINGULAR, SPxBasis::solve(), SPxSolver::spxout, SPxBasis::status(), SPxSolver::testVecs(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theFrhs, SPxSolver::theFvec, and SPxSolver::type().
Referenced by SoPlex::_solveRealStable(), SPxSolver::enter(), SPxSolver::leave(), SPxSolver::solve(), and SPxSolver::terminate().
Real feastol | ( | ) | const |
allowed primal feasibility tolerance.
Definition at line 803 of file spxsolver.h.
Referenced by SoPlex::_checkBasisScaling(), SoPlex::_checkScaling(), SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_solveRealStable(), SoPlex::_verifySolutionReal(), SPxSolver::factorize(), SPxSolver::getDegeneracyLevel(), SPxSolver::initRep(), SPxSolver::precisionReached(), SPxSolver::solve(), SPxSolver::varStatusToBasisStatusRow(), and SPxSolver::writeState().
void forceRecompNonbasicValue | ( | ) |
Definition at line 670 of file spxsolver.h.
Referenced by SoPlex::_storeSolutionReal(), SPxSolver::changeCol(), SPxSolver::changeElement(), SPxSolver::changeLhs(), SPxSolver::changeLhsStatus(), SPxSolver::changeLower(), SPxSolver::changeLowerStatus(), SPxSolver::changeMaxObj(), SPxSolver::changeObj(), SPxSolver::changeRange(), SPxSolver::changeRhs(), SPxSolver::changeRhsStatus(), SPxSolver::changeRow(), SPxSolver::changeRowObj(), SPxSolver::changeUpper(), SPxSolver::changeUpperStatus(), SPxSolver::clear(), SPxSolver::doRemoveCol(), SPxSolver::doRemoveCols(), SPxSolver::initRep(), SPxSolver::leave(), SPxSolver::reLoad(), SPxSolver::setBasis(), SPxSolver::setType(), and SPxSolver::solve().
const Vector& fRhs | ( | ) | const |
right-hand side vector for fVec
The feasibility vector is computed by solving a linear system with the basis matrix. The right-hand side vector of this system is referred to as feasibility, right-hand side vector fRhs().
For a row basis, fRhs() is the objective vector (ignoring shifts). For a column basis, it is the sum of all nonbasic vectors scaled by the factor of their bound.
Definition at line 1336 of file spxsolver.h.
Referenced by SPxSolver::factorize(), SPxSolver::leave(), SPxSolver::solve(), and SPxSolver::value().
const Vector& fTest | ( | ) | const |
Violations of fVec.
For the leaving Simplex algorithm, pricing involves selecting a variable from fVec that violates its bounds that is to leave the basis. When a SPxPricer is called to select such a leaving variable, fTest() contains the vector of violations: For fTest()[i] < 0, the i
'th basic variable violates one of its bounds by the given value. Otherwise no bound is violated.
Definition at line 1385 of file spxsolver.h.
Referenced by SPxDevexPR::buildBestPriceVectorLeave(), SPxSteepPR::buildBestPriceVectorLeave(), SPxSolver::qualRedCostViolation(), SPxBoundFlippingRT::selectEnter(), SPxDantzigPR::selectLeave(), SPxParMultPR::selectLeave(), SPxWeightPR::selectLeave(), SPxDevexPR::selectLeaveHyper(), SPxSteepPR::selectLeaveHyper(), SPxDantzigPR::selectLeaveSparse(), SPxDevexPR::selectLeaveSparse(), SPxSteepPR::selectLeaveSparse(), SPxDevexPR::selectLeaveX(), SPxSteepPR::selectLeaveX(), SPxSolver::solve(), and SPxSolver::updateFtest().
UpdateVector& fVec | ( | ) | const |
feasibility vector.
This method return the feasibility vector. If it satisfies its bound, the basis is called feasible (independently of the chosen representation). The feasibility vector has dimension dim().
For the entering Simplex, fVec is kept within its bounds. In contrast to this, the pricing of the leaving Simplex selects an element of fVec, that violates its bounds.
Definition at line 1323 of file spxsolver.h.
Referenced by SoPlex::_updateDecompReducedProblemViol(), SPxSolver::computeDualfarkas4Row(), SPxSolver::computePrimalray4Col(), SPxDevexPR::entered4(), SPxSteepPR::entered4(), SPxSolver::factorize(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getDual(), SoPlex::getOriginalProblemBasisColStatus(), SPxSolver::getPrimal(), SPxSolver::getRedCost(), SPxSolver::leave(), SPxDevexPR::left4(), SPxSteepPR::left4(), SPxFastRT::maxDelta(), SPxFastRT::maxReLeave(), SPxFastRT::maxSelect(), SPxFastRT::maxShortLeave(), SPxFastRT::minDelta(), SPxFastRT::minReLeave(), SPxFastRT::minSelect(), SPxFastRT::minShortLeave(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMinEnter(), SPxSolver::printDisplayLine(), SPxSteepPR::selectEnter(), SPxDefaultRT::selectLeave(), SPxHarrisRT::selectLeave(), SPxFastRT::selectLeave(), SPxBoundFlippingRT::selectLeave(), SPxSolver::setDual(), SPxSolver::setPrimal(), SPxSolver::setRedCost(), SPxSolver::solve(), SPxSolver::terminate(), and SPxSolver::value().
SPxSolver::Status getBasis | ( | VarStatus | rows[], |
VarStatus | cols[], | ||
const int | rowsSize = -1 , |
||
const int | colsSize = -1 |
||
) | const |
get current basis, and return solver status.
Definition at line 1900 of file spxsolver.cpp.
References SPxSolver::basisStatusToVarStatus(), SPxBasis::Desc::colStatus(), SPxBasis::desc(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxBasis::Desc::rowStatus(), and SPxSolver::status().
Referenced by SoPlex::_decompResolveWithoutPreprocessing(), SoPlex::_evaluateSolutionDecomp(), SoPlex::_formDecompReducedProblem(), SoPlex::_optimizeRational(), SoPlex::_resolveWithoutPreprocessing(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealForRational(), SoPlex::_storeSolutionReal(), SoPlex::_storeSolutionRealFromPresol(), and SoPlex::getBasis().
SPxSolver::VarStatus getBasisColStatus | ( | int | col | ) | const |
gets basis status for a single column
Definition at line 1894 of file spxsolver.cpp.
References SPxSolver::basisStatusToVarStatus(), SPxBasis::desc(), and SPxLPBase< R >::nCols().
Referenced by SoPlex::basisColStatus().
SPxSolver::VarStatus getBasisRowStatus | ( | int | row | ) | const |
gets basis status for a single row
Definition at line 1888 of file spxsolver.cpp.
References SPxSolver::basisStatusToVarStatus(), SPxBasis::desc(), and SPxLPBase< R >::nRows().
Referenced by SoPlex::basisRowStatus().
SPxBasis::SPxStatus getBasisStatus | ( | ) | const |
gets basis status
Definition at line 2039 of file spxsolver.h.
bool getComputeDegeneracy | ( | ) | const |
returns whether the degeneracy is computed in each iteration
Definition at line 2240 of file spxsolver.h.
Referenced by SPxSolver::terminate().
int getDecompIterationLimit | ( | ) | const |
returns the iteration limit for the decomposition simplex initialisation
Definition at line 2266 of file spxsolver.h.
Referenced by SPxSolver::terminate().
DecompStatus getDecompStatus | ( | ) | const |
returns whether a basis needs to be found for the improved dual simplex
Definition at line 2224 of file spxsolver.h.
int getDegenCompOffset | ( | ) | const |
gets the offset for the number of iterations before the degeneracy is computed
Definition at line 2254 of file spxsolver.h.
Referenced by SPxSolver::terminate().
get level of dual degeneracy
Definition at line 1997 of file spxsolver.cpp.
References SPxSolver::COLUMN, SPxSolver::ENTER, SPxSolver::feastol(), soplex::isZero(), SPxSolver::LEAVE, SPxLPBase< R >::maxObj(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxSolver::rep(), SPxSolver::ROW, and SPxSolver::type().
Referenced by SoPlex::_solveDecompositionDualSimplex(), SPxSolver::printDisplayLine(), and SPxSolver::terminate().
int getDisplayFreq | ( | ) |
get display frequency
Definition at line 852 of file spxsolver.h.
|
virtual |
get current solution vector for dual variables.
This method returns the Status of the basis. If it is REGULAR or better, the vector of dual variables of the current basis will be copied to the argument vector
. Hence, vector
must be of dimension nRows().
SPxStatusException | if no problem loaded |
Definition at line 1899 of file spxsolve.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxSolver::fVec(), SPxSolver::isInitialized(), SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::nCols(), SPxSolver::NO_PROBLEM, SPxLPBase< R >::nRows(), SPxLPBase< R >::number(), SPxSolver::rep(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxLPBase< R >::spxSense(), and SPxSolver::status().
Referenced by SoPlex::_decompResolveWithoutPreprocessing(), SoPlex::_resolveWithoutPreprocessing(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealForRational(), SoPlex::_storeSolutionReal(), and SPxSolver::getResult().
|
virtual |
get dual farkas proof of infeasibility.
SPxStatusException | if no problem loaded |
Definition at line 2030 of file spxsolve.cpp.
References VectorBase< R >::clear(), SPxSolver::dualFarkas, SPxBasis::INFEASIBLE, SPxSolver::isInitialized(), SPxBasis::status(), and SPxSolver::status().
Referenced by SoPlex::_solveRealForRational(), and SoPlex::_storeSolutionReal().
bool getDualNorms | ( | int & | nnormsRow, |
int & | nnormsCol, | ||
Real * | norms | ||
) | const |
get dual norms
Definition at line 2087 of file spxsolver.cpp.
References SPxSolver::coDim(), SPxSolver::COLUMN, SPxSolver::coWeights, VectorBase< R >::dim(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::LEAVE, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::type(), SPxSolver::weights, and SPxSolver::weightsAreSetup.
Referenced by SoPlex::getDualNorms().
|
protectedvirtual |
Definition at line 441 of file enter.cpp.
References SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxSolver::computePvec(), SPxSolver::computeTest(), SPxSolver::coTest(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), soplex::EQ(), SPxSolver::getEnterVals2(), soplex::infinity, SPxSolver::isBasic(), SPxId::isSPxColId(), SPxId::isSPxRowId(), SPxLPBase< R >::lhs(), SPxLPBase< Real >::lower(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), MSG_DEBUG, MSG_ERROR, SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theTest, SPxSolver::theUCbound, SPxSolver::theURbound, and SPxLPBase< Real >::upper().
Referenced by SPxSolver::enter(), and SPxSolver::updateCoTest().
|
protectedvirtual |
Definition at line 766 of file enter.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, UpdateVector::delta(), SPxBasis::desc(), SPxBasis::dualColStatus(), SPxBasis::dualRowStatus(), SPxId::isSPxColId(), SPxId::isSPxRowId(), SPxLPBase< R >::lhs(), SPxLPBase< R >::lower(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), MSG_DEBUG, MSG_ERROR, SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theCoPvec, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theUBbound, SPxSolver::theUCbound, SPxSolver::theURbound, and SPxLPBase< R >::upper().
Referenced by SPxSolver::enter(), and SPxSolver::getEnterVals().
|
virtual |
Definition at line 898 of file spxsolver.h.
Referenced by SoPlex::_optimizeReal().
|
protectedvirtual |
Definition at line 196 of file leave.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::desc(), SPxBasis::dualColStatus(), SPxBasis::dualRowStatus(), soplex::infinity, SPxSolver::isBasic(), SPxId::isSPxColId(), SPxId::isSPxRowId(), SPxLPBase< R >::lhs(), SPxLPBase< Real >::lower(), SPxLPBase< R >::maxObj(), MSG_DEBUG, SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theUBbound, SPxSolver::theUCbound, SPxSolver::theURbound, and SPxLPBase< Real >::upper().
Referenced by SPxSolver::leave().
|
protectedvirtual |
Definition at line 402 of file leave.cpp.
References SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, UpdateVector::delta(), SPxBasis::desc(), SPxBasis::dualColStatus(), SPxBasis::dualRowStatus(), soplex::infinity, SPxId::isSPxColId(), SPxId::isSPxRowId(), SPxLPBase< R >::lhs(), SPxLPBase< Real >::lower(), SPxLPBase< R >::lower(), MSG_DEBUG, MSG_ERROR, SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theCoPvec, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::thePvec, SPxSolver::theUCbound, SPxSolver::theURbound, SPxLPBase< R >::upper(), and SPxLPBase< Real >::upper().
Referenced by SPxSolver::leave().
void getLhs | ( | Vector & | p_lhs | ) | const |
copy lhs value vector to p_lhs
.
Definition at line 2194 of file spxsolver.h.
void getLower | ( | Vector & | p_low | ) | const |
copy lower bound vector to p_low
.
Definition at line 2183 of file spxsolver.h.
int getMaxIters | ( | ) |
the maximum number of iterations
Definition at line 2165 of file spxsolver.h.
Real getMaxTime | ( | ) |
the maximum runtime
Definition at line 2153 of file spxsolver.h.
Referenced by SoPlex::decompTerminate().
void getNdualNorms | ( | int & | nnormsRow, |
int & | nnormsCol | ||
) | const |
get number of dual norms
Definition at line 2062 of file spxsolver.cpp.
References SPxSolver::coDim(), SPxSolver::COLUMN, SPxSolver::coWeights, VectorBase< R >::dim(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::LEAVE, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::type(), SPxSolver::weights, and SPxSolver::weightsAreSetup.
Referenced by SoPlex::getNdualNorms().
|
virtual |
get solution vector for primal variables.
This method returns the Status of the basis. If it is REGULAR or better, the primal solution vector of the current basis will be copied to the argument vector
. Hence, vector
must be of dimension nCols().
SPxStatusException | if not initialized |
Definition at line 1842 of file spxsolve.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::colStatus(), SPxSolver::coPvec(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxSolver::dim(), SPxSolver::fVec(), SPxSolver::isInitialized(), SPxId::isSPxColId(), SPxLPBase< Real >::lower(), SPxLPBase< R >::nCols(), SPxSolver::NO_PROBLEM, SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::status(), and SPxLPBase< Real >::upper().
Referenced by SoPlex::_decompResolveWithoutPreprocessing(), SoPlex::_findViolatedRows(), SoPlex::_resolveWithoutPreprocessing(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealForRational(), SoPlex::_storeSolutionReal(), SPxSolver::getResult(), SPxSolver::qualBoundViolation(), SPxSolver::qualConstraintViolation(), SPxSolver::qualSlackViolation(), SPxSolver::solve(), and SPxSolver::terminate().
|
virtual |
get primal ray in case of unboundedness.
SPxStatusException | if no problem loaded |
Definition at line 2012 of file spxsolve.cpp.
References VectorBase< R >::clear(), SPxSolver::isInitialized(), SPxSolver::primalRay, SPxBasis::status(), SPxSolver::status(), and SPxBasis::UNBOUNDED.
Referenced by SoPlex::_storeSolutionReal().
|
virtual |
get vector of reduced costs.
This method returns the Status of the basis. If it is REGULAR or better, the vector of reduced costs of the current basis will be copied to the argument vector
. Hence, vector
must be of dimension nCols().
Let d denote the vector of dual variables, as defined above, and A the LPs constraint matrix. Then the reduced cost vector r is defined as \(r^T = c^T - d^TA\).
SPxStatusException | if no problem loaded |
Definition at line 1951 of file spxsolve.cpp.
References SPxBasis::baseId(), VectorBase< R >::clear(), SPxBasis::Desc::colStatus(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxSolver::dim(), SPxSolver::fVec(), SPxSolver::isInitialized(), SPxLPBase< R >::maxObj(), SPxLPBase< Real >::MINIMIZE, SPxLPBase< R >::nCols(), SPxLPBase< R >::number(), SPxSolver::rep(), SPxSolver::ROW, SPxLPBase< R >::spxSense(), and SPxSolver::status().
Referenced by SoPlex::_decompResolveWithoutPreprocessing(), SoPlex::_findViolatedRows(), SoPlex::_resolveWithoutPreprocessing(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealForRational(), SoPlex::_storeSolutionReal(), SoPlex::_updateDecompReducedProblem(), and SPxSolver::getResult().
SPxSolver::Status getResult | ( | Real * | value = 0 , |
Vector * | primal = 0 , |
||
Vector * | slacks = 0 , |
||
Vector * | dual = 0 , |
||
Vector * | reduCost = 0 |
||
) |
get all results of last solve.
Definition at line 2271 of file spxsolve.cpp.
References SPxSolver::getDual(), SPxSolver::getPrimal(), SPxSolver::getRedCost(), SPxSolver::getSlacks(), SPxSolver::status(), and SPxSolver::value().
void getRhs | ( | Vector & | p_rhs | ) | const |
copy rhs value vector to p_rhs
.
Definition at line 2200 of file spxsolver.h.
|
virtual |
get vector of slack variables.
This method returns the Status of the basis. If it is REGULAR or better, the slack variables of the current basis will be copied to the argument vector
. Hence, vector
must be of dimension nRows().
SPxStatusException | if no problem loaded |
Definition at line 2048 of file spxsolve.cpp.
References SPxBasis::baseId(), SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), SPxSolver::dim(), SPxSolver::isInitialized(), SPxLPBase< R >::lhs(), SPxLPBase< R >::nRows(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::pVec(), SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxBasis::Desc::rowStatus(), and SPxSolver::status().
Referenced by SoPlex::_decompResolveWithoutPreprocessing(), SoPlex::_resolveWithoutPreprocessing(), SoPlex::_solveRealForRational(), SoPlex::_storeSolutionReal(), SPxSolver::getResult(), and SPxSolver::qualSlackViolation().
SolutionPolish getSolutionPolishing | ( | ) |
return objective of solution polishing
Definition at line 650 of file spxsolver.h.
Timer::TYPE getTiming | ( | ) |
set timing type
Definition at line 839 of file spxsolver.h.
void getUpper | ( | Vector & | p_up | ) | const |
copy upper bound vector to p_up
.
Definition at line 2188 of file spxsolver.h.
void hyperPricing | ( | bool | h | ) |
enable or disable hyper sparse pricing
Definition at line 1014 of file spxsolver.cpp.
References SPxSolver::coDim(), SPxSolver::dim(), SPxSolver::hyperPricingEnter, SPxSolver::hyperPricingLeave, DIdxSet::setMax(), SPxSolver::updateViols, and SPxSolver::updateViolsCo.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
SPxId id | ( | int | i | ) | const |
id of i
'th vector.
The i
'th Id is the i
'th SPxRowId for a rowwise and the i
'th SPxColId for a columnwise basis represenation. Hence, 0 <= i < coDim().
Definition at line 1098 of file spxsolver.h.
References SPxLPBase< Real >::cId(), SPxSolver::coId(), and SPxLPBase< Real >::rId().
Referenced by SPxDevexPR::buildBestPriceVectorEnterCoDim(), SPxSteepPR::buildBestPriceVectorEnterCoDim(), SPxBoundFlippingRT::getData(), SPxFastRT::maxDelta(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minSelect(), SPxSolver::performSolutionPolishing(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxParMultPR::selectEnter(), SPxDantzigPR::selectEnterDenseCoDim(), SPxDevexPR::selectEnterDenseCoDim(), SPxSteepPR::selectEnterDenseCoDim(), SPxDevexPR::selectEnterHyperCoDim(), SPxSteepPR::selectEnterHyperCoDim(), SPxDantzigPR::selectEnterSparseCoDim(), SPxDevexPR::selectEnterSparseCoDim(), and SPxSteepPR::selectEnterSparseCoDim().
|
virtual |
intialize data structures.
If SPxSolver is not initialized, the method solve() calls init() to setup all vectors and internal data structures. Most of the other methods within this section are called by init().
Derived classes should add the initialization of additional data structures by overriding this method. Don't forget, however, to call SPxSolver::init().
Definition at line 319 of file spxsolver.cpp.
References SPxSolver::clearUpdateVecs(), SPxSolver::coDim(), SPxSolver::COLUMN, SPxSolver::computeCoTest(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeFrhs(), SPxSolver::computeFtest(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxBasis::coSolve(), SPxBasis::desc(), SPxSolver::dim(), SPxBasis::DUAL, SPxSolver::ENTER, SPxSolver::entertol(), SPxBasis::factorize(), SPxBasis::factorized, SPxSolver::infeasibilities, SPxSolver::infeasibilitiesCo, SPxSolver::initialized, SPxSolver::isInfeasible, SPxSolver::isInfeasibleCo, SPxSolver::lastShift, SPxSolver::leavetol(), SPxRatioTester::load(), SPxPricer::load(), SPxBasis::load(), SPxBasis::loadDesc(), SPxSolver::m_numCycle, SPxBasis::matrixIsSetup, SPxBasis::NO_PROBLEM, SPxBasis::PRIMAL, SPxSolver::reDim(), SPxSolver::rep(), DataArray< T >::reSize(), SPxBasis::restoreInitialBasis(), SPxSolver::ROW, SPxSolver::setBasisStatus(), SPxRatioTester::setDelta(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxSolver::setEnterBounds(), SPxSolver::setLeaveBounds(), DIdxSet::setMax(), SPxSolver::setPrimalBounds(), SPxSolver::shiftFvec(), SPxSolver::shiftPvec(), SPxBasis::SINGULAR, SPxBasis::solve(), SPxBasis::solver(), SPxBasis::status(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::thepricer, SPxSolver::theratiotester, SPxSolver::theShift, and SPxSolver::type().
Referenced by SoPlex::_formDecompComplementaryProblem(), SoPlex::_loadRealLP(), SPxSolver::factorize(), SPxWeightST::generate(), SPxSolver::performSolutionPolishing(), SPxSolver::solve(), and SPxSolver::unscaleLPandReloadBasis().
void initRep | ( | Representation | p_rep | ) |
initialize ROW or COLUMN representation.
Definition at line 197 of file spxsolver.cpp.
References SPxSolver::addVec, LPColSetBase< R >::colSet(), SPxSolver::COLUMN, SPxBasis::desc(), SPxSolver::dualRhs, SPxSolver::dualVec, SPxSolver::feastol(), SPxSolver::forceRecompNonbasicValue(), SPxBasis::loadDesc(), SPxBasis::NO_PROBLEM, SPxSolver::opttol(), SPxSolver::primRhs, SPxSolver::primVec, SPxSolver::reDim(), SPxSolver::ROW, LPRowSetBase< R >::rowSet(), SPxSolver::setFeastol(), SPxSolver::setOpttol(), SPxPricer::setRep(), SPxBasis::setRep(), SPxPricer::solver(), SPxBasis::status(), SPxSolver::theCoLbound, SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoUbound, SPxSolver::thecovectors, SPxSolver::theCPvec, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLbound, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::thepricer, SPxSolver::thePvec, SPxSolver::theRep, SPxSolver::theRPvec, SPxSolver::theUbound, SPxSolver::theUCbound, SPxSolver::theURbound, SPxSolver::thevectors, and SPxSolver::unInit().
Referenced by SPxSolver::setRep(), and SPxSolver::SPxSolver().
bool isBasic | ( | SPxBasis::Desc::Status | stat | ) | const |
does stat
describe a basic index ?
Definition at line 1263 of file spxsolver.h.
Referenced by SoPlex::_updateDecompReducedProblem(), SPxSolver::computeCoTest(), SPxSolver::computeFrhs(), SPxSolver::computeFrhs1(), SPxSolver::computeFrhs2(), SPxSolver::computeFrhsXtra(), SPxSolver::computeTest(), SPxSolver::coTest(), SPxBasis::dump(), SPxSolver::getEnterVals(), SPxSolver::getLeaveVals(), SPxSolver::leave(), SPxBasis::loadDesc(), SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxBasis::removedCol(), SPxBasis::removedCols(), SPxBasis::removedRow(), SPxBasis::removedRows(), SPxDefaultRT::selectEnter(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxSolver::shiftPvec(), SPxSolver::test(), SPxSolver::testVecs(), SPxSolver::unShift(), SPxSolver::updateCoTest(), and SPxSolver::updateTest().
bool isBasic | ( | const SPxId & | p_id | ) | const |
is the p_id
'th vector basic ?
Definition at line 1269 of file spxsolver.h.
bool isBasic | ( | const SPxRowId & | rid | ) | const |
is the rid
'th vector basic ?
Definition at line 1278 of file spxsolver.h.
bool isBasic | ( | const SPxColId & | cid | ) | const |
is the cid
'th vector basic ?
Definition at line 1284 of file spxsolver.h.
bool isBasic | ( | int | i | ) | const |
is the i
'th vector basic ?
Definition at line 1302 of file spxsolver.h.
check a given basis for validity.
Definition at line 1920 of file spxsolver.cpp.
References SPxSolver::BASIC, SPxSolver::dim(), SPxSolver::FIXED, soplex::infinity, SPxLPBase< R >::lhs(), SPxLPBase< R >::lower(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxSolver::ON_LOWER, SPxSolver::ON_UPPER, SPxLPBase< R >::rhs(), DataArray< T >::size(), SPxSolver::UNDEFINED, and SPxLPBase< R >::upper().
bool isCoBasic | ( | int | i | ) | const |
is the i
'th covector basic ?
Definition at line 1308 of file spxsolver.h.
Referenced by SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxBoundFlippingRT::selectEnter(), and SPxSolver::testVecs().
bool isCoId | ( | const SPxId & | p_id | ) | const |
Is p_id
a CoId.
This method returns wheather or not p_id
identifies a coVector with respect to the chosen representation.
Definition at line 1144 of file spxsolver.h.
Referenced by SPxFastRT::maxReEnter(), SPxFastRT::minReEnter(), SPxFastRT::selectEnter(), and SPxFastRT::shortEnter().
bool isColBasic | ( | int | i | ) | const |
is the i
'th column vector basic ?
Definition at line 1296 of file spxsolver.h.
Referenced by SoPlex::getBasisInd(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SoPlex::getBasisInverseTimesVecReal(), SoPlex::multBasis(), SoPlex::multBasisTranspose(), and SPxSolver::solve().
bool isConsistent | ( | ) | const |
check consistency.
Miscellaneous
Definition at line 1513 of file spxsolver.cpp.
References SPxSolver::addVec, SPxSolver::coDim(), SPxSolver::COLUMN, UpdateVector::delta(), VectorBase< R >::dim(), SPxSolver::dim(), SPxSolver::dualRhs, SPxSolver::dualVec, SPxSolver::epsilon(), SSVectorBase< R >::getEpsilon(), SPxSolver::initialized, UpdateVector::isConsistent(), DVectorBase< R >::isConsistent(), SPxBasis::isConsistent(), SPxLPBase< Real >::isConsistent(), MSGinconsistent, SPxLPBase< Real >::nCols(), SPxLPBase< Real >::nRows(), SPxSolver::primRhs, SPxSolver::primVec, SPxSolver::rep(), SPxSolver::theCoLbound, SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theCoUbound, SPxSolver::thecovectors, SPxSolver::theCPvec, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLbound, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::thePvec, SPxSolver::theRPvec, SPxSolver::theTest, SPxSolver::theUBbound, SPxSolver::theUbound, SPxSolver::theUCbound, SPxSolver::theURbound, SPxSolver::thevectors, and SPxSolver::unitVecs.
Referenced by SPxSolver::operator=(), and SPxSolver::SPxSolver().
bool isId | ( | const SPxId & | p_id | ) | const |
Is p_id
an SPxId ?
This method returns wheather or not p_id
identifies a vector with respect to the chosen representation.
Definition at line 1135 of file spxsolver.h.
Referenced by SPxSolver::coId(), SPxFastRT::maxReEnter(), SPxFastRT::minReEnter(), SPxSolver::rejectEnter(), SPxParMultPR::selectEnter(), SPxFastRT::shortEnter(), and SPxSolver::ungetEnterVal().
|
protected |
has the internal data been initialized?
As long as an instance of SPxSolver is not initialized, no member contains setup data. Initialization is performed via method init(). Afterwards all data structures are kept up to date (even for all manipulation methods), until unInit() is called. However, some manipulation methods call unInit() themselfs.
Definition at line 1850 of file spxsolver.h.
Referenced by SPxSolver::changeLhsStatus(), SPxSolver::changeLowerStatus(), SPxSolver::changeRhsStatus(), SPxSolver::changeUpperStatus(), SPxSolver::getDual(), SPxSolver::getDualfarkas(), SPxSolver::getPrimal(), SPxSolver::getPrimalray(), SPxSolver::getRedCost(), SPxSolver::getSlacks(), SPxSolver::reDim(), SPxSolver::setDual(), SPxSolver::setPricer(), SPxSolver::setPrimal(), SPxSolver::setRedCost(), SPxSolver::setSlacks(), SPxSolver::setTester(), SPxSolver::solve(), SPxSolver::unShift(), and SPxSolver::value().
bool isRowBasic | ( | int | i | ) | const |
is the i
'th row vector basic ?
Definition at line 1290 of file spxsolver.h.
Referenced by SoPlex::getBasisInd(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SoPlex::getBasisInverseTimesVecReal(), SoPlex::getExpectedDualVariableSign(), SoPlex::multBasis(), SoPlex::multBasisTranspose(), and SPxSolver::solve().
bool isTimeLimitReached | ( | const bool | forceCheck = false | ) |
returns whether current time limit is reached; call to time() may be skipped unless forceCheck
is true
Definition at line 1657 of file spxsolver.cpp.
References SPxSolver::cumulativeTime(), soplex::infinity, MAXNCLCKSKIPS, SPxSolver::maxTime, SPxSolver::nCallsToTimelim, SPxSolver::nClckSkipsLeft, NINITCALLS, SAFETYFACTOR, and SPxSolver::time().
Referenced by SPxSolver::performSolutionPolishing(), SPxSteepPR::setupWeights(), and SPxSolver::terminate().
int iterations | ( | ) | const |
get number of iterations of current solution.
Definition at line 2118 of file spxsolver.h.
Referenced by SoPlex::_decompSimplifyAndSolve(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealLPAndRecordStatistics(), SPxSolver::performSolutionPolishing(), SPxAutoPR::setActivePricer(), and SPxSolver::solve().
const Vector& lbBound | ( | ) | const |
lower bound for fVec.
Definition at line 1359 of file spxsolver.h.
Referenced by SPxFastRT::maxDelta(), SPxFastRT::maxReLeave(), SPxFastRT::maxSelect(), SPxFastRT::maxShortLeave(), SPxFastRT::minDelta(), SPxFastRT::minReLeave(), SPxFastRT::minSelect(), SPxFastRT::minShortLeave(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMinEnter(), SPxDefaultRT::selectLeave(), SPxHarrisRT::selectLeave(), and SPxBoundFlippingRT::selectLeave().
Vector& lbBound | ( | ) |
lower bound for fVec, writable.
This method returns the lower bound for the feasibility vector. It may only be called for the ENTERing Simplex.
For the ENTERing Simplex algorithms, the feasibility vector is maintained to fullfill its bounds. As fVec itself, also its bound depend on the chosen representation. Further, they may need to be shifted (see below).
Definition at line 1372 of file spxsolver.h.
const Vector& lcBound | ( | ) | const |
Definition at line 1438 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), and SPxBoundFlippingRT::selectEnter().
Vector& lcBound | ( | ) |
lower bound for coPvec.
This method returns the lower bound for coPvec. It may only be called for the leaving Simplex algorithm.
For the leaving Simplex algorithms coPvec is maintained to fullfill its bounds. As coPvec itself, also its bound depend on the chosen representation. Further, they may need to be shifted (see below).
Definition at line 1452 of file spxsolver.h.
|
private |
let index i
leave the basis and manage entering of another one.
false
if LP is unbounded/infeasible. Definition at line 716 of file leave.cpp.
References SPxBasis::baseId(), SPxBasis::baseVec(), SPxSolver::basis(), SPxSolver::boundflips, SPxBasis::change(), SSVectorBase< R >::clear(), SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxSolver::computeDualfarkas4Col(), SPxSolver::computeFrhs(), SPxSolver::computeFtest(), SPxSolver::computePrimalray4Row(), SPxBasis::coSolve(), SPxBasis::Desc::D_FREE, UpdateVector::delta(), SPxBasis::desc(), SPxSolver::dim(), SPxSolver::doPupdate(), SPxSolver::entertol(), SPxSolver::enterVector(), SPxSolver::epsilon(), SPxSolver::factorize(), SPxSolver::forceRecompNonbasicValue(), SPxSolver::fRhs(), SPxSolver::fVec(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxBasis::INFEASIBLE, soplex::infinity, SPxSolver::initialized, SPxSolver::instableLeave, SPxSolver::instableLeaveNum, SPxSolver::instableLeaveVal, SPxSolver::isBasic(), UpdateVector::isConsistent(), SSVectorBase< R >::isConsistent(), SSVectorBase< R >::isSetup(), SPxId::isSPxRowId(), SPxId::isValid(), SPxBasis::iteration(), SPxBasis::lastUpdate(), SPxSolver::LEAVE, SPxSolver::leaveCycles, SPxSolver::leavetol(), VectorBase< R >::length(), SSVectorBase< R >::length(), SPxSolver::m_maxCycle, SPxSolver::m_numCycle, SPxSolver::m_pricingViol, MSG_DEBUG, MSG_INFO2, MSG_INFO3, VectorBase< R >::multAdd(), SPxBasis::multBaseWith(), soplex::NE(), SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxSolver::primVec, SPxSolver::recomputedVectors, SPxSolver::rejectLeave(), SPxSolver::rep(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxRatioTester::selectEnter(), SPxSolver::setBasisStatus(), SPxSolver::setupPupdate(), SPxBasis::SINGULAR, SSVectorBase< R >::size(), SPxBasis::solve(), SPxBasis::solve4update(), SPxSolver::solveVector2, SPxSolver::solveVector2rhs, SPxSolver::solveVector3, SPxSolver::solveVector3rhs, soplex::spxAbs(), SPxSolver::spxout, SPxBasis::status(), SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::thePvec, SPxSolver::theratiotester, SPxSolver::theShift, SPxSolver::theUBbound, SPxSolver::theUCbound, SPxSolver::theURbound, SPxSolver::totalboundflips, SPxSolver::type(), SPxBasis::UNBOUNDED, SPxSolver::unitVecs, UpdateVector::update(), SPxSolver::updateFtest(), SPxSolver::updateNonbasicValue(), UpdateVector::value(), and SPxException::what().
Referenced by SPxSolver::performSolutionPolishing(), and SPxSolver::solve().
Real leavetol | ( | ) | const |
feasibility tolerance maintained by ratio test during LEAVE algorithm.
Definition at line 796 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::computeTest(), SPxSolver::init(), SPxSteepPR::isConsistent(), SPxSolver::leave(), SPxSolver::performSolutionPolishing(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxSolver::shiftPvec(), SPxSolver::solve(), SPxSolver::terminate(), SPxSolver::testBounds(), SPxSolver::testVecs(), SPxSolver::unShift(), SPxSolver::updateCoTest(), and SPxSolver::updateTest().
|
virtual |
set a start basis.
Definition at line 98 of file spxsolver.cpp.
References SPxBasis::load(), SPxBasis::loadDesc(), SPxBasis::NO_PROBLEM, SPxBasis::REGULAR, SPxSolver::setBasisStatus(), SPxBasis::status(), and SPxSolver::unInit().
Referenced by SPxWeightST::generate(), SPxSolver::setBasis(), and SPxSolver::solve().
|
virtual |
copy LP.
Definition at line 71 of file spxsolver.cpp.
References SPxRatioTester::clear(), SPxPricer::clear(), SPxSolver::clear(), SPxBasis::load(), SPxLPBase< Real >::operator=(), SPxSolver::reDim(), SPxSolver::resetClockStats(), SPxSolver::thepricer, SPxSolver::theratiotester, SPxSolver::unInit(), and SPxBasis::unLoad().
Referenced by SoPlex::_decompSimplifyAndSolve(), SoPlex::_ensureRealLPLoaded(), SoPlex::_formDecompComplementaryProblem(), SoPlex::_formDecompReducedProblem(), SoPlex::_loadRealLP(), SoPlex::_optimizeRational(), SoPlex::_preprocessAndSolveReal(), SoPlex::_restoreLPReal(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealForRational(), SoPlex::_syncLPReal(), and SoPlex::readBasisFile().
|
private |
|
private |
const Vector& lpBound | ( | ) | const |
Definition at line 1504 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), and SPxBoundFlippingRT::selectEnter().
Vector& lpBound | ( | ) |
lower bound for pVec.
This method returns the lower bound for pVec. It may only be called for the leaving Simplex algorithm.
For the leaving Simplex algorithms pVec is maintained to fullfill its bounds. As pVec itself, also its bound depend on the chosen representation. Further, they may need to be shifted (see below).
Definition at line 1518 of file spxsolver.h.
int maxCycle | ( | ) | const |
maximum number of degenerate simplex steps before we detect cycling.
SPxSolver considers a Simplex step as degenerate if the steplength does not exceed epsilon(). Cycling occurs if only degenerate steps are taken. To prevent this situation, SPxSolver perturbs the problem such that nondegenerate steps are ensured.
maxCycle() controls how agressive such perturbation is performed, since no more than maxCycle() degenerate steps are accepted before perturbing the LP. The current number of consecutive degenerate steps is counted by numCycle().
Definition at line 882 of file spxsolver.h.
Referenced by SPxHarrisRT::degenerateEps().
|
virtual |
maximal infeasibility of basis
This method is called before concluding optimality. Since it is possible that some stable implementation of class SPxRatioTester yielded a slightly infeasible (or unpriced) basis, this must be checked before terminating with an optimal solution.
Definition at line 671 of file spxsolver.cpp.
References SPxSolver::coDim(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::LEAVE, SPxSolver::m_pricingViol, SPxSolver::m_pricingViolCo, SPxSolver::m_pricingViolCoUpToDate, SPxSolver::m_pricingViolUpToDate, MAXIMUM, SPxSolver::theCoLbound, SPxSolver::theCoPvec, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLbound, SPxSolver::thePvec, SPxSolver::theUBbound, and SPxSolver::type().
Referenced by SPxSolver::solve().
|
protected |
Compute part of objective value.
This method is called from value() in order to compute the part of the objective value resulting form nonbasic variables for COLUMN Representation.
Definition at line 758 of file spxsolver.cpp.
References SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::desc(), SPxSolver::ENTER, soplex::EQ(), soplex::EQrel(), SPxSolver::LEAVE, SPxLPBase< R >::lhs(), SPxLPBase< Real >::lhs(), SPxLPBase< Real >::lower(), SPxLPBase< R >::lower(), SPxSolver::m_nonbasicValue, SPxSolver::m_nonbasicValueUpToDate, SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), MSG_ERROR, SPxLPBase< R >::nCols(), soplex::NE(), SPxLPBase< R >::nRows(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< Real >::rhs(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theUCbound, SPxSolver::theURbound, SPxSolver::type(), SPxLPBase< R >::upper(), and SPxLPBase< Real >::upper().
Referenced by SPxSolver::updateNonbasicValue(), and SPxSolver::value().
|
virtual |
check for violations above tol and immediately return false w/o checking the remaining values
This method is useful for verifying whether an objective limit can be used as termination criterion
Definition at line 717 of file spxsolver.cpp.
References SPxSolver::coDim(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::LEAVE, SPxSolver::theCoLbound, SPxSolver::theCoPvec, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLbound, SPxSolver::thePvec, SPxSolver::theUBbound, and SPxSolver::type().
Referenced by SPxSolver::terminate().
int numCycle | ( | ) | const |
actual number of degenerate simplex steps encountered so far.
Definition at line 887 of file spxsolver.h.
Referenced by SPxHarrisRT::degenerateEps().
|
virtual |
get objective value of current solution.
Definition at line 2002 of file spxsolver.h.
Referenced by SoPlex::_solveDecompositionDualSimplex(), and SoPlex::_storeSolutionReal().
assignment operator
assignment operator and copy constructor
Definition at line 1137 of file spxsolver.cpp.
References SPxSolver::addVec, SPxSolver::boundflips, SPxSolver::boundrange, SPxStarter::clone(), SPxRatioTester::clone(), SPxPricer::clone(), LPColSetBase< R >::colSet(), SPxSolver::COLUMN, SPxSolver::computeDegeneracy, SPxSolver::coWeights, SPxSolver::decompIterationLimit, SPxSolver::degenCompIterOffset, SPxSolver::displayFreq, SPxSolver::displayLine, SPxSolver::dualFarkas, SPxSolver::dualRhs, SPxSolver::dualVec, SPxSolver::enterCount, SPxSolver::enterCycles, SPxSolver::enterDegenCand, SPxSolver::freePricer, SPxSolver::freeRatioTester, SPxSolver::freeStarter, SPxSolver::fullPerturbation, SPxSolver::getStartingDecompBasis, SPxSolver::hyperPricingEnter, SPxSolver::hyperPricingLeave, SPxSolver::infeasibilities, SPxSolver::infeasibilitiesCo, SPxSolver::initialized, SPxSolver::instableEnter, SPxSolver::instableEnterId, SPxSolver::instableEnterVal, SPxSolver::instableLeave, SPxSolver::instableLeaveNum, SPxSolver::instableLeaveVal, SPxSolver::integerVariables, SPxSolver::isConsistent(), SPxSolver::isInfeasible, SPxSolver::isInfeasibleCo, SPxSolver::lastShift, SPxSolver::leaveCount, SPxSolver::leaveCycles, SPxSolver::leaveDegenCand, SPxRatioTester::load(), SPxPricer::load(), SPxSolver::m_entertol, SPxSolver::m_leavetol, SPxSolver::m_maxCycle, SPxSolver::m_nonbasicValue, SPxSolver::m_nonbasicValueUpToDate, SPxSolver::m_numCycle, SPxSolver::m_pricingViol, SPxSolver::m_pricingViolCo, SPxSolver::m_pricingViolCoUpToDate, SPxSolver::m_pricingViolUpToDate, SPxSolver::m_status, SPxSolver::maxIters, SPxSolver::maxTime, SPxSolver::objLimit, SPxSolver::objrange, SPxBasis::operator=(), SPxLPBase< Real >::operator=(), SPxSolver::polishCount, SPxSolver::polishObj, SPxSolver::primalCount, SPxSolver::primalDegenSum, SPxSolver::primalRay, SPxSolver::primRhs, SPxSolver::primVec, SPxSolver::printCondition, SPxSolver::remainingRoundsEnter, SPxSolver::remainingRoundsEnterCo, SPxSolver::remainingRoundsLeave, SPxSolver::ROW, LPRowSetBase< R >::rowSet(), SPxSolver::siderange, SPxSolver::sparsePricingEnter, SPxSolver::sparsePricingEnterCo, SPxSolver::sparsePricingFactor, SPxSolver::sparsePricingLeave, SPxSolver::spxout, SPxSolver::theCoLbound, SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theCoUbound, SPxSolver::thecovectors, SPxSolver::theCPvec, SPxSolver::theCumulativeTime, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLbound, SPxSolver::theLCbound, SPxBasis::theLP, SPxSolver::theLRbound, SPxSolver::thepricer, SPxSolver::thePricing, SPxSolver::thePvec, SPxSolver::theratiotester, SPxSolver::theRep, SPxSolver::theRPvec, SPxSolver::theShift, SPxSolver::thestarter, SPxSolver::theTest, SPxSolver::theType, SPxSolver::theUBbound, SPxSolver::theUbound, SPxSolver::theUCbound, SPxSolver::theURbound, SPxSolver::thevectors, SPxSolver::timerType, SPxSolver::totalboundflips, SPxSolver::unitVecs, SPxSolver::weights, and SPxSolver::weightsAreSetup.
Real opttol | ( | ) | const |
allowed optimality, i.e., dual feasibility tolerance.
Definition at line 811 of file spxsolver.h.
Referenced by SoPlex::_performOptIRStable(), SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_verifySolutionReal(), SPxSolver::factorize(), SPxSolver::initRep(), SPxSolver::precisionReached(), SPxSolver::solve(), SPxSolver::terminate(), and SPxSolver::writeState().
void performSolutionPolishing | ( | ) |
Identify primal basic variables that have zero reduced costs and try to pivot them out of the basis to make them tight. This is supposed to decrease the number of fractional variables when solving LP relaxations of (mixed) integer programs. The objective must not be modified during this procedure.
Definition at line 1171 of file spxsolve.cpp.
References DIdxSet::addIdx(), SPxBasis::baseId(), SPxSolver::clearUpdateVecs(), SPxSolver::coId(), SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::desc(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::enter(), SPxSolver::entertol(), soplex::EQrel(), SPxSolver::id(), IdxSet::index(), SPxSolver::init(), SPxSolver::instableEnter, SPxSolver::instableLeave, SPxSolver::integerVariables, SPxId::isSPxRowId(), SPxSolver::isTimeLimitReached(), SPxSolver::iterations(), SPxSolver::LEAVE, SPxSolver::leave(), SPxSolver::leavetol(), soplex::LErel(), SPxSolver::maxIters, SPxLPBase< R >::maxObj(), MSG_DEBUG, MSG_INFO1, MSG_INFO2, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::number(), SPxBasis::OPTIMAL, SPxSolver::OPTIMAL, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::POLISH_FRACTIONALITY, SPxSolver::POLISH_INTEGRALITY, SPxSolver::POLISH_OFF, SPxSolver::polishCount, SPxSolver::polishObj, IdxSet::remove(), SPxSolver::rep(), SPxBasis::Desc::rowStatus(), SPxBasis::setStatus(), SPxRatioTester::setType(), SPxSolver::setType(), SPxSolver::shift(), IdxSet::size(), DataArray< T >::size(), SPxSolver::spxout, SPxSolver::status(), SPxSolver::theCoPvec, SPxSolver::theFvec, SPxSolver::thePvec, SPxSolver::theratiotester, SPxSolver::type(), and SPxSolver::value().
Referenced by SPxSolver::solve().
|
private |
Definition at line 233 of file spxshift.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::D_ON_BOTH, UpdateVector::delta(), VectorBase< R >::dim(), SPxBasis::dualStatus(), SPxSolver::fullPerturbation, VectorBase< R >::get_const_ptr(), soplex::GT(), IdxSet::index(), SSVectorBase< R >::indices(), soplex::infinity, soplex::LT(), soplex::NE(), Random::next(), SPxSolver::random, SSVectorBase< R >::size(), SPxSolver::theShift, and SSVectorBase< R >::values().
Referenced by SPxSolver::perturbMaxEnter(), and SPxSolver::perturbMaxLeave().
|
private |
Definition at line 407 of file spxshift.cpp.
References UpdateVector::delta(), VectorBase< R >::dim(), SPxSolver::fullPerturbation, VectorBase< R >::get_const_ptr(), soplex::GT(), IdxSet::index(), SSVectorBase< R >::indices(), soplex::infinity, soplex::LT(), soplex::NE(), Random::next(), SPxSolver::random, SPxSolver::rep(), SSVectorBase< R >::size(), and SSVectorBase< R >::values().
|
protectedvirtual |
perturb basis bounds.
Definition at line 321 of file spxshift.cpp.
References UpdateVector::delta(), SPxSolver::entertol(), SPxSolver::epsilon(), SPxSolver::fVec(), SPxBasis::iteration(), SPxSolver::lbBound(), MSG_DEBUG, SPxSolver::perturbMax(), SSVectorBase< R >::setup(), SPxSolver::shift(), and SPxSolver::ubBound().
Referenced by SPxSolver::enter().
|
protectedvirtual |
perturb nonbasic bounds.
Definition at line 498 of file spxshift.cpp.
References SPxSolver::coPvec(), UpdateVector::delta(), SPxBasis::desc(), SPxSolver::epsilon(), SPxBasis::iteration(), SPxSolver::lcBound(), SPxSolver::leavetol(), SPxSolver::lpBound(), MSG_DEBUG, SPxSolver::perturbMax(), SPxSolver::pVec(), SSVectorBase< R >::setup(), SPxSolver::shift(), SPxSolver::status(), SPxSolver::theShift, SPxSolver::ucBound(), and SPxSolver::upBound().
Referenced by SPxSolver::leave().
|
private |
Definition at line 154 of file spxshift.cpp.
References SPxBasis::baseId(), SPxBasis::Desc::D_ON_BOTH, UpdateVector::delta(), VectorBase< R >::dim(), SPxBasis::dualStatus(), SPxSolver::fullPerturbation, VectorBase< R >::get_const_ptr(), soplex::GT(), IdxSet::index(), SSVectorBase< R >::indices(), soplex::infinity, soplex::LT(), soplex::NE(), Random::next(), SPxSolver::random, SSVectorBase< R >::size(), SPxSolver::theShift, and SSVectorBase< R >::values().
Referenced by SPxSolver::perturbMinEnter(), and SPxSolver::perturbMinLeave().
|
private |
Definition at line 330 of file spxshift.cpp.
References UpdateVector::delta(), VectorBase< R >::dim(), SPxSolver::fullPerturbation, VectorBase< R >::get_const_ptr(), soplex::GT(), IdxSet::index(), SSVectorBase< R >::indices(), soplex::infinity, soplex::LT(), soplex::NE(), Random::next(), SPxSolver::random, SPxSolver::rep(), SSVectorBase< R >::size(), and SSVectorBase< R >::values().
|
protectedvirtual |
Definition at line 312 of file spxshift.cpp.
References UpdateVector::delta(), SPxSolver::entertol(), SPxSolver::epsilon(), SPxSolver::fVec(), SPxBasis::iteration(), SPxSolver::lbBound(), MSG_DEBUG, SPxSolver::perturbMin(), SSVectorBase< R >::setup(), SPxSolver::shift(), and SPxSolver::ubBound().
Referenced by SPxSolver::enter().
|
protectedvirtual |
Definition at line 485 of file spxshift.cpp.
References SPxSolver::coPvec(), UpdateVector::delta(), SPxBasis::desc(), SPxSolver::epsilon(), SPxBasis::iteration(), SPxSolver::lcBound(), SPxSolver::leavetol(), SPxSolver::lpBound(), MSG_DEBUG, SPxSolver::perturbMin(), SPxSolver::pVec(), SSVectorBase< R >::setup(), SPxSolver::shift(), SPxSolver::status(), SPxSolver::theShift, SPxSolver::ucBound(), and SPxSolver::upBound().
Referenced by SPxSolver::leave().
int polishIterations | ( | ) |
return number of iterations done with primal algorithm
Definition at line 2137 of file spxsolver.h.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
|
protectedvirtual |
is the solution precise enough, or should we increase delta() ?
Definition at line 37 of file spxsolve.cpp.
References SPxPricer::epsilon(), SPxSolver::feastol(), MSG_INFO3, SPxSolver::opttol(), SPxSolver::qualBoundViolation(), SPxSolver::qualConstraintViolation(), SPxSolver::qualRedCostViolation(), SPxSolver::spxout, and SPxSolver::thepricer.
Referenced by SPxSolver::solve().
const SPxPricer* pricer | ( | ) | const |
return loaded SPxPricer.
Definition at line 1771 of file spxsolver.h.
Referenced by SoPlex::_solveRealStable(), SoPlex::getPricerName(), and SPxSolver::writeState().
Pricing pricing | ( | ) | const |
return current Pricing.
Definition at line 518 of file spxsolver.h.
Referenced by SPxSolver::doPupdate(), SPxSolver::enter(), SPxSolver::factorize(), SPxParMultPR::selectEnter(), and SPxSolver::terminate().
int primalDegeneratePivots | ( | ) |
get number of primal degenerate pivots
Definition at line 2100 of file spxsolver.h.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
int primalIterations | ( | ) |
return number of iterations done with primal algorithm
Definition at line 2124 of file spxsolver.h.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
|
virtual |
print display line of flying table
Definition at line 1589 of file spxsolve.cpp.
References SPxSolver::basis(), SPxSolver::displayFreq, SPxSolver::displayLine, SPxSolver::fVec(), SPxSolver::getDegeneracyLevel(), SPxBasis::getEstimatedCondition(), SLinSolver::getFactorCount(), SPxBasis::getFastCondition(), SPxSolver::getStartingDecompBasis, SPxBasis::iteration(), SPxSolver::LEAVE, SPxSolver::m_pricingViol, SPxSolver::m_pricingViolCo, MAXIMUM, MSG_INFO1, SPxSolver::printCondition, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::shift(), SPxSolver::slinSolver(), SPxSolver::spxout, SPxSolver::time(), SPxSolver::type(), and SPxSolver::value().
Referenced by SoPlex::_solveDecompositionDualSimplex(), and SPxSolver::solve().
UpdateVector& pVec | ( | ) | const |
pricing vector.
The pricing vector pVec is the product of coPvec with the constraint matrix. As coPvec, also pVec is maintained within its bound for the leaving Simplex algorithm, while the bounds are tested for the entering Simplex. pVec is of dimension coDim(). Vector pVec() is only up to date for LEAVEing Simplex or FULL pricing in ENTERing Simplex.
Definition at line 1478 of file spxsolver.h.
Referenced by SoPlex::_identifyComplementaryDualFixedPrimalVars(), SoPlex::_updateDecompComplementaryDualProblem(), SoPlex::_updateDecompComplementaryPrimalProblem(), SPxDevexPR::entered4(), SPxSteepPR::entered4(), SPxSolver::factorize(), SPxBoundFlippingRT::flipAndUpdate(), SPxWeightST::generate(), SPxBoundFlippingRT::getData(), SoPlex::getOriginalProblemBasisRowStatus(), SPxSolver::getSlacks(), SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxSolver::setRedCost(), SPxSolver::setSlacks(), SPxFastRT::shortEnter(), and SPxSolver::terminate().
get violations of bounds.
Definition at line 59 of file spxquality.cpp.
References SPxSolver::epsilon(), SPxSolver::getPrimal(), SPxLPBase< R >::lower(), SPxLPBase< R >::nCols(), soplex::spxAbs(), and SPxLPBase< R >::upper().
Referenced by SPxSolver::precisionReached().
get violation of constraints.
Definition at line 25 of file spxquality.cpp.
References SPxSolver::epsilon(), SPxSolver::getPrimal(), SVectorBase< R >::index(), SPxLPBase< R >::lhs(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rhs(), SPxLPBase< R >::rowVector(), SVectorBase< R >::size(), soplex::spxAbs(), and SVectorBase< R >::value().
Referenced by SPxSolver::precisionReached().
get violation of optimality criterion.
Definition at line 116 of file spxquality.cpp.
References SPxSolver::coDim(), SPxSolver::coTest(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::fTest(), SPxSolver::LEAVE, SPxSolver::test(), and SPxSolver::type().
Referenced by SPxSolver::precisionReached().
get the residuum |Ax-b|.
Definition at line 87 of file spxquality.cpp.
References SPxSolver::getPrimal(), SPxSolver::getSlacks(), SVectorBase< R >::index(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rowVector(), SVectorBase< R >::size(), soplex::spxAbs(), and SVectorBase< R >::value().
const SPxRatioTester* ratiotester | ( | ) | const |
return loaded SPxRatioTester.
Definition at line 1781 of file spxsolver.h.
Referenced by SoPlex::_solveRealStable(), SoPlex::getRatiotesterName(), and SPxSolver::writeState().
|
virtual |
read LP from input stream.
Reimplemented from SPxLPBase< R >.
Definition at line 31 of file spxsolver.cpp.
References SPxRatioTester::clear(), SPxPricer::clear(), SPxSolver::clear(), SPxSolver::initialized, SPxLPBase< Real >::read(), SPxBasis::theLP, SPxSolver::thepricer, SPxSolver::theratiotester, SPxSolver::unInit(), and SPxBasis::unLoad().
|
virtual |
Load basis from filename
in MPS format. If rowNames
and colNames
are NULL
, default names are used for the constraints and variables.
Definition at line 24 of file spxfileio.cpp.
References SPxBasis::readBasis(), and SPxSolver::writeBasisFile().
Referenced by SoPlex::readBasisFile().
|
protectedvirtual |
reset dimensions of vectors according to loaded LP.
Definition at line 469 of file spxsolver.cpp.
References SPxSolver::coDim(), SPxSolver::dim(), SPxSolver::isInitialized(), SPxLPBase< Real >::nCols(), SPxLPBase< Real >::nRows(), UpdateVector::reDim(), DVectorBase< R >::reDim(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::thePvec, SPxSolver::theTest, SPxSolver::theUBbound, SPxSolver::theUCbound, SPxSolver::theURbound, and SPxSolver::unitVecs.
Referenced by SPxSolver::addedCols(), SPxSolver::addedRows(), SPxSolver::init(), SPxSolver::initRep(), and SPxSolver::loadLP().
|
protectedvirtual |
setup all vecs fresh
Definition at line 265 of file spxsolver.cpp.
References SPxSolver::COLUMN, SPxSolver::computeCoTest(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeFrhs(), SPxSolver::computeFtest(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxBasis::coSolve(), SPxSolver::ENTER, SPxSolver::initialized, SPxSolver::lastShift, SPxSolver::rep(), SPxSolver::ROW, SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxSolver::setEnterBounds(), SPxSolver::setLeaveBounds(), SPxSolver::setPrimalBounds(), SPxBasis::solve(), SPxSolver::testBounds(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theShift, and SPxSolver::type().
|
protectedvirtual |
Definition at line 1143 of file enter.cpp.
References SPxBasis::Desc::coStatus(), SPxBasis::desc(), SPxSolver::isId(), SPxLPBase< R >::number(), SPxBasis::Desc::status(), SPxSolver::theCoTest, and SPxSolver::theTest.
Referenced by SPxSolver::enter().
|
protectedvirtual |
Definition at line 650 of file leave.cpp.
References SPxBasis::Desc::colStatus(), SPxBasis::Desc::D_ON_BOTH, SPxBasis::desc(), SPxId::isSPxRowId(), MSG_DEBUG, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxBasis::Desc::rowStatus(), SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theUCbound, and SPxSolver::theURbound.
Referenced by SPxSolver::leave().
|
virtual |
reload LP.
Definition at line 56 of file spxsolver.cpp.
References SPxRatioTester::clear(), SPxPricer::clear(), SPxSolver::forceRecompNonbasicValue(), SPxSolver::m_status, SPxBasis::theLP, SPxSolver::thepricer, SPxSolver::theratiotester, SPxSolver::unInit(), SPxSolver::UNKNOWN, and SPxBasis::unLoad().
Referenced by SoPlex::_decompSimplifyAndSolve(), SoPlex::_solveRealStable(), and SoPlex::clearBasis().
Representation rep | ( | ) | const |
return the current basis representation.
Definition at line 506 of file spxsolver.h.
Referenced by SoPlex::_checkBasisScaling(), SoPlex::_getZeroDualMultiplierIndices(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealLPAndRecordStatistics(), SPxBasis::addedCols(), SPxBasis::addedRows(), SPxSolver::changeLhsStatus(), SPxSolver::changeLowerStatus(), SPxSolver::changeRhsStatus(), SPxSolver::changeUpperStatus(), SoPlex::checkBasisDualFeasibility(), SPxSolver::computeEnterCoPrhs4Col(), SPxSolver::computeEnterCoPrhs4Row(), SPxSolver::computeFrhs(), SPxSolver::computeFrhsXtra(), SPxSolver::coTest(), SPxBasis::Desc::Desc(), SPxSolver::enter(), SPxSolver::factorize(), SPxBoundFlippingRT::flipAndUpdate(), SPxWeightST::generate(), SoPlex::getBasisInd(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SoPlex::getBasisInverseTimesVecReal(), SPxSolver::getDegeneracyLevel(), SPxSolver::getDual(), SPxSolver::getDualNorms(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::getNdualNorms(), SPxSolver::getPrimal(), SPxSolver::getRedCost(), SPxSolver::getSlacks(), SPxSolver::init(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxDevexPR::load(), SoPlex::multBasis(), SoPlex::multBasisTranspose(), SPxSolver::nonbasicValue(), SPxSolver::performSolutionPolishing(), SPxSolver::perturbMax(), SPxSolver::perturbMin(), SPxSolver::printDisplayLine(), SPxSolver::reinitializeVecs(), SPxBasis::removedCol(), SPxBasis::removedCols(), SPxBasis::removedRow(), SPxBasis::removedRows(), SPxBasis::restoreInitialBasis(), SPxWeightPR::selectEnter(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxWeightPR::selectLeave(), SPxFastRT::selectLeave(), SPxBoundFlippingRT::selectLeave(), SPxSolver::setDual(), SPxSolver::setDualColBounds(), SPxSolver::setDualNorms(), SPxSolver::setDualRowBounds(), SPxSolver::setLeaveBound4Row(), SPxSolver::setPrimal(), SPxSolver::setPrimalBounds(), SPxSolver::setRedCost(), SPxBasis::setRep(), SPxSolver::setSlacks(), SPxWeightST::setupWeights(), SPxSolver::solve(), SPxSolver::terminate(), SPxSolver::test(), SPxSolver::ungetEnterVal(), SPxSolver::unShift(), SPxSolver::value(), and SPxSolver::writeState().
|
protected |
resets clock average statistics
Definition at line 312 of file spxsolver.cpp.
References SPxSolver::nCallsToTimelim, SPxSolver::nClckSkipsLeft, and SPxSolver::theCumulativeTime.
Referenced by SPxSolver::loadLP().
void resetCumulativeTime | ( | ) |
reset cumulative time counter to zero.
Definition at line 2082 of file spxsolver.h.
SPxRowId rowId | ( | int | i | ) | const |
RowId of i
'th inequality.
Mapping between numbers and Ids
Definition at line 2276 of file spxsolver.h.
Referenced by SoPlex::_getCompatibleColumns(), SoPlex::_updateDecompComplementaryPrimalProblem(), and SPxBasis::readBasis().
const LPRowSet& rows | ( | ) | const |
return const lp's rows if available.
Definition at line 2171 of file spxsolver.h.
SPxSense sense | ( | ) | const |
optimization sense.
Definition at line 2206 of file spxsolver.h.
set the lp solver's basis.
Definition at line 1975 of file spxsolver.cpp.
References SPxBasis::Desc::colStatus(), SPxBasis::desc(), SPxSolver::forceRecompNonbasicValue(), SPxBasis::load(), SPxSolver::loadBasis(), SPxLPBase< R >::nCols(), SPxBasis::NO_PROBLEM, SPxLPBase< R >::nRows(), SPxBasis::Desc::rowStatus(), SPxBasis::status(), SPxSolver::varStatusToBasisStatusCol(), and SPxSolver::varStatusToBasisStatusRow().
Referenced by SoPlex::_decompSimplifyAndSolve(), SoPlex::_ensureRealLPLoaded(), SoPlex::_optimizeRational(), SoPlex::_performOptIRStable(), SoPlex::_preprocessAndSolveReal(), SoPlex::_restoreLPReal(), SoPlex::_solveRealForRational(), SoPlex::_storeSolutionReal(), and SoPlex::setBasis().
|
virtual |
setup linear solver to use. If destroy
is true, slusolver
will be freed in destructor.
Definition at line 89 of file spxsolver.cpp.
References SPxBasis::loadBasisSolver(), SLinSolver::spxout, and SPxSolver::spxout.
Referenced by SoPlex::_createDecompReducedAndComplementaryProblems(), SoPlex::operator=(), and SoPlex::SoPlex().
void setBasisStatus | ( | SPxBasis::SPxStatus | stat | ) |
set the lp solver's basis status.
Definition at line 2051 of file spxsolver.h.
Referenced by SoPlex::_storeSolutionReal(), SPxSolver::clear(), SPxSolver::doRemoveCol(), SPxSolver::doRemoveCols(), SPxSolver::doRemoveRow(), SPxSolver::doRemoveRows(), SPxSolver::enter(), SPxSolver::init(), SPxSolver::leave(), SPxSolver::loadBasis(), and SPxSolver::solve().
void setComputeDegenFlag | ( | bool | computeDegen | ) |
sets whether the degeneracy is computed at each iteration
Definition at line 2233 of file spxsolver.h.
Referenced by SoPlex::optimize().
void setConditionInformation | ( | int | condInfo | ) |
print condition number within the usual output
Definition at line 858 of file spxsolver.h.
Referenced by SoPlex::setIntParam().
void setDecompIterationLimit | ( | int | iterationLimit | ) |
sets the iteration limit for the decomposition simplex initialisation
Definition at line 2260 of file spxsolver.h.
Referenced by SoPlex::_solveDecompositionDualSimplex(), and SPxSolver::terminate().
void setDecompStatus | ( | DecompStatus | decomp_stat | ) |
turn on or off the improved dual simplex.
Definition at line 457 of file spxsolver.cpp.
References SPxSolver::FINDSTARTBASIS, and SPxSolver::getStartingDecompBasis.
Referenced by SoPlex::_solveDecompositionDualSimplex().
void setDegenCompOffset | ( | int | iterOffset | ) |
sets the offset for the number of iterations before the degeneracy is computed
Definition at line 2247 of file spxsolver.h.
Referenced by SoPlex::_solveDecompositionDualSimplex(), and SPxSolver::terminate().
void setDelta | ( | Real | d | ) |
set parameter delta
, i.e., set feastol
and opttol
to same value.
Definition at line 1004 of file spxsolver.cpp.
References SPxSolver::m_entertol, and SPxSolver::m_leavetol.
Referenced by SoPlex::_solveRealStable(), and SPxSolver::SPxSolver().
void setDisplayFreq | ( | int | freq | ) |
set display frequency
Definition at line 846 of file spxsolver.h.
Referenced by SoPlex::setIntParam().
|
private |
Definition at line 2125 of file spxsolve.cpp.
References SPxBasis::baseId(), SPxSolver::coPvec(), SPxSolver::fVec(), SPxSolver::isInitialized(), SPxLPBase< Real >::MAXIMIZE, SPxLPBase< Real >::MINIMIZE, SPxLPBase< R >::nCols(), SPxLPBase< R >::number(), SPxSolver::rep(), SPxSolver::ROW, and SPxLPBase< R >::spxSense().
|
protected |
Definition at line 105 of file spxbounds.cpp.
References SPxSolver::clearDualBounds(), SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::desc(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxSolver::rep(), SPxBasis::Desc::rowStatus(), SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theUCbound, and SPxSolver::theURbound.
Referenced by SPxSolver::init(), and SPxSolver::reinitializeVecs().
bool setDualNorms | ( | int | nnormsRow, |
int | nnormsCol, | ||
Real * | norms | ||
) |
set dual norms
Definition at line 2125 of file spxsolver.cpp.
References SPxSolver::coDim(), SPxSolver::COLUMN, SPxSolver::coWeights, VectorBase< R >::dim(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::LEAVE, DVectorBase< R >::reDim(), SPxSolver::rep(), SPxSolver::ROW, SPxSolver::type(), SPxSolver::weights, and SPxSolver::weightsAreSetup.
Referenced by SoPlex::setDualNorms().
|
protected |
Definition at line 135 of file spxbounds.cpp.
References SPxSolver::clearDualBounds(), SPxBasis::dualColStatus(), SPxBasis::dualRowStatus(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxSolver::rep(), SPxSolver::ROW, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theUCbound, and SPxSolver::theURbound.
Referenced by SPxSolver::init(), and SPxSolver::reinitializeVecs().
|
protected |
Definition at line 196 of file spxbounds.cpp.
References SPxBasis::baseId(), SPxBasis::desc(), soplex::infinity, SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::theLBbound, SPxSolver::theLCbound, SPxSolver::theUBbound, and SPxSolver::theUCbound.
Referenced by SPxSolver::setEnterBounds().
|
protected |
This sets up the bounds for basic variables for entering simplex algorithms. It requires, that all upper lower feasibility bounds have allready been setup. Method |setEnterBound4Row(i, n)| does so for the |i|-th basis variable being row index |n|. Equivalently, method |setEnterBound4Col(i, n)| does so for the |i|-th basis variable being column index |n|.
Definition at line 167 of file spxbounds.cpp.
References SPxBasis::baseId(), SPxBasis::desc(), soplex::infinity, SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::theLBbound, SPxSolver::theLRbound, SPxSolver::theUBbound, and SPxSolver::theURbound.
Referenced by SPxSolver::setEnterBounds().
|
protectedvirtual |
Definition at line 225 of file spxbounds.cpp.
References SPxBasis::baseId(), SPxSolver::dim(), SPxId::isSPxRowId(), SPxLPBase< R >::number(), SPxSolver::setEnterBound4Col(), and SPxSolver::setEnterBound4Row().
Referenced by SPxSolver::init(), and SPxSolver::reinitializeVecs().
void setFeastol | ( | Real | d | ) |
set parameter feastol
.
Definition at line 980 of file spxsolver.cpp.
References SPxSolver::COLUMN, SPxSolver::m_entertol, SPxSolver::m_leavetol, and SPxSolver::theRep.
Referenced by SoPlex::_performOptIRStable(), SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_solveRealStable(), SPxSolver::initRep(), and SoPlex::optimize().
void setFillFactor | ( | Real | f | ) |
set refactor threshold for fill-in in current factor update compared to fill-in in last factorization
Definition at line 482 of file spxsolver.h.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
void setIntegralityInformation | ( | int | ncols, |
int * | intInfo | ||
) |
pass integrality information about the variables to the solver
Definition at line 2160 of file spxsolver.cpp.
References SPxSolver::integerVariables, SPxLPBase< R >::nCols(), and DataArray< T >::reSize().
Referenced by SoPlex::setIntegralityInformation().
|
protected |
Definition at line 280 of file spxbounds.cpp.
References SPxBasis::baseId(), SPxBasis::desc(), soplex::infinity, SPxLPBase< Real >::lower(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::theLBbound, SPxSolver::theUBbound, and SPxLPBase< Real >::upper().
Referenced by SPxSolver::setLeaveBounds().
|
protected |
This sets up the bounds for basic variables for leaving simplex algorithms. While method |setLeaveBound4Row(i,n)| does so for the |i|-th basic variable being the |n|-th row, |setLeaveBound4Col(i,n)| does so for the |i|-th basic variable being the |n|-th column.
Definition at line 245 of file spxbounds.cpp.
References SPxBasis::baseId(), SPxSolver::COLUMN, SPxBasis::desc(), soplex::infinity, SPxLPBase< R >::lhs(), SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::number(), SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::theLBbound, and SPxSolver::theUBbound.
Referenced by SPxSolver::setLeaveBounds().
|
protectedvirtual |
Definition at line 314 of file spxbounds.cpp.
References SPxBasis::baseId(), SPxSolver::dim(), SPxId::isSPxRowId(), SPxLPBase< R >::number(), SPxSolver::setLeaveBound4Col(), and SPxSolver::setLeaveBound4Row().
Referenced by SPxSolver::init(), and SPxSolver::reinitializeVecs().
void setMemFactor | ( | Real | f | ) |
set refactor threshold for memory growth in current factor update compared to the last factorization
Definition at line 488 of file spxsolver.h.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
void setNonzeroFactor | ( | Real | f | ) |
set refactor threshold for nonzeros in last factorized basis matrix compared to updated basis matrix
Definition at line 476 of file spxsolver.h.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
void setOpttol | ( | Real | d | ) |
set parameter opttol
.
Definition at line 992 of file spxsolver.cpp.
References SPxSolver::COLUMN, SPxSolver::m_entertol, SPxSolver::m_leavetol, and SPxSolver::theRep.
Referenced by SoPlex::_performOptIRStable(), SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_solveRealStable(), SPxSolver::initRep(), and SoPlex::optimize().
void setOutstream | ( | SPxOut & | newOutstream | ) |
Definition at line 469 of file spxsolver.h.
Referenced by SoPlex::_createDecompReducedAndComplementaryProblems(), SoPlex::operator=(), and SoPlex::SoPlex().
|
virtual |
setup pricer to use. If destroy
is true, pricer
will be freed in destructor.
Definition at line 111 of file spxsolver.cpp.
References SPxPricer::clear(), SPxSolver::freePricer, SPxSolver::FULL, SPxSolver::isInitialized(), SPxPricer::load(), SPxSolver::setPricing(), and SPxSolver::thepricer.
Referenced by SoPlex::setIntParam().
void setPricing | ( | Pricing | pr | ) |
Definition at line 445 of file spxsolver.cpp.
References SPxSolver::computeCoTest(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxSolver::ENTER, SPxSolver::initialized, SPxSolver::thePricing, and SPxSolver::type().
Referenced by SPxSolver::setPricer(), SPxHybridPR::setType(), and SPxParMultPR::setType().
|
private |
Definition at line 2105 of file spxsolve.cpp.
References SPxBasis::baseId(), SPxSolver::coPvec(), SPxSolver::dim(), SPxSolver::fVec(), SPxSolver::isInitialized(), SPxId::isSPxColId(), SPxLPBase< R >::number(), SPxSolver::rep(), and SPxSolver::ROW.
|
protected |
setup feasibility bounds for entering algorithm
Setting up the feasiblity bound for normal primal variables is straightforward. However, slack variables need some more details on how we treat them. This is slightly different from usual textbook versions. Let \(l_i \le A_i^T x \le u_i\). This can be transformed to \(A_i^Tx + s_i = 0\), with \(-u_i \le s_i \le -l_i\). Hence, with this definition of slack variables \(s_i\), we can directly use vectors \(l\) and \(u\) as feasibility bounds.
Definition at line 32 of file spxbounds.cpp.
References SPxLPBase< R >::lhs(), SPxLPBase< Real >::lower(), SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theUCbound, SPxSolver::theURbound, and SPxLPBase< Real >::upper().
Referenced by SPxSolver::init(), and SPxSolver::reinitializeVecs().
|
private |
Definition at line 2157 of file spxsolve.cpp.
References SPxBasis::baseId(), SPxSolver::dim(), SPxSolver::fVec(), SPxSolver::isInitialized(), SPxLPBase< R >::maxObj(), SPxLPBase< Real >::MINIMIZE, SPxLPBase< R >::number(), SPxSolver::pVec(), SPxSolver::rep(), SPxSolver::ROW, and SPxLPBase< R >::spxSense().
void setRep | ( | Representation | p_rep | ) |
switch to ROW or COLUMN representation if not already used.
Definition at line 257 of file spxsolver.cpp.
References SPxSolver::initRep(), and SPxSolver::theRep.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
|
private |
Definition at line 2191 of file spxsolve.cpp.
References SPxBasis::baseId(), SPxSolver::COLUMN, SPxSolver::dim(), SPxSolver::isInitialized(), SPxLPBase< R >::number(), SPxSolver::pVec(), and SPxSolver::rep().
void setSolutionPolishing | ( | SolutionPolish | _polishObj | ) |
set objective of solution polishing (0: off, 1: max_basic_slack, 2: min_basic_slack)
Definition at line 644 of file spxsolver.h.
Referenced by SoPlex::_preprocessAndSolveReal(), and SoPlex::setIntParam().
void setSolverStatus | ( | SPxSolver::Status | stat | ) |
setting the solver status external from the solve loop.
Definition at line 2060 of file spxsolver.h.
Referenced by SoPlex::decompTerminate().
void setSparsePricingFactor | ( | Real | fac | ) |
Definition at line 864 of file spxsolver.h.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
|
virtual |
setup starting basis generator to use. If destroy
is true, starter
will be freed in destructor.
Definition at line 164 of file spxsolver.cpp.
References SPxSolver::freeStarter, and SPxSolver::thestarter.
|
virtual |
set iteration limit.
Definition at line 1643 of file spxsolver.cpp.
References SPxSolver::maxIters.
Referenced by SoPlex::_solveRealLPAndRecordStatistics().
set time limit.
Limits and status inquiry
Definition at line 1630 of file spxsolver.cpp.
References SPxSolver::maxTime.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
set objective limit.
Definition at line 1697 of file spxsolver.cpp.
References SPxSolver::objLimit.
Referenced by SoPlex::_decompSimplifyAndSolve(), SoPlex::_optimizeRational(), and SoPlex::_preprocessAndSolveReal().
|
virtual |
setup ratio-tester to use. If destroy
is true, tester
will be freed in destructor.
Definition at line 140 of file spxsolver.cpp.
References SPxRatioTester::clear(), SPxSolver::freeRatioTester, SPxSolver::isInitialized(), SPxRatioTester::load(), and SPxSolver::theratiotester.
Referenced by SoPlex::setIntParam().
void setTiming | ( | Timer::TYPE | ttype | ) |
void setType | ( | Type | tp | ) |
Definition at line 180 of file spxsolver.cpp.
References SPxSolver::forceRecompNonbasicValue(), SPxSolver::LEAVE, MSG_INFO3, SPxSolver::spxout, SPxSolver::theType, and SPxSolver::unInit().
Referenced by SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_solveRealStable(), SPxSolver::performSolutionPolishing(), and SPxSolver::solve().
Setup vectors to be cosolved within Simplex loop.
Load vector y
to be coSolved with the basis matrix during the ENTER Simplex. The system will be solved after SPxSolver's call to SPxRatioTester. The system will be solved along with another system. Solving two linear system at a time has performance advantages over solving the two linear systems seperately.
Definition at line 1722 of file spxsolver.h.
Referenced by SPxSteepPR::selectEnter().
Setup vectors to be cosolved within Simplex loop.
Load a second vector z
to be coSolved with the basis matrix during the ENTER Simplex. The system will be solved after SPxSolver's call to SPxRatioTester. The system will be solved along with two other systems.
Definition at line 1734 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::flipAndUpdate().
Setup vectors to be solved within Simplex loop.
Load vector y
to be solved with the basis matrix during the LEAVE Simplex. The system will be solved after SPxSolver's call to SPxRatioTester. The system will be solved along with another system. Solving two linear system at a time has performance advantages over solving the two linear systems seperately.
Definition at line 1694 of file spxsolver.h.
Referenced by SPxSteepPR::selectLeave().
Setup vectors to be solved within Simplex loop.
Load a second additional vector y2
to be solved with the basis matrix during the LEAVE Simplex. The system will be solved after SPxSolver's call to SPxRatioTester. The system will be solved along with at least one other system. Solving several linear system at a time has performance advantages over solving them seperately.
Definition at line 1708 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::flipAndUpdate().
|
protectedvirtual |
Definition at line 534 of file spxvecs.cpp.
References SSVectorBase< R >::assign2product(), SSVectorBase< R >::assign2product4setup(), SSVectorBase< R >::assign2productAndSetup(), UpdateVector::delta(), VectorBase< R >::dim(), SSVectorBase< R >::isSetup(), SSVectorBase< R >::setup(), SSVectorBase< R >::size(), SPxSolver::theCoPvec, SPxSolver::thecovectors, SPxSolver::thePvec, and SPxSolver::thevectors.
Referenced by SPxSolver::enter(), and SPxSolver::leave().
|
virtual |
total current shift amount.
Definition at line 1627 of file spxsolver.h.
Referenced by SoPlex::_storeSolutionReal(), SPxSolver::performSolutionPolishing(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinEnter(), SPxSolver::perturbMinLeave(), SoPlex::printDecompDisplayLine(), SPxSolver::printDisplayLine(), SPxHarrisRT::selectEnter(), SPxHarrisRT::selectLeave(), SPxSolver::solve(), and SPxSolver::terminate().
void shiftFvec | ( | ) |
Perform initial shifting to optain an feasible or pricable basis.
Definition at line 25 of file spxshift.cpp.
References SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::entertol(), SPxSolver::epsilon(), MSG_DEBUG, Random::next(), SPxSolver::random, SPxSolver::shiftLBbound(), SPxSolver::shiftUBbound(), SPxSolver::testBounds(), SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theUBbound, and SPxSolver::type().
Referenced by SPxSolver::init().
void shiftLBbound | ( | int | i, |
Real | to | ||
) |
shift i
'th lbBound to to
.
Definition at line 1584 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxFastRT::maxReLeave(), SPxFastRT::minReLeave(), SPxHarrisRT::selectLeave(), and SPxSolver::shiftFvec().
void shiftLCbound | ( | int | i, |
Real | to | ||
) |
shift i
'th lcBound to to
.
Definition at line 1616 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxHarrisRT::selectEnter(), and SPxSolver::shiftPvec().
void shiftLPbound | ( | int | i, |
Real | to | ||
) |
shift i
'th lpBound to to
.
Definition at line 1600 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxHarrisRT::selectEnter(), and SPxSolver::shiftPvec().
void shiftPvec | ( | ) |
Perform initial shifting to optain an feasible or pricable basis.
Definition at line 81 of file spxshift.cpp.
References SPxSolver::coDim(), SPxSolver::coId(), SPxSolver::dim(), SPxSolver::epsilon(), SPxSolver::isBasic(), SPxSolver::LEAVE, SPxSolver::leavetol(), MSG_DEBUG, Random::next(), SPxSolver::random, SPxSolver::shiftLCbound(), SPxSolver::shiftLPbound(), SPxSolver::shiftUCbound(), SPxSolver::shiftUPbound(), SPxSolver::testBounds(), SPxSolver::theCoLbound, SPxSolver::theCoPvec, SPxSolver::theCoUbound, SPxSolver::theLbound, SPxSolver::thePvec, SPxSolver::theUbound, and SPxSolver::type().
Referenced by SPxSolver::init().
void shiftUBbound | ( | int | i, |
Real | to | ||
) |
shift i
'th ubBound to to
.
Definition at line 1576 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxFastRT::maxReLeave(), SPxFastRT::minReLeave(), SPxHarrisRT::selectLeave(), and SPxSolver::shiftFvec().
void shiftUCbound | ( | int | i, |
Real | to | ||
) |
shift i
'th ucBound to to
.
Definition at line 1608 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxHarrisRT::selectEnter(), and SPxSolver::shiftPvec().
void shiftUPbound | ( | int | i, |
Real | to | ||
) |
shift i
'th upBound to to
.
Definition at line 1592 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxHarrisRT::selectEnter(), and SPxSolver::shiftPvec().
const SLinSolver* slinSolver | ( | ) | const |
return loaded SLinSolver.
Definition at line 1776 of file spxsolver.h.
Referenced by SPxSolver::printDisplayLine(), and SPxSolver::solve().
|
virtual |
solve loaded LP.
Solves the loaded LP by processing the Simplex iteration until the termination criteria is fullfilled (see terminate()). The SPxStatus of the solver will indicate the reason for termination.
SPxStatusException | if either no problem, solver, pricer or ratiotester loaded or if solve is still running when it shouldn't be |
Definition at line 131 of file spxsolve.cpp.
References SPxSolver::ABORT_CYCLING, SPxSolver::ABORT_ITER, DIdxSet::addIdx(), SPxBasis::baseId(), SPxSolver::basis(), SPxSolver::boundflips, SPxSolver::boundrange, SPxSolver::calculateProblemRanges(), IdxSet::clear(), SPxSolver::clearUpdateVecs(), SPxSolver::coDim(), SPxSolver::COLUMN, SPxSolver::computeCoTest(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeFrhs(), SPxSolver::computeFtest(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxBasis::coSolve(), SPxSolver::coSolveVector2, SPxSolver::coSolveVector3, SPxBasis::desc(), SPxSolver::dim(), SPxBasis::DUAL, SPxSolver::dualDegenSum, SPxSolver::ENTER, SPxSolver::enter(), SPxSolver::enterCount, SPxSolver::enterCycles, SPxPricer::entered4(), SPxSolver::entertol(), SPxPricer::epsilon(), SPxSolver::epsilon(), SPxSolver::ERROR, SPxSolver::factorize(), SPxSolver::feastol(), SPxSolver::forceRecompNonbasicValue(), SPxSolver::fRhs(), SPxSolver::fTest(), SPxSolver::fVec(), SPxStarter::generate(), SPxOut::getCurrentStream(), SPxRatioTester::getDelta(), SPxSolver::getPrimal(), soplex::GT(), SPxSolver::hyperPricingEnter, SPxSolver::hyperPricingLeave, SVectorBase< R >::index(), SPxSolver::infeasibilities, SPxSolver::infeasibilitiesCo, SPxBasis::INFEASIBLE, soplex::infinity, SPxSolver::init(), SPxSolver::instableEnter, SPxSolver::instableEnterId, SPxSolver::instableEnterVal, SPxSolver::instableLeave, SPxSolver::instableLeaveNum, SPxSolver::instableLeaveVal, SPxSolver::isColBasic(), SPxSolver::isInfeasible, SPxSolver::isInfeasibleCo, SPxSolver::isInitialized(), SPxSolver::isRowBasic(), SPxId::isSPxColId(), SPxId::isSPxRowId(), SPxId::isValid(), SPxBasis::iteration(), SPxSolver::iterations(), SPxBasis::iterCount, SPxBasis::iterDegenCheck, SPxBasis::lastEntered(), SPxBasis::lastIndex(), SPxBasis::lastIterCount, SPxBasis::lastLeft(), SPxBasis::lastUpdate(), SPxSolver::LEAVE, SPxSolver::leave(), SPxSolver::leaveCount, SPxSolver::leaveCycles, SPxSolver::leavetol(), SPxPricer::left4(), SPxLPBase< R >::lhs(), SPxBasis::load(), SPxSolver::loadBasis(), SPxLPBase< R >::lower(), soplex::LT(), SPxSolver::m_entertol, SPxSolver::m_leavetol, SPxSolver::m_numCycle, SPxSolver::m_status, SPxBasis::matrixIsSetup, MAXCYCLES, MAXIMUM, SPxSolver::maxInfeas(), SPxSolver::maxIters, MAXREFACPIVOTS, MAXSTALLRECOVERS, MAXSTALLS, MSG_DEBUG, MSG_INFO1, MSG_INFO2, MSG_INFO3, MSG_WARNING, SPxLPBase< R >::nCols(), SPxSolver::NO_PRICER, SPxSolver::NO_PROBLEM, SPxSolver::NO_RATIOTESTER, SPxSolver::NO_SOLVER, SPxPricer::NOT_VIOLATED, SPxLPBase< R >::nRows(), SPxLPBase< R >::number(), SPxSolver::objrange, SPxBasis::OPTIMAL, SPxSolver::OPTIMAL, SPxSolver::opttol(), SPxSolver::performSolutionPolishing(), SPxSolver::polishCount, SPxSolver::precisionReached(), SPxBasis::PRIMAL, SPxSolver::primalCount, SPxSolver::primalDegenSum, SPxSolver::printDisplayLine(), SPxSolver::recomputedVectors, SPxBasis::REGULAR, SPxSolver::REGULAR, SPxSolver::rep(), Timer::reset(), SPxLPBase< R >::rhs(), SPxLPBase< R >::rowVector(), SPxSolver::RUNNING, SPxPricer::selectEnter(), SPxPricer::selectLeave(), SPxSolver::setBasisStatus(), SPxRatioTester::setDelta(), SPxPricer::setEpsilon(), SPxOut::setScientific(), SPxPricer::setType(), SPxRatioTester::setType(), SPxSolver::setType(), SPxSolver::shift(), SPxSolver::siderange, SPxBasis::SINGULAR, SPxSolver::SINGULAR, SVectorBase< R >::size(), SPxSolver::slinSolver(), SPxBasis::solve(), SPxRatioTester::solver(), SPxPricer::solver(), SPxSolver::solveVector2, SPxSolver::solveVector3, SPxSolver::sparsePricingEnter, SPxSolver::sparsePricingEnterCo, SPxSolver::sparsePricingLeave, soplex::spxAbs(), SPxSolver::spxout, Timer::start(), SPxBasis::status(), SPxSolver::status(), Timer::stop(), SPxSolver::terminate(), SPxSolver::testBounds(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theCumulativeTime, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::thepricer, SPxSolver::theratiotester, SPxSolver::thestarter, SPxSolver::theTest, SPxSolver::theTime, SPxSolver::time(), SPxSolver::totalboundflips, SPxSolver::type(), SPxBasis::UNBOUNDED, SPxSolver::UNKNOWN, SPxSolver::unShift(), SPxSolver::updateViols, SPxSolver::updateViolsCo, SPxLPBase< R >::upper(), SVectorBase< R >::value(), SPxSolver::value(), and SPxPricer::VIOLATED.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
SPxStarter* starter | ( | ) | const |
return current starter.
Definition at line 524 of file spxsolver.h.
std::string statistics | ( | ) | const |
returns statistical information in form of a string.
Definition at line 2212 of file spxsolver.h.
SPxSolver::Status status | ( | void | ) | const |
Status of solution process.
Definition at line 2213 of file spxsolve.cpp.
References SPxSolver::ABORT_CYCLING, SPxSolver::ABORT_DECOMP, SPxSolver::ABORT_EXDECOMP, SPxSolver::ABORT_ITER, SPxSolver::ABORT_TIME, SPxSolver::ABORT_VALUE, SPxBasis::DUAL, SPxSolver::ERROR, SPxBasis::INFEASIBLE, SPxSolver::INFEASIBLE, SPxSolver::m_status, SPxSolver::NO_PRICER, SPxBasis::NO_PROBLEM, SPxSolver::NO_PROBLEM, SPxSolver::NO_RATIOTESTER, SPxSolver::NO_SOLVER, SPxSolver::NOT_INIT, SPxBasis::OPTIMAL, SPxSolver::OPTIMAL, SPxBasis::PRIMAL, SPxBasis::REGULAR, SPxSolver::REGULAR, SPxSolver::RUNNING, SPxBasis::SINGULAR, SPxSolver::SINGULAR, SPxBasis::status(), SPxBasis::UNBOUNDED, SPxSolver::UNBOUNDED, and SPxSolver::UNKNOWN.
Referenced by SoPlex::_decompResolveWithoutPreprocessing(), SoPlex::_evaluateSolutionDecomp(), SoPlex::_evaluateSolutionReal(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealForRational(), SoPlex::clearBasis(), SPxSolver::getBasis(), SPxSolver::getDual(), SPxSolver::getDualfarkas(), SPxSolver::getPrimal(), SPxSolver::getPrimalray(), SPxSolver::getRedCost(), SPxSolver::getResult(), SPxSolver::getSlacks(), SPxSolver::performSolutionPolishing(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), and SPxSolver::solve().
int subversion | ( | ) | const |
return the internal subversion of SPxSolver as number
Definition at line 501 of file spxsolver.h.
Real sumDualDegeneracy | ( | ) |
get the sum of dual degeneracy
Definition at line 2106 of file spxsolver.h.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
Real sumPrimalDegeneracy | ( | ) |
get the sum of primal degeneracy
Definition at line 2112 of file spxsolver.h.
Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().
|
virtual |
Termination criterion.
This method is called in each Simplex iteration to determine, if the algorithm is to terminate. In this case a nonzero value is returned.
This method is declared virtual to allow for implementation of other stopping criteria or using it as callback method within the Simplex loop, by overriding the method in a derived class. However, all implementations must terminate with the statement return
SPxSolver::terminate(), if no own termination criteria is encountered.
Note, that the Simplex loop stopped even when terminate() returns 0, if the LP has been solved to optimality (i.e. no further pricing succeeds and no shift is present).
Definition at line 1637 of file spxsolve.cpp.
References SPxSolver::ABORT_DECOMP, SPxSolver::ABORT_EXDECOMP, SPxSolver::ABORT_TIME, SPxSolver::ABORT_VALUE, SPxSolver::COLUMN, SPxSolver::computeEnterCoPrhs(), SPxSolver::computeFrhs(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxBasis::coSolve(), SPxSolver::dim(), SPxBasis::DUAL, SPxSolver::dualDegenSum, SPxSolver::ENTER, SPxSolver::entertol(), SPxSolver::epsilon(), SPxSolver::factorize(), SPxSolver::FULL, SPxSolver::fVec(), SPxSolver::getComputeDegeneracy(), SPxSolver::getDecompIterationLimit(), SPxSolver::getDegenCompOffset(), SPxSolver::getDegeneracyLevel(), SPxSolver::getPrimal(), SPxSolver::getStartingDecompBasis, soplex::infinity, SPxSolver::isTimeLimitReached(), SPxBasis::iteration(), SPxBasis::iterCount, SPxBasis::iterDegenCheck, SPxBasis::lastDegenCheck(), SPxBasis::lastIterCount, SPxSolver::LEAVE, SPxSolver::leavetol(), VectorBase< R >::length(), SPxSolver::m_status, SPxSolver::maxTime, MINIMUM, MSG_DEBUG, MSG_INFO2, MSG_INFO3, MSG_WARNING, SPxLPBase< R >::nCols(), SPxSolver::noViols(), SPxLPBase< R >::nRows(), SPxSolver::objLimit, SPxBasis::OPTIMAL, SPxSolver::opttol(), SPxBasis::prevIteration(), SPxSolver::pricing(), SPxSolver::primalDegenSum, SPxSolver::pVec(), SPxSolver::rep(), SPxSolver::ROW, SPxSolver::RUNNING, SPxSolver::setDecompIterationLimit(), SPxSolver::setDegenCompOffset(), SPxSolver::shift(), SPxBasis::SINGULAR, SPxBasis::solve(), SPxSolver::spxout, SPxLPBase< R >::spxSense(), SPxBasis::status(), SPxSolver::testVecs(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::type(), SPxSolver::UNKNOWN, SPxSolver::unShift(), SPxBasis::updateCount, and SPxSolver::value().
Referenced by SPxSolver::solve().
|
virtual |
return iteration limit.
Definition at line 1651 of file spxsolver.cpp.
References SPxSolver::maxIters.
|
virtual |
|
virtual |
return objective limit.
Definition at line 1702 of file spxsolver.cpp.
References SPxSolver::objLimit.
const Vector& test | ( | ) | const |
Violations of pVec.
In entering Simplex pricing selects checks vectors coPvec() and pVec() for violation of its bounds. Vector test() contains the violations for pVec(), i.e., if test()[i] < 0, the i'th element of pVec() is violated by test()[i]. Vector test() is only up to date for FULL pricing.
Definition at line 1531 of file spxsolver.h.
Referenced by SPxDevexPR::buildBestPriceVectorEnterCoDim(), SPxSteepPR::buildBestPriceVectorEnterCoDim(), SPxSolver::computeTest(), SPxSolver::qualRedCostViolation(), SPxParMultPR::selectEnter(), SPxWeightPR::selectEnter(), SPxDantzigPR::selectEnterDenseCoDim(), SPxDevexPR::selectEnterDenseCoDim(), SPxSteepPR::selectEnterDenseCoDim(), SPxDevexPR::selectEnterHyperCoDim(), SPxSteepPR::selectEnterHyperCoDim(), SPxDantzigPR::selectEnterSparseCoDim(), SPxDevexPR::selectEnterSparseCoDim(), SPxSteepPR::selectEnterSparseCoDim(), and SPxSolver::updateTest().
|
private |
test vector i
with status stat
.
Definition at line 64 of file enter.cpp.
References SPxSolver::COLUMN, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxSolver::ENTER, SPxSolver::isBasic(), SPxLPBase< R >::lhs(), SPxLPBase< R >::maxObj(), SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxSolver::thePvec, and SPxSolver::type().
void testBounds | ( | ) | const |
Definition at line 328 of file spxbounds.cpp.
References SPxSolver::coDim(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::entertol(), SPxBasis::iterCount, SPxSolver::leavetol(), MSG_INFO2, SPxSolver::spxout, SPxSolver::theCoLbound, SPxSolver::theCoPvec, SPxSolver::theCoUbound, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLbound, SPxSolver::thePvec, SPxSolver::theUBbound, SPxSolver::theUbound, and SPxSolver::type().
Referenced by SPxSolver::reinitializeVecs(), SPxSolver::shiftFvec(), SPxSolver::shiftPvec(), and SPxSolver::solve().
void testVecs | ( | ) |
Definition at line 1515 of file spxsolve.cpp.
References VectorBase< R >::clear(), SPxSolver::coDim(), SPxBasis::coSolve(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::entertol(), SPxSolver::isBasic(), SPxSolver::isCoBasic(), SPxBasis::iteration(), SPxSolver::leavetol(), VectorBase< R >::length(), MSG_INFO1, MSG_INFO3, SPxBasis::multBaseWith(), SPxBasis::multWithBase(), SPxBasis::SINGULAR, SPxBasis::solve(), SPxSolver::spxout, SPxBasis::status(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theTest, and SPxSolver::type().
Referenced by SPxSolver::factorize(), and SPxSolver::terminate().
Real time | ( | ) | const |
time spent in last call to method solve().
Definition at line 2143 of file spxsolver.h.
Referenced by SPxBasis::change(), SPxSolver::isTimeLimitReached(), SPxSolver::printDisplayLine(), and SPxSolver::solve().
Type type | ( | ) | const |
return current Type.
Definition at line 512 of file spxsolver.h.
Referenced by SoPlex::_solveDecompositionDualSimplex(), SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_solveRealStable(), SPxDevexPR::addedCoVecs(), SPxDevexPR::addedVecs(), SPxSteepPR::addedVecs(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeFrhs(), SPxSolver::computeFrhsXtra(), SPxSolver::computeFtest(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::coTest(), SPxSolver::enter(), SPxSteepPR::entered4(), SPxSolver::factorize(), SPxSolver::getDegeneracyLevel(), SPxSolver::getDualNorms(), SPxSolver::getNdualNorms(), SPxSolver::init(), SPxSteepPR::isConsistent(), SPxSolver::leave(), SPxSteepPR::left4(), SPxHybridPR::load(), SPxAutoPR::load(), SPxFastRT::load(), SPxSolver::maxInfeas(), SPxSolver::nonbasicValue(), SPxSolver::noViols(), SPxSolver::performSolutionPolishing(), SoPlex::printDecompDisplayLine(), SPxSolver::printDisplayLine(), SPxSolver::qualRedCostViolation(), SPxSolver::reinitializeVecs(), SPxSteepPR::removedVecs(), SPxSolver::setDualNorms(), SPxSolver::setPricing(), SPxWeightST::setupWeights(), SPxSolver::shiftFvec(), SPxSolver::shiftPvec(), SPxSolver::solve(), SPxSolver::terminate(), SPxSolver::test(), SPxSolver::testBounds(), SPxSolver::testVecs(), SPxSolver::unShift(), SPxSolver::updateFtest(), and SPxSolver::value().
const Vector& ubBound | ( | ) | const |
upper bound for fVec.
Definition at line 1341 of file spxsolver.h.
Referenced by SPxFastRT::maxDelta(), SPxFastRT::maxReLeave(), SPxFastRT::maxSelect(), SPxFastRT::maxShortLeave(), SPxFastRT::minDelta(), SPxFastRT::minReLeave(), SPxFastRT::minSelect(), SPxFastRT::minShortLeave(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMinEnter(), SPxDefaultRT::selectLeave(), SPxHarrisRT::selectLeave(), and SPxBoundFlippingRT::selectLeave().
Vector& ubBound | ( | ) |
upper bound for fVec, writable.
This method returns the upper bound for the feasibility vector. It may only be called for the ENTERing Simplex.
For the ENTERing Simplex algorithms, the feasibility vector is maintained to fullfill its bounds. As fVec itself, also its bounds depend on the chosen representation. Further, they may need to be shifted (see below).
Definition at line 1354 of file spxsolver.h.
const Vector& ucBound | ( | ) | const |
Definition at line 1417 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), and SPxBoundFlippingRT::selectEnter().
Vector& ucBound | ( | ) |
upper bound for coPvec.
This method returns the upper bound for coPvec. It may only be called for the leaving Simplex algorithm.
For the leaving Simplex algorithms coPvec is maintained to fullfill its bounds. As coPvec itself, also its bound depend on the chosen representation. Further, they may need to be shifted (see below).
Definition at line 1431 of file spxsolver.h.
|
protectedvirtual |
Definition at line 1083 of file enter.cpp.
References SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::desc(), SPxSolver::isId(), SPxSolver::isInfeasible, SPxSolver::isInfeasibleCo, SPxId::isSPxColId(), SPxId::isSPxRowId(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), VectorBase< R >::multAdd(), SPxPricer::NOT_VIOLATED, SPxLPBase< R >::number(), SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxBasis::Desc::rowStatus(), SPxSolver::theCoTest, SPxSolver::theFrhs, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::theTest, SPxSolver::theUCbound, and SPxSolver::theURbound.
Referenced by SPxSolver::enter().
|
protectedvirtual |
uninitialize data structures.
Definition at line 1859 of file spxsolver.h.
Referenced by SPxSolver::addedCols(), SPxSolver::addedRows(), SPxSolver::changeCol(), SPxSolver::changeElement(), SPxSolver::changeLhs(), SPxSolver::changeLower(), SPxSolver::changeMaxObj(), SPxSolver::changeObj(), SPxSolver::changeRange(), SPxSolver::changeRhs(), SPxSolver::changeRow(), SPxSolver::changeRowObj(), SPxSolver::changeSense(), SPxSolver::changeUpper(), SPxSolver::clear(), SPxSolver::doRemoveCol(), SPxSolver::doRemoveCols(), SPxSolver::doRemoveRow(), SPxSolver::doRemoveRows(), SPxSolver::initRep(), SPxSolver::loadBasis(), SPxSolver::loadLP(), SPxSolver::read(), SPxSolver::reLoad(), SPxSolver::setType(), and SPxSolver::unscaleLPandReloadBasis().
const SVector& unitVector | ( | int | i | ) | const |
return i
'th unit vector.
Definition at line 1236 of file spxsolver.h.
Referenced by SoPlex::_getCompatibleBoundCons(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SPxSteepPR::isConsistent(), SPxSteepPR::selectLeave(), and SPxSteepPR::setupWeights().
void unscaleLPandReloadBasis | ( | ) |
unscales the LP and reloads the basis
Definition at line 534 of file spxsolver.cpp.
References SPxSolver::init(), SPxBasis::invalidate(), SPxSolver::unInit(), and SPxLPBase< R >::unscaleLP().
Referenced by SoPlex::_checkBasisScaling(), SoPlex::_optimizeReal(), and SoPlex::_verifySolutionReal().
|
virtual |
remove shift as much as possible.
Definition at line 511 of file spxshift.cpp.
References SPxBasis::baseId(), SPxSolver::clearDualBounds(), SPxId::COL_ID, SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxBasis::desc(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::entertol(), SPxSolver::isBasic(), SPxSolver::isInitialized(), SPxSolver::LEAVE, SPxSolver::leavetol(), SPxLPBase< R >::lhs(), SPxLPBase< R >::lower(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), MSG_INFO3, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::number(), SPxSolver::rep(), SPxLPBase< R >::rhs(), SPxSolver::ROW, SPxId::ROW_ID, SPxBasis::Desc::rowStatus(), SPxSolver::spxout, SPxSolver::theCoPvec, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLCbound, SPxSolver::theLRbound, SPxSolver::thePvec, SPxSolver::theShift, SPxSolver::theUBbound, SPxSolver::theUCbound, SPxSolver::theURbound, SPxId::type(), SPxSolver::type(), and SPxLPBase< R >::upper().
Referenced by SPxSolver::solve(), and SPxSolver::terminate().
const Vector& upBound | ( | ) | const |
Definition at line 1483 of file spxsolver.h.
Referenced by SPxBoundFlippingRT::getData(), SPxFastRT::maxDelta(), SPxFastRT::maxReEnter(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minReEnter(), SPxFastRT::minSelect(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinLeave(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), and SPxBoundFlippingRT::selectEnter().
Vector& upBound | ( | ) |
upper bound for pVec.
This method returns the upper bound for pVec. It may only be called for the leaving Simplex algorithm.
For the leaving Simplex algorithms pVec is maintained to fullfill its bounds. As pVec itself, also its bound depend on the chosen representation. Further, they may need to be shifted (see below).
Definition at line 1497 of file spxsolver.h.
|
private |
recompute coTest vector.
Definition at line 377 of file enter.cpp.
References DIdxSet::addIdx(), IdxSet::clear(), SPxBasis::Desc::coStatus(), SPxSolver::coTest(), UpdateVector::delta(), SPxBasis::desc(), SPxSolver::getEnterVals(), SPxSolver::hyperPricingEnter, UpdateVector::idx(), IdxSet::index(), SPxSolver::infeasibilities, SPxSolver::isBasic(), SPxSolver::isInfeasible, SPxSolver::leavetol(), SPxSolver::m_pricingViol, SPxSolver::m_pricingViolUpToDate, SPxPricer::NOT_VIOLATED, SPxSolver::remainingRoundsEnter, SSVectorBase< R >::setup(), IdxSet::size(), SPxSolver::sparsePricingEnter, SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::updateViols, and SPxPricer::VIOLATED.
Referenced by SPxSolver::enter().
|
private |
update basis feasibility test vector.
Definition at line 107 of file leave.cpp.
References DIdxSet::addIdx(), SPxSolver::boundflips, IdxSet::clear(), SPxSolver::entertol(), SPxSolver::epsilon(), SPxSolver::fTest(), SPxSolver::hyperPricingLeave, UpdateVector::idx(), IdxSet::index(), SSVectorBase< R >::index(), SPxSolver::infeasibilities, SPxSolver::isInfeasible, SPxSolver::LEAVE, SPxSolver::m_pricingViol, SPxSolver::m_pricingViolUpToDate, SPxPricer::NOT_VIOLATED, SPxSolver::remainingRoundsLeave, IdxSet::size(), SSVectorBase< R >::size(), SPxSolver::solveVector3, SPxSolver::sparsePricingLeave, soplex::spxAbs(), SPxSolver::theCoTest, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theUBbound, SPxSolver::type(), SPxSolver::updateViols, SSVectorBase< R >::value(), and SPxPricer::VIOLATED.
Referenced by SPxSolver::leave().
bool updateNonbasicValue | ( | Real | objChange | ) |
Definition at line 962 of file spxsolver.cpp.
References SPxBasis::iteration(), SPxSolver::m_nonbasicValue, SPxSolver::m_nonbasicValueUpToDate, MSG_DEBUG, and SPxSolver::nonbasicValue().
Referenced by SPxSolver::changeLhsStatus(), SPxSolver::changeLowerStatus(), SPxSolver::changeRhsStatus(), SPxSolver::changeUpperStatus(), SPxSolver::enter(), SPxBoundFlippingRT::flipAndUpdate(), and SPxSolver::leave().
|
private |
recompute test vector.
Definition at line 322 of file enter.cpp.
References DIdxSet::addIdx(), IdxSet::clear(), UpdateVector::delta(), SPxBasis::desc(), SPxSolver::hyperPricingEnter, UpdateVector::idx(), IdxSet::index(), SPxSolver::infeasibilitiesCo, SPxSolver::isBasic(), SPxSolver::isInfeasibleCo, SPxSolver::leavetol(), SPxSolver::m_pricingViolCo, SPxSolver::m_pricingViolCoUpToDate, SPxPricer::NOT_VIOLATED, SPxSolver::remainingRoundsEnterCo, SSVectorBase< R >::setup(), IdxSet::size(), SPxSolver::sparsePricingEnterCo, SPxBasis::Desc::status(), SPxSolver::test(), SPxSolver::thePvec, SPxSolver::theTest, SPxSolver::updateViolsCo, and SPxPricer::VIOLATED.
Referenced by SPxSolver::enter().
void useFullPerturbation | ( | bool | full | ) |
perturb entire problem or only the bounds relevant to the current pivot
Definition at line 893 of file spxsolver.h.
Referenced by SoPlex::setBoolParam().
|
virtual |
current objective value.
Definition at line 939 of file spxsolver.cpp.
References SPxSolver::coPrhs(), SPxSolver::coPvec(), SPxSolver::fRhs(), SPxSolver::fVec(), soplex::infinity, SPxSolver::isInitialized(), SPxSolver::LEAVE, SPxSolver::nonbasicValue(), SPxLPBase< R >::objOffset(), SPxSolver::rep(), SPxSolver::ROW, SPxLPBase< Real >::spxSense(), and SPxSolver::type().
Referenced by SPxSolver::computeDualfarkas4Col(), SPxSolver::computeDualfarkas4Row(), SPxSolver::computePrimalray4Col(), SPxSolver::computePrimalray4Row(), SPxSolver::getResult(), SPxSolver::performSolutionPolishing(), SoPlex::printDecompDisplayLine(), SPxSolver::printDisplayLine(), SPxFastRT::selectLeave(), SPxSolver::solve(), and SPxSolver::terminate().
SPxBasis::Desc::Status varStatus | ( | int | i | ) | const |
Status of i
'th variable.
Definition at line 1251 of file spxsolver.h.
|
protected |
converts VarStatus to basis status for columns
Definition at line 1815 of file spxsolver.cpp.
References SPxSolver::BASIC, SPxBasis::dualColStatus(), SPxSolver::FIXED, soplex::infinity, SPxLPBase< R >::lower(), SPxLPBase< R >::maxObj(), MSG_ERROR, SPxSolver::ON_LOWER, SPxSolver::ON_UPPER, SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxLPBase< R >::upper(), and SPxSolver::ZERO.
Referenced by SPxSolver::setBasis().
|
protected |
converts VarStatus to basis status for rows
Definition at line 1748 of file spxsolver.cpp.
References SPxSolver::BASIC, SPxBasis::dualRowStatus(), soplex::EQ(), SPxSolver::feastol(), SPxSolver::FIXED, soplex::infinity, SPxLPBase< R >::lhs(), MSG_ERROR, SPxSolver::ON_LOWER, SPxSolver::ON_UPPER, SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxLPBase< R >::rhs(), and SPxSolver::ZERO.
Referenced by SPxSolver::setBasis().
const SVector& vector | ( | int | i | ) | const |
i
'th vector.
i
'th, 0 <= i < coDim(), vector of the loaded LP (with respect to the chosen representation). Definition at line 1157 of file spxsolver.h.
Referenced by SoPlex::_getCompatibleColumns(), SoPlex::_updateDecompReducedProblemViol(), SPxSolver::computeFrhs(), SPxSolver::computeFrhs1(), SPxSolver::computeFrhsXtra(), SPxSolver::computePvec(), SPxSteepPR::entered4(), SPxBoundFlippingRT::flipAndUpdate(), SPxWeightST::generate(), SPxBoundFlippingRT::getData(), SPxBasis::loadDesc(), SPxBasis::loadMatrixVecs(), SPxFastRT::maxReEnter(), SPxFastRT::minReEnter(), SPxBasis::removedCol(), SPxBasis::removedRow(), SPxHarrisRT::selectEnter(), SPxSteepPR::selectEnter(), SPxBoundFlippingRT::selectEnter(), and SPxSteepPR::setupWeights().
Definition at line 1163 of file spxsolver.h.
Definition at line 1171 of file spxsolver.h.
vector associated to p_id
.
id
(with respect to the chosen representation). If p_id
is an id, a vector of the constraint matrix is returned, otherwise the corresponding unit vector (of the slack variable or bound inequality) is returned. Definition at line 1188 of file spxsolver.h.
int version | ( | ) | const |
return the version of SPxSolver as number like 123 for 1.2.3
Definition at line 496 of file spxsolver.h.
|
virtual |
Write basis to filename
in MPS format. If rowNames
and colNames
are NULL
, default names are used for the constraints and variables.
Definition at line 39 of file spxfileio.cpp.
References SPxBasis::writeBasis().
Referenced by SPxSolver::readBasisFile(), SoPlex::writeBasisFile(), and SPxSolver::writeState().
|
virtual |
Write current LP, basis, and parameter settings. LP is written in MPS format to "\p filename".mps, basis is written in "\p filename".bas, and parameters are written to "\p filename".set. If rowNames
and colNames
are NULL
, default names are used for the constraints and variables.
Definition at line 31 of file spxwritestate.cpp.
References SPxSolver::basis(), SPxSolver::COLUMN, SPxSolver::epsilon(), SPxSolver::feastol(), SPxBasis::getMaxUpdates(), Random::getSeed(), soplex::infinity, SPxSolver::opttol(), SPxSolver::pricer(), SPxSolver::random, SPxSolver::ratiotester(), SPxSolver::rep(), SOPLEX_SUBVERSION, SOPLEX_VERSION, SPxSolver::writeBasisFile(), and SPxLPBase< R >::writeMPS().
|
friend |
Definition at line 88 of file spxsolver.h.
|
friend |
Definition at line 87 of file spxsolver.h.
|
protected |
storage for thePvec = &addVec
Definition at line 344 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
protected |
number of performed bound flips
Definition at line 392 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::leave(), SPxSolver::operator=(), SPxBoundFlippingRT::selectEnter(), SPxBoundFlippingRT::selectLeave(), SPxSolver::solve(), and SPxSolver::updateFtest().
|
protected |
absolute range of all bounds in the problem
Definition at line 406 of file spxsolver.h.
Referenced by SPxSolver::calculateProblemRanges(), SPxSolver::operator=(), and SPxSolver::solve().
|
private |
Definition at line 318 of file spxsolver.h.
Referenced by SPxSolver::operator=().
|
private |
when 2 systems are to be solved at a time; typically for speepest edge weights
Definition at line 283 of file spxsolver.h.
Referenced by SPxSolver::clearUpdateVecs(), SPxSolver::enter(), and SPxSolver::solve().
|
private |
when 2 systems are to be solved at a time; typically for speepest edge weights
Definition at line 285 of file spxsolver.h.
Referenced by SPxSolver::enter().
|
private |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!)
Definition at line 287 of file spxsolver.h.
Referenced by SPxSolver::clearUpdateVecs(), SPxSolver::enter(), and SPxSolver::solve().
|
private |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!)
Definition at line 289 of file spxsolver.h.
Referenced by SPxSolver::enter().
DVector coWeights |
store dual norms
Definition at line 460 of file spxsolver.h.
Referenced by SPxDevexPR::addedCoVecs(), SPxSteepPR::addedCoVecs(), SPxDevexPR::buildBestPriceVectorEnterDim(), SPxSteepPR::buildBestPriceVectorEnterDim(), SPxDevexPR::buildBestPriceVectorLeave(), SPxSteepPR::buildBestPriceVectorLeave(), SPxDevexPR::entered4(), SPxSteepPR::entered4(), SPxSolver::getDualNorms(), SPxSolver::getNdualNorms(), SPxSteepPR::isConsistent(), SPxDevexPR::left4(), SPxSteepPR::left4(), SPxSolver::operator=(), SPxSteepPR::removedCoVec(), SPxSteepPR::removedCoVecs(), SPxDevexPR::selectEnterDenseDim(), SPxSteepPR::selectEnterDenseDim(), SPxDevexPR::selectEnterHyperDim(), SPxSteepPR::selectEnterHyperDim(), SPxDevexPR::selectEnterSparseDim(), SPxSteepPR::selectEnterSparseDim(), SPxDevexPR::selectLeaveHyper(), SPxSteepPR::selectLeaveHyper(), SPxDevexPR::selectLeaveSparse(), SPxSteepPR::selectLeaveSparse(), SPxDevexPR::selectLeaveX(), SPxSteepPR::selectLeaveX(), SPxSolver::setDualNorms(), SPxSteepPR::setRep(), SPxParMultPR::setType(), SPxPricer::setType(), SPxSteepPR::setupWeights(), and SPxDevexPR::setupWeights().
|
private |
the maximum number of iterations before the decomposition simplex is aborted.
Definition at line 322 of file spxsolver.h.
Referenced by SPxSolver::operator=().
|
private |
the number of iterations performed before the degeneracy level is computed
Definition at line 320 of file spxsolver.h.
Referenced by SPxSolver::operator=().
|
private |
Definition at line 313 of file spxsolver.h.
Referenced by SPxSolver::operator=(), and SPxSolver::printDisplayLine().
|
private |
Definition at line 312 of file spxsolver.h.
Referenced by SPxSolver::operator=(), and SPxSolver::printDisplayLine().
|
protected |
the sum of the dual degeneracy percentage
Definition at line 400 of file spxsolver.h.
Referenced by SPxSolver::solve(), and SPxSolver::terminate().
|
protected |
stores dual farkas proof in case of infeasibility
Definition at line 385 of file spxsolver.h.
Referenced by SPxSolver::computeDualfarkas4Col(), SPxSolver::computeDualfarkas4Row(), SPxSolver::getDualfarkas(), and SPxSolver::operator=().
|
protected |
rhs vector for computing the dual vector
Definition at line 342 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
protected |
dual vector
Definition at line 343 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
protected |
number of ENTER iterations
Definition at line 388 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxBoundFlippingRT::selectLeave(), and SPxSolver::solve().
|
protected |
the number of degenerate steps during the entering algorithm
Definition at line 395 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::operator=(), and SPxSolver::solve().
|
protected |
the number of degenerate candidates in the entering algorithm
Definition at line 397 of file spxsolver.h.
Referenced by SPxSolver::operator=().
|
private |
true iff thepricer should be freed inside of object
Definition at line 291 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::setPricer(), SPxSolver::SPxSolver(), and SPxSolver::~SPxSolver().
|
private |
true iff theratiotester should be freed inside of object
Definition at line 292 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::setTester(), SPxSolver::SPxSolver(), and SPxSolver::~SPxSolver().
|
private |
true iff thestarter should be freed inside of object
Definition at line 293 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::setStarter(), SPxSolver::SPxSolver(), and SPxSolver::~SPxSolver().
|
private |
whether to perturb the entire problem or just the bounds relevant for the current pivot
Definition at line 325 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::perturbMax(), and SPxSolver::perturbMin().
|
private |
flag to indicate whether the simplex is solved to get the starting improved dual simplex basis
Definition at line 317 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::printDisplayLine(), SPxSolver::setDecompStatus(), and SPxSolver::terminate().
bool hyperPricingEnter |
true if hyper sparse pricing is turned on in the entering Simplex
Definition at line 452 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::computeTest(), SPxSolver::hyperPricing(), SPxSolver::operator=(), SPxDevexPR::selectEnterX(), SPxSteepPR::selectEnterX(), SPxSolver::solve(), SPxSolver::updateCoTest(), and SPxSolver::updateTest().
bool hyperPricingLeave |
true if hyper sparse pricing is turned on in the leaving Simplex
Definition at line 451 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::hyperPricing(), SPxSolver::operator=(), SPxDevexPR::selectLeave(), SPxSteepPR::selectLeave(), SPxSolver::solve(), and SPxSolver::updateFtest().
DIdxSet infeasibilities |
For the leaving Simplex algorithm this vector contains the indices of infeasible basic variables; for the entering Simplex algorithm this vector contains the indices of infeasible slack variables.
Definition at line 429 of file spxsolver.h.
Referenced by SPxDevexPR::buildBestPriceVectorEnterDim(), SPxSteepPR::buildBestPriceVectorEnterDim(), SPxDevexPR::buildBestPriceVectorLeave(), SPxSteepPR::buildBestPriceVectorLeave(), SPxSolver::clear(), SPxSolver::computeCoTest(), SPxSolver::computeFtest(), SPxSolver::init(), SPxSolver::operator=(), SPxDantzigPR::selectEnterSparseDim(), SPxDevexPR::selectEnterSparseDim(), SPxSteepPR::selectEnterSparseDim(), SPxDantzigPR::selectLeaveSparse(), SPxDevexPR::selectLeaveSparse(), SPxSteepPR::selectLeaveSparse(), SPxSolver::solve(), SPxSolver::updateCoTest(), and SPxSolver::updateFtest().
DIdxSet infeasibilitiesCo |
For the entering Simplex algorithm these vectors contains the indices of infeasible basic variables.
Definition at line 432 of file spxsolver.h.
Referenced by SPxDevexPR::buildBestPriceVectorEnterCoDim(), SPxSteepPR::buildBestPriceVectorEnterCoDim(), SPxSolver::clear(), SPxSolver::computeTest(), SPxSolver::init(), SPxSolver::operator=(), SPxDantzigPR::selectEnterSparseCoDim(), SPxDevexPR::selectEnterSparseCoDim(), SPxSteepPR::selectEnterSparseCoDim(), SPxSolver::solve(), and SPxSolver::updateTest().
|
private |
true, if all vectors are setup.
Definition at line 272 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::factorize(), SPxSolver::init(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::operator=(), SPxSolver::read(), SPxSolver::reinitializeVecs(), and SPxSolver::setPricing().
|
private |
Definition at line 306 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxFastRT::selectLeave(), SPxBoundFlippingRT::selectLeave(), and SPxSolver::solve().
|
private |
Definition at line 305 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::operator=(), SPxBoundFlippingRT::selectLeave(), and SPxSolver::solve().
|
private |
Definition at line 307 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::operator=(), SPxBoundFlippingRT::selectLeave(), and SPxSolver::solve().
|
private |
Definition at line 299 of file spxsolver.h.
Referenced by SPxSolver::leave(), SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), and SPxSolver::solve().
|
private |
Definition at line 298 of file spxsolver.h.
Referenced by SPxSolver::leave(), SPxSolver::operator=(), SPxBoundFlippingRT::selectEnter(), and SPxSolver::solve().
|
private |
Definition at line 300 of file spxsolver.h.
Referenced by SPxSolver::leave(), SPxSolver::operator=(), SPxBoundFlippingRT::selectEnter(), and SPxSolver::solve().
DataArray<int> integerVariables |
supplementary variable information, 0: continous variable, 1: integer variable
Definition at line 466 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxFastRT::selectEnter(), SPxFastRT::selectLeave(), and SPxSolver::setIntegralityInformation().
DataArray<int> isInfeasible |
0: index not violated, 1: index violated, 2: index violated and among candidate list
Binary vectors to store whether basic indices are infeasible the i-th entry equals false, if the i-th basic variable is not infeasible the i-th entry equals true, if the i-th basic variable is infeasible
Definition at line 443 of file spxsolver.h.
Referenced by SPxDevexPR::buildBestPriceVectorEnterDim(), SPxSteepPR::buildBestPriceVectorEnterDim(), SPxDevexPR::buildBestPriceVectorLeave(), SPxSteepPR::buildBestPriceVectorLeave(), SPxSolver::clear(), SPxSolver::computeCoTest(), SPxSolver::computeFtest(), SPxSolver::init(), SPxSolver::operator=(), SPxDevexPR::selectEnterHyperDim(), SPxSteepPR::selectEnterHyperDim(), SPxDantzigPR::selectEnterSparseDim(), SPxDevexPR::selectEnterSparseDim(), SPxSteepPR::selectEnterSparseDim(), SPxDevexPR::selectLeaveHyper(), SPxSteepPR::selectLeaveHyper(), SPxDantzigPR::selectLeaveSparse(), SPxDevexPR::selectLeaveSparse(), SPxSteepPR::selectLeaveSparse(), SPxSolver::solve(), SPxSolver::ungetEnterVal(), SPxSolver::updateCoTest(), and SPxSolver::updateFtest().
DataArray<int> isInfeasibleCo |
0: index not violated, 1: index violated, 2: index violated and among candidate list
Definition at line 445 of file spxsolver.h.
Referenced by SPxDevexPR::buildBestPriceVectorEnterCoDim(), SPxSteepPR::buildBestPriceVectorEnterCoDim(), SPxSolver::clear(), SPxSolver::computeTest(), SPxSolver::init(), SPxSolver::operator=(), SPxDevexPR::selectEnterHyperCoDim(), SPxSteepPR::selectEnterHyperCoDim(), SPxDantzigPR::selectEnterSparseCoDim(), SPxDevexPR::selectEnterSparseCoDim(), SPxSteepPR::selectEnterSparseCoDim(), SPxSolver::solve(), SPxSolver::ungetEnterVal(), and SPxSolver::updateTest().
|
private |
for forcing feasibility.
Definition at line 269 of file spxsolver.h.
Referenced by SPxSolver::init(), SPxSolver::operator=(), and SPxSolver::reinitializeVecs().
|
protected |
number of LEAVE iterations
Definition at line 387 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxBoundFlippingRT::selectEnter(), and SPxSolver::solve().
|
protected |
the number of degenerate steps during the leaving algorithm
Definition at line 396 of file spxsolver.h.
Referenced by SPxSolver::leave(), SPxSolver::operator=(), and SPxSolver::solve().
|
protected |
the number of degenerate candidates in the leaving algorithm
Definition at line 398 of file spxsolver.h.
Referenced by SPxSolver::operator=().
|
private |
feasibility tolerance maintained during entering algorithm
Definition at line 266 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::setDelta(), SPxSolver::setFeastol(), SPxSolver::setOpttol(), and SPxSolver::solve().
|
private |
feasibility tolerance maintained during leaving algorithm
Definition at line 267 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::setDelta(), SPxSolver::setFeastol(), SPxSolver::setOpttol(), and SPxSolver::solve().
|
private |
maximum steps before cycling is detected.
Definition at line 270 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::leave(), and SPxSolver::operator=().
|
private |
nonbasic part of current objective value
Definition at line 257 of file spxsolver.h.
Referenced by SPxSolver::nonbasicValue(), SPxSolver::operator=(), and SPxSolver::updateNonbasicValue().
|
private |
true, if the stored objValue is up to date
Definition at line 258 of file spxsolver.h.
Referenced by SPxSolver::changeLhsStatus(), SPxSolver::changeLowerStatus(), SPxSolver::changeRhsStatus(), SPxSolver::changeUpperStatus(), SPxSolver::nonbasicValue(), SPxSolver::operator=(), and SPxSolver::updateNonbasicValue().
|
private |
actual number of degenerate steps so far.
Definition at line 271 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::init(), SPxSolver::leave(), SPxSolver::operator=(), and SPxSolver::solve().
|
private |
maximal feasibility violation of current solution
Definition at line 260 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::computeFtest(), SPxSolver::factorize(), SPxSolver::leave(), SPxSolver::maxInfeas(), SPxSolver::operator=(), SPxSolver::printDisplayLine(), SPxSolver::updateCoTest(), and SPxSolver::updateFtest().
|
private |
maximal feasibility violation of current solution in coDim
Definition at line 263 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::computeTest(), SPxSolver::factorize(), SPxSolver::maxInfeas(), SPxSolver::operator=(), SPxSolver::printDisplayLine(), and SPxSolver::updateTest().
|
private |
true, if the stored violation in coDim is up to date
Definition at line 264 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::computeTest(), SPxSolver::maxInfeas(), SPxSolver::operator=(), and SPxSolver::updateTest().
|
private |
true, if the stored violation is up to date
Definition at line 261 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::computeFtest(), SPxSolver::maxInfeas(), SPxSolver::operator=(), SPxSolver::updateCoTest(), and SPxSolver::updateFtest().
|
private |
status of algorithm.
Definition at line 255 of file spxsolver.h.
Referenced by SPxSolver::factorize(), SPxSolver::operator=(), SPxSolver::reLoad(), SPxSolver::solve(), SPxSolver::status(), and SPxSolver::terminate().
|
private |
maximum allowed iterations.
Definition at line 250 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxSolver::setTerminationIter(), SPxSolver::solve(), and SPxSolver::terminationIter().
|
private |
maximum allowed time.
Definition at line 251 of file spxsolver.h.
Referenced by SPxSolver::isTimeLimitReached(), SPxSolver::operator=(), SPxSolver::setTerminationTime(), SPxSolver::terminate(), and SPxSolver::terminationTime().
|
private |
Definition at line 253 of file spxsolver.h.
Referenced by SPxSolver::isTimeLimitReached(), and SPxSolver::resetClockStats().
|
private |
remaining number of times the clock can be safely skipped
Definition at line 252 of file spxsolver.h.
Referenced by SPxSolver::isTimeLimitReached(), and SPxSolver::resetClockStats().
|
private |
< the number of calls to the method isTimeLimitReached()
objective value limit.
Definition at line 254 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::setTerminationValue(), SPxSolver::terminate(), and SPxSolver::terminationValue().
|
protected |
absolute range of all objective coefficients in the problem
Definition at line 408 of file spxsolver.h.
Referenced by SPxSolver::calculateProblemRanges(), SPxSolver::operator=(), and SPxSolver::solve().
|
protected |
number of solution polishing iterations
Definition at line 390 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), and SPxSolver::solve().
|
private |
objective of solution polishing
Definition at line 246 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxFastRT::selectEnter(), and SPxFastRT::selectLeave().
|
protected |
number of primal iterations
Definition at line 389 of file spxsolver.h.
Referenced by SPxSolver::operator=(), and SPxSolver::solve().
|
protected |
the sum of the primal degeneracy percentage
Definition at line 399 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::solve(), and SPxSolver::terminate().
|
protected |
stores primal ray in case of unboundedness
Definition at line 384 of file spxsolver.h.
Referenced by SPxSolver::computePrimalray4Col(), SPxSolver::computePrimalray4Row(), SPxSolver::getPrimalray(), and SPxSolver::operator=().
|
protected |
rhs vector for computing the primal vector
Definition at line 340 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
protected |
primal vector
Definition at line 341 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
private |
printing the current condition number in the log (0 - off, 1 - estimate,exact, 2 - exact)";ratio estimate , 3 - sum estimate, 4 - product estimate)
Definition at line 327 of file spxsolver.h.
Referenced by SPxSolver::operator=(), and SPxSolver::printDisplayLine().
Random random |
The random number generator used throughout the whole computation. Its seed can be modified.
Definition at line 424 of file spxsolver.h.
Referenced by SPxSolver::perturbMax(), SPxSolver::perturbMin(), SoPlex::printUserSettings(), SoPlex::randomSeed(), SoPlex::saveSettingsFile(), SoPlex::setRandomSeed(), SPxSolver::shiftFvec(), SPxSolver::shiftPvec(), and SPxSolver::writeState().
|
private |
flag to perform clean up step to reduce numerical errors only once
Definition at line 310 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::leave(), and SPxSolver::solve().
int remainingRoundsEnter |
Definition at line 455 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::operator=(), and SPxSolver::updateCoTest().
int remainingRoundsEnterCo |
Definition at line 456 of file spxsolver.h.
Referenced by SPxSolver::computeTest(), SPxSolver::operator=(), and SPxSolver::updateTest().
int remainingRoundsLeave |
number of dense rounds/refactorizations until sparsePricing is enabled again
Definition at line 454 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::operator=(), and SPxSolver::updateFtest().
|
protected |
absolute range of all side in the problem
Definition at line 407 of file spxsolver.h.
Referenced by SPxSolver::calculateProblemRanges(), SPxSolver::operator=(), and SPxSolver::solve().
|
private |
when 2 systems are to be solved at a time; typically for speepest edge weights
Definition at line 275 of file spxsolver.h.
Referenced by SPxSolver::clearUpdateVecs(), SPxSolver::leave(), and SPxSolver::solve().
|
private |
when 2 systems are to be solved at a time; typically for speepest edge weights
Definition at line 277 of file spxsolver.h.
Referenced by SPxSolver::leave().
|
private |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!)
Definition at line 279 of file spxsolver.h.
Referenced by SPxSolver::clearUpdateVecs(), SPxSolver::leave(), SPxSolver::solve(), and SPxSolver::updateFtest().
|
private |
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!)
Definition at line 281 of file spxsolver.h.
Referenced by SPxSolver::leave().
bool sparsePricingEnter |
true if sparsePricing is turned on in the entering Simplex for slack variables
Definition at line 449 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::operator=(), SPxDantzigPR::selectEnterX(), SPxDevexPR::selectEnterX(), SPxSteepPR::selectEnterX(), SPxSolver::solve(), and SPxSolver::updateCoTest().
bool sparsePricingEnterCo |
true if sparsePricing is turned on in the entering Simplex
Definition at line 450 of file spxsolver.h.
Referenced by SPxSolver::computeTest(), SPxSolver::operator=(), SPxDantzigPR::selectEnterX(), SPxDevexPR::selectEnterX(), SPxSteepPR::selectEnterX(), SPxSolver::solve(), and SPxSolver::updateTest().
|
private |
enable sparse pricing when viols < factor * dim()
Definition at line 314 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::computeFtest(), SPxSolver::computeTest(), and SPxSolver::operator=().
bool sparsePricingLeave |
These values enable or disable sparse pricing.
true if sparsePricing is turned on in the leaving Simplex
Definition at line 448 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::operator=(), SPxDantzigPR::selectLeave(), SPxDevexPR::selectLeave(), SPxSteepPR::selectLeave(), SPxSolver::solve(), and SPxSolver::updateFtest().
SPxOut* spxout |
message handler
Definition at line 463 of file spxsolver.h.
Referenced by SPxSolver::computeCoTest(), SPxSolver::computeFrhs2(), SPxSolver::computeFtest(), SPxSolver::computeTest(), SPxSolver::enter(), SPxSolver::factorize(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::leave(), SPxDevexPR::left4(), SPxSteepPR::left4(), SPxBasis::load(), SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxSolver::precisionReached(), SPxSolver::printDisplayLine(), SPxAutoPR::selectEnter(), SPxDevexPR::selectEnter(), SPxSteepPR::selectEnter(), SPxAutoPR::selectLeave(), SPxDevexPR::selectLeave(), SPxSteepPR::selectLeave(), SPxSolver::setBasisSolver(), SPxHybridPR::setType(), SPxSolver::setType(), SPxSteepPR::setupWeights(), SPxSolver::solve(), SPxSolver::terminate(), SPxSolver::testBounds(), SPxSolver::testVecs(), and SPxSolver::unShift().
|
protected |
Lower bound for covars.
Definition at line 378 of file spxsolver.h.
Referenced by SPxSolver::computeFrhs(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::operator=(), SPxSolver::shiftPvec(), SPxSolver::SPxSolver(), and SPxSolver::testBounds().
|
protected |
Definition at line 365 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::factorize(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::init(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::reinitializeVecs(), SPxSolver::solve(), SPxSolver::SPxSolver(), SPxSolver::terminate(), and SPxSolver::testVecs().
|
protected |
Definition at line 366 of file spxsolver.h.
Referenced by SPxSolver::clearUpdateVecs(), SPxSolver::coTest(), SPxSolver::doPupdate(), SPxSolver::enter(), SPxSolver::factorize(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals2(), SPxSolver::init(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxSolver::reDim(), SPxSolver::reinitializeVecs(), SPxSolver::setupPupdate(), SPxSolver::shiftPvec(), SPxSolver::solve(), SPxSolver::SPxSolver(), SPxSolver::terminate(), SPxSolver::testBounds(), SPxSolver::testVecs(), SPxSolver::unShift(), and SPxSolver::updateCoTest().
|
protected |
Definition at line 381 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::computeCoTest(), SPxSolver::computeFtest(), SPxSolver::getEnterVals(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::rejectEnter(), SPxSolver::solve(), SPxSolver::testVecs(), SPxSolver::ungetEnterVal(), SPxSolver::updateCoTest(), and SPxSolver::updateFtest().
|
protected |
Upper bound for covars.
Definition at line 377 of file spxsolver.h.
Referenced by SPxSolver::computeFrhs(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), SPxSolver::shiftPvec(), SPxSolver::SPxSolver(), and SPxSolver::testBounds().
|
protected |
the LP coVectors according to representation
Definition at line 338 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), SPxSolver::setupPupdate(), and SPxSolver::SPxSolver().
|
protected |
column pricing vector
Definition at line 371 of file spxsolver.h.
Referenced by SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
private |
cumulative time spent in all calls to method solve()
Definition at line 249 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::resetClockStats(), and SPxSolver::solve().
|
protected |
The values of the rhs corresponding to the current basis.
Definition at line 360 of file spxsolver.h.
Referenced by SPxSolver::computeFrhs(), SPxSolver::computeFrhs1(), SPxSolver::computeFrhsXtra(), SPxSolver::enter(), SPxSolver::factorize(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::init(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::reinitializeVecs(), SPxSolver::solve(), SPxSolver::SPxSolver(), SPxSolver::terminate(), SPxSolver::testVecs(), and SPxSolver::ungetEnterVal().
|
protected |
The values of all basis variables.
Definition at line 362 of file spxsolver.h.
Referenced by SPxSolver::clearUpdateVecs(), SPxSolver::computeFtest(), SPxSolver::enter(), SPxSolver::factorize(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::init(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxSolver::reDim(), SPxSolver::reinitializeVecs(), SPxSolver::shiftFvec(), SPxSolver::solve(), SPxSolver::SPxSolver(), SPxSolver::terminate(), SPxSolver::testBounds(), SPxSolver::testVecs(), SPxSolver::unShift(), and SPxSolver::updateFtest().
|
protected |
Lower Basic Feasibility bound.
Definition at line 357 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::enter(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::setEnterBound4Col(), SPxSolver::setEnterBound4Row(), SPxSolver::setLeaveBound4Col(), SPxSolver::setLeaveBound4Row(), SPxSolver::shiftFvec(), SPxSolver::testBounds(), SPxSolver::unShift(), and SPxSolver::updateFtest().
|
protected |
Lower bound for vars.
Definition at line 376 of file spxsolver.h.
Referenced by SPxSolver::computeFrhs(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::operator=(), SPxSolver::shiftPvec(), SPxSolver::SPxSolver(), and SPxSolver::testBounds().
|
protected |
Lower Column Feasibility bound.
Definition at line 349 of file spxsolver.h.
Referenced by SPxSolver::changeLowerStatus(), SPxSolver::changeUpperStatus(), SPxSolver::clear(), SPxSolver::computeLeaveCoPrhs4Col(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::nonbasicValue(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::rejectLeave(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxSolver::setEnterBound4Col(), SPxSolver::setPrimalBounds(), SPxSolver::SPxSolver(), SPxSolver::ungetEnterVal(), and SPxSolver::unShift().
|
protected |
Lower Row Feasibility bound.
Definition at line 347 of file spxsolver.h.
Referenced by SPxSolver::changeLhsStatus(), SPxSolver::changeRhsStatus(), SPxSolver::clear(), SPxSolver::computeLeaveCoPrhs4Row(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::nonbasicValue(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::rejectLeave(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxSolver::setEnterBound4Row(), SPxSolver::setPrimalBounds(), SPxSolver::SPxSolver(), SPxSolver::ungetEnterVal(), and SPxSolver::unShift().
|
protected |
Definition at line 402 of file spxsolver.h.
Referenced by SPxSolver::init(), SPxSolver::initRep(), SPxSolver::loadLP(), SPxSolver::operator=(), SPxSolver::precisionReached(), SPxSolver::read(), SPxSolver::reLoad(), SPxSolver::setPricer(), SPxSolver::solve(), SPxSolver::SPxSolver(), and SPxSolver::~SPxSolver().
|
private |
full or partial pricing.
Definition at line 244 of file spxsolver.h.
Referenced by SPxSolver::operator=(), and SPxSolver::setPricing().
|
protected |
The pricing vector
Definition at line 368 of file spxsolver.h.
Referenced by SPxSolver::clearUpdateVecs(), SPxSolver::computePvec(), SPxSolver::doPupdate(), SPxSolver::enter(), SPxSolver::getLeaveVals2(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxSolver::reDim(), SPxSolver::setupPupdate(), SPxSolver::shiftPvec(), SPxSolver::SPxSolver(), SPxSolver::test(), SPxSolver::testBounds(), SPxSolver::unShift(), and SPxSolver::updateTest().
|
protected |
Definition at line 403 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::init(), SPxSolver::leave(), SPxSolver::loadLP(), SPxSolver::operator=(), SPxSolver::performSolutionPolishing(), SPxSolver::read(), SPxSolver::reLoad(), SPxSolver::setTester(), SPxSolver::solve(), SPxSolver::SPxSolver(), and SPxSolver::~SPxSolver().
|
private |
row or column representation.
Definition at line 245 of file spxsolver.h.
Referenced by SPxSolver::initRep(), SPxSolver::operator=(), SPxSolver::setFeastol(), SPxSolver::setOpttol(), SPxSolver::setRep(), and SPxSolver::SPxSolver().
|
protected |
row pricing vector
Definition at line 370 of file spxsolver.h.
Referenced by SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
private |
sum of all shifts applied to any bound.
Definition at line 268 of file spxsolver.h.
Referenced by SPxSolver::changeLhsStatus(), SPxSolver::changeLowerStatus(), SPxSolver::changeRhsStatus(), SPxSolver::changeUpperStatus(), SPxBoundFlippingRT::getData(), SPxSolver::init(), SPxSolver::leave(), SPxFastRT::maxReEnter(), SPxFastRT::minReEnter(), SPxSolver::operator=(), SPxSolver::perturbMax(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMin(), SPxSolver::perturbMinLeave(), SPxSolver::reinitializeVecs(), and SPxSolver::unShift().
|
protected |
Definition at line 404 of file spxsolver.h.
Referenced by SPxSolver::operator=(), SPxSolver::setStarter(), SPxSolver::solve(), SPxSolver::SPxSolver(), and SPxSolver::~SPxSolver().
|
protected |
Definition at line 382 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::computeTest(), SPxSolver::getEnterVals(), SPxSolver::isConsistent(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::rejectEnter(), SPxSolver::solve(), SPxSolver::testVecs(), SPxSolver::ungetEnterVal(), and SPxSolver::updateTest().
|
private |
time spent in last call to method solve()
Definition at line 247 of file spxsolver.h.
Referenced by SPxSolver::solve(), SPxSolver::SPxSolver(), and SPxSolver::~SPxSolver().
|
private |
entering or leaving algortihm.
Definition at line 243 of file spxsolver.h.
Referenced by SPxSolver::operator=(), and SPxSolver::setType().
|
protected |
Upper Basic Feasibility bound.
In entering Simplex algorithm, the ratio test must ensure that all basic variables remain within their feasibility bounds. To give fast acces to them, the bounds of basic variables are copied into the following two vectors.
Definition at line 356 of file spxsolver.h.
Referenced by SPxSolver::computeFtest(), SPxSolver::enter(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::maxInfeas(), SPxSolver::noViols(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::setEnterBound4Col(), SPxSolver::setEnterBound4Row(), SPxSolver::setLeaveBound4Col(), SPxSolver::setLeaveBound4Row(), SPxSolver::shiftFvec(), SPxSolver::testBounds(), SPxSolver::unShift(), and SPxSolver::updateFtest().
|
protected |
Upper bound for vars.
Definition at line 375 of file spxsolver.h.
Referenced by SPxSolver::computeFrhs(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), SPxSolver::shiftPvec(), SPxSolver::SPxSolver(), and SPxSolver::testBounds().
|
protected |
Upper Column Feasibility bound.
Definition at line 348 of file spxsolver.h.
Referenced by SPxSolver::changeLowerStatus(), SPxSolver::changeUpperStatus(), SPxSolver::clear(), SPxSolver::computeLeaveCoPrhs4Col(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::nonbasicValue(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::rejectLeave(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxSolver::setEnterBound4Col(), SPxSolver::setPrimalBounds(), SPxSolver::SPxSolver(), SPxSolver::ungetEnterVal(), and SPxSolver::unShift().
|
protected |
Upper Row Feasibility bound.
Definition at line 346 of file spxsolver.h.
Referenced by SPxSolver::changeLhsStatus(), SPxSolver::changeRhsStatus(), SPxSolver::clear(), SPxSolver::computeLeaveCoPrhs4Row(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::nonbasicValue(), SPxSolver::operator=(), SPxSolver::reDim(), SPxSolver::rejectLeave(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxSolver::setEnterBound4Row(), SPxSolver::setPrimalBounds(), SPxSolver::SPxSolver(), SPxSolver::ungetEnterVal(), and SPxSolver::unShift().
|
protected |
the LP vectors according to representation
Definition at line 337 of file spxsolver.h.
Referenced by SPxSolver::initRep(), SPxSolver::isConsistent(), SPxSolver::operator=(), SPxSolver::setupPupdate(), and SPxSolver::SPxSolver().
|
private |
type of timer (user or wallclock)
Definition at line 248 of file spxsolver.h.
Referenced by SPxSolver::operator=(), and SPxSolver::SPxSolver().
|
protected |
total number of bound flips
Definition at line 393 of file spxsolver.h.
Referenced by SPxSolver::enter(), SPxSolver::leave(), SPxSolver::operator=(), and SPxSolver::solve().
|
protected |
array of unit vectors
Definition at line 336 of file spxsolver.h.
Referenced by SPxSolver::clear(), SPxSolver::enter(), SPxSolver::isConsistent(), SPxSolver::leave(), SPxSolver::operator=(), and SPxSolver::reDim().
DIdxSet updateViols |
store indices that were changed in the previous iteration and must be checked in hyper pricing
Definition at line 435 of file spxsolver.h.
Referenced by SPxSolver::hyperPricing(), SPxDevexPR::selectEnterHyperDim(), SPxSteepPR::selectEnterHyperDim(), SPxDevexPR::selectLeaveHyper(), SPxSteepPR::selectLeaveHyper(), SPxSolver::solve(), SPxSolver::updateCoTest(), and SPxSolver::updateFtest().
DIdxSet updateViolsCo |
Definition at line 436 of file spxsolver.h.
Referenced by SPxSolver::hyperPricing(), SPxDevexPR::selectEnterHyperCoDim(), SPxSteepPR::selectEnterHyperCoDim(), SPxSolver::solve(), and SPxSolver::updateTest().
DVector weights |
dual pricing norms
store dual norms
Definition at line 459 of file spxsolver.h.
Referenced by SPxDevexPR::addedVecs(), SPxSteepPR::addedVecs(), SPxDevexPR::buildBestPriceVectorEnterCoDim(), SPxSteepPR::buildBestPriceVectorEnterCoDim(), SPxDevexPR::entered4(), SPxSteepPR::entered4(), SPxSolver::getDualNorms(), SPxSolver::getNdualNorms(), SPxSteepPR::isConsistent(), SPxSolver::operator=(), SPxSteepPR::removedVec(), SPxSteepPR::removedVecs(), SPxDevexPR::selectEnterDenseCoDim(), SPxSteepPR::selectEnterDenseCoDim(), SPxDevexPR::selectEnterHyperCoDim(), SPxSteepPR::selectEnterHyperCoDim(), SPxDevexPR::selectEnterSparseCoDim(), SPxSteepPR::selectEnterSparseCoDim(), SPxSolver::setDualNorms(), SPxSteepPR::setRep(), SPxParMultPR::setType(), SPxPricer::setType(), SPxSteepPR::setupWeights(), and SPxDevexPR::setupWeights().
bool weightsAreSetup |
are the dual norms already set up?
Definition at line 461 of file spxsolver.h.
Referenced by SPxSolver::getDualNorms(), SPxSolver::getNdualNorms(), SPxSolver::operator=(), SPxSolver::setDualNorms(), SPxParMultPR::setType(), SPxPricer::setType(), SPxSteepPR::setupWeights(), and SPxDevexPR::setupWeights().