Scippy

SoPlex

Sequential object-oriented simPlex

SoPlexLegacy Class Reference

Preconfigured SoPlexLegacy LP-solver. More...

#include <soplexlegacy.h>

Inheritance diagram for SoPlexLegacy:

Public Member Functions

 SoPlexLegacy (SPxOut &outstream, SPxSolver::Type type=SPxSolver::LEAVE, SPxSolver::Representation rep=SPxSolver::COLUMN)
 default construtor.
 
virtual ~SoPlexLegacy ()
 
SoPlexLegacyoperator= (const SoPlexLegacy &rhs)
 assignment operator.
 
 SoPlexLegacy (const SoPlexLegacy &)
 copy constructor.
 
virtual void setUtype (SLUFactor::UpdateType tp)
 message handler
 
SPxSolver::Pricing pricing () const
 return current Pricing.
 
virtual void setPricing (SPxSolver::Pricing pr)
 set FULL or PARTIAL pricing.
 
SPxSolver::Type type () const
 return current Type.
 
SPxSolver::Representation rep () const
 return current basis representation.
 
virtual void setType (SPxSolver::Type tp)
 set LEAVE or ENTER algorithm.
 
virtual void setRep (SPxSolver::Representation p_rep)
 set ROW or COLUMN representation.
 
virtual void setPreScaler (SPxScaler *scaler, const bool destroy=false)
 setup prescaler to use. If destroy is true, scaler will be freed in destructor.
 
virtual void setPostScaler (SPxScaler *scaler, const bool destroy=false)
 setup postscaler to use. If destroy is true, scaler will be freed in destructor.
 
virtual void setSimplifier (SPxSimplifier *simpli, const bool destroy=false)
 setup simplifier to use. If destroy is true, simpli will be freed in destructor.
 
bool has_simplifier () const
 has a simplifier been set?
 
bool has_prescaler () const
 has a prescaler been set?
 
bool has_postscaler () const
 has a postscaler been set?
 
virtual void setPricer (SPxPricer *pricer, const bool destroy=false)
 setup pricer to use.
 
virtual void setTester (SPxRatioTester *tester, const bool destroy=false)
 setup ratio-tester to use.
 
virtual void setStarter (SPxStarter *starter, const bool destroy=false)
 setup starting basis generator to use.
 
virtual void setBasis (SPxSolver::VarStatus rows[], SPxSolver::VarStatus cols[])
 
virtual void clearBasis ()
 clear starting basis
 
virtual void setTerminationTime (Real time=infinity)
 set time limit.
 
Real terminationTime () const
 return time limit.
 
virtual void setTerminationIter (int iter=-1)
 set iteration limit.
 
int terminationIter () const
 return iteration limit.
 
virtual void setTerminationValue (Real val=infinity)
 set objective limit.
 
Real terminationValue () const
 return objective limit.
 
virtual Real feastol () const
 allowed primal feasibility tolerance.
 
virtual Real opttol () const
 allowed optimality, i.e., dual feasibility tolerance.
 
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.
 
virtual void setFeastol (Real d)
 set parameter feastol.
 
virtual void setOpttol (Real d)
 set parameter opttol.
 
virtual void setDelta (Real d)
 set parameter delta, i.e., set feastol and opttol to same value.
 
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.
 
SPxSolver::VarStatus getBasisColStatus (int col) const
 gets basis status for a single column.
 
SPxSolver::Status getBasis (SPxSolver::VarStatus rows[], SPxSolver::VarStatus cols[]) const
 get current basis, and return solver status.
 
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.
 
virtual void qualBoundViolation (Real &maxviol, Real &sumviol) const
 get violations of bounds.
 
virtual Real getFactorTime () const
 time spent in factorizations
 
virtual int getFactorCount () const
 number of factorizations performed
 
virtual Real getSolveTime () const
 time spent in solves
 
virtual int getSolveCount () const
 number of solves performed
 
virtual int iteration () const
 
virtual bool terminate ()
 
virtual SPxSolver::Status status () const
 returns the current status
 
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.
 
- Public Member Functions inherited from SPxLPBase< R >
void setOutstream (SPxOut &newOutstream)
 
