Scippy

SoPlex

Sequential object-oriented simPlex

SoPlexLegacy Class Reference

Preconfigured SoPlexLegacy LP-solver. More...

#include <soplexlegacy.h>

Public Member Functions

 SoPlexLegacy (SPxOut &outstream, SPxSolver::Type type=SPxSolver::LEAVE, SPxSolver::Representation rep=SPxSolver::COLUMN)
 default construtor. More...
 
virtual ~SoPlexLegacy ()
 
SoPlexLegacyoperator= (const SoPlexLegacy &rhs)
 assignment operator. More...
 
 SoPlexLegacy (const SoPlexLegacy &)
 copy constructor. More...
 
virtual void setUtype (SLUFactor::UpdateType tp)
 message handler More...
 
SPxSolver::Pricing pricing () const
 return current Pricing. More...
 
virtual void setPricing (SPxSolver::Pricing pr)
 set FULL or PARTIAL pricing. More...
 
SPxSolver::Type type () const
 return current Type. More...
 
SPxSolver::Representation rep () const
 return current basis representation. More...
 
virtual void setType (SPxSolver::Type tp)
 set LEAVE or ENTER algorithm. More...
 
virtual void setRep (SPxSolver::Representation p_rep)
 set ROW or COLUMN representation. More...
 
virtual void setPostScaler (SPxScaler *scaler, const bool destroy=false)
 setup postscaler to use. If destroy is true, scaler will be freed in destructor. More...
 
virtual void setSimplifier (SPxSimplifier *simpli, const bool destroy=false)
 setup simplifier to use. If destroy is true, simpli will be freed in destructor. More...
 
bool has_simplifier () const
 has a simplifier been set? More...
 
bool has_postscaler () const
 has a postscaler been set? More...
 
virtual void setPricer (SPxPricer *pricer, const bool destroy=false)
 setup pricer to use. More...
 
virtual void setTester (SPxRatioTester *tester, const bool destroy=false)
 setup ratio-tester to use. More...
 
virtual void setStarter (SPxStarter *starter, const bool destroy=false)
 setup starting basis generator to use. More...
 
virtual void setBasis (SPxSolver::VarStatus rows[], SPxSolver::VarStatus cols[])
 
virtual void clearBasis ()
 clear starting basis More...
 
virtual void setTerminationTime (Real time=infinity)
 set time limit. More...
 
Real terminationTime () const
 return time limit. More...
 
virtual void setTerminationIter (int iter=-1)
 set iteration limit. More...
 
int terminationIter () const
 return iteration limit. More...
 
virtual void setTerminationValue (Real val=infinity)
 set objective limit. More...
 
Real terminationValue () const
 return objective limit. More...
 
virtual Real feastol () const
 allowed primal feasibility tolerance. More...
 
virtual Real opttol () const
 allowed optimality, i.e., dual feasibility tolerance. More...
 
virtual 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...
 
virtual void setFeastol (Real d)
 set parameter feastol. More...
 
virtual void setOpttol (Real d)
 set parameter opttol. More...
 
virtual void setDelta (Real d)
 set parameter delta, i.e., set feastol and opttol to same value. More...
 
virtual SPxSolver::Status solve ()
 
virtual Real objValue () const
 
virtual SPxSolver::Status getPrimal (Vector &vector) const
 
virtual SPxSolver::Status getSlacks (Vector &vector) const
 
virtual SPxSolver::Status getDual (Vector &vector) const
 
virtual SPxSolver::Status getRedCost (Vector &vector) const
 
SPxSolver::VarStatus getBasisRowStatus (int row) const
 gets basis status for a single row. More...
 
SPxSolver::VarStatus getBasisColStatus (int col) const
 gets basis status for a single column. More...
 
SPxSolver::Status getBasis (SPxSolver::VarStatus rows[], SPxSolver::VarStatus cols[]) const
 get current basis, and return solver status. More...
 
const char * getColName (int idx, const NameSet *cnames, char *buf)
 
const char * getRowName (int idx, const NameSet *rnames, char *buf)
 
virtual SPxSolver::Status getPrimalray (Vector &vector) const
 
virtual SPxSolver::Status getDualfarkas (Vector &vector) const
 
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 Real getFactorTime () const
 time spent in factorizations More...
 
virtual int getFactorCount () const
 number of factorizations performed More...
 
virtual Real getSolveTime () const
 time spent in solves More...
 
virtual int getSolveCount () const
 number of solves performed More...
 
virtual int iteration () const
 
virtual bool terminate ()
 
virtual SPxSolver::Status status () const
 returns the current status 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)
 
virtual bool writeState (const char *filename, const NameSet *rowNames=NULL, const NameSet *colNames=NULL) const
 
std::string statistics () const
 returns statistical information in form of a string. More...
 
- Public Member Functions inherited from SPxLPBase< R >
void setOutstream (SPxOut &newOutstream)
 
void unscaleLP ()
 unscales the lp and clears basis More...
 
template<>
void computePrimalActivity (const VectorBase< Rational > &primal, VectorBase< Rational > &activity, const bool unscaled) const
 
template<>
void computeDualActivity (const VectorBase< Rational > &dual, VectorBase< Rational > &activity, const bool unscaled) const
 
template<>
Rational maxAbsNzo (bool) const
 
template<>
Rational minAbsNzo (bool) const
 
template<>
bool readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 Read LP in "CPLEX LP File Format". More...
 
