Scippy

SoPlex

Sequential object-oriented simPlex

SPxSolver Class Reference

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 Types

Data Types
enum  Representation { ROW = -1, COLUMN = 1 }
 LP basis representation. More...
 
enum  Type { ENTER = -1, LEAVE = 1 }
 Algorithmic type. More...
 
enum  Pricing { FULL, PARTIAL }
 Pricing type. More...
 
enum  DecompStatus { FINDSTARTBASIS = 0, DONTFINDSTARTBASIS = 1 }
 Improved dual simplex status. More...
 
enum  VarStatus {
  ON_UPPER, ON_LOWER, FIXED, ZERO,
  BASIC, UNDEFINED
}
 
enum  Status {
  ERROR = -15, NO_RATIOTESTER = -14, NO_PRICER = -13, NO_SOLVER = -12,
  NOT_INIT = -11, ABORT_EXDECOMP = -10, ABORT_DECOMP = -9, ABORT_CYCLING = -8,
  ABORT_TIME = -7, ABORT_ITER = -6, ABORT_VALUE = -5, SINGULAR = -4,
  NO_PROBLEM = -3, REGULAR = -2, RUNNING = -1, UNKNOWN = 0,
  OPTIMAL = 1, UNBOUNDED = 2, INFEASIBLE = 3, INForUNBD = 4
}
 
enum  SolutionPolish { POLISH_OFF, POLISH_INTEGRALITY, POLISH_FRACTIONALITY }
 objective for solution polishing More...
 
- Public Types inherited from SPxLPBase< Real >
enum  SPxSense
 Optimization sense. More...
 

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...
 
UpdateVectorfVec () const
 feasibility vector. More...
 
const VectorfRhs () const
 right-hand side vector for fVec More...
 
const VectorubBound () const
 upper bound for fVec. More...
 
VectorubBound ()
 upper bound for fVec, writable. More...
 
const VectorlbBound () const
 lower bound for fVec. More...
 
VectorlbBound ()
 lower bound for fVec, writable. More...
 
const VectorfTest () const
 Violations of fVec. More...
 
UpdateVectorcoPvec () const
 copricing vector. More...
 
const VectorcoPrhs () const
 Right-hand side vector for coPvec. More...
 
const VectorucBound () const
 
VectorucBound ()
 upper bound for coPvec. More...
 
const VectorlcBound () const
 
VectorlcBound ()
 lower bound for coPvec. More...
 
const VectorcoTest () const
 violations of coPvec. More...
 
UpdateVectorpVec () const
 pricing vector. More...
 
const VectorupBound () const
 
VectorupBound ()
 upper bound for pVec. More...
 
const VectorlpBound () const
 
VectorlpBound ()
 lower bound for pVec. More...
 
const Vectortest () 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...
 
SPxStarterstarter () const
 return current starter. More...
 
Setup

Before solving an LP with an instance of SPxSolver, the following steps must be performed:

  1. Load the LP by copying an external LP or reading it from an input stream.
  2. Setup the pricer to use by loading an SPxPricer object (if not already done in a previous call).
  3. Setup the ratio test method to use by loading an SPxRatioTester object (if not already done in a previous call).
  4. Setup the linear system solver to use by loading an SLinSolver object (if not already done in a previous call).
  5. Optionally setup an start basis generation method by loading an SPxStarter object.
  6. Optionally setup a start basis by loading a SPxBasis::Desc object.
  7. Optionally switch to another basis Representation by calling method setRep().
  8. Optionally switch to another algorithm Type by calling method setType().

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

Class SPxLP introduces SPxIds to identify row or column data of an LP. SPxSolver uses this concept to access data with respect to the chosen representation.

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 SVectorvector (int i) const
 i 'th vector. More...
 
const SVectorvector (const SPxRowId &rid) const
 
const SVectorvector (const SPxColId &cid) const
 
const SVectorvector (const SPxId &p_id) const
 vector associated to p_id. More...
 
const SVectorcoVector (int i) const
 i 'th covector of LP. More...
 
const SVectorcoVector (const SPxRowId &rid) const
 
const SVectorcoVector (const SPxColId &cid) const
 
const SVectorcoVector (const SPxId &p_id) const
 coVector associated to p_id. More...
 