template<>
bool readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
template<>
bool readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
template<>
void writeLPF (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 
template<>
void writeMPS (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 
template<>
bool readLPF (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
template<>
bool readMPS (std::istream &p_input, NameSet *p_rnames, NameSet *p_cnames, DIdxSet *p_intvars)
 
template<>
void writeLPF (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 
template<>
void writeMPS (std::ostream &p_output, const NameSet *p_rnames, const NameSet *p_cnames, const DIdxSet *p_intvars) const
 
int nRows () const
 Returns number of rows in LP.
 
int nCols () const
 Returns number of columns in LP.
 
int nNzos () const
 Returns number of nonzeros in LP.
 
minAbsNzo () const
 Absolute smallest non-zero element in LP.
 
maxAbsNzo () const
 Absolute biggest non-zero element in LP.
 
void getRow (int i, LPRowBase< R > &row) const
 Gets i 'th row.
 
void getRow (const SPxRowId &id, LPRowBase< R > &row) const
 Gets row with identifier id.
 
void getRows (int start, int end, LPRowSetBase< R > &set) const
 Gets rows start, ... end.
 
const SVectorBase< R > & rowVector (int i) const
 Gets row vector of row i.
 
const SVectorBase< R > & rowVector (const SPxRowId &id) const
 Gets row vector of row with identifier id.
 
const VectorBase< R > & rhs () const
 Returns right hand side vector.
 
const R & rhs (int i) const
 
const R & rhs (const SPxRowId &id) const
 Returns right hand side of row with identifier id.
 
const VectorBase< R > & lhs () const
 Returns left hand side vector.
 
const R & lhs (int i) const
 
const R & lhs (const SPxRowId &id) const
 Returns left hand side of row with identifier id.
 
void getRowObj (VectorBase< R > &prowobj) const
 Gets row objective function vector.
 
rowObj (int i) const
 
rowObj (const SPxRowId &id) const
 Returns row objective function value of row with identifier id.
 
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.
 
LPRowBase< R >::Type rowType (int i) const
 Returns the inequality type of the i'th LPRow.
 
LPRowBase< R >::Type rowType (const SPxRowId &id) const
 Returns the inequality type of the row with identifier key.
 
void getCol (int i, LPColBase< R > &col) const
 Gets i 'th column.
 
void getCol (const SPxColId &id, LPColBase< R > &col) const
 Gets column with identifier id.
 
void getCols (int start, int end, LPColSetBase< R > &set) const
 Gets columns start, ..., end.
 
const SVectorBase< R > & colVector (int i) const
 Returns column vector of column i.
 
const SVectorBase< R > & colVector (const SPxColId &id) const
 Returns column vector of column with identifier id.
 
void getObj (VectorBase< R > &pobj) const
 Gets objective vector.
 
obj (int i) const
 Returns objective value of column i.
 
obj (const SPxColId &id) const
 Returns objective value of column with identifier id.
 
const VectorBase< R > & maxObj () const
 Returns objective vector for maximization problem.
 
const R & maxObj (int i) const
 Returns objective value of column i for maximization problem.
 
const R & maxObj (const SPxColId &id) const
 Returns objective value of column with identifier id for maximization problem.
 
const VectorBase< R > & upper () const
 Returns upper bound vector.
 
const R & upper (int i) const
 Returns upper bound of column i.
 
const R & upper (const SPxColId &id) const
 Returns upper bound of column with identifier id.
 
const VectorBase< R > & lower () const
 Returns lower bound vector.
 
const R & lower (int i) const
 Returns lower bound of column i.
 
const R & lower (const SPxColId &id) const
 Returns lower bound of column with identifier id.
 
SPxSense spxSense () const
 Returns the optimization sense.
 
const R & objOffset () const
 Returns the objective function value offset.
 
int number (const SPxRowId &id) const
 Returns the row number of the row with identifier id.
 
int number (const SPxColId &id) const
 Returns the column number of the column with identifier id.
 
int number (const SPxId &id) const
 Returns the row or column number for identifier id.
 
SPxRowId rId (int n) const
 Returns the row identifier for row n.
 
SPxColId cId (int n) const
 Returns the column identifier for column n.
 
virtual void addRow (const LPRowBase< R > &row)
 
virtual void addRow (const R &lhsValue, const SVectorBase< R > &rowVec, const R &rhsValue)
 
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)
 Adds row to LPRowSetBase.
 
virtual void addRows (const LPRowSetBase< R > &pset)
 
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)
 adds all LPRowBases of pset to LPRowSetBase.
 
virtual void addCol (const LPColBase< R > &col)
 
virtual void addCol (const R &objValue, const R &lowerValue, const SVectorBase< R > &colVec, const R &upperValue)
 
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)
 Adds col to LPColSetVBase.
 
virtual void addCols (const LPColSetBase< R > &pset)
 
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)
 Adds all LPColBases of set to LPColSetBase.
 