template<>
bool readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
template<>
void writeLPF (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 Write LP in LP Format. More...
 
template<>
void writeMPS (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 Write LP in MPS format. More...
 
template<>
void buildDualProblem (SPxLPBase< Rational > &dualLP, SPxRowId primalRowIds[], SPxColId primalColIds[], SPxRowId dualRowIds[], SPxColId dualColIds[], int *nprimalrows, int *nprimalcols, int *ndualrows, int *ndualcols)
 Building the dual problem from a given LP. More...
 
template<>
void unscaleLP ()
 
template<>
void computePrimalActivity (const VectorBase< Real > &primal, VectorBase< Real > &activity, const bool unscaled) const
 
template<>
void computeDualActivity (const VectorBase< Real > &dual, VectorBase< Real > &activity, const bool unscaled) const
 
template<>
Real maxAbsNzo (bool unscaled) const
 
template<>
Real minAbsNzo (bool unscaled) const
 
template<>
void getObjUnscaled (VectorBase< Real > &pobj) const
 Gets unscaled objective vector. More...
 
template<>
void getRowVectorUnscaled (int i, DSVectorBase< Real > &vec) const
 Gets unscaled row vector of row i. More...
 
template<>
void getRhsUnscaled (VectorBase< Real > &vec) const
 Gets unscaled right hand side vector. More...
 
template<>
Real rhsUnscaled (int i) const
 Returns unscaled right hand side of row number i. More...
 
template<>
Real rhsUnscaled (const SPxRowId &id) const
 Returns unscaled right hand side of row with identifier id. More...
 
template<>
void getLhsUnscaled (VectorBase< Real > &vec) const
 Returns unscaled left hand side vector. More...
 
template<>
Real lhsUnscaled (int i) const
 Returns unscaled left hand side of row number i. More...
 
template<>
Real lhsUnscaled (const SPxRowId &id) const
 Returns left hand side of row with identifier id. More...
 
template<>
void getColVectorUnscaled (int i, DSVectorBase< Real > &vec) const
 Gets column vector of column i. More...
 
template<>
void getColVectorUnscaled (const SPxColId &id, DSVectorBase< Real > &vec) const
 Gets column vector of column with identifier id. More...
 
template<>
Real objUnscaled (int i) const
 Returns unscaled objective value of column i. More...
 
template<>
Real objUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id. More...
 
template<>
void maxObjUnscaled (VectorBase< Real > &vec) const
 Returns unscaled objective vector for maximization problem. More...
 
template<>
Real maxObjUnscaled (int i) const
 Returns unscaled objective value of column i for maximization problem. More...
 
template<>
Real maxObjUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id for maximization problem. More...
 
template<>
void getUpperUnscaled (DVector &vec) const
 Returns unscaled upper bound vector. More...
 
template<>
Real upperUnscaled (int i) const
 Returns unscaled upper bound of column i. More...
 
template<>
Real upperUnscaled (const SPxColId &id) const
 Returns unscaled upper bound of column with identifier id. More...
 
template<>
void getLowerUnscaled (DVector &vec) const
 Returns unscaled lower bound vector. More...
 
template<>
Real lowerUnscaled (int i) const
 Returns unscaled lower bound of column i. More...
 
template<>
Real lowerUnscaled (const SPxColId &id) const
 Returns unscaled lower bound of column with identifier id. More...
 
template<>
void changeMaxObj (const VectorBase< Real > &newObj, bool scale)
 Changes objective vector to newObj. More...
 
template<>
void changeLower (const VectorBase< Real > &newLower, bool scale)
 Changes vector of lower bounds to newLower. More...
 
template<>
void changeUpper (const VectorBase< Real > &newUpper, bool scale)
 Changes vector of upper bounds to newUpper. More...
 
template<>
void changeLhs (const VectorBase< Real > &newLhs, bool scale)
 Changes left hand side vector for constraints to newLhs. More...
 
template<>
void changeRhs (const VectorBase< Real > &newRhs, bool scale)
 Changes right hand side vector for constraints to newRhs. More...
 
template<>
bool readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 Read LP in "CPLEX LP File Format". More...
 
template<>
bool readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
template<>
void writeLPF (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 Write LP in LP Format. More...
 
template<>
void writeMPS (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 Write LP in MPS format. More...
 
template<>
void buildDualProblem (SPxLPBase< Real > &dualLP, SPxRowId primalRowIds[], SPxColId primalColIds[], SPxRowId dualRowIds[], SPxColId dualColIds[], int *nprimalrows, int *nprimalcols, int *ndualrows, int *ndualcols)
 Building the dual problem from a given LP. More...
 
bool isScaled () const
 Returns true if and only if the LP is scaled. More...
 
void setScalingInfo (bool scaled)
 set whether the LP is scaled or not More...
 
int nRows () const
 Returns number of rows in LP. More...
 
int nCols () const
 Returns number of columns in LP. More...
 
int nNzos () const
 Returns number of nonzeros in LP. More...
 
virtual R minAbsNzo (bool unscaled=true) const
 Absolute smallest non-zero element in (possibly scaled) LP. More...
 
virtual R maxAbsNzo (bool unscaled=true) const
 Absolute biggest non-zero element in (in rational case possibly scaled) LP. More...
 
void getRow (int i, LPRowBase< R > &row) const
 Gets i 'th row. More...
 
void getRow (const SPxRowId &id, LPRowBase< R > &row) const
 Gets row with identifier id. More...
 
void getRows (int start, int end, LPRowSetBase< R > &set) const
 Gets rows start, ... end. More...
 
const SVectorBase< R > & rowVector (int i) const
 Gets row vector of row i. More...
 
const SVectorBase< R > & rowVector (const SPxRowId &id) const
 Gets row vector of row with identifier id. More...
 
void getRowVectorUnscaled (int i, DSVectorBase< Real > &vec) const
 Gets unscaled row vector of row i. More...
 
const VectorBase< R > & rhs () const
 Returns right hand side vector. More...
 
const R & rhs (int i) const
 Returns right hand side of row number i. More...
 
const R & rhs (const SPxRowId &id) const
 Returns right hand side of row with identifier id. More...
 
void getRhs (VectorBase< R > &vec) const
 Gets (internal and possibly scaled) right hand side vector. More...
 
void getRhsUnscaled (VectorBase< Real > &vec) const
 Gets unscaled right hand side vector. More...
 
rhsUnscaled (int i) const
 Returns unscaled right hand side of row number i. More...
 
rhsUnscaled (const SPxRowId &id) const
 Returns unscaled right hand side of row with identifier id. More...
 
const VectorBase< R > & lhs () const
 Returns left hand side vector. More...
 
const R & lhs (int i) const
 Returns left hand side of row number i. More...
 
const R & lhs (const SPxRowId &id) const
 Returns left hand side of row with identifier id. More...
 
void getRowObj (VectorBase< R > &prowobj) const
 Gets row objective function vector. More...
 
rowObj (int i) const
 
rowObj (const SPxRowId &id) const
 Returns row objective function value of row with identifier id. More...
 
const VectorBase< R > & maxRowObj () const
 
const R & maxRowObj (int i) const
 
const R & maxRowObj (const SPxRowId &id) const
 Returns row objective function value of row with identifier id. More...
 
void getLhsUnscaled (VectorBase< Real > &vec) const
 Returns unscaled left hand side vector. More...
 
lhsUnscaled (int i) const
 Returns unscaled left hand side of row number i. More...
 
lhsUnscaled (const SPxRowId &id) const
 Returns left hand side of row with identifier id. More...
 
LPRowBase< R >::Type rowType (int i) const
 Returns the inequality type of the i'th LPRow. More...
 
LPRowBase< R >::Type rowType (const SPxRowId &id) const
 Returns the inequality type of the row with identifier key. More...
 
void getCol (int i, LPColBase< R > &col) const
 Gets i 'th column. More...
 
void getCol (const SPxColId &id, LPColBase< R > &col) const
 Gets column with identifier id. More...
 
void getCols (int start, int end, LPColSetBase< R > &set) const
 Gets columns start, ..., end. More...
 
const SVectorBase< R > & colVector (int i) const
 Returns column vector of column i. More...
 
const SVectorBase< R > & colVector (const SPxColId &id) const
 Returns column vector of column with identifier id. More...
 
void getColVectorUnscaled (int i, DSVectorBase< Real > &vec) const
 Gets column vector of column i. More...
 
void getColVectorUnscaled (const SPxColId &id, DSVectorBase< Real > &vec) const
 Gets column vector of column with identifier id. More...
 
void getObjUnscaled (VectorBase< Real > &pobj) const
 Gets unscaled objective vector. More...
 
void getObj (VectorBase< R > &pobj) const
 Gets objective vector. More...
 
obj (int i) const
 Returns objective value of column i. More...
 
obj (const SPxColId &id) const
 Returns objective value of column with identifier id. More...
 
objUnscaled (int i) const
 Returns unscaled objective value of column i. More...
 
objUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id. More...
 
const VectorBase< R > & maxObj () const
 Returns objective vector for maximization problem. More...
 
const R & maxObj (int i) const
 Returns objective value of column i for maximization problem. More...
 
const R & maxObj (const SPxColId &id) const
 Returns objective value of column with identifier id for maximization problem. More...
 
void maxObjUnscaled (VectorBase< Real > &vec) const
 Returns unscaled objective vector for maximization problem. More...
 
maxObjUnscaled (int i) const
 Returns unscaled objective value of column i for maximization problem. More...
 
maxObjUnscaled (const SPxColId &id) const
 Returns unscaled objective value of column with identifier id for maximization problem. More...
 
const VectorBase< R > & upper () const
 Returns upper bound vector. More...
 
const R & upper (int i) const
 Returns upper bound of column i. More...
 
const R & upper (const SPxColId &id) const
 Returns upper bound of column with identifier id. More...
 
void getUpperUnscaled (DVector &vec) const
 Gets unscaled upper bound vector. More...
 
upperUnscaled (int i) const
 Returns unscaled upper bound of column i. More...
 
upperUnscaled (const SPxColId &id) const
 Returns unscaled upper bound of column with identifier id. More...
 
const VectorBase< R > & lower () const
 Returns (internal and possibly scaled) lower bound vector. More...
 
const R & lower (int i) const
 Returns (internal and possibly scaled) lower bound of column i. More...
 
const R & lower (const SPxColId &id) const
 Returns (internal and possibly scaled) lower bound of column with identifier id. More...
 
void getLowerUnscaled (DVector &vec) const
 Gets unscaled lower bound vector. More...
 
lowerUnscaled (int i) const
 Returns unscaled lower bound of column i. More...
 
lowerUnscaled (const SPxColId &id) const
 Returns unscaled lower bound of column with identifier id. More...
 
SPxSense spxSense () const
 Returns the optimization sense. More...
 
const R & objOffset () const
 Returns the objective function value offset. More...
 
int number (const SPxRowId &id) const
 Returns the row number of the row with identifier id. More...
 
int number (const SPxColId &id) const
 Returns the column number of the column with identifier id. More...
 
int number (const SPxId &id) const
 Returns the row or column number for identifier id. More...
 
SPxRowId rId (int n) const
 Returns the row identifier for row n. More...
 
SPxColId cId (int n) const
 Returns the column identifier for column n. More...
 
virtual void addRow (const LPRowBase< R > &row, bool scale=false)
 
virtual void addRow (const R &lhsValue, const SVectorBase< R > &rowVec, const R &rhsValue, bool scale=false)
 
template<class S >
void addRow (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue)
 
virtual void addRow (SPxRowId &id, const LPRowBase< R > &row, bool scale=false)
 Adds row to LPRowSetBase. More...
 
virtual void addRows (const LPRowSetBase< R > &pset, bool scale=false)
 
template<class S >
void addRows (const S *lhsValues, const S *rowValues, const int *rowIndices, const int *rowStarts, const int *rowLengths, const int numRows, const int numValues, const S *rhsValues)
 
virtual void addRows (SPxRowId id[], const LPRowSetBase< R > &set, bool scale=false)
 adds all LPRowBases of pset to LPRowSetBase. More...
 
virtual void addCol (const LPColBase< R > &col, bool scale=false)
 
virtual void addCol (const R &objValue, const R &lowerValue, const SVectorBase< R > &colVec, const R &upperValue, bool scale=false)
 
template<class S >
void addCol (const S *objValue, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue)
 
virtual void addCol (SPxColId &id, const LPColBase< R > &col, bool scale=false)
 Adds col to LPColSetVBase. More...
 
virtual void addCols (const LPColSetBase< R > &pset, bool scale=false)
 
template<class S >
void addCols (const S *objValue, const S *lowerValues, const S *colValues, const int *colIndices, const int *colStarts, const int *colLengths, const int numCols, const int numValues, const S *upperValues)
 
virtual void addCols (SPxColId id[], const LPColSetBase< R > &set, bool scale=false)
 Adds all LPColBases of set to LPColSetBase. More...
 
virtual void removeRow (int i)
 Removes i 'th row. More...
 
virtual void removeRow (SPxRowId id)
 Removes row with identifier id. More...
 
virtual void removeRows (int perm[])
 Removes multiple rows. More...
 
virtual void removeRows (SPxRowId id[], int n, int perm[]=0)
 
virtual void removeRows (int nums[], int n, int perm[]=0)
 Removes n LPRowBases. More...
 
virtual void removeRowRange (int start, int end, int perm[]=0)
 Removes rows from start to end (including both). More...
 
virtual void removeCol (int i)
 Removes i 'th column. More...
 
virtual void removeCol (SPxColId id)
 Removes column with identifier id. More...
 
virtual void removeCols (int perm[])
 Removes multiple columns. More...
 
virtual void removeCols (SPxColId id[], int n, int perm[]=0)
 
virtual void removeCols (int nums[], int n, int perm[]=0)
 Removes n LPCols. More...
 
virtual void removeColRange (int start, int end, int perm[]=0)
 Removes columns from start to end (including both). More...
 
virtual void clear ()
 clears the LP. 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 read (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
 Reads LP in LP or MPS format from input stream in. More...
 
virtual bool readFile (const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
 Reads LP from a file. More...
 
virtual void writeLPF (std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=0) const
 
virtual void writeMPS (std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=0) const
 Writes a file in MPS format to out. More...
 
virtual void writeFile (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const DIdxSet *p_intvars=0) const
 Write loaded LP to filename. More...
 
void printProblemStatistics (std::ostream &os)
 
virtual void changeObj (const VectorBase< R > &newObj, bool scale=false)
 Changes objective vector to newObj. scale determines whether the new data should be scaled. More...
 
virtual void changeObj (int i, const R &newVal, bool scale=false)
 changes i 'th objective vector element to newVal. scale determines whether the new data should be scaled More...
 
template<class S >
void changeObj (int i, const S *newVal)
 changes i 'th objective vector element to newVal. More...
 
virtual void changeObj (SPxColId id, const R &newVal, bool scale=false)
 Changes objective value of column with identifier id to newVal. scale determines whether the new data should be scaled. More...
 
virtual void changeMaxObj (const VectorBase< R > &newObj, bool scale=false)
 Changes objective vector to newObj. scale determines whether the new data should be scaled. More...
 
virtual void changeMaxObj (int i, const R &newVal, bool scale=false)
 changes i 'th objective vector element to newVal. scale determines whether the new data should be scaled More...
 
template<class S >
void changeMaxObj (int i, const S *newVal)
 changes i 'th objective vector element to newVal. More...
 
virtual void changeMaxObj (SPxColId id, const R &newVal, bool scale=false)
 Changes objective value of column with identifier id to newVal. scale determines whether the new data should be scaled. More...
 
virtual void changeLower (const VectorBase< R > &newLower, bool scale=false)
 Changes vector of lower bounds to newLower. scale determines whether the new data should be scaled. More...
 
virtual void changeLower (int i, const R &newLower, bool scale=false)
 changes i 'th lower bound to newLower. scale determines whether the new data should be scaled More...
 
template<class S >
void changeLower (int i, const S *newLower)
 changes i 'th lower bound to newLower. More...
 
virtual void changeLower (SPxColId id, const R &newLower, bool scale=false)
 changes lower bound of column with identifier id to newLower. scale determines whether the new data should be scaled More...
 
virtual void changeUpper (const VectorBase< R > &newUpper, bool scale=false)
 Changes vector of upper bounds to newUpper. scale determines whether the new data should be scaled. More...
 
virtual void changeUpper (int i, const R &newUpper, bool scale=false)
 Changes i 'th upper bound to newUpper. scale determines whether the new data should be scaled. More...
 
template<class S >
void changeUpper (int i, const S *newUpper)
 Changes i 'th upper bound to newUpper. More...
 
virtual void changeUpper (SPxColId id, const R &newUpper, bool scale=false)
 Changes upper bound of column with identifier id to newLower. scale determines whether the new data should be scaled. More...
 
virtual void changeBounds (const VectorBase< R > &newLower, const VectorBase< R > &newUpper, bool scale=false)
 Changes variable bounds to newLower and newUpper. scale determines whether the new data should be scaled. More...
 
virtual void changeBounds (int i, const R &newLower, const R &newUpper, bool scale=false)
 Changes bounds of column i to newLower and newUpper. scale determines whether the new data should be scaled. More...
 
template<class S >
void changeBounds (int i, const S *newLower, const S *newUpper)
 Changes bounds of column i to newLower and newUpper. More...
 
virtual void changeBounds (SPxColId id, const R &newLower, const R &newUpper, bool scale=false)
 Changes bounds of column with identifier id. scale determines whether the new data should be scaled. More...
 
virtual void changeLhs (const VectorBase< R > &newLhs, bool scale=false)
 Changes left hand side vector for constraints to newLhs. scale determines whether the new data should be scaled. More...
 
virtual void changeLhs (int i, const R &newLhs, bool scale=false)
 Changes i 'th left hand side value to newLhs. scale determines whether the new data should be scaled. More...
 
template<class S >
void changeLhs (int i, const S *newLhs)
 Changes i 'th left hand side value to newLhs. More...
 
virtual void changeLhs (SPxRowId id, const R &newLhs, bool scale=false)
 Changes left hand side value for row with identifier id. scale determines whether the new data should be scaled. More...
 
virtual void changeRhs (const VectorBase< R > &newRhs, bool scale=false)
 Changes right hand side vector for constraints to newRhs. scale determines whether the new data should be scaled. More...
 
virtual void changeRhs (int i, const R &newRhs, bool scale=false)
 Changes i 'th right hand side value to newRhs. scale determines whether the new data should be scaled. More...
 
virtual void changeRhs (SPxRowId id, const R &newRhs, bool scale=false)
 Changes right hand side value for row with identifier id. scale determines whether the new data should be scaled. More...
 
virtual void changeRange (const VectorBase< R > &newLhs, const VectorBase< R > &newRhs, bool scale=false)
 Changes left and right hand side vectors. scale determines whether the new data should be scaled. More...
 
virtual void changeRange (int i, const R &newLhs, const R &newRhs, bool scale=false)
 Changes left and right hand side of row i. scale determines whether the new data should be scaled. More...
 
template<class S >
void changeRange (int i, const S *newLhs, const S *newRhs)
 Changes left and right hand side of row i. More...
 
virtual void changeRange (SPxRowId id, const R &newLhs, const R &newRhs, bool scale=false)
 Changes left and right hand side of row with identifier id. scale determines whether the new data should be scaled. More...
 
virtual void changeRowObj (const VectorBase< R > &newRowObj, bool scale=false)
 Changes row objective function vector to newRowObj. scale determines whether the new data should be scaled. More...
 
virtual void changeRowObj (int i, const R &newRowObj, bool scale=false)
 Changes i 'th row objective function value to newRowObj. scale determines whether the new data should be scaled. More...
 
virtual void changeRowObj (SPxRowId id, const R &newRowObj, bool scale=false)
 Changes row objective function value for row with identifier id. scale determines whether the new data should be scaled. More...
 
virtual void clearRowObjs ()
 Clears row objective function values for all rows. More...
 
virtual void changeRow (int n, const LPRowBase< R > &newRow, bool scale=false)
 Replaces i 'th row of LP with newRow. scale determines whether the new data should be scaled. More...
 
virtual void changeRow (SPxRowId id, const LPRowBase< R > &newRow, bool scale=false)
 Replaces row with identifier id with newRow. scale determines whether the new data should be scaled. More...
 
virtual void changeCol (int n, const LPColBase< R > &newCol, bool scale=false)
 Replaces i 'th column of LP with newCol. scale determines whether the new data should be scaled. More...
 
virtual void changeCol (SPxColId id, const LPColBase< R > &newCol, bool scale=false)
 Replaces column with identifier id with newCol. scale determines whether the new data should be scaled. More...
 
virtual void changeElement (int i, int j, const R &val, bool scale=false)
 Changes LP element (i, j) to val. scale determines whether the new data should be scaled. More...
 
template<class S >
void changeElement (int i, int j, const S *val)
 Changes LP element (i, j) to val. More...
 
virtual void changeElement (SPxRowId rid, SPxColId cid, const R &val, bool scale=false)
 Changes LP element identified by (rid, cid) to val. scale determines whether the new data should be scaled. More...
 
virtual void changeSense (SPxSense sns)
 Changes optimization sense to sns. More...
 
virtual void changeObjOffset (const R &o)
 
virtual void computePrimalActivity (const VectorBase< R > &primal, VectorBase< R > &activity, const bool unscaled=true) const
 Computes activity of the rows for a given primal vector; activity does not need to be zero. More...
 
virtual void addPrimalActivity (const SVectorBase< R > &primal, VectorBase< R > &activity) const
 Updates activity of the rows for a given primal vector; activity does not need to be zero. More...
 
virtual void computeDualActivity (const VectorBase< R > &dual, VectorBase< R > &activity, const bool unscaled=true) const
 Computes "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More...
 
virtual void addDualActivity (const SVectorBase< R > &dual, VectorBase< R > &activity) const
 Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More...
 
virtual void subDualActivity (const VectorBase< R > &dual, VectorBase< R > &activity) const
 Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More...
 
virtual void buildDualProblem (SPxLPBase< R > &dualLP, SPxRowId primalRowIds[]=0, SPxColId primalColIds[]=0, SPxRowId dualRowIds[]=0, SPxColId dualColIds[]=0, int *nprimalrows=0, int *nprimalcols=0, int *ndualrows=0, int *ndualcols=0)
 Building the dual problem from a given LP. More...
 
bool isConsistent () const
 Consistency check. More...
 
 SPxLPBase ()
 Default constructor. More...
 
virtual ~SPxLPBase ()
 Destructor. More...
 
 SPxLPBase (const SPxLPBase< R > &old)
 Copy constructor. More...
 
template<class S >
 SPxLPBase (const SPxLPBase< S > &old)
 Copy constructor. More...
 
SPxLPBase< R > & operator= (const SPxLPBase< R > &old)
 Assignment operator. More...
 
template<class S >
SPxLPBase< R > & operator= (const SPxLPBase< S > &old)
 Assignment operator. More...
 

Protected Attributes

SLUFactor m_slu
 LU Factorisation. More...
 
SPxSolver m_solver
 solver More...
 
SPxScalerm_postScaler
 post-scaler More...
 
SPxSimplifierm_simplifier
 simplifier More...
 
bool m_vanished
 did the presolver solve the problem ? More...
 
bool m_freePreScaler
 true iff m_preScaler should be freed inside of this object More...
 
bool m_freePostScaler
 true iff m_postScaler should be freed inside of this object More...
 
bool m_freeSimplifier
 true iff m_simplifier should be freed inside of this object More...
 
DataArray< SPxSolver::VarStatusm_colsbasisstatus
 
DataArray< SPxSolver::VarStatusm_rowsbasisstatus
 
- Protected Attributes inherited from LPRowSetBase< R >
DataArray< int > scaleExp
 row scaling factors (stored as bitshift) More...
 
- Protected Attributes inherited from ClassArray< Nonzero< R > >
int thesize
 number of used elements in array data More...
 
int themax
 the length of array data and More...
 
Nonzero< R > * data
 the array of elements More...
 
double memFactor
 memory extension factor. More...
 
- Protected Attributes inherited from LPColSetBase< R >
DataArray< int > scaleExp
 column scaling factors (stored as bitshift) More...
 

Private Member Functions

void unsimplify () const
 undoes preprocessing such that the unsimplified solution values and basis is available More...
 

Additional Inherited Members

- Public Types inherited from SPxLPBase< R >
enum  SPxSense { MAXIMIZE = 1, MINIMIZE = -1 }
 Optimization sense. More...
 
- Public Attributes inherited from SPxLPBase< R >
SPxOutspxout
 
- Protected Member Functions inherited from SPxLPBase< R >
R & rhs_w (int i)
 Returns right hand side of row i. More...
 
R & lhs_w (int i)
 Returns left hand side of row i. More...
 
R & maxRowObj_w (int i)
 Returns objective function value of row i. More...
 
R & maxObj_w (int i)
 Returns objective value of column i for maximization problem. More...
 
R & upper_w (int i)
 Returns upper bound of column i. More...
 
R & lower_w (int i)
 Returns lower bound of column i. More...
 
const LPRowSetBase< R > * lprowset () const
 Returns the LP as an LPRowSetBase. More...
 
const LPColSetBase< R > * lpcolset () const
 Returns the LP as an LPColSetBase. More...
 
virtual void doRemoveRow (int j)
 Internal helper method. More...
 
virtual void doRemoveRows (int perm[])
 Internal helper method. More...
 
virtual void doRemoveCol (int j)
 Internal helper method. More...
 
virtual void doRemoveCols (int perm[])
 Internal helper method. More...
 
virtual void addedRows (int newrows)
 Called after the last n rows have just been added. More...
 
virtual void addedCols (int newcols)
 Called after the last n columns have just been added. More...
 
void added2Set (SVSetBase< R > &set, const SVSetBase< R > &addset, int n)
 
- Protected Member Functions inherited from LPRowSetBase< R >
const SVSetBase< R > * rowSet () const
 Returns the complete SVSet. More...
 
int num () const
 Returns the number of LPRowBases in LPRowSetBase. More...
 
int max () const
 Returns the maximum number of LPRowBases that fit. More...
 
const VectorBase< R > & lhs () const
 Returns the vector of lhs values. More...
 
VectorBase< R > & lhs_w ()
 Returns the vector of lhs values. More...
 
const R & lhs (int i) const
 Returns the lhs of the i 'th LPRowBase. More...
 
R & lhs_w (int i)
 Returns the lhs of the i 'th LPRowBase. More...
 
const R & lhs (const DataKey &k) const
 Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More...
 
R & lhs_w (const DataKey &k)
 Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More...
 
const VectorBase< R > & rhs () const
 Returns the vector of rhs values. More...
 
VectorBase< R > & rhs_w ()
 Returns the vector of rhs values (writeable). More...
 
const R & rhs (int i) const
 Returns the rhs of the i 'th LPRowBase. More...
 
R & rhs_w (int i)
 Returns the rhs of the i 'th LPRowBase (writeable). More...
 
const R & rhs (const DataKey &k) const
 Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase. More...
 
R & rhs_w (const DataKey &k)
 Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase (writeable). More...
 
const VectorBase< R > & obj () const
 Returns the vector of objective coefficients. More...
 
VectorBase< R > & obj_w ()
 Returns the vector of objective coefficients (writeable). More...
 
const R & obj (int i) const
 Returns the objective coefficient of the i 'th LPRowBase. More...
 
R & obj_w (int i)
 Returns the objective coefficient of the i 'th LPRowBase (writeable). More...
 
const R & obj (const DataKey &k) const
 Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase. More...
 
R & obj_w (const DataKey &k)
 Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase (writeable). More...
 
SVectorBase< R > & rowVector_w (int i)
 Returns a writable rowVector of the i 'th LPRowBase. More...
 
const SVectorBase< R > & rowVector (int i) const
 Returns the rowVector of the i 'th LPRowBase. More...
 
SVectorBase< R > & rowVector_w (const DataKey &k)
 Returns a writable rowVector of the LPRowBase with DataKey k. More...
 
const SVectorBase< R > & rowVector (const DataKey &k) const
 Returns the rowVector of the LPRowBase with DataKey k. More...
 
LPRowBase< R >::Type type (int i) const
 Returns the inequalitiy type of the i 'th LPRowBase. More...
 
LPRowBase< R >::Type type (const DataKey &k) const
 Returns the inequality type of the LPRowBase with DataKey k. More...
 
void setType (int i, typename LPRowBase< R >::Type t)
 Changes the inequality type of row i to type. More...
 
const R & value (int i) const
 Returns the value of the i'th LPRowBase. More...
 
const R & value (const DataKey &k) const
 Returns the value of the LPRowBase with DataKey k. More...
 
DataKey key (int i) const
 Returns the DataKey of the i 'th LPRowBase in LPRowSetBase. More...
 
int number (const DataKey &k) const
 Returns the number of the LPRowBase with DataKey k in LPRowSetBase. More...
 
bool has (const DataKey &k) const
 does DataKey k belong to LPRowSetBase ? More...
 
void add (const LPRowBase< R > &row)
 
void add (DataKey &pkey, const LPRowBase< R > &prow)
 Adds row to LPRowSetBase. More...
 
void add (const R &plhs, const SVectorBase< R > &prowVector, const R &prhs, const R &pobj=0, const int &pscaleExp=0)
 Adds LPRowBase consisting of left hand side lhs, row vector rowVector, and right hand side rhs to LPRowSetBase. More...
 
template<class S >
void add (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=0)
 Adds LPRowBase consisting of left hand side lhs, row vector rowVector, and right hand side rhs to LPRowSetBase. More...
 
template<class S >
void add (DataKey &newkey, const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=0)
 Adds LPRowBase consisting of left hand side lhs, row vector rowVector, and right hand side rhs to LPRowSetBase, with DataKey key. More...
 
void add (DataKey &newkey, const R &newlhs, const SVectorBase< R > &newrowVector, const R &newrhs, const R &newobj=0, const int &newscaleExp=0)
 Adds LPRowBase consisting of left hand side lhs, row vector rowVector, and right hand side rhs to LPRowSetBase, with DataKey key. More...
 
void add (const LPRowSetBase< R > &newset)
 
void add (DataKey keys[], const LPRowSetBase< R > &set)
 Adds all LPRowBases of set to LPRowSetBase. More...
 
void xtend (int n, int newmax)
 Extends row n to fit newmax nonzeros. More...
 
void xtend (const DataKey &pkey, int pnewmax)
 Extends row with DataKey key to fit newmax nonzeros. More...
 
void add2 (const DataKey &k, int n, const int idx[], const R val[])
 Adds n nonzero (idx, val)-pairs to rowVector with DataKey k. More...
 
void add2 (int i, int n, const int idx[], const R val[])
 Adds n nonzero (idx, val)-pairs to i 'th rowVector. More...
 
template<class S >
void add2 (int i, int n, const int idx[], const S val[])
 Adds n nonzero (idx, val)-pairs to i 'th rowVector. More...
 
SVectorBase< R > & create (int pnonzeros=0, const R &plhs=0, const R &prhs=1, const R &pobj=0, const int &pscaleExp=0)
 Creates new LPRowBase with specified parameters and returns a reference to its row vector. More...
 
SVectorBase< R > & create (DataKey &newkey, int nonzeros=0, const R &newlhs=0, const R &newrhs=1, const R &newobj=0, const int &newscaleExp=0)
 Creates new LPRowBase with specified parameters and returns a reference to its row vector. More...
 
void remove (int i)
 Removes i 'th LPRowBase. More...
 
void remove (const DataKey &k)
 Removes LPRowBase with DataKey k. More...
 
void remove (int perm[])
 Removes multiple LPRowBases. More...
 
void remove (const int nums[], int n)
 Removes n LPRowBases with row numbers given by nums. More...
 
void remove (const int nums[], int n, int *perm)
 Removes n LPRowBases with row numbers given by nums, Stores permutation of row indices in perm. More...
 
void clear ()
 Removes all LPRowBases. More...
 
void reMax (int newmax=0)
 Reallocates memory to be able to store newmax LPRowBases. More...
 
int memSize () const
 Returns number of used nonzero entries. More...
 
int memMax () const
 Returns length of nonzero memory. More...
 
void memRemax (int newmax)
 Reallocates memory to be able to store newmax nonzeros. More...
 
void memPack ()
 Garbage collection in nonzero memory. More...
 
bool isConsistent () const
 Checks consistency. More...
 
 LPRowSetBase (int pmax=-1, int pmemmax=-1)
 Default constructor. More...
 
LPRowSetBase< R > & operator= (const LPRowSetBase< R > &rs)
 Assignment operator. More...
 
template<class S >
LPRowSetBase< R > & operator= (const LPRowSetBase< S > &rs)
 Assignment operator. More...
 
 LPRowSetBase (const LPRowSetBase< R > &rs)
 Copy constructor. More...
 
template<class S >
 LPRowSetBase (const LPRowSetBase< S > &rs)
 Copy constructor. More...
 
virtual ~LPRowSetBase ()
 Destructor. More...
 
- Protected Member Functions inherited from SVSetBase< R >
void add (const SVectorBase< R > &svec)
 Adds svec to the set. More...
 
void add (DataKey &nkey, const SVectorBase< R > &svec)
 Adds svec to SVSetBase. More...
 
template<class S >
void add (DataKey &nkey, const S *rowValues, const int *rowIndices, int rowSize)
 Adds svec to SVSetBase. More...
 
void add (const SVectorBase< R > svec[], int n)
 Adds all n SVectorBases in the array svec to the set. More...
 
void add (DataKey nkey[], const SVectorBase< R > svec[], int n)
 Adds n SVectorBases to SVSetBase. More...
 
template<class S >
void add (const SVSetBase< S > &pset)
 Adds all SVectorBases in pset to SVSetBase. More...
 
template<class S >
void add (DataKey nkey[], const SVSetBase< S > &pset)
 Adds all SVectorBases of pset to SVSetBase. More...
 
SVectorBase< R > * create (int idxmax=0)
 Creates new SVectorBase in set. More...
 
SVectorBase< R > * create (DataKey &nkey, int idxmax=-1)
 Creates new SVectorBase in set. More...
 
void xtend (SVectorBase< R > &svec, int newmax)
 Extends svec to fit newmax nonzeros. More...
 
void add2 (SVectorBase< R > &svec, int idx, R val)
 Adds nonzero (idx, val) to svec of this SVSetBase. More...
 
void add2 (SVectorBase< R > &svec, int n, const int idx[], const R val[])
 Adds n nonzeros to svec of this SVSetBase. More...
 
template<class S >
void add2 (SVectorBase< R > &svec, int n, const int idx[], const S val[])
 Adds n nonzeros to svec of this SVSetBase. More...
 
void remove (const DataKey &removekey)
 Removes the vector with key removekey from the set. More...
 
void remove (int removenum)
 Removes the vector with number removenum from the set. More...
 
void remove (const SVectorBase< R > *svec)
 Removes one SVectorBase from set. More...
 
void remove (int perm[])
 Removes multiple elements. More...
 
void remove (const DataKey keys[], int n)
 Removes n SVectorBases from set. More...
 
void remove (const int nums[], int n)
 Removes n SVectorBases from set. More...
 
void remove (const DataKey keys[], int n, int *perm)
 
void remove (const int nums[], int n, int *perm)
 
void clear (int minNewSize=-1)
 Removes all SVectorBases from set. More...
 
SVectorBase< R > & operator[] (int n)
 Gets SVectorBase by number, writeable. More...
 
const SVectorBase< R > & operator[] (int n) const
 Gets SVectorBase by number. More...
 
SVectorBase< R > & operator[] (const DataKey &k)
 Gets SVectorBase by DataKey, writeable. More...
 
const SVectorBase< R > & operator[] (const DataKey &k) const
 Gets SVectorBase by DataKey. More...
 
int num () const
 Current number of SVectorBases. More...
 
int max () const
 Current maximum number of SVectorBases. More...
 
DataKey key (int n) const
 Gets DataKey of vector number. More...
 
DataKey key (const SVectorBase< R > *svec) const
 Gets DataKey of SVectorBase. More...
 
int number (const DataKey &k) const
 Gets vector number of DataKey. More...
 
int number (const SVectorBase< R > *svec) const
 Gets vector number of SVectorBase. More...
 
bool has (const DataKey &k) const
 True iff SVSetBase contains a SVectorBase for DataKey k. More...
 
bool has (int n) const
 True iff SVSetBase contains a SVectorBase for vector number n. More...
 
bool has (const SVectorBase< R > *svec) const
 Is an SVectorBase in the set? More...
 
int memSize () const
 Used nonzero memory. More...
 
int memMax () const
 Length of nonzero memory. More...
 
void memRemax (int newmax)
 Reset length of nonzero memory. More...
 
void memPack ()
 Garbage collection in nonzero memory. More...
 
void reMax (int newmax=0)
 Resets maximum number of SVectorBases. More...
 
bool isConsistent () const
 Consistency check. More...
 
 SVSetBase (int pmax=-1, int pmemmax=-1, double pfac=1.1, double pmemFac=1.2)
 Default constructor. More...
 
virtual ~SVSetBase ()
 Destructor. More...
 
SVSetBase< R > & operator= (const SVSetBase< R > &rhs)
 Assignment operator. More...
 
template<class S >
SVSetBase< R > & operator= (const SVSetBase< S > &rhs)
 Assignment operator. More...
 
 SVSetBase (const SVSetBase< R > &old)
 Copy constructor. More...
 
template<class S >
 SVSetBase (const SVSetBase< S > &old)
 Copy constructor. More...
 
- Protected Member Functions inherited from ClassArray< Nonzero< R > >
Nonzero< R > & operator[] (int n)
 Reference to n 'th element. More...
 
const Nonzero< R > & operator[] (int n) const
 Reference to n 'th const element. More...
 
Nonzero< R > & last ()
 Reference to last element. More...
 
const Nonzero< R > & last () const
 Reference to last const element. More...
 
Nonzero< R > * get_ptr ()
 Gets a C pointer to the data. More...
 
const Nonzero< R > * get_const_ptr () const
 Gets a const C pointer to the data. More...
 
void append (const Nonzero< R > &t)
 Appends element t. More...
 
void append (int n, const Nonzero< R > t[])
 Appends n elements from t. More...
 
void append (const ClassArray< Nonzero< R > > &t)
 Appends all elements from t. More...
 
void insert (int i, int n)
 Inserts n uninitialized elements before i 'th element. More...
 
void insert (int i, int n, const Nonzero< R > t[])
 Inserts n elements from t before i 'the element. More...
 
void insert (int i, const ClassArray< Nonzero< R > > &t)
 Inserts all elements from t before i 'th element. More...
 
void remove (int n=0, int m=1)
 Removes m elements starting at n. More...
 
void removeLast (int m=1)
 Removes m last elements. More...
 
void clear ()
 Removes all elements. More...
 
int size () const
 Returns number of elements. More...
 
void reSize (int newsize)
 Resets size to newsize. More...
 
int max () const
 Returns maximum number of elements. More...
 
ptrdiff_t reMax (int newMax=1, int newSize=-1)
 Resets maximum number of elements. More...
 
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...
 

Detailed Description

Preconfigured SoPlexLegacy LP-solver.

Definition at line 41 of file soplexlegacy.h.

Constructor & Destructor Documentation

◆ SoPlexLegacy() [1/2]

◆ ~SoPlexLegacy()

◆ SoPlexLegacy() [2/2]

Member Function Documentation

◆ clearBasis()

virtual void clearBasis ( )
virtual

clear starting basis

Definition at line 175 of file soplexlegacy.h.

References DataArray< T >::clear(), and SPxSolver::reLoad().

◆ delta()

virtual Real delta ( ) const
virtual

guaranteed primal and dual bound violation for optimal solution, returning the maximum of feastol() and opttol(), i.e., the less tight tolerance.

Definition at line 222 of file soplexlegacy.h.

References SPxSolver::delta().

◆ feastol()

virtual Real feastol ( ) const
virtual

allowed primal feasibility tolerance.

Definition at line 212 of file soplexlegacy.h.

References SPxSolver::feastol().

◆ getBasis()

◆ getBasisColStatus()

◆ getBasisRowStatus()

◆ getColName()

const char* getColName ( int  idx,
const NameSet cnames,
char *  buf 
)

◆ getDual()

◆ getDualfarkas()

SPxSolver::Status getDualfarkas ( Vector vector) const
virtual
Exceptions
SPxStatusExceptionif simplifier loaded, this is not yet implemented

Does not work yet with presolve

Definition at line 444 of file soplexlegacy.cpp.

References SPxSolver::getDualfarkas(), SoPlexLegacy::has_simplifier(), SoPlexLegacy::m_postScaler, SoPlexLegacy::m_solver, MSG_ERROR, and SPxScaler::unscaleDual().

Referenced by SoPlexLegacy::getRowName().

◆ getFactorCount()

virtual int getFactorCount ( ) const
virtual

number of factorizations performed

Definition at line 334 of file soplexlegacy.h.

References SLUFactor::getFactorCount().

◆ getFactorTime()

virtual Real getFactorTime ( ) const
virtual

time spent in factorizations

Definition at line 329 of file soplexlegacy.h.

References SLUFactor::getFactorTime(), and REAL.

◆ getPrimal()

◆ getPrimalray()

SPxSolver::Status getPrimalray ( Vector vector) const
virtual
Exceptions
SPxStatusExceptionif simplifier loaded, this is not yet implemented

Does not work yet with presolve

Definition at line 428 of file soplexlegacy.cpp.

References SPxSolver::getPrimalray(), SoPlexLegacy::has_simplifier(), SoPlexLegacy::m_postScaler, SoPlexLegacy::m_solver, MSG_ERROR, and SPxScaler::unscalePrimal().

Referenced by SoPlexLegacy::getRowName().

◆ getRedCost()

◆ getRowName()

◆ getSlacks()

◆ getSolveCount()

virtual int getSolveCount ( ) const
virtual

number of solves performed

Definition at line 344 of file soplexlegacy.h.

References SLUFactor::getSolveCount().

◆ getSolveTime()

virtual Real getSolveTime ( ) const
virtual

time spent in solves

Definition at line 339 of file soplexlegacy.h.

References SLUFactor::getSolveTime(), and REAL.

◆ has_postscaler()

bool has_postscaler ( ) const

has a postscaler been set?

Definition at line 137 of file soplexlegacy.h.

◆ has_simplifier()

◆ iteration()

virtual int iteration ( ) const
virtual

Definition at line 349 of file soplexlegacy.h.

References SPxSolver::basis(), and SPxBasis::iteration().

◆ objValue()

Real objValue ( ) const
virtual

◆ operator=()

◆ opttol()

virtual Real opttol ( ) const
virtual

allowed optimality, i.e., dual feasibility tolerance.

Definition at line 217 of file soplexlegacy.h.

References SPxSolver::opttol().

◆ pricing()

SPxSolver::Pricing pricing ( ) const

return current Pricing.

Definition at line 98 of file soplexlegacy.h.

References SPxSolver::pricing().

◆ qualBoundViolation()

void qualBoundViolation ( Real maxviol,
Real sumviol 
) const
virtual

◆ qualConstraintViolation()

◆ readBasisFile()

bool readBasisFile ( const char *  filename,
const NameSet rowNames,
const NameSet colNames 
)
virtual

Load basis from filename in MPS format. If rowNames and colNames are NULL, default names are used for the constraints and variables.

Definition at line 528 of file soplexlegacy.cpp.

References SPxSolver::loadLP(), SoPlexLegacy::m_solver, and SPxSolver::readBasisFile().

Referenced by SoPlexLegacy::status().

◆ rep()

return current basis representation.

Definition at line 113 of file soplexlegacy.h.

References SPxSolver::rep().

Referenced by SoPlexLegacy::writeBasisFile().

◆ setBasis()

virtual void setBasis ( SPxSolver::VarStatus  rows[],
SPxSolver::VarStatus  cols[] 
)
virtual
Exceptions
SPxStatusExceptionif simplifier loaded, this is not yet implemented set starting basis

Definition at line 158 of file soplexlegacy.h.

References SoPlexLegacy::has_simplifier(), MSG_ERROR, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), and DataArray< T >::reSize().

◆ setDelta()

◆ setFeastol()

virtual void setFeastol ( Real  d)
virtual

set parameter feastol.

Definition at line 227 of file soplexlegacy.h.

References SPxSolver::setFeastol().

◆ setOpttol()

virtual void setOpttol ( Real  d)
virtual

set parameter opttol.

Definition at line 232 of file soplexlegacy.h.

References SPxSolver::setOpttol().

◆ setPostScaler()

void setPostScaler ( SPxScaler scaler,
const bool  destroy = false 
)
virtual

setup postscaler to use. If destroy is true, scaler will be freed in destructor.

Definition at line 148 of file soplexlegacy.cpp.

References SoPlexLegacy::m_freePostScaler, SoPlexLegacy::m_postScaler, SPxScaler::setOutstream(), and SPxLPBase< R >::spxout.

Referenced by SoPlexLegacy::setRep().

◆ setPricer()

virtual void setPricer ( SPxPricer pricer,
const bool  destroy = false 
)
virtual

setup pricer to use.

Definition at line 142 of file soplexlegacy.h.

References SPxSolver::setPricer().

◆ setPricing()

virtual void setPricing ( SPxSolver::Pricing  pr)
virtual

set FULL or PARTIAL pricing.

Definition at line 103 of file soplexlegacy.h.

References SPxSolver::setPricing().

◆ setRep()

virtual void setRep ( SPxSolver::Representation  p_rep)
virtual

set ROW or COLUMN representation.

Definition at line 123 of file soplexlegacy.h.

References SoPlexLegacy::setPostScaler(), SPxSolver::setRep(), and SoPlexLegacy::setSimplifier().

◆ setSimplifier()

void setSimplifier ( SPxSimplifier simpli,
const bool  destroy = false 
)
virtual

setup simplifier to use. If destroy is true, simpli will be freed in destructor.

Definition at line 164 of file soplexlegacy.cpp.

References SoPlexLegacy::m_freeSimplifier, and SoPlexLegacy::m_simplifier.

Referenced by SoPlexLegacy::setRep().

◆ setStarter()

virtual void setStarter ( SPxStarter starter,
const bool  destroy = false 
)
virtual

setup starting basis generator to use.

Definition at line 152 of file soplexlegacy.h.

References SPxSolver::setStarter().

◆ setTerminationIter()

virtual void setTerminationIter ( int  iter = -1)
virtual

set iteration limit.

Definition at line 192 of file soplexlegacy.h.

References SPxSolver::setTerminationIter().

◆ setTerminationTime()

virtual void setTerminationTime ( Real  time = infinity)
virtual

set time limit.

Definition at line 182 of file soplexlegacy.h.

References SPxSolver::setTerminationTime().

◆ setTerminationValue()

virtual void setTerminationValue ( Real  val = infinity)
virtual

set objective limit.

Definition at line 202 of file soplexlegacy.h.

References SPxSolver::setTerminationValue().

◆ setTester()

virtual void setTester ( SPxRatioTester tester,
const bool  destroy = false 
)
virtual

setup ratio-tester to use.

Definition at line 147 of file soplexlegacy.h.

References SPxSolver::setTester().

◆ setType()

virtual void setType ( SPxSolver::Type  tp)
virtual

set LEAVE or ENTER algorithm.

Definition at line 118 of file soplexlegacy.h.

References SPxSolver::setType().

◆ setUtype()

virtual void setUtype ( SLUFactor::UpdateType  tp)
virtual

message handler

set verbosity set update type for factorization.

Definition at line 93 of file soplexlegacy.h.

References SLUFactor::setUtype().

◆ solve()

◆ statistics()

std::string statistics ( ) const

returns statistical information in form of a string.

Definition at line 397 of file soplexlegacy.h.

References SPxSolver::statistics(), and SoPlexLegacy::unsimplify().

◆ status()

◆ terminate()

virtual bool terminate ( )
virtual

Definition at line 354 of file soplexlegacy.h.

References SPxSolver::terminate().

◆ terminationIter()

int terminationIter ( ) const

return iteration limit.

Definition at line 197 of file soplexlegacy.h.

References SPxSolver::terminationIter().

◆ terminationTime()

Real terminationTime ( ) const

return time limit.

Definition at line 187 of file soplexlegacy.h.

References SPxSolver::terminationTime().

◆ terminationValue()

Real terminationValue ( ) const

return objective limit.

Definition at line 207 of file soplexlegacy.h.

References SPxSolver::terminationValue().

◆ type()

SPxSolver::Type type ( ) const

return current Type.

Definition at line 108 of file soplexlegacy.h.

References SPxSolver::type().

◆ unsimplify()

◆ writeBasisFile()

bool writeBasisFile ( const char *  filename,
const NameSet rowNames,
const NameSet colNames 
)
virtual

◆ writeState()

bool writeState ( const char *  filename,
const NameSet rowNames = NULL,
const NameSet colNames = NULL 
) const
virtual

Write LP, basis and parameter settings of the current SPxSolver object (i.e. after simplifying and scaling). LP is written in MPS format to "\p filename".mps, basis is written in "\p filename".bas, and parameters are written to "\p filename".set. If rowNames and colNames are NULL, default names are used for the constraints and variables.

Definition at line 614 of file soplexlegacy.cpp.

References SoPlexLegacy::m_solver, and SPxSolver::writeState().

Referenced by SoPlexLegacy::status().

Member Data Documentation

◆ m_colsbasisstatus

DataArray<SPxSolver::VarStatus> m_colsbasisstatus
protected

Definition at line 57 of file soplexlegacy.h.

Referenced by SoPlexLegacy::solve().

◆ m_freePostScaler

bool m_freePostScaler
protected

true iff m_postScaler should be freed inside of this object

Definition at line 55 of file soplexlegacy.h.

Referenced by SoPlexLegacy::operator=(), SoPlexLegacy::setPostScaler(), SoPlexLegacy::SoPlexLegacy(), and SoPlexLegacy::~SoPlexLegacy().

◆ m_freePreScaler

bool m_freePreScaler
protected

true iff m_preScaler should be freed inside of this object

Definition at line 54 of file soplexlegacy.h.

◆ m_freeSimplifier

bool m_freeSimplifier
protected

true iff m_simplifier should be freed inside of this object

Definition at line 56 of file soplexlegacy.h.

Referenced by SoPlexLegacy::operator=(), SoPlexLegacy::setSimplifier(), SoPlexLegacy::SoPlexLegacy(), and SoPlexLegacy::~SoPlexLegacy().

◆ m_postScaler

◆ m_rowsbasisstatus

DataArray<SPxSolver::VarStatus> m_rowsbasisstatus
protected

Definition at line 58 of file soplexlegacy.h.

Referenced by SoPlexLegacy::solve().

◆ m_simplifier

◆ m_slu

SLUFactor m_slu
protected

LU Factorisation.

Definition at line 49 of file soplexlegacy.h.

Referenced by SoPlexLegacy::operator=(), and SoPlexLegacy::SoPlexLegacy().

◆ m_solver

◆ m_vanished