const SVectorunitVector (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...
 
SPxSolveroperator= (const SPxSolver &base)
 assignment operator More...
 
 SPxSolver (const SPxSolver &base)
 copy constructor More...
 
- Public Member Functions inherited from SPxLPBase< Real >
void setOutstream (SPxOut &newOutstream)
 
void unscaleLP ()
 unscales the lp and clears basis More...
 
void unscaleLP ()
 
Rational minAbsNzo (bool) const
 
Real minAbsNzo (bool unscaled) const
 
Rational maxAbsNzo (bool) const
 
Real maxAbsNzo (bool unscaled) const
 
void getRowVectorUnscaled (int i, DSVectorBase< Real > &vec) const
 Gets unscaled row vector of row i. More...
 
void getRhsUnscaled (VectorBase< Real > &vec) const
 Gets unscaled right hand side vector. More...
 
Real rhsUnscaled (int i) const
 Returns unscaled right hand side of row number i. More...
 
Real rhsUnscaled (const SPxRowId &id) const
 Returns unscaled right hand side of row with identifier id. More...
 
void getLhsUnscaled (VectorBase< Real > &vec) const
 Returns unscaled left hand side vector. More...
 
Real lhsUnscaled (int i) const
 Returns unscaled left hand side of row number i. More...
 
Real lhsUnscaled (const SPxRowId &id) const
 Returns left hand side of row 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...
 
Real objUnscaled (int i) const
 Returns unscaled objective value of column i. More...
 
Real objUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id. More...
 
void maxObjUnscaled (VectorBase< Real > &vec) const
 Returns unscaled objective vector for maximization problem. More...
 
Real maxObjUnscaled (int i) const
 Returns unscaled objective value of column i for maximization problem. More...
 
Real maxObjUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id for maximization problem. More...
 
void getUpperUnscaled (DVector &vec) const
 Returns unscaled upper bound vector. More...
 
Real upperUnscaled (int i) const
 Returns unscaled upper bound of column i. More...
 
Real upperUnscaled (const SPxColId &id) const
 Returns unscaled upper bound of column with identifier id. More...
 
void getLowerUnscaled (DVector &vec) const
 Returns unscaled lower bound vector. More...
 
Real lowerUnscaled (int i) const
 Returns unscaled lower bound of column i. More...
 
Real lowerUnscaled (const SPxColId &id) const
 Returns unscaled lower bound of column with identifier id. More...
 
bool readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 Read LP in "CPLEX LP File Format". More...
 
bool readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 Read LP in "CPLEX LP File Format". More...
 
bool readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
bool readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
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...
 
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...
 
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...
 
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...
 
void changeMaxObj (const VectorBase< Real > &newObj, bool scale)
 Changes objective vector to newObj. More...
 
void changeLower (const VectorBase< Real > &newLower, bool scale)
 Changes vector of lower bounds to newLower. More...
 
void changeUpper (const VectorBase< Real > &newUpper, bool scale)
 Changes vector of upper bounds to newUpper. More...
 
void changeLhs (const VectorBase< Real > &newLhs, bool scale)
 Changes left hand side vector for constraints to newLhs. More...
 
void changeRhs (const VectorBase< Real > &newRhs, bool scale)
 Changes right hand side vector for constraints to newRhs. More...
 
void computePrimalActivity (const VectorBase< Rational > &primal, VectorBase< Rational > &activity, const bool unscaled) const
 
void computePrimalActivity (const VectorBase< Real > &primal, VectorBase< Real > &activity, const bool unscaled) const
 
void computeDualActivity (const VectorBase< Rational > &dual, VectorBase< Rational > &activity, const bool unscaled) const
 
void computeDualActivity (const VectorBase< Real > &dual, VectorBase< Real > &activity, const bool unscaled) const
 
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...
 
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...
 
 SPxLPBase ()
 Default constructor. More...
 
 SPxLPBase (const SPxLPBase< Real > &old)
 Copy constructor. More...
 
 SPxLPBase (const SPxLPBase< S > &old)
 Copy constructor. More...
 
virtual ~SPxLPBase ()
 Destructor. More...
 
SPxLPBase< Real > & operator= (const SPxLPBase< Real > &old)
 Assignment operator. More...
 
SPxLPBase< Real > & operator= (const SPxLPBase< S > &old)
 Assignment operator. 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 Real minAbsNzo (bool unscaled=true) const
 Absolute smallest non-zero element in (possibly scaled) LP. More...
 
virtual Real maxAbsNzo (bool unscaled=true) const
 Absolute biggest non-zero element in (in rational case possibly scaled) LP. More...
 
void getRow (int i, LPRowBase< Real > &row) const
 Gets i 'th row. More...
 
void getRow (const SPxRowId &id, LPRowBase< Real > &row) const
 Gets row with identifier id. More...
 
void getRows (int start, int end, LPRowSetBase< Real > &set) const
 Gets rows start, ... end. More...
 
const SVectorBase< Real > & rowVector (int i) const
 Gets row vector of row i. More...
 
const SVectorBase< Real > & 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< Real > & rhs () const
 Returns right hand side vector. More...
 
const Realrhs (int i) const
 Returns right hand side of row number i. More...
 
const Realrhs (const SPxRowId &id) const
 Returns right hand side of row with identifier id. More...
 
void getRhs (VectorBase< Real > &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...
 
Real rhsUnscaled (int i) const
 Returns unscaled right hand side of row number i. More...
 
Real rhsUnscaled (const SPxRowId &id) const
 Returns unscaled right hand side of row with identifier id. More...
 
const VectorBase< Real > & lhs () const
 Returns left hand side vector. More...
 
const Reallhs (int i) const
 Returns left hand side of row number i. More...
 
const Reallhs (const SPxRowId &id) const
 Returns left hand side of row with identifier id. More...
 
void getRowObj (VectorBase< Real > &prowobj) const
 Gets row objective function vector. More...
 
Real rowObj (int i) const
 
Real rowObj (const SPxRowId &id) const
 Returns row objective function value of row with identifier id. More...
 
const VectorBase< Real > & maxRowObj () const
 
const RealmaxRowObj (int i) const
 
const RealmaxRowObj (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...
 
Real lhsUnscaled (int i) const
 Returns unscaled left hand side of row number i. More...
 
Real lhsUnscaled (const SPxRowId &id) const
 Returns left hand side of row with identifier id. More...
 
LPRowBase< Real >::Type rowType (int i) const
 Returns the inequality type of the i'th LPRow. More...
 
LPRowBase< Real >::Type rowType (const SPxRowId &id) const
 Returns the inequality type of the row with identifier key. More...
 
void getCol (int i, LPColBase< Real > &col) const
 Gets i 'th column. More...
 
void getCol (const SPxColId &id, LPColBase< Real > &col) const
 Gets column with identifier id. More...
 
void getCols (int start, int end, LPColSetBase< Real > &set) const
 Gets columns start, ..., end. More...
 
const SVectorBase< Real > & colVector (int i) const
 Returns column vector of column i. More...
 
const SVectorBase< Real > & 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< Real > &pobj) const
 Gets objective vector. More...
 
Real obj (int i) const
 Returns objective value of column i. More...
 
Real obj (const SPxColId &id) const
 Returns objective value of column with identifier id. More...
 
Real objUnscaled (int i) const
 Returns unscaled objective value of column i. More...
 
Real objUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id. More...
 
const VectorBase< Real > & maxObj () const
 Returns objective vector for maximization problem. More...
 
const RealmaxObj (int i) const
 Returns objective value of column i for maximization problem. More...
 
const RealmaxObj (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...
 
Real maxObjUnscaled (int i) const
 Returns unscaled objective value of column i for maximization problem. More...
 
Real maxObjUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id for maximization problem. More...
 
const VectorBase< Real > & upper () const
 Returns upper bound vector. More...
 
const Realupper (int i) const
 Returns upper bound of column i. More...
 
const Realupper (const SPxColId &id) const
 Returns upper bound of column with identifier id. More...
 
void getUpperUnscaled (DVector &vec) const
 Gets unscaled upper bound vector. More...
 
Real upperUnscaled (int i) const
 Returns unscaled upper bound of column i. More...
 
Real upperUnscaled (const SPxColId &id) const
 Returns unscaled upper bound of column with identifier id. More...
 
const VectorBase< Real > & lower () const
 Returns (internal and possibly scaled) lower bound vector. More...
 
const Reallower (int i) const
 Returns (internal and possibly scaled) lower bound of column i. More...
 
const Reallower (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...
 
Real lowerUnscaled (int i) const
 Returns unscaled lower bound of column i. More...
 
Real lowerUnscaled (const SPxColId &id) const
 Returns unscaled lower bound of column with identifier id. More...
 
SPxSense spxSense () const
 Returns the optimization sense. More...
 
const RealobjOffset () 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< Real > &row, bool scale=false)
 
virtual void addRow (const Real &lhsValue, const SVectorBase< Real > &rowVec, const Real &rhsValue, bool scale=false)
 
void addRow (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue)
 
virtual void addRow (SPxRowId &id, const LPRowBase< Real > &row, bool scale=false)
 Adds row to LPRowSetBase. More...
 
virtual void addRows (const LPRowSetBase< Real > &pset, bool scale=false)
 
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< Real > &set, bool scale=false)
 adds all LPRowBases of pset to LPRowSetBase. More...
 
virtual void addCol (const LPColBase< Real > &col, bool scale=false)
 
virtual void addCol (const Real &objValue, const Real &lowerValue, const SVectorBase< Real > &colVec, const Real &upperValue, bool scale=false)
 
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< Real > &col, bool scale=false)
 Adds col to LPColSetVBase. More...
 
virtual void addCols (const LPColSetBase< Real > &pset, bool scale=false)
 
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< Real > &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< Real > &newObj, bool scale=false)
 Changes objective vector to newObj. scale determines whether the new data should be scaled. More...
 