virtual void removeRow (int i)
 Removes i 'th row.
 
virtual void removeRow (SPxRowId id)
 Removes row with identifier id.
 
virtual void removeRows (int perm[])
 Removes multiple rows.
 
virtual void removeRows (SPxRowId id[], int n, int perm[]=0)
 
virtual void removeRows (int nums[], int n, int perm[]=0)
 Removes n LPRowBases.
 
virtual void removeRowRange (int start, int end, int perm[]=0)
 Removes rows from start to end (including both).
 
virtual void removeCol (int i)
 Removes i 'th column.
 
virtual void removeCol (SPxColId id)
 Removes column with identifier id.
 
virtual void removeCols (int perm[])
 Removes multiple columns.
 
virtual void removeCols (SPxColId id[], int n, int perm[]=0)
 
virtual void removeCols (int nums[], int n, int perm[]=0)
 Removes n LPCols.
 
virtual void removeColRange (int start, int end, int perm[]=0)
 Removes columns from start to end (including both).
 
virtual void clear ()
 clears the LP.
 
virtual bool readLPF (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
 Reads LP in LP format from input stream in.
 
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.
 
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.
 
virtual bool readFile (const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
 Reads LP from a file.
 
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.
 
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.
 
void printProblemStatistics (std::ostream &os)
 
virtual void changeObj (const VectorBase< R > &newObj)
 Changes objective vector to newObj.
 
virtual void changeObj (int i, const R &newVal)
 changes i 'th objective vector element to newVal.
 
template<class S >
void changeObj (int i, const S *newVal)
 changes i 'th objective vector element to newVal.
 
virtual void changeObj (SPxColId id, const R &newVal)
 Changes objective value of column with identifier id to newVal.
 
virtual void changeMaxObj (const VectorBase< R > &newObj)
 Changes objective vector to newObj.
 
virtual void changeMaxObj (int i, const R &newVal)
 changes i 'th objective vector element to newVal.
 
template<class S >
void changeMaxObj (int i, const S *newVal)
 changes i 'th objective vector element to newVal.
 
virtual void changeMaxObj (SPxColId id, const R &newVal)
 Changes objective value of column with identifier id to newVal.
 
virtual void changeLower (const VectorBase< R > &newLower)
 Changes vector of lower bounds to newLower.
 
virtual void changeLower (int i, const R &newLower)
 changes i 'th lower bound to newLower.
 
template<class S >
void changeLower (int i, const S *newLower)
 changes i 'th lower bound to newLower.
 
virtual void changeLower (SPxColId id, const R &newLower)
 changes lower bound of column with identifier id to newLower.
 
virtual void changeUpper (const VectorBase< R > &newUpper)
 Changes vector of upper bounds to newUpper.
 
virtual void changeUpper (int i, const R &newUpper)
 Changes i 'th upper bound to newUpper.
 
template<class S >
void changeUpper (int i, const S *newUpper)
 Changes i 'th upper bound to newUpper.
 
virtual void changeUpper (SPxColId id, const R &newUpper)
 Changes upper bound of column with identifier id to newLower.
 
virtual void changeBounds (const VectorBase< R > &newLower, const VectorBase< R > &newUpper)
 Changes variable bounds to newLower and newUpper.
 
virtual void changeBounds (int i, const R &newLower, const R &newUpper)
 Changes bounds of column i to newLower and newUpper.
 
template<class S >
void changeBounds (int i, const S *newLower, const S *newUpper)
 Changes bounds of column i to newLower and newUpper.
 
virtual void changeBounds (SPxColId id, const R &newLower, const R &newUpper)
 Changes bounds of column with identifier id.
 
virtual void changeLhs (const VectorBase< R > &newLhs)
 Changes left hand side vector for constraints to newLhs.
 
virtual void changeLhs (int i, const R &newLhs)
 Changes i 'th left hand side value to newLhs.
 
template<class S >
void changeLhs (int i, const S *newLhs)
 Changes i 'th left hand side value to newLhs.
 
virtual void changeLhs (SPxRowId id, const R &newLhs)
 Changes left hand side value for row with identifier id.
 
virtual void changeRhs (const VectorBase< R > &newRhs)
 Changes right hand side vector for constraints to newRhs.
 
virtual void changeRhs (int i, const R &newRhs)
 Changes i 'th right hand side value to newRhs.
 
virtual void changeRhs (SPxRowId id, const R &newRhs)
 Changes right hand side value for row with identifier id.
 
virtual void changeRange (const VectorBase< R > &newLhs, const VectorBase< R > &newRhs)
 Changes left and right hand side vectors.
 
virtual void changeRange (int i, const R &newLhs, const R &newRhs)
 Changes left and right hand side of row i.
 
template<class S >
void changeRange (int i, const S *newLhs, const S *newRhs)
 Changes left and right hand side of row i.
 
virtual void changeRange (SPxRowId id, const R &newLhs, const R &newRhs)
 Changes left and right hand side of row with identifier id.
 
virtual void changeRowObj (const VectorBase< R > &newRowObj)
 Changes row objective function vector to newRowObj.
 
virtual void changeRowObj (int i, const R &newRowObj)
 Changes i 'th row objective function value to newRowObj.
 
virtual void changeRowObj (SPxRowId id, const R &newRowObj)
 Changes row objective function value for row with identifier id.
 
virtual void clearRowObjs ()
 Clears row objective function values for all rows.
 
virtual void changeRow (int n, const LPRowBase< R > &newRow)
 Replaces i 'th row of LP with newRow.
 
virtual void changeRow (SPxRowId id, const LPRowBase< R > &newRow)
 Replaces row with identifier id with newRow.
 
virtual void changeCol (int n, const LPColBase< R > &newCol)
 Replaces i 'th column of LP with newCol.
 
virtual void changeCol (SPxColId id, const LPColBase< R > &newCol)
 Replaces column with identifier id with newCol.
 
virtual void changeElement (int i, int j, const R &val)
 Changes LP element (i, j) to val.
 
template<class S >
void changeElement (int i, int j, const S *val)
 Changes LP element (i, j) to val.
 
virtual void changeElement (SPxRowId rid, SPxColId cid, const R &val)
 Changes LP element identified by (rid, cid) to val.
 
virtual void changeSense (SPxSense sns)
 Changes optimization sense to sns.
 
virtual void changeObjOffset (const R &o)
 
virtual void computePrimalActivity (const VectorBase< R > &primal, VectorBase< R > &activity) const
 Computes activity of the rows for a given primal vector; activity does not need to be zero.
 
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.
 
virtual void computeDualActivity (const VectorBase< R > &dual, VectorBase< R > &activity) const
 Computes "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero.
 
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.
 
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.
 
bool isConsistent () const
 Consistency check.
 
 SPxLPBase ()
 Default constructor.
 
virtual ~SPxLPBase ()
 Destructor.
 
 SPxLPBase (const SPxLPBase< R > &old)
 Copy constructor.
 
template<class S >
 SPxLPBase (const SPxLPBase< S > &old)
 Copy constructor.
 
SPxLPBase< R > & operator= (const SPxLPBase< R > &old)
 Assignment operator.
 
template<class S >
SPxLPBase< R > & operator= (const SPxLPBase< S > &old)
 Assignment operator.
 

Protected Attributes

SLUFactor m_slu
 LU Factorisation.
 
SPxSolver m_solver
 solver
 
SPxScalerm_preScaler
 pre-scaler
 
SPxScalerm_postScaler
 post-scaler
 
SPxSimplifierm_simplifier
 simplifier
 
bool m_vanished
 did the presolver solve the problem ?
 
bool m_freePreScaler
 true iff m_preScaler should be freed inside of this object
 
bool m_freePostScaler
 true iff m_postScaler should be freed inside of this object
 
bool m_freeSimplifier
 true iff m_simplifier should be freed inside of this object
 
DataArray< SPxSolver::VarStatusm_colsbasisstatus
 
DataArray< SPxSolver::VarStatusm_rowsbasisstatus
 

Private Member Functions

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

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.
 
R & lhs_w (int i)
 Returns left hand side of row i.
 
R & maxRowObj_w (int i)
 Returns objective function value of row i.
 
R & maxObj_w (int i)
 Returns objective value of column i for maximization problem.
 
R & upper_w (int i)
 Returns upper bound of column i.
 
R & lower_w (int i)
 Returns lower bound of column i.
 
const LPRowSetBase< R > * lprowset () const
 Returns the LP as an LPRowSetBase.
 
const LPColSetBase< R > * lpcolset () const
 Returns the LP as an LPColSetBase.
 
virtual void doRemoveRow (int j)
 Internal helper method.
 
virtual void doRemoveRows (int perm[])
 Internal helper method.
 
virtual void doRemoveCol (int j)
 Internal helper method.
 
virtual void doRemoveCols (int perm[])
 Internal helper method.
 
virtual void addedRows (int)
 Called after the last n rows have just been added.
 
virtual void addedCols (int)
 Called after the last n columns have just been added.
 
void added2Set (SVSetBase< R > &set, const SVSetBase< R > &addset, int n)
 

Detailed Description

Preconfigured SoPlexLegacy LP-solver.

Definition at line 41 of file soplexlegacy.h.

Constructor & Destructor Documentation

Member Function Documentation

virtual void clearBasis ( )
virtual
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 230 of file soplexlegacy.h.

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

virtual Real feastol ( ) const
virtual

allowed primal feasibility tolerance.

Definition at line 220 of file soplexlegacy.h.

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

const char* getColName ( int  idx,
const NameSet cnames,
char *  buf 
)
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 537 of file soplexlegacy.cpp.

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

virtual int getFactorCount ( ) const
virtual

number of factorizations performed

Definition at line 342 of file soplexlegacy.h.

References SLUFactor::getFactorCount(), SoPlexLegacy::m_slu, and SoPlexLegacy::m_vanished.

virtual Real getFactorTime ( ) const
virtual

time spent in factorizations

Definition at line 337 of file soplexlegacy.h.

References SLUFactor::getFactorTime(), SoPlexLegacy::m_slu, SoPlexLegacy::m_vanished, and REAL.

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 518 of file soplexlegacy.cpp.

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

const char* getRowName ( int  idx,
const NameSet rnames,
char *  buf 
)
virtual int getSolveCount ( ) const
virtual

number of solves performed

Definition at line 352 of file soplexlegacy.h.

References SLUFactor::getSolveCount(), SoPlexLegacy::m_slu, and SoPlexLegacy::m_vanished.

virtual Real getSolveTime ( ) const
virtual

time spent in solves

Definition at line 347 of file soplexlegacy.h.

References SLUFactor::getSolveTime(), SoPlexLegacy::m_slu, SoPlexLegacy::m_vanished, and REAL.

bool has_postscaler ( ) const

has a postscaler been set?

Definition at line 145 of file soplexlegacy.h.

References SoPlexLegacy::m_postScaler.

bool has_prescaler ( ) const

has a prescaler been set?

Definition at line 140 of file soplexlegacy.h.

References SoPlexLegacy::m_preScaler.

virtual int iteration ( ) const
virtual
Real objValue ( ) const
virtual
virtual Real opttol ( ) const
virtual

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

Definition at line 225 of file soplexlegacy.h.

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

SPxSolver::Pricing pricing ( ) const

return current Pricing.

Definition at line 99 of file soplexlegacy.h.

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

void qualBoundViolation ( Real maxviol,
Real sumviol 
) const
virtual
void qualConstraintViolation ( Real maxviol,
Real sumviol 
) const
virtual
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 624 of file soplexlegacy.cpp.

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

return current basis representation.

Definition at line 114 of file soplexlegacy.h.

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

Referenced by SoPlexLegacy::writeBasisFile().

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 166 of file soplexlegacy.h.

References SoPlexLegacy::has_simplifier(), SoPlexLegacy::m_colsbasisstatus, SoPlexLegacy::m_rowsbasisstatus, MSG_ERROR, SPxLPBase< R >::nCols(), and SPxLPBase< R >::nRows().

virtual void setDelta ( Real  d)
virtual

set parameter delta, i.e., set feastol and opttol to same value.

Definition at line 245 of file soplexlegacy.h.

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

virtual void setFeastol ( Real  d)
virtual

set parameter feastol.

Definition at line 235 of file soplexlegacy.h.

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

virtual void setOpttol ( Real  d)
virtual

set parameter opttol.

Definition at line 240 of file soplexlegacy.h.

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

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 202 of file soplexlegacy.cpp.

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

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

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

Definition at line 186 of file soplexlegacy.cpp.

References SoPlexLegacy::m_freePreScaler, SoPlexLegacy::m_preScaler, SPxScaler::setOutstream(), and SPxLPBase< R >::spxout.

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

setup pricer to use.

Definition at line 150 of file soplexlegacy.h.

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

virtual void setPricing ( SPxSolver::Pricing  pr)
virtual

set FULL or PARTIAL pricing.

Definition at line 104 of file soplexlegacy.h.

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

virtual void setRep ( SPxSolver::Representation  p_rep)
virtual

set ROW or COLUMN representation.

Definition at line 124 of file soplexlegacy.h.

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

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 218 of file soplexlegacy.cpp.

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

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

setup starting basis generator to use.

Definition at line 160 of file soplexlegacy.h.

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

virtual void setTerminationIter ( int  iter = -1)
virtual

set iteration limit.

Definition at line 200 of file soplexlegacy.h.

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

virtual void setTerminationTime ( Real  time = infinity)
virtual

set time limit.

Definition at line 190 of file soplexlegacy.h.

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

virtual void setTerminationValue ( Real  val = infinity)
virtual

set objective limit.

Definition at line 210 of file soplexlegacy.h.

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

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

setup ratio-tester to use.

Definition at line 155 of file soplexlegacy.h.

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

virtual void setType ( SPxSolver::Type  tp)
virtual

set LEAVE or ENTER algorithm.

Definition at line 119 of file soplexlegacy.h.

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

virtual void setUtype ( SLUFactor::UpdateType  tp)
virtual

message handler

set verbosity set update type for factorization.

Definition at line 94 of file soplexlegacy.h.

References SoPlexLegacy::m_slu, and SLUFactor::setUtype().

std::string statistics ( ) const

returns statistical information in form of a string.

Definition at line 405 of file soplexlegacy.h.

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

virtual SPxSolver::Status status ( ) const
virtual
virtual bool terminate ( )
virtual

Definition at line 362 of file soplexlegacy.h.

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

int terminationIter ( ) const

return iteration limit.

Definition at line 205 of file soplexlegacy.h.

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

Real terminationTime ( ) const

return time limit.

Definition at line 195 of file soplexlegacy.h.

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

Real terminationValue ( ) const

return objective limit.

Definition at line 215 of file soplexlegacy.h.

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

SPxSolver::Type type ( ) const

return current Type.

Definition at line 109 of file soplexlegacy.h.

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

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
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 710 of file soplexlegacy.cpp.

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

Member Data Documentation

DataArray<SPxSolver::VarStatus> m_colsbasisstatus
protected
bool m_freePostScaler
protected

true iff m_postScaler should be freed inside of this object

Definition at line 56 of file soplexlegacy.h.

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

bool m_freePreScaler
protected

true iff m_preScaler should be freed inside of this object

Definition at line 55 of file soplexlegacy.h.

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

bool m_freeSimplifier
protected

true iff m_simplifier should be freed inside of this object

Definition at line 57 of file soplexlegacy.h.

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

DataArray<SPxSolver::VarStatus> m_rowsbasisstatus
protected