void changeObj (int i, const S *newVal)
 changes i 'th objective vector element to newVal. More...
 
virtual void changeMaxObj (const VectorBase< Real > &newObj, bool scale=false)
 Changes objective vector to newObj. scale determines whether the new data should be scaled. More...
 
void changeMaxObj (int i, const S *newVal)
 changes i 'th objective vector element to newVal. More...
 
virtual void changeLower (const VectorBase< Real > &newLower, bool scale=false)
 Changes vector of lower bounds to newLower. scale determines whether the new data should be scaled. More...
 
void changeLower (int i, const S *newLower)
 changes i 'th lower bound to newLower. More...
 
virtual void changeUpper (const VectorBase< Real > &newUpper, bool scale=false)
 Changes vector of upper bounds to newUpper. scale determines whether the new data should be scaled. More...
 
void changeUpper (int i, const S *newUpper)
 Changes i 'th upper bound to newUpper. More...
 
virtual void changeBounds (const VectorBase< Real > &newLower, const VectorBase< Real > &newUpper, bool scale=false)
 Changes variable bounds to newLower and newUpper. scale determines whether the new data should be scaled. More...
 
void changeBounds (int i, const S *newLower, const S *newUpper)
 Changes bounds of column i to newLower and newUpper. More...
 
virtual void changeLhs (const VectorBase< Real > &newLhs, bool scale=false)
 Changes left hand side vector for constraints to newLhs. scale determines whether the new data should be scaled. More...
 
void changeLhs (int i, const S *newLhs)
 Changes i 'th left hand side value to newLhs. More...
 
virtual void changeRhs (const VectorBase< Real > &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 changeRange (const VectorBase< Real > &newLhs, const VectorBase< Real > &newRhs, bool scale=false)
 Changes left and right hand side vectors. scale determines whether the new data should be scaled. More...
 
void changeRange (int i, const S *newLhs, const S *newRhs)
 Changes left and right hand side of row i. More...
 
virtual void changeRowObj (const VectorBase< Real > &newRowObj, bool scale=false)
 Changes row objective function vector to newRowObj. scale determines whether the new data should be scaled. More...
 
virtual void changeRow (int n, const LPRowBase< Real > &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< Real > &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< Real > &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< Real > &newCol, bool scale=false)
 Replaces column with identifier id with newCol. scale determines whether the new data should be scaled. More...
 
void changeElement (int i, int j, const S *val)
 Changes LP element (i, j) to val. More...
 
virtual void changeObjOffset (const Real &o)
 
virtual void computePrimalActivity (const VectorBase< Real > &primal, VectorBase< Real > &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< Real > &primal, VectorBase< Real > &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< Real > &dual, VectorBase< Real > &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< Real > &dual, VectorBase< Real > &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< Real > &dual, VectorBase< Real > &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< Real > &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...
 

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...
 
SPxOutspxout
 message handler More...
 
DataArray< int > integerVariables
 supplementary variable information, 0: continous variable, 1: integer variable More...
 
- Public Attributes inherited from SPxLPBase< Real >
SPxOutspxout
 

Protected Member Functions

Precision
virtual bool precisionReached (Real &newpricertol) const
 is the solution precise enough, or should we increase delta() ? 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< Real >
Realrhs_w (int i)
 Returns right hand side of row i. More...
 
Reallhs_w (int i)
 Returns left hand side of row i. More...
 
RealmaxRowObj_w (int i)
 Returns objective function value of row i. More...
 
RealmaxObj_w (int i)
 Returns objective value of column i for maximization problem. More...
 
Realupper_w (int i)
 Returns upper bound of column i. More...
 
Reallower_w (int i)
 Returns lower bound of column i. More...
 
const LPRowSetBase< Real > * lprowset () const
 Returns the LP as an LPRowSetBase. More...
 
const LPColSetBase< Real > * lpcolset () const
 Returns the LP as an LPColSetBase. More...
 
void added2Set (SVSetBase< Real > &set, const SVSetBase< Real > &addset, int n)
 
- Protected Member Functions inherited from LPRowSetBase< Real >
const SVSetBase< Real > * rowSet () const
 Returns the complete SVSet. More...
 
 LPRowSetBase (int pmax=-1, int pmemmax=-1)
 Default constructor. More...
 
 LPRowSetBase (const LPRowSetBase< Real > &rs)
 Copy constructor. More...
 
 LPRowSetBase (const LPRowSetBase< S > &rs)
 Copy constructor. More...
 
LPRowSetBase< Real > & operator= (const LPRowSetBase< Real > &rs)
 Assignment operator. More...
 
LPRowSetBase< Real > & operator= (const LPRowSetBase< S > &rs)
 Assignment operator. More...
 
virtual ~LPRowSetBase ()
 Destructor. 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< Real > & lhs () const
 Returns the vector of lhs values. More...
 
const Reallhs (int i) const
 Returns the lhs of the i 'th LPRowBase. More...
 
const Reallhs (const DataKey &k) const
 Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More...
 
VectorBase< Real > & lhs_w ()
 Returns the vector of lhs values. More...
 
Reallhs_w (int i)
 Returns the lhs of the i 'th LPRowBase. More...
 
Reallhs_w (const DataKey &k)
 Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More...
 
const VectorBase< Real > & rhs () const
 Returns the vector of rhs values. More...
 
const Realrhs (int i) const
 Returns the rhs of the i 'th LPRowBase. More...
 
const Realrhs (const DataKey &k) const
 Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase. More...
 
VectorBase< Real > & rhs_w ()
 Returns the vector of rhs values (writeable). More...
 
Realrhs_w (int i)
 Returns the rhs of the i 'th LPRowBase (writeable). More...
 
Realrhs_w (const DataKey &k)
 Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase (writeable). More...
 
const VectorBase< Real > & obj () const
 Returns the vector of objective coefficients. More...
 
const Realobj (int i) const
 Returns the objective coefficient of the i 'th LPRowBase. More...
 
const Realobj (const DataKey &k) const
 Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase. More...
 
VectorBase< Real > & obj_w ()
 Returns the vector of objective coefficients (writeable). More...
 
Realobj_w (int i)
 Returns the objective coefficient of the i 'th LPRowBase (writeable). More...
 
Realobj_w (const DataKey &k)
 Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase (writeable). More...
 
SVectorBase< Real > & rowVector_w (int i)
 Returns a writable rowVector of the i 'th LPRowBase. More...
 
SVectorBase< Real > & rowVector_w (const DataKey &k)
 Returns a writable rowVector of the LPRowBase with DataKey k. More...
 
const SVectorBase< Real > & rowVector (int i) const
 Returns the rowVector of the i 'th LPRowBase. More...
 
const SVectorBase< Real > & rowVector (const DataKey &k) const
 Returns the rowVector of the LPRowBase with DataKey k. More...
 
LPRowBase< Real >::Type type (int i) const
 Returns the inequalitiy type of the i 'th LPRowBase. More...
 
LPRowBase< Real >::Type type (const DataKey &k) const
 Returns the inequality type of the LPRowBase with DataKey k. More...
 
void setType (int i, typename LPRowBase< Real >::Type t)
 Changes the inequality type of row i to type. More...
 
const Realvalue (int i) const
 Returns the value of the i'th LPRowBase. More...
 
const Realvalue (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< Real > &row)
 
void add (DataKey &pkey, const LPRowBase< Real > &prow)
 Adds row to LPRowSetBase. More...
 
void add (const Real &plhs, const SVectorBase< Real > &prowVector, const Real &prhs, const Real &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...
 
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...
 
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 Real &newlhs, const SVectorBase< Real > &newrowVector, const Real &newrhs, const Real &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< Real > &newset)
 
void add (DataKey keys[], const LPRowSetBase< Real > &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 Real val[])
 Adds n nonzero (idx, val)-pairs to rowVector with DataKey k. More...
 
void add2 (int i, int n, const int idx[], const Real val[])
 Adds n nonzero (idx, val)-pairs to i 'th rowVector. More...
 
void add2 (int i, int n, const int idx[], const S val[])
 Adds n nonzero (idx, val)-pairs to i 'th rowVector. More...
 
SVectorBase< Real > & create (int pnonzeros=0, const Real &plhs=0, const Real &prhs=1, const Real &pobj=0, const int &pscaleExp=0)
 Creates new LPRowBase with specified parameters and returns a reference to its row vector. More...
 
SVectorBase< Real > & create (DataKey &newkey, int nonzeros=0, const Real &newlhs=0, const Real &newrhs=1, const Real &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...
 
- Protected Member Functions inherited from SVSetBase< Real >
 SVSetBase (int pmax=-1, int pmemmax=-1, double pfac=1.1, double pmemFac=1.2)
 Default constructor. More...
 
 SVSetBase (const SVSetBase< Real > &old)
 Copy constructor. More...
 
 SVSetBase (const SVSetBase< S > &old)
 Copy constructor. More...
 
virtual ~SVSetBase ()
 Destructor. More...
 
SVSetBase< Real > & operator= (const SVSetBase< Real > &rhs)
 Assignment operator. More...
 
SVSetBase< Real > & operator= (const SVSetBase< S > &rhs)
 Assignment operator. More...
 
void add (const SVectorBase< Real > &svec)
 Adds svec to the set. More...
 
void add (DataKey &nkey, const SVectorBase< Real > &svec)
 Adds svec to SVSetBase. More...
 
void add (DataKey &nkey, const S *rowValues, const int *rowIndices, int rowSize)
 Adds svec to SVSetBase. More...
 
void add (const SVectorBase< Real > svec[], int n)
 Adds all n SVectorBases in the array svec to the set. More...
 
void add (DataKey nkey[], const SVectorBase< Real > svec[], int n)
 Adds n SVectorBases to SVSetBase. More...
 
void add (const SVSetBase< S > &pset)
 Adds all SVectorBases in pset to SVSetBase. More...
 
void add (DataKey nkey[], const SVSetBase< S > &pset)
 Adds all SVectorBases of pset to SVSetBase. More...
 
SVectorBase< Real > * create (int idxmax=0)
 Creates new SVectorBase in set. More...
 
SVectorBase< Real > * create (DataKey &nkey, int idxmax=-1)
 Creates new SVectorBase in set. More...
 
void xtend (SVectorBase< Real > &svec, int newmax)
 Extends svec to fit newmax nonzeros. More...
 
void add2 (SVectorBase< Real > &svec, int idx, Real val)
 Adds nonzero (idx, val) to svec of this SVSetBase. More...
 
void add2 (SVectorBase< Real > &svec, int n, const int idx[], const Real val[])
 Adds n nonzeros to svec of this SVSetBase. More...
 
void add2 (SVectorBase< Real > &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< Real > *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< Real > & operator[] (int n)
 Gets SVectorBase by number, writeable. More...
 
const SVectorBase< Real > & operator[] (int n) const
 Gets SVectorBase by number. More...
 
SVectorBase< Real > & operator[] (const DataKey &k)
 Gets SVectorBase by DataKey, writeable. More...
 
const SVectorBase< Real > & 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< Real > *svec) const
 Gets DataKey of SVectorBase. More...
 
int number (const DataKey &k) const
 Gets vector number of DataKey. More...
 
int number (const SVectorBase< Real > *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< Real > *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...
 
- Protected Member Functions inherited from ClassArray< Nonzero< Real > >
Nonzero< Real > & operator[] (int n)
 Reference to n 'th element. More...
 
const Nonzero< Real > & operator[] (int n) const
 Reference to n 'th const element. More...
 
Nonzero< Real > & last ()
 Reference to last element. More...
 
const Nonzero< Real > & last () const
 Reference to last const element. More...
 
Nonzero< Real > * get_ptr ()
 Gets a C pointer to the data. More...
 
const Nonzero< Real > * get_const_ptr () const
 Gets a const C pointer to the data. More...
 
void append (const Nonzero< Real > &t)
 Appends element t. More...
 
void append (int n, const Nonzero< Real > t[])
 Appends n elements from t. More...
 
void append (const ClassArray< Nonzero< Real > > &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< Real > t[])
 Inserts n elements from t before i 'the element. More...
 
void insert (int i, const ClassArray< Nonzero< Real > > &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...
 
ClassArrayoperator= (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 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...
 
ClassArrayoperator= (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 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 Descdesc () const
 
Descdesc ()
 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...
 
SPxIdbaseId (int i)
 
SPxId baseId (int i) const
 returns the Id of the i'th basis vector. More...
 
const SVectorbaseVec (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...
 
SPxSolversolver () const
 returns loaded solver. More...
 
VectormultBaseWith (Vector &x) const
 Basis-vector product. More...
 
void multBaseWith (SSVector &x, SSVector &result) const
 Basis-vector product. More...
 
VectormultWithBase (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...
 
SPxBasisoperator= (const SPxBasis &rhs)
 assignment operator More...
 
virtual ~SPxBasis ()
 destructor. More...
 

Protected Attributes

Protected data
Array< UnitVectorunitVecs
 array of unit vectors More...
 
const SVSetthevectors
 the LP vectors according to representation More...
 
const SVSetthecovectors
 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...
 
DVectortheFrhs
 
UpdateVectortheFvec
 
DVectortheCoPrhs
 
UpdateVectortheCoPvec
 
UpdateVectorthePvec
 
UpdateVectortheRPvec
 row pricing vector More...
 
UpdateVectortheCPvec
 column pricing vector More...
 
DVectortheUbound
 Upper bound for vars. More...
 
DVectortheLbound
 Lower bound for vars. More...
 
DVectortheCoUbound
 Upper bound for covars. More...
 
DVectortheCoLbound
 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...
 
SPxPricerthepricer
 
SPxRatioTestertheratiotester
 
SPxStarterthestarter
 
- Protected Attributes inherited from LPRowSetBase< Real >
DataArray< int > scaleExp
 row scaling factors (stored as bitshift) More...
 
- Protected Attributes inherited from ClassArray< Nonzero< Real > >
int thesize
 number of used elements in array data More...
 
int themax
 the length of array data and More...
 
Nonzero< Real > * 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 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 SPxBasis
SPxSolvertheLP
 the LP More...
 
DataArray< SPxIdtheBaseId
 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...
 
SLinSolverfactor
 
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...
 
TimertheTime
 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...
 
TimertheTime
 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...
 
SSVectorsolveVector2
 when 2 systems are to be solved at a time; typically for speepest edge weights More...
 
SSVectorsolveVector2rhs
 when 2 systems are to be solved at a time; typically for speepest edge weights More...
 
SSVectorsolveVector3
 when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!) More...
 
SSVectorsolveVector3rhs
 when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!) More...
 
SSVectorcoSolveVector2
 when 2 systems are to be solved at a time; typically for speepest edge weights More...
 
SSVectorcoSolveVector2rhs
 when 2 systems are to be solved at a time; typically for speepest edge weights More...
 
SSVectorcoSolveVector3
 when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic solution will be modified!) More...
 
SSVectorcoSolveVector3rhs
 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
 
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 SoPlexLegacy
 
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:

  1. SPxPricer::selectEnter()
  2. SPxRatioTester::selectLeave()
  3. SPxPricer::entered4()

For the leaving Simplex:

  1. SPxPricer::selectLeave()
  2. SPxRatioTester::selectEnter()
  3. SPxPricer::left4()
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 SPxBasisbasis () const
 Return current basis. More...
 
SPxBasisbasis ()
 
const SPxPricerpricer () const
 return loaded SPxPricer. More...
 
const SLinSolverslinSolver () const
 return loaded SLinSolver. More...
 
const SPxRatioTesterratiotester () 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.

Initialization
These methods are used to setup all the vectors used in the Simplex loop, that where described in the previous sectios.
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 SVectorenterVector (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, Real &objChange)
 
virtual void getLeaveVals2 (Real leaveMax, SPxId enterId, Real &enterBound, Real &newUBbound, Real &newLBbound, Real &newCoPrhs, 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, Real &objChange)
 
virtual void getEnterVals2 (int leaveIdx, Real enterMax, Real &leaveBound, Real &objChange)
 
virtual void ungetEnterVal (SPxId enterId, SPxBasis::Desc::Status enterStat, Real leaveVal, const SVector &vec, 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 LPRowSetrows () const
 return const lp's rows if available. More...
 
const LPColSetcols () 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...
 

Detailed Description

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 84 of file spxsolver.h.

Member Enumeration Documentation

◆ 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.

◆ Pricing

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.

◆ 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.

◆ SolutionPolish

objective for solution polishing

Enumerator
POLISH_OFF 

don't perform modifications on optimal basis

POLISH_INTEGRALITY 

maximize number of basic slack variables, i.e. more variables on bounds

POLISH_FRACTIONALITY 

minimize number of basic slack variables, i.e. more variables in between bounds

Definition at line 227 of file spxsolver.h.

◆ Status

enum Status
Todo:
In spxchange, change the status to if (m_status > 0) m_status = REGULAR;
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.

Definition at line 202 of file spxsolver.h.

◆ Type

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
COLUMNPRIMALDUAL
Enumerator
ENTER 

Entering Simplex.

The Simplex loop for the entering Simplex can be sketched as follows:

  • Pricing : Select a variable to ENTER the basis.
  • Ratio-Test : Select variable to LEAVE the basis such that the basis remains feasible.
  • Perform the basis update.
LEAVE 

Leaving Simplex.

The Simplex loop for the leaving Simplex can be sketched as follows:

  • Pricing: Select a variable to LEAVE the basis.
  • Ratio-Test: Select variable to ENTER the basis such that the basis remains priced.
  • Perform the basis update.

Definition at line 124 of file spxsolver.h.

◆ VarStatus

enum VarStatus
Enumerator
ON_UPPER 

variable set to its upper bound.

ON_LOWER 

variable set to its lower bound.

FIXED 

variable fixed to identical bounds.

ZERO 

free variable fixed to zero.

BASIC 

variable is basic.

UNDEFINED 

nothing known about basis status (possibly due to a singular basis in transformed problem)

Definition at line 189 of file spxsolver.h.

Constructor & Destructor Documentation

◆ SPxSolver() [1/2]

SPxSolver ( Type  type = LEAVE,
Representation  rep = ROW,
Timer::TYPE  ttype = Timer::USER_TIME 
)
explicit

default constructor.

Constructors / destructors

Definition at line 974 of file spxsolver.cpp.

References TimerFactory::createTimer(), DEFAULT_BND_VIOL, SPxSolver::initRep(), SPxSolver::setDelta(), SPxBasis::theLP, SPxSolver::theTime, and SPxSolver::timerType.

◆ ~SPxSolver()

◆ SPxSolver() [2/2]

Member Function Documentation

◆ addedCols()

void addedCols ( int  n)
protectedvirtual

◆ addedRows()

void addedRows ( int  n)
protectedvirtual

Reimplemented from SPxLPBase< Real >.

Definition at line 205 of file changesoplex.cpp.

References SPxBasis::addedCols(), SPxSolver::addedCols(), SPxLPBase< Real >::addedCols(), SPxPricer::addedCoVecs(), SPxBasis::addedRows(), SPxLPBase< Real >::addedRows(), SPxPricer::addedVecs(), SPxSolver::clearDualBounds(), SPxBasis::Desc::colStatus(), SPxSolver::COLUMN, SPxSolver::computeCoTest(), SPxSolver::computeEnterCoPrhs4Col(), SPxSolver::computeFtest(), SPxSolver::computeLeaveCoPrhs4Col(), SPxSolver::computePvec(), SPxSolver::computeTest(), SPxBasis::coSolve(), SPxBasis::desc(), SPxSolver::ENTER, SPxSolver::entertol(), SPxSolver::isInitialized(), SPxSolver::leavetol(), SPxSolver::localAddCols(), SPxLPBase< Real >::lower(), SPxLPBase< Real >::maxObj(), VectorBase< R >::multAdd(), SPxLPBase< Real >::nCols(), SPxBasis::NO_PROBLEM, LPRowSetBase< Real >::obj(), SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::reDim(), SPxSolver::rep(), SPxSolver::ROW, SPxSolver::setEnterBound4Col(), SPxSolver::setLeaveBound4Col(), SPxSolver::shiftFvec(), SPxSolver::shiftLBbound(), SPxSolver::shiftLPbound(), SPxSolver::shiftUBbound(), SPxSolver::shiftUPbound(), SPxBasis::solve(), SPxLPBase< Real >::spxSense(), SPxBasis::status(), SPxSolver::test(), SPxSolver::theCoPrhs, SPxSolver::theCoPvec, SPxSolver::theCoTest, SPxSolver::theFrhs, SPxSolver::theFvec, SPxSolver::theLBbound, SPxSolver::theLCbound, SPxSolver::thepricer, SPxSolver::thePvec, SPxSolver::theTest, SPxSolver::theUBbound, SPxSolver::theUCbound, SPxSolver::type(), SPxSolver::unInit(), SPxLPBase< Real >::upper(), and SPxSolver::vector().

◆ basis() [1/2]

const SPxBasis& basis ( ) const

Return current basis.

Note
The basis can be used to solve linear systems or use any other of its (const) methods. It is, however, encuraged to use methods setup4solve() and setup4coSolve() for solving systems, since this is likely to have perfomance advantages.

Definition at line 1736 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(), SoPlexLegacy::iteration(), 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(), SoPlexLegacy::solve(), SPxSolver::solve(), and SPxSolver::writeState().

◆ basis() [2/2]

SPxBasis& basis ( )

Definition at line 1741 of file spxsolver.h.

◆ basisStatusToVarStatus()

◆ boundFlips()

int boundFlips ( ) const

get number of bound flips.

Definition at line 2061 of file spxsolver.h.

Referenced by SoPlex::_decompSimplifyAndSolve(), and SoPlex::_solveRealLPAndRecordStatistics().

◆ changeBounds() [1/3]

void changeBounds ( const Vector newLower,
const Vector newUpper,
bool  scale = false 
)
virtual

◆ changeBounds() [2/3]

void changeBounds ( int  i,
const Real newLower,
const Real newUpper,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 954 of file changesoplex.cpp.

References SPxSolver::changeLower(), and SPxSolver::changeUpper().

◆ changeBounds() [3/3]

virtual void changeBounds ( SPxColId  p_id,
const Real p_newLower,
const Real p_newUpper,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 992 of file spxsolver.h.

◆ changeCol() [1/2]

void changeCol ( int  i,
const LPCol newCol,
bool  scale = false 
)
virtual

◆ changeCol() [2/2]

virtual void changeCol ( SPxColId  p_id,
const LPCol p_newCol,
bool  scale = false 
)
virtual

Definition at line 1037 of file spxsolver.h.

◆ changeElement() [1/2]

void changeElement ( int  i,
int  j,
const Real val,
bool  scale = false 
)
virtual

◆ changeElement() [2/2]

virtual void changeElement ( SPxRowId  rid,
SPxColId  cid,
const Real val,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 1044 of file spxsolver.h.

◆ changeLhs() [1/3]

◆ changeLhs() [2/3]

void changeLhs ( int  i,
const Real newLhs,
bool  scale = false 
)
virtual

◆ changeLhs() [3/3]

virtual void changeLhs ( SPxRowId  p_id,
const Real p_newLhs,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 1003 of file spxsolver.h.

◆ changeLhsStatus()

◆ changeLower() [1/3]

◆ changeLower() [2/3]

void changeLower ( int  i,
const Real newLower,
bool  scale = false 
)
virtual

◆ changeLower() [3/3]

virtual void changeLower ( SPxColId  p_id,
const Real p_newLower,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 972 of file spxsolver.h.

◆ changeLowerStatus()

◆ changeMaxObj() [1/3]

void changeMaxObj ( const Vector newObj,
bool  scale = false 
)
virtual
Todo:
Factorization remains valid, we do not need a reDim() pricing vectors should be recomputed.

Definition at line 685 of file changesoplex.cpp.

References SPxLPBase< Real >::changeMaxObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().

◆ changeMaxObj() [2/3]

void changeMaxObj ( int  i,
const Real newVal,
bool  scale = false 
)
virtual
Todo:
Factorization remains valid, we do not need a reDim() pricing vectors should be recomputed.

Reimplemented from SPxLPBase< Real >.

Definition at line 697 of file changesoplex.cpp.

References SPxLPBase< Real >::changeMaxObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().

◆ changeMaxObj() [3/3]

virtual void changeMaxObj ( SPxColId  p_id,
const Real p_newVal,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 946 of file spxsolver.h.

◆ changeObj() [1/3]

void changeObj ( const Vector newObj,
bool  scale = false 
)
virtual

scale determines whether the new data needs to be scaled according to the existing LP (persistent scaling)

Todo:
Factorization remains valid, we do not need a reDim() pricing vectors should be recomputed.

Definition at line 660 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().

◆ changeObj() [2/3]

void changeObj ( int  i,
const Real newVal,
bool  scale = false 
)
virtual
Todo:
Factorization remains valid, we do not need a reDim() pricing vectors should be recomputed.

Reimplemented from SPxLPBase< Real >.

Definition at line 672 of file changesoplex.cpp.

References SPxLPBase< Real >::changeObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().

◆ changeObj() [3/3]

virtual void changeObj ( SPxColId  p_id,
const Real p_newVal,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 937 of file spxsolver.h.

◆ changeRange() [1/3]

◆ changeRange() [2/3]

void changeRange ( int  i,
const Real newLhs,
const Real newRhs,
bool  scale = false 
)
virtual

◆ changeRange() [3/3]

virtual void changeRange ( SPxRowId  p_id,
const Real p_newLhs,
const Real p_newRhs,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 1023 of file spxsolver.h.

◆ changeRhs() [1/3]

◆ changeRhs() [2/3]

void changeRhs ( int  i,
const Real newRhs,
bool  scale = false 
)
virtual

◆ changeRhs() [3/3]

virtual void changeRhs ( SPxRowId  p_id,
const Real p_newRhs,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 1014 of file spxsolver.h.

◆ changeRhsStatus()

◆ changeRow() [1/2]

void changeRow ( int  i,
const LPRow newRow,
bool  scale = false 
)
virtual

◆ changeRow() [2/2]

virtual void changeRow ( SPxRowId  p_id,
const LPRow p_newRow,
bool  scale = false 
)
virtual

Definition at line 1030 of file spxsolver.h.

◆ changeRowObj() [1/3]

void changeRowObj ( const Vector newObj,
bool  scale = false 
)
virtual
Todo:
Factorization remains valid, we do not need a reDim() pricing vectors should be recomputed.

Definition at line 709 of file changesoplex.cpp.

References SPxLPBase< Real >::changeRowObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().

Referenced by SoPlex::_performOptIRStable().

◆ changeRowObj() [2/3]

void changeRowObj ( int  i,
const Real newVal,
bool  scale = false 
)
virtual
Todo:
Factorization remains valid, we do not need a reDim() pricing vectors should be recomputed.

Reimplemented from SPxLPBase< Real >.

Definition at line 721 of file changesoplex.cpp.

References SPxLPBase< Real >::changeRowObj(), SPxSolver::forceRecompNonbasicValue(), and SPxSolver::unInit().

◆ changeRowObj() [3/3]

virtual void changeRowObj ( SPxRowId  p_id,
const Real p_newVal,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 955 of file spxsolver.h.

◆ changeSense()

void changeSense ( SPxSense  sns)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 1240 of file changesoplex.cpp.

References SPxLPBase< Real >::changeSense(), and SPxSolver::unInit().

Referenced by SoPlex::_solveDecompositionDualSimplex().

◆ changeUpper() [1/3]

◆ changeUpper() [2/3]

void changeUpper ( int  i,
const Real newUpper,
bool  scale = false 
)
virtual

◆ changeUpper() [3/3]

virtual void changeUpper ( SPxColId  p_id,
const Real p_newUpper,
bool  scale = false 
)
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 983 of file spxsolver.h.

◆ changeUpperStatus()

◆ clear()

◆ clearDualBounds()

void clearDualBounds ( SPxBasis::Desc::Status  stat,
Real upp,
Real lw 
) const
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::addedRows(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), and SPxSolver::unShift().

◆ clearRowObjs()

virtual void clearRowObjs ( )
virtual

Reimplemented from SPxLPBase< Real >.

Definition at line 960 of file spxsolver.h.

Referenced by SoPlex::_performOptIRStable().

◆ clearUpdateVecs()

◆ coDim()

◆ coId()

◆ colId()

SPxColId colId ( int  i) const

ColId of i 'th column.

Definition at line 2253 of file spxsolver.h.

Referenced by SoPlex::_updateDecompComplementaryDualProblem(), and SPxBasis::readBasis().

◆ cols()

const LPColSet& cols ( ) const

return const lp's cols if available.

Definition at line 2150 of file spxsolver.h.

◆ computeCoTest()

◆ computeDualfarkas4Col()

◆ computeDualfarkas4Row()

◆ computeEnterCoPrhs()

◆ computeEnterCoPrhs4Col()

◆ computeEnterCoPrhs4Row()

void computeEnterCoPrhs4Row ( int  i,
int  n 
)
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 336 of file spxvecs.cpp.

References SPxBasis::baseId(), SPxBasis::desc(), soplex::EQ(), soplex::infinity, SPxLPBase< Real >::lhs(), SPxLPBase< Real >::maxRowObj(), SPxLPBase< Real >::number(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< Real >::rhs(), and SPxSolver::ROW.

Referenced by SPxSolver::computeEnterCoPrhs().

◆ computeFrhs()

void computeFrhs ( )
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.

Todo:
put this into a separate method

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< Real >::lhs(), SPxLPBase< Real >::maxObj(), SPxLPBase< Real >::maxRowObj(), MSG_ERROR, VectorBase< R >::multAdd(), SPxLPBase< Real >::nRows(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< Real >::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().

◆ computeFrhs1()

void computeFrhs1 ( const Vector ufb,
const Vector lfb 
)
protectedvirtual

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.

Parameters
ufbupper feasibility bound for variables
lfblower feasibility bound for variables

Definition at line 197 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().

◆ computeFrhs2()

void computeFrhs2 ( Vector coufb,
Vector colfb 
)
protected

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.

Parameters
coufbupper feasibility bound for covariables
colfblower feasibility bound for covariables

Definition at line 254 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().

◆ computeFrhsXtra()

◆ computeFtest()

◆ computeLeaveCoPrhs()

◆ computeLeaveCoPrhs4Col()

◆ computeLeaveCoPrhs4Row()

◆ computePrimalray4Col()

void computePrimalray4Col (