Scippy

SoPlex

Sequential object-oriented simPlex

SoPlex Class Reference

Preconfigured SoPlex LP-solver. More...

#include <soplex.h>

Classes

struct  RowViolation
 
struct  RowViolationCompare
 
class  Settings
 class of parameter settings More...
 
class  Statistics
 

Public Member Functions

 SoPlex ()
 default constructor More...
 
SoPlexoperator= (const SoPlex &rhs)
 assignment operator More...
 
 SoPlex (const SoPlex &rhs)
 copy constructor More...
 
virtual ~SoPlex ()
 destructor More...
 
int numRowsReal () const
 returns number of rows More...
 
int numColsReal () const
 returns number of columns More...
 
int numNonzerosReal () const
 returns number of nonzeros More...
 
Real minAbsNonzeroReal () const
 returns smallest non-zero element in absolute value More...
 
Real maxAbsNonzeroReal () const
 returns biggest non-zero element in absolute value More...
 
Real coefReal (int row, int col) const
 returns (unscaled) coefficient More...
 
const SVectorRealrowVectorRealInternal (int i) const
 returns vector of row i, ignoring scaling More...
 
void getRowVectorReal (int i, DSVectorReal &row) const
 gets vector of row i More...
 
const VectorRealrhsRealInternal () const
 returns right-hand side vector, ignoring scaling More...
 
void getRhsReal (DVectorReal &rhs) const
 gets right-hand side vector More...
 
Real rhsReal (int i) const
 returns right-hand side of row i More...
 
const VectorReallhsRealInternal () const
 returns left-hand side vector, ignoring scaling More...
 
void getLhsReal (DVectorReal &lhs) const
 gets left-hand side vector More...
 
Real lhsReal (int i) const
 returns left-hand side of row i More...
 
LPRowReal::Type rowTypeReal (int i) const
 returns inequality type of row i More...
 
const SVectorRealcolVectorRealInternal (int i) const
 returns vector of col i, ignoring scaling More...
 
void getColVectorReal (int i, DSVectorReal &col) const
 gets vector of col i More...
 
const VectorRealupperRealInternal () const
 returns upper bound vector More...
 
Real upperReal (int i) const
 returns upper bound of column i More...
 
void getUpperReal (DVectorReal &upper) const
 gets upper bound vector More...
 
const VectorReallowerRealInternal () const
 returns lower bound vector More...
 
Real lowerReal (int i) const
 returns lower bound of column i More...
 
void getLowerReal (DVectorReal &lower) const
 gets lower bound vector More...
 
void getObjReal (VectorReal &obj) const
 gets objective function vector More...
 
Real objReal (int i) const
 returns objective value of column i More...
 
const VectorRealmaxObjRealInternal () const
 returns objective function vector after transformation to a maximization problem; since this is how it is stored internally, this is generally faster More...
 
Real maxObjReal (int i) const
 returns objective value of column i after transformation to a maximization problem; since this is how it is stored internally, this is generally faster More...
 
void getNdualNorms (int &nnormsRow, int &nnormsCol) const
 gets number of available dual norms More...
 
bool getDualNorms (int &nnormsRow, int &nnormsCol, Real *norms) const
 gets steepest edge norms and returns false if they are not available More...
 
bool setDualNorms (int nnormsRow, int nnormsCol, Real *norms)
 sets steepest edge norms and returns false if that's not possible More...
 
void setIntegralityInformation (int ncols, int *intInfo)
 pass integrality information about the variables to the solver More...
 
int numRowsRational () const
 returns number of rows More...
 
int numColsRational () const
 returns number of columns More...
 
int numNonzerosRational () const
 returns number of nonzeros More...
 
Rational minAbsNonzeroRational () const
 returns smallest non-zero element in absolute value More...
 
Rational maxAbsNonzeroRational () const
 returns biggest non-zero element in absolute value More...
 
void getRowRational (int i, LPRowRational &lprow) const
 gets row i More...
 
void getRowsRational (int start, int end, LPRowSetRational &lprowset) const
 gets rows start, ..., end. More...
 
const SVectorRationalrowVectorRational (int i) const
 returns vector of row i More...
 
const VectorRationalrhsRational () const
 returns right-hand side vector More...
 
const RationalrhsRational (int i) const
 returns right-hand side of row i More...
 
const VectorRationallhsRational () const
 returns left-hand side vector More...
 
const RationallhsRational (int i) const
 returns left-hand side of row i More...
 
LPRowRational::Type rowTypeRational (int i) const
 returns inequality type of row i More...
 
void getColRational (int i, LPColRational &lpcol) const
 gets column i More...
 
void getColsRational (int start, int end, LPColSetRational &lpcolset) const
 gets columns start, ..., end More...
 
const SVectorRationalcolVectorRational (int i) const
 returns vector of column i More...
 
const VectorRationalupperRational () const
 returns upper bound vector More...
 
const RationalupperRational (int i) const
 returns upper bound of column i More...
 
const VectorRationallowerRational () const
 returns lower bound vector More...
 
const RationallowerRational (int i) const
 returns lower bound of column i More...
 
void getObjRational (VectorRational &obj) const
 gets objective function vector More...
 
void getObjRational (int i, Rational &obj) const
 gets objective value of column i More...
 
Rational objRational (int i) const
 returns objective value of column i More...
 
const VectorRationalmaxObjRational () const
 returns objective function vector after transformation to a maximization problem; since this is how it is stored internally, this is generally faster More...
 
const RationalmaxObjRational (int i) const
 returns objective value of column i after transformation to a maximization problem; since this is how it is stored internally, this is generally faster More...
 
void addRowReal (const LPRowReal &lprow)
 adds a single row More...
 
void addRowsReal (const LPRowSetReal &lprowset)
 adds multiple rows More...
 
void addColReal (const LPCol &lpcol)
 adds a single column More...
 
void addColsReal (const LPColSetReal &lpcolset)
 adds multiple columns More...
 
void changeRowReal (int i, const LPRowReal &lprow)
 replaces row i with lprow More...
 
void changeLhsReal (const VectorReal &lhs)
 changes left-hand side vector for constraints to lhs More...
 
void changeLhsReal (int i, const Real &lhs)
 changes left-hand side of row i to lhs More...
 
void changeRhsReal (const VectorReal &rhs)
 changes right-hand side vector to rhs More...
 
void changeRhsReal (int i, const Real &rhs)
 changes right-hand side of row i to rhs More...
 
void changeRangeReal (const VectorReal &lhs, const VectorReal &rhs)
 changes left- and right-hand side vectors More...
 
void changeRangeReal (int i, const Real &lhs, const Real &rhs)
 changes left- and right-hand side of row i More...
 
void changeColReal (int i, const LPColReal &lpcol)
 replaces column i with lpcol More...
 
void changeLowerReal (const VectorReal &lower)
 changes vector of lower bounds to lower More...
 
void changeLowerReal (int i, const Real &lower)
 changes lower bound of column i to lower More...
 
void changeUpperReal (const VectorReal &upper)
 changes vector of upper bounds to upper More...
 
void changeUpperReal (int i, const Real &upper)
 changes i 'th upper bound to upper More...
 
void changeBoundsReal (const VectorReal &lower, const VectorReal &upper)
 changes vectors of column bounds to lower and upper More...
 
void changeBoundsReal (int i, const Real &lower, const Real &upper)
 changes bounds of column i to lower and upper More...
 
void changeObjReal (const VectorReal &obj)
 changes objective function vector to obj More...
 
void changeObjReal (int i, const Real &obj)
 changes objective coefficient of column i to obj More...
 
void changeElementReal (int i, int j, const Real &val)
 changes matrix entry in row i and column j to val More...
 
void removeRowReal (int i)
 removes row i More...
 
void removeRowsReal (int perm[])
 removes all rows with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where row i has been moved to; note that perm must point to an array of size at least numRowsReal() More...
 
void removeRowsReal (int idx[], int n, int perm[]=0)
 remove all rows with indices in array idx of size n; an array perm of size numRowsReal() may be passed as buffer memory More...
 
void removeRowRangeReal (int start, int end, int perm[]=0)
 removes rows start to end including both; an array perm of size numRowsReal() may be passed as buffer memory More...
 
void removeColReal (int i)
 removes column i More...
 
void removeColsReal (int perm[])
 removes all columns with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where column i has been moved to; note that perm must point to an array of size at least numColsReal() More...
 
void removeColsReal (int idx[], int n, int perm[]=0)
 remove all columns with indices in array idx of size n; an array perm of size numColsReal() may be passed as buffer memory More...
 
void removeColRangeReal (int start, int end, int perm[]=0)
 removes columns start to end including both; an array perm of size numColsReal() may be passed as buffer memory More...
 
void clearLPReal ()
 clears the LP More...
 
void syncLPReal ()
 synchronizes real LP with rational LP, i.e., copies (rounded) rational LP into real LP, if sync mode is manual More...
 
void addRowRational (const LPRowRational &lprow)
 adds a single row More...
 
void addRowsRational (const LPRowSetRational &lprowset)
 adds multiple rows More...
 
void addColRational (const LPColRational &lpcol)
 adds a single column More...
 
void addColsRational (const LPColSetRational &lpcolset)
 adds multiple columns More...
 
void changeRowRational (int i, const LPRowRational &lprow)
 replaces row i with lprow More...
 
void changeLhsRational (const VectorRational &lhs)
 changes left-hand side vector for constraints to lhs More...
 
void changeLhsRational (int i, const Rational &lhs)
 changes left-hand side of row i to lhs More...
 
void changeRhsRational (const VectorRational &rhs)
 changes right-hand side vector to rhs More...
 
void changeRhsRational (int i, const Rational &rhs)
 changes right-hand side of row i to rhs More...
 
void changeRangeRational (const VectorRational &lhs, const VectorRational &rhs)
 changes left- and right-hand side vectors More...
 
void changeRangeRational (int i, const Rational &lhs, const Rational &rhs)
 changes left- and right-hand side of row i More...
 
void changeColRational (int i, const LPColRational &lpcol)
 replaces column i with lpcol More...
 
void changeLowerRational (const VectorRational &lower)
 changes vector of lower bounds to lower More...
 
void changeLowerRational (int i, const Rational &lower)
 changes lower bound of column i to lower More...
 
void changeUpperRational (const VectorRational &upper)
 changes vector of upper bounds to upper More...
 
void changeUpperRational (int i, const Rational &upper)
 changes i 'th upper bound to upper More...
 
void changeBoundsRational (const VectorRational &lower, const VectorRational &upper)
 changes vectors of column bounds to lower and upper More...
 
void changeBoundsRational (int i, const Rational &lower, const Rational &upper)
 changes bounds of column i to lower and upper More...
 
void changeObjRational (const VectorRational &obj)
 changes objective function vector to obj More...
 
void changeObjRational (int i, const Rational &obj)
 changes objective coefficient of column i to obj More...
 
void changeElementRational (int i, int j, const Rational &val)
 changes matrix entry in row i and column j to val More...
 
void removeRowRational (int i)
 removes row i More...
 
void removeRowsRational (int perm[])
 removes all rows with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where row i has been moved to; note that perm must point to an array of size at least numRowsRational() More...
 
void removeRowsRational (int idx[], int n, int perm[]=0)
 remove all rows with indices in array idx of size n; an array perm of size numRowsRational() may be passed as buffer memory More...
 
void removeRowRangeRational (int start, int end, int perm[]=0)
 removes rows start to end including both; an array perm of size numRowsRational() may be passed as buffer memory More...
 
void removeColRational (int i)
 removes column i More...
 
void removeColsRational (int perm[])
 removes all columns with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where column i has been moved to; note that perm must point to an array of size at least numColsRational() More...
 
void removeColsRational (int idx[], int n, int perm[]=0)
 remove all columns with indices in array idx of size n; an array perm of size numColsRational() may be passed as buffer memory More...
 
void removeColRangeRational (int start, int end, int perm[]=0)
 removes columns start to end including both; an array perm of size numColsRational() may be passed as buffer memory More...
 
void clearLPRational ()
 clears the LP More...
 
void syncLPRational ()
 synchronizes rational LP with real LP, i.e., copies real LP to rational LP, if sync mode is manual More...
 
SPxSolver::Status optimize ()
 optimize the given LP More...
 
SPxSolver::Status solve ()
 
SPxSolver::Status status () const
 returns the current solver status More...
 
bool isPrimalFeasible () const
 is stored primal solution feasible? More...
 
bool hasPrimal () const
 is a primal feasible solution available? More...
 
bool hasPrimalRay () const
 is a primal unbounded ray available? More...
 
bool isDualFeasible () const
 is stored dual solution feasible? More...
 
bool hasDual () const
 is a dual feasible solution available? More...
 
bool hasDualFarkas () const
 is Farkas proof of infeasibility available? More...
 
Real objValueReal ()
 returns the objective value if a primal solution is available More...
 
bool getPrimalReal (VectorReal &vector)
 gets the primal solution vector if available; returns true on success More...
 
bool getSlacksReal (VectorReal &vector)
 gets the vector of slack values if available; returns true on success More...
 
bool getPrimalRayReal (VectorReal &vector)
 gets the primal ray if available; returns true on success More...
 
bool getDualReal (VectorReal &vector)
 gets the dual solution vector if available; returns true on success More...
 
bool getRedCostReal (VectorReal &vector)
 gets the vector of reduced cost values if available; returns true on success More...
 
bool getDualFarkasReal (VectorReal &vector)
 gets the Farkas proof if available; returns true on success More...
 
bool getBoundViolationReal (Real &maxviol, Real &sumviol)
 gets violation of bounds; returns true on success More...
 
bool getRowViolationReal (Real &maxviol, Real &sumviol)
 gets violation of constraints; returns true on success More...
 
bool getRedCostViolationReal (Real &maxviol, Real &sumviol)
 gets violation of reduced costs; returns true on success More...
 
bool getDualViolationReal (Real &maxviol, Real &sumviol)
 gets violation of dual multipliers; returns true on success More...
 
Rational objValueRational ()
 returns the objective value if a primal solution is available More...
 
bool getPrimalRational (VectorRational &vector)
 gets the primal solution vector if available; returns true on success More...
 
bool getSlacksRational (VectorRational &vector)
 gets the vector of slack values if available; returns true on success More...
 
bool getPrimalRayRational (VectorRational &vector)
 gets the primal ray if LP is unbounded; returns true on success More...
 
bool getDualRational (VectorRational &vector)
 gets the dual solution vector if available; returns true on success More...
 
bool getRedCostRational (VectorRational &vector)
 gets the vector of reduced cost values if available; returns true on success More...
 
bool getDualFarkasRational (VectorRational &vector)
 gets the Farkas proof if LP is infeasible; returns true on success More...
 
bool getBoundViolationRational (Rational &maxviol, Rational &sumviol)
 gets violation of bounds; returns true on success More...
 
bool getRowViolationRational (Rational &maxviol, Rational &sumviol)
 gets violation of constraints; returns true on success More...
 
bool getRedCostViolationRational (Rational &maxviol, Rational &sumviol)
 gets violation of reduced costs; returns true on success More...
 
bool getDualViolationRational (Rational &maxviol, Rational &sumviol)
 gets violation of dual multipliers; returns true on success More...
 
int totalSizePrimalRational (const int base=2)
 get size of primal solution More...
 
int totalSizeDualRational (const int base=2)
 get size of dual solution More...
 
int dlcmSizePrimalRational (const int base=2)
 get size of least common multiple of denominators in primal solution More...
 
int dlcmSizeDualRational (const int base=2)
 get size of least common multiple of denominators in dual solution More...
 
int dmaxSizePrimalRational (const int base=2)
 get size of largest denominator in primal solution More...
 
int dmaxSizeDualRational (const int base=2)
 get size of largest denominator in dual solution More...
 
bool hasBasis () const
 is an advanced starting basis available? More...
 
SPxBasis::SPxStatus basisStatus () const
 returns the current basis status More...
 
SPxSolver::VarStatus basisRowStatus (int row) const
 returns basis status for a single row More...
 
SPxSolver::VarStatus basisColStatus (int col) const
 returns basis status for a single column More...
 
void getBasis (SPxSolver::VarStatus rows[], SPxSolver::VarStatus cols[]) const
 gets current basis via arrays of statuses More...
 
void getBasisInd (int *bind) const
 gets the indices of the basic columns and rows; basic column n gives value n, basic row m gives value -1-m More...
 
bool getFastCondition (Real &condition, int type=0)
 compute condition number estimate based on the diagonal of the LU factorization; returns true on success type = 0: max/min ratio type = 1: trace of U (sum of diagonal elements) type = 2: product of diagonal elements More...
 
bool getEstimatedCondition (Real &condition)
 computes an estimated condition number for the current basis matrix using the power method; returns true on success More...
 
bool getExactCondition (Real &condition)
 computes the exact condition number for the current basis matrix using the power method; returns true on success More...
 
bool getBasisInverseRowReal (int r, Real *coef, int *inds=NULL, int *ninds=NULL, bool unscale=true)
 computes row r of basis inverse; returns true on success More...
 
bool getBasisInverseColReal (int c, Real *coef, int *inds=NULL, int *ninds=NULL, bool unscale=true)
 computes column c of basis inverse; returns true on success More...
 
bool getBasisInverseTimesVecReal (Real *rhs, Real *sol, bool unscale=true)
 computes dense solution of basis matrix B * sol = rhs; returns true on success More...
 
bool multBasis (Real *vec, bool unscale=true)
 multiply with basis matrix; B * vec (inplace) More...
 
bool multBasisTranspose (Real *vec, bool unscale=true)
 multiply with transpose of basis matrix; vec * B^T (inplace) More...
 
bool computeBasisInverseRational ()
 compute rational basis inverse; returns true on success More...
 
bool getBasisIndRational (DataArray< int > &bind)
 gets an array of indices for the columns of the rational basis matrix; bind[i] >= 0 means that the i-th column of the basis matrix contains variable bind[i]; bind[i] < 0 means that the i-th column of the basis matrix contains the slack variable for row -bind[i]-1; performs rational factorization if not available; returns true on success More...
 
bool getBasisInverseRowRational (const int r, SSVectorRational &vec)
 computes row r of basis inverse; performs rational factorization if not available; returns true on success More...
 
bool getBasisInverseColRational (const int c, SSVectorRational &vec)
 computes column c of basis inverse; performs rational factorization if not available; returns true on success More...
 
bool getBasisInverseTimesVecRational (const SVectorRational &rhs, SSVectorRational &sol)
 computes solution of basis matrix B * sol = rhs; performs rational factorization if not available; returns true on success More...
 
void setBasis (const SPxSolver::VarStatus rows[], const SPxSolver::VarStatus cols[])
 sets starting basis via arrays of statuses More...
 
void clearBasis ()
 clears starting basis More...
 
int numIterations () const
 number of iterations since last call to solve More...
 
Real solveTime () const
 time spent in last call to solve More...
 
std::string statisticString () const
 statistical information in form of a string More...
 
const char * getStarterName ()
 name of starter More...
 
const char * getSimplifierName ()
 name of simplifier More...
 
const char * getScalerName ()
 name of scaling method More...
 
const char * getPricerName ()
 name of currently loaded pricer More...
 
const char * getRatiotesterName ()
 name of currently loaded ratiotester More...
 
bool readFile (const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
 reads LP file in LP or MPS format according to READMODE parameter; gets row names, column names, and integer variables if desired; returns true on success More...
 
bool writeFileReal (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const DIdxSet *intvars=0, const bool unscale=true) const
 writes real LP to file; LP or MPS format is chosen from the extension in filename; if rowNames and colNames are NULL, default names are used; if intVars is not NULL, the variables contained in it are marked as integer; returns true on success More...
 
bool writeFileRational (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const DIdxSet *intvars=0) const
 writes rational LP to file; LP or MPS format is chosen from the extension in filename; if rowNames and colNames are NULL, default names are used; if intVars is not NULL, the variables contained in it are marked as integer; returns true on success More...
 
bool writeDualFileReal (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const DIdxSet *intvars=0) const
 writes the dual of the real LP to file; LP or MPS format is chosen from the extension in filename; if rowNames and colNames are NULL, default names are used; if intVars is not NULL, the variables contained in it are marked as integer; returns true on success More...
 
bool readBasisFile (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0)
 reads basis information from filename and returns true on success; if rowNames and colNames are NULL, default names are assumed; returns true on success More...
 
bool writeBasisFile (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const bool cpxFormat=false) const
 writes basis information to filename; if rowNames and colNames are NULL, default names are used; returns true on success More...
 
void writeStateReal (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const bool cpxFormat=false) const
 writes internal LP, basis information, and parameter settings; if rowNames and colNames are NULL, default names are used More...
 
void writeStateRational (const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const bool cpxFormat=false) const
 writes internal LP, basis information, and parameter settings; if rowNames and colNames are NULL, default names are used More...
 
void printSolutionStatistics (std::ostream &os)
 prints solution statistics More...
 
void printSolvingStatistics (std::ostream &os)
 prints statistics on solving process More...
 
void printShortStatistics (std::ostream &os)
 prints short statistics More...
 
void printStatistics (std::ostream &os)
 prints complete statistics More...
 
void printStatus (std::ostream &os, SPxSolver::Status status)
 prints status More...
 
void printVersion () const
 prints version and compilation options More...
 
bool areLPsInSync (const bool checkVecVals=true, const bool checkMatVals=false, const bool quiet=false) const
 checks if real LP and rational LP are in sync; dimensions will always be compared, vector and matrix values only if the respective parameter is set to true. If quiet is set to true the function will only display which vectors are different. More...
 
void setRandomSeed (unsigned int seed)
 set the random seeds of the solver instance More...
 
unsigned int randomSeed () const
 returns the current random seed of the solver instance More...
 

Private Member Functions

void _ensureDSVectorRationalMemory (DSVectorRational &vec, const int newmax) const
 extends sparse vector to hold newmax entries if and only if it holds no more free entries More...
 
void _idxToPerm (int *idx, int idxSize, int *perm, int permSize) const
 creates a permutation for removing rows/columns from an array of indices More...
 
void _rangeToPerm (int start, int end, int *perm, int permSize) const
 creates a permutation for removing rows/columns from a range of indices More...
 
bool _isConsistent () const
 checks consistency More...
 
bool _isSolveStopped (bool &stoppedTime, bool &stoppedIter) const
 should solving process be stopped? More...
 
RangeType _rangeTypeReal (const Real &lower, const Real &upper) const
 determines RangeType from real bounds More...
 
RangeType _rangeTypeRational (const Rational &lower, const Rational &upper) const
 determines RangeType from rational bounds More...
 
RangeType _switchRangeType (const RangeType &rangeType) const
 switches RANGETYPE_LOWER to RANGETYPE_UPPER and vice versa More...
 
bool _lowerFinite (const RangeType &rangeType) const
 checks whether RangeType corresponds to finite lower bound More...
 
bool _upperFinite (const RangeType &rangeType) const
 checks whether RangeType corresponds to finite upper bound More...
 
void _addRowReal (const LPRowReal &lprow)
 adds a single row to the real LP and adjusts basis More...
 
void _addRowReal (Real lhs, const SVectorReal &lprow, Real rhs)
 adds a single row to the real LP and adjusts basis More...
 
void _addRowsReal (const LPRowSetReal &lprowset)
 adds multiple rows to the real LP and adjusts basis More...
 
void _addColReal (const LPColReal &lpcol)
 adds a single column to the real LP and adjusts basis More...
 
void _addColReal (Real obj, Real lower, const SVectorReal &lpcol, Real upper)
 adds a single column to the real LP and adjusts basis More...
 
void _addColsReal (const LPColSetReal &lpcolset)
 adds multiple columns to the real LP and adjusts basis More...
 
void _changeRowReal (int i, const LPRowReal &lprow)
 replaces row i with lprow and adjusts basis More...
 
void _changeLhsReal (const VectorReal &lhs)
 changes left-hand side vector for constraints to lhs and adjusts basis More...
 
void _changeLhsReal (int i, const Real &lhs)
 changes left-hand side of row i to lhs and adjusts basis More...
 
void _changeRhsReal (const VectorReal &rhs)
 changes right-hand side vector to rhs and adjusts basis More...
 
void _changeRhsReal (int i, const Real &rhs)
 changes right-hand side of row i to rhs and adjusts basis More...
 
void _changeRangeReal (const VectorReal &lhs, const VectorReal &rhs)
 changes left- and right-hand side vectors and adjusts basis More...
 
void _changeRangeReal (int i, const Real &lhs, const Real &rhs)
 changes left- and right-hand side of row i and adjusts basis More...
 
void _changeColReal (int i, const LPColReal &lpcol)
 replaces column i with lpcol and adjusts basis More...
 
void _changeLowerReal (const VectorReal &lower)
 changes vector of lower bounds to lower and adjusts basis More...
 
void _changeLowerReal (int i, const Real &lower)
 changes lower bound of column i to lower and adjusts basis More...
 
void _changeUpperReal (const VectorReal &upper)
 changes vector of upper bounds to upper and adjusts basis More...
 
void _changeUpperReal (int i, const Real &upper)
 changes i 'th upper bound to upper and adjusts basis More...
 
void _changeBoundsReal (const VectorReal &lower, const VectorReal &upper)
 changes vectors of column bounds to lower and upper and adjusts basis More...
 
void _changeBoundsReal (int i, const Real &lower, const Real &upper)
 changes bounds of column i to lower and upper and adjusts basis More...
 
void _changeElementReal (int i, int j, const Real &val)
 changes matrix entry in row i and column j to val and adjusts basis More...
 
void _removeRowReal (int i)
 removes row i and adjusts basis More...
 
void _removeRowsReal (int perm[])
 removes all rows with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where row i has been moved to; note that perm must point to an array of size at least numRowsReal() More...
 
void _removeRowsReal (int idx[], int n, int perm[])
 remove all rows with indices in array idx of size n; an array perm of size numRowsReal() may be passed as buffer memory More...
 
void _removeRowRangeReal (int start, int end, int perm[])
 removes rows start to end including both; an array perm of size numRowsReal() may be passed as buffer memory More...
 
void _removeColReal (int i)
 removes column i More...
 
void _removeColsReal (int perm[])
 removes all columns with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where column i has been moved to; note that perm must point to an array of size at least numColsReal() More...
 
void _removeColsReal (int idx[], int n, int perm[])
 remove all columns with indices in array idx of size n; an array perm of size numColsReal() may be passed as buffer memory More...
 
void _removeColRangeReal (int start, int end, int perm[])
 removes columns start to end including both; an array perm of size numColsReal() may be passed as buffer memory More...
 
void _invalidateSolution ()
 invalidates solution More...
 
void _enableSimplifierAndScaler ()
 enables simplifier and scaler according to current parameters More...
 
void _disableSimplifierAndScaler ()
 disables simplifier and scaler More...
 
void _ensureRationalLP ()
 ensures that the rational LP is available; performs no sync More...
 
void _ensureRealLPLoaded ()
 ensures that the real LP and the basis are loaded in the solver; performs no sync More...
 
void _solveRealLPAndRecordStatistics ()
 call floating-point solver and update statistics on iterations etc. More...
 
bool _readFileReal (const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
 reads real LP in LP or MPS format from file and returns true on success; gets row names, column names, and integer variables if desired More...
 
bool _readFileRational (const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
 reads rational LP in LP or MPS format from file and returns true on success; gets row names, column names, and integer variables if desired More...
 
void _completeRangeTypesRational ()
 completes range type arrays after adding columns and/or rows More...
 
void _recomputeRangeTypesReal ()
 recomputes range types from scratch using real LP More...
 
void _recomputeRangeTypesRational ()
 recomputes range types from scratch using rational LP More...
 
void _syncLPReal (bool time=true)
 synchronizes real LP with rational LP, i.e., copies (rounded) rational LP into real LP, without looking at the sync mode More...
 
void _syncLPRational (bool time=true)
 synchronizes rational LP with real LP, i.e., copies real LP to rational LP, without looking at the sync mode More...
 
void _syncRealSolution ()
 synchronizes rational solution with real solution, i.e., copies (rounded) rational solution to real solution More...
 
void _syncRationalSolution ()
 synchronizes real solution with rational solution, i.e., copies real solution to rational solution More...
 
const UnitVectorRational_unitVectorRational (const int i)
 returns pointer to a constant unit vector available until destruction of the SoPlex class More...
 
bool _parseSettingsLine (char *line, const int lineNumber)
 parses one line in a settings file and returns true on success; note that the string is modified More...
 
void _optimizeRational ()
 solves rational LP More...
 
void _performOptIRStable (SolRational &sol, bool acceptUnbounded, bool acceptInfeasible, int minRounds, bool &primalFeasible, bool &dualFeasible, bool &infeasible, bool &unbounded, bool &stopped, bool &stoppedIter, bool &error)
 solves current problem with iterative refinement and recovery mechanism More...
 
void _performUnboundedIRStable (SolRational &sol, bool &hasUnboundedRay, bool &stopped, bool &stoppedIter, bool &error)
 performs iterative refinement on the auxiliary problem for testing unboundedness More...
 
void _performFeasIRStable (SolRational &sol, bool &withDualFarkas, bool &stopped, bool &stoppedIter, bool &error)
 performs iterative refinement on the auxiliary problem for testing feasibility More...
 
void _lift ()
 reduces matrix coefficient in absolute value by the lifting procedure of Thiele et al. 2013 More...
 
void _project (SolRational &sol)
 undoes lifting More...
 
void _storeBasis ()
 store basis More...
 
void _restoreBasis ()
 restore basis More...
 
void _storeLPReal ()
 stores objective, bounds, and sides of real LP More...
 
void _restoreLPReal ()
 restores objective, bounds, and sides of real LP More...
 
void _transformEquality ()
 introduces slack variables to transform inequality constraints into equations for both rational and real LP, which should be in sync More...
 
void _untransformEquality (SolRational &sol)
 undoes transformation to equality form More...
 
void _transformUnbounded ()
 transforms LP to unboundedness problem by moving the objective function to the constraints, changing right-hand side and bounds to zero, and adding an auxiliary variable for the decrease in the objective function More...
 
void _untransformUnbounded (SolRational &sol, bool unbounded)
 undoes transformation to unboundedness problem More...
 
void _transformFeasibility ()
 transforms LP to feasibility problem by removing the objective function, shifting variables, and homogenizing the right-hand side More...
 
void _untransformFeasibility (SolRational &sol, bool infeasible)
 undoes transformation to feasibility problem More...
 
void _computeInfeasBox (SolRational &sol, bool transformed)
 
SPxSolver::Status _solveRealForRational (bool fromscratch, VectorReal &primal, VectorReal &dual, DataArray< SPxSolver::VarStatus > &basisStatusRows, DataArray< SPxSolver::VarStatus > &basisStatusCols, bool &returnedBasis)
 solves real LP during iterative refinement More...
 
SPxSolver::Status _solveRealStable (bool acceptUnbounded, bool acceptInfeasible, VectorReal &primal, VectorReal &dual, DataArray< SPxSolver::VarStatus > &basisStatusRows, DataArray< SPxSolver::VarStatus > &basisStatusCols, bool &returnedBasis, const bool forceNoSimplifier=false)
 solves real LP with recovery mechanism More...
 
void _computeBasisInverseRational ()
 computes rational inverse of basis matrix as defined by _rationalLUSolverBind More...
 
void _factorizeColumnRational (SolRational &sol, DataArray< SPxSolver::VarStatus > &basisStatusRows, DataArray< SPxSolver::VarStatus > &basisStatusCols, bool &stoppedTime, bool &stoppedIter, bool &error, bool &optimal)
 factorizes rational basis matrix in column representation More...
 
bool _reconstructSolutionRational (SolRational &sol, DataArray< SPxSolver::VarStatus > &basisStatusRows, DataArray< SPxSolver::VarStatus > &basisStatusCols, const Rational &denomBoundSquared)
 attempts rational reconstruction of primal-dual solution More...
 
void _optimizeReal ()
 solves real LP More...
 
void _evaluateSolutionReal (SPxSimplifier::Result simplificationStatus)
 checks result of the solving process and solves again without preprocessing if necessary More...
 
void _preprocessAndSolveReal (bool applyPreprocessing)
 solves real LP with/without preprocessing More...
 
void _resolveWithoutPreprocessing (SPxSimplifier::Result simplificationStatus)
 loads original problem into solver and solves again after it has been solved to optimality with preprocessing More...
 
void _verifySolutionReal ()
 verify computed solution and resolve if necessary More...
 
void _storeSolutionReal (bool verify=true)
 stores solution of the real LP; before calling this, the real LP must be loaded in the solver and solved (again) More...
 
void _storeSolutionRealFromPresol ()
 stores solution from the simplifier because problem vanished in presolving step More...
 
void _unscaleSolutionReal (SPxLPReal &LP, bool persistent=true)
 unscales stored solution to remove internal or external scaling of LP More...
 
void _loadRealLP (bool initBasis)
 load original LP and possibly setup a slack basis More...
 
void _checkScaling (SPxLPReal *origLP) const
 check scaling of LP More...
 
void _checkBasisScaling ()
 check correctness of (un)scaled basis matrix operations More...
 
bool _reapplyPersistentScaling () const
 check whether persistent scaling is supposed to be reapplied again after unscaling More...
 
void _solveDecompositionDualSimplex ()
 solves LP using the decomposition based dual simplex More...
 
void _createDecompReducedAndComplementaryProblems ()
 creating copies of the original problem that will be manipulated to form the reduced and complementary problems More...
 
void _formDecompReducedProblem (bool &stop)
 forms the reduced problem More...
 
void _solveDecompReducedProblem ()
 solves the reduced problem More...
 
void _formDecompComplementaryProblem ()
 forms the complementary problem More...
 
void _decompSimplifyAndSolve (SPxSolver &solver, SLUFactor &sluFactor, bool fromScratch, bool applyPreprocessing)
 simplifies the problem and solves More...
 
void _decompResolveWithoutPreprocessing (SPxSolver &solver, SLUFactor &sluFactor, SPxSimplifier::Result result)
 loads original problem into solver and solves again after it has been solved to optimality with preprocessing More...
 
void _getZeroDualMultiplierIndices (Vector feasVector, int *nonposind, int *colsforremoval, int *nnonposind, bool &stop)
 identifies the columns of the row-form basis that correspond to rows with zero dual multipliers. More...
 
void _getCompatibleColumns (Vector feasVector, int *nonposind, int *compatind, int *rowsforremoval, int *colsforremoval, int nnonposind, int *ncompatind, bool formRedProb, bool &stop)
 retrieves the compatible columns from the constraint matrix More...
 
void _computeReducedProbObjCoeff (bool &stop)
 computes the reduced problem objective coefficients More...
 
void _getCompatibleBoundCons (LPRowSet &boundcons, int *compatboundcons, int *nonposind, int *ncompatboundcons, int nnonposind, bool &stop)
 computes the compatible bound constraints and adds them to the reduced problem More...
 
void _getRowsForRemovalComplementaryProblem (int *nonposind, int *bind, int *rowsforremoval, int *nrowsforremoval, int nnonposind)
 computes the rows to remove from the complementary problem More...
 
void _deleteAndUpdateRowsComplementaryProblem (SPxRowId rangedRowIds[], int &naddedrows)
 removing rows from the complementary problem. More...
 
void _evaluateSolutionDecomp (SPxSolver &solver, SLUFactor &sluFactor, SPxSimplifier::Result result)
 evaluates the solution of the reduced problem for the DBDS More...
 
void _updateDecompReducedProblem (Real objVal, DVector dualVector, DVector redcostVector, DVector compPrimalVector, DVector compDualVector)
 update the reduced problem with additional columns and rows More...
 
void _updateDecompReducedProblemViol (bool allrows)
 update the reduced problem with additional columns and rows based upon the violated original bounds and rows More...
 
void _findViolatedRows (Real compObjValue, DataArray< RowViolation > &violatedrows, int &nviolatedrows)
 builds the update rows with those violated in the complmentary problem More...
 
void _updateDecompComplementaryDualProblem (bool origObj)
 update the dual complementary problem with additional columns and rows More...
 
void _updateDecompComplementaryPrimalProblem (bool origObj)
 update the primal complementary problem with additional columns and rows More...
 
void _checkOriginalProblemOptimality (Vector primalVector, bool printViol)
 checking the optimality of the original problem. More...
 
void _updateComplementaryDualSlackColCoeff ()
 updating the slack column coefficients to adjust for equality constraints More...
 
void _updateComplementaryPrimalSlackColCoeff ()
 updating the slack column coefficients to adjust for equality constraints More...
 
void _removeComplementaryDualFixedPrimalVars (int *currFixedVars)
 removing the dual columns related to the fixed variables More...
 
void _identifyComplementaryDualFixedPrimalVars (int *currFixedVars)
 removing the dual columns related to the fixed variables More...
 
void _updateComplementaryDualFixedPrimalVars (int *currFixedVars)
 updating the dual columns related to the fixed primal variables. More...
 
void _identifyComplementaryPrimalFixedPrimalVars (int *currFixedVars)
 removing the dual columns related to the fixed variables More...
 
void _updateComplementaryPrimalFixedPrimalVars (int *currFixedVars)
 updating the dual columns related to the fixed primal variables. More...
 
void _setComplementaryDualOriginalObjective ()
 updating the complementary dual problem with the original objective function More...
 
void _setComplementaryPrimalOriginalObjective ()
 updating the complementary primal problem with the original objective function More...
 
int getOrigVarFixedDirection (int colNum)
 determining which bound the primal variables will be fixed to. More...
 
bool checkBasisDualFeasibility (Vector feasVec)
 checks the dual feasibility of the current basis More...
 
DualSign getExpectedDualVariableSign (int rowNumber)
 returns the expected sign of the dual variables for the reduced problem More...
 
DualSign getOrigProbDualVariableSign (int rowNumber)
 returns the expected sign of the dual variables for the original problem More...
 
void printDecompDisplayLine (SPxSolver &solver, const SPxOut::Verbosity origVerb, bool force, bool forceHead)
 prints a display line of the flying table for the DBDS More...
 
void getOriginalProblemStatistics ()
 stores the problem statistics of the original problem More...
 
void printOriginalProblemStatistics (std::ostream &os)
 stores the problem statistics of the original problem More...
 
Real getCompSlackVarCoeff (int primalRowNum)
 gets the coefficient of the slack variable in the primal complementary problem More...
 
bool getDecompBoundViolation (Real &maxviol, Real &sumviol)
 gets violation of bounds; returns true on success More...
 
bool getDecompRowViolation (Real &maxviol, Real &sumviol)
 gets violation of constraints; returns true on success More...
 
bool decompTerminate (Real timeLimit)
 function call to terminate the decomposition simplex More...
 
void _writeOriginalProblemBasis (const char *filename, NameSet *rowNames, NameSet *colNames, bool cpxFormat)
 function to build a basis for the original problem as given by the solution to the reduced problem More...
 
void getOriginalProblemBasisRowStatus (DataArray< int > &degenerateRowNums, DataArray< SPxSolver::VarStatus > &degenerateRowStatus, int &nDegenerateRows, int &nNonBasicRows)
 function to retrieve the original problem row basis status from the reduced and complementary problems More...
 
void getOriginalProblemBasisColStatus (int &nNonBasicCols)
 function to retrieve the column status for the original problem basis from the reduced and complementary problems More...
 

Private Attributes

Statistics_statistics
 statistics since last call to solveReal() or solveRational() More...
 
Settings_currentSettings
 
Rational _rationalPosInfty
 
Rational _rationalNegInfty
 
Rational _rationalFeastol
 
Rational _rationalOpttol
 
Rational _rationalMaxscaleincr
 
SPxSolver _solver
 
SLUFactor _slufactor
 
SPxMainSM _simplifierMainSM
 
SPxEquiliSC _scalerUniequi
 
SPxEquiliSC _scalerBiequi
 
SPxGeometSC _scalerGeo1
 
SPxGeometSC _scalerGeo8
 
SPxLeastSqSC _scalerLeastsq
 
SPxWeightST _starterWeight
 
SPxSumST _starterSum
 
SPxVectorST _starterVector
 
SPxAutoPR _pricerAuto
 
SPxDantzigPR _pricerDantzig
 
SPxParMultPR _pricerParMult
 
SPxDevexPR _pricerDevex
 
SPxSteepPR _pricerQuickSteep
 
SPxSteepExPR _pricerSteep
 
SPxDefaultRT _ratiotesterTextbook
 
SPxHarrisRT _ratiotesterHarris
 
SPxFastRT _ratiotesterFast
 
SPxBoundFlippingRT _ratiotesterBoundFlipping
 
SPxLPReal_realLP
 
SPxLPReal_decompLP
 
SPxSimplifier_simplifier
 
SPxScaler_scaler
 
SPxStarter_starter
 
bool _isRealLPLoaded
 
bool _isRealLPScaled
 
bool _applyPolishing
 
DVectorReal _manualLower
 
DVectorReal _manualUpper
 
DVectorReal _manualLhs
 
DVectorReal _manualRhs
 
DVectorReal _manualObj
 
SPxLPReal _manualRealLP
 
SPxSolver::Status _status
 
int _lastSolveMode
 
DataArray< SPxSolver::VarStatus_basisStatusRows
 
DataArray< SPxSolver::VarStatus_basisStatusCols
 
SolReal _solReal
 
SolRational _solRational
 
SolRational _workSol
 
bool _hasBasis
 
bool _hasSolReal
 
bool _hasSolRational
 
int _optimizeCalls
 
int _unscaleCalls
 
Rational _rationalPosone
 
Rational _rationalNegone
 
Rational _rationalZero
 
enum  BoolParam {
  LIFTING = 0, EQTRANS = 1, TESTDUALINF = 2, RATFAC = 3,
  USEDECOMPDUALSIMPLEX = 4, COMPUTEDEGEN = 5, USECOMPDUAL = 6, EXPLICITVIOL = 7,
  ACCEPTCYCLING = 8, RATREC = 9, POWERSCALING = 10, RATFACJUMP = 11,
  ROWBOUNDFLIPS = 12, PERSISTENTSCALING = 13, FULLPERTURBATION = 14, BOOLPARAM_COUNT = 15
}
 boolean parameters More...
 
enum  IntParam {
  OBJSENSE = 0, REPRESENTATION = 1, ALGORITHM = 2, FACTOR_UPDATE_TYPE = 3,
  FACTOR_UPDATE_MAX = 4, ITERLIMIT = 5, REFLIMIT = 6, STALLREFLIMIT = 7,
  DISPLAYFREQ = 8, VERBOSITY = 9, SIMPLIFIER = 10, SCALER = 11,
  STARTER = 12, PRICER = 13, RATIOTESTER = 14, SYNCMODE = 15,
  READMODE = 16, SOLVEMODE = 17, CHECKMODE = 18, TIMER = 19,
  HYPER_PRICING = 20, RATFAC_MINSTALLS = 21, LEASTSQ_MAXROUNDS = 22, SOLUTION_POLISHING = 23,
  DECOMP_ITERLIMIT = 24, DECOMP_MAXADDEDROWS = 25, DECOMP_DISPLAYFREQ = 26, DECOMP_VERBOSITY = 27,
  PRINTCONDITION = 28, INTPARAM_COUNT = 29
}
 integer parameters More...
 
enum  { OBJSENSE_MINIMIZE = -1, OBJSENSE_MAXIMIZE = 1 }
 values for parameter OBJSENSE More...
 
enum  { REPRESENTATION_AUTO = 0, REPRESENTATION_COLUMN = 1, REPRESENTATION_ROW = 2 }
 values for parameter REPRESENTATION More...
 
enum  { ALGORITHM_PRIMAL = 0, ALGORITHM_DUAL = 1 }
 values for parameter ALGORITHM More...
 
enum  { FACTOR_UPDATE_TYPE_ETA = 0, FACTOR_UPDATE_TYPE_FT = 1 }
 values for parameter FACTOR_UPDATE_TYPE More...
 
enum  {
  VERBOSITY_ERROR = 0, VERBOSITY_WARNING = 1, VERBOSITY_DEBUG = 2, VERBOSITY_NORMAL = 3,
  VERBOSITY_HIGH = 4, VERBOSITY_FULL = 5
}
 values for parameter VERBOSITY More...
 
enum  { SIMPLIFIER_OFF = 0, SIMPLIFIER_AUTO = 1 }
 values for parameter SIMPLIFIER More...
 
enum  {
  SCALER_OFF = 0, SCALER_UNIEQUI = 1, SCALER_BIEQUI = 2, SCALER_GEO1 = 3,
  SCALER_GEO8 = 4, SCALER_LEASTSQ = 5
}
 values for parameter SCALER More...
 
enum  { STARTER_OFF = 0, STARTER_WEIGHT = 1, STARTER_SUM = 2, STARTER_VECTOR = 3 }
 values for parameter STARTER More...
 
enum  {
  PRICER_AUTO = 0, PRICER_DANTZIG = 1, PRICER_PARMULT = 2, PRICER_DEVEX = 3,
  PRICER_QUICKSTEEP = 4, PRICER_STEEP = 5
}
 values for parameter PRICER More...
 
enum  { RATIOTESTER_TEXTBOOK = 0, RATIOTESTER_HARRIS = 1, RATIOTESTER_FAST = 2, RATIOTESTER_BOUNDFLIPPING = 3 }
 values for parameter RATIOTESTER More...
 
enum  { SYNCMODE_ONLYREAL = 0, SYNCMODE_AUTO = 1, SYNCMODE_MANUAL = 2 }
 values for parameter SYNCMODE More...
 
enum  { READMODE_REAL = 0, READMODE_RATIONAL = 1 }
 values for parameter READMODE More...
 
enum  { SOLVEMODE_REAL = 0, SOLVEMODE_AUTO = 1, SOLVEMODE_RATIONAL = 2 }
 values for parameter SOLVEMODE More...
 
enum  { CHECKMODE_REAL = 0, CHECKMODE_AUTO = 1, CHECKMODE_RATIONAL = 2 }
 values for parameter CHECKMODE More...
 
enum  { TIMER_OFF = 0, TIMER_CPU = 1, TIMER_WALLCLOCK = 2 }
 values for parameter TIMER More...
 
enum  { HYPER_PRICING_OFF = 0, HYPER_PRICING_AUTO = 1, HYPER_PRICING_ON = 2 }
 values for parameter HYPER_PRICING More...
 
enum  { POLISHING_OFF = 0, POLISHING_INTEGRALITY = 1, POLISHING_FRACTIONALITY = 2 }
 values for parameter SOLUTION_POLISHING More...
 
enum  RealParam {
  FEASTOL = 0, OPTTOL = 1, EPSILON_ZERO = 2, EPSILON_FACTORIZATION = 3,
  EPSILON_UPDATE = 4, EPSILON_PIVOT = 5, INFTY = 6, TIMELIMIT = 7,
  OBJLIMIT_LOWER = 8, OBJLIMIT_UPPER = 9, FPFEASTOL = 10, FPOPTTOL = 11,
  MAXSCALEINCR = 12, LIFTMINVAL = 13, LIFTMAXVAL = 14, SPARSITY_THRESHOLD = 15,
  REPRESENTATION_SWITCH = 16, RATREC_FREQ = 17, MINRED = 18, REFAC_BASIS_NNZ = 19,
  REFAC_UPDATE_FILL = 20, REFAC_MEM_FACTOR = 21, LEASTSQ_ACRCY = 22, OBJ_OFFSET = 23,
  REALPARAM_COUNT = 24
}
 real parameters More...
 
SPxOut spxout
 
bool boolParam (const BoolParam param) const
 returns boolean parameter value More...
 
int intParam (const IntParam param) const
 returns integer parameter value More...
 
Real realParam (const RealParam param) const
 returns real parameter value More...
 
const Settingssettings () const
 returns current parameter settings More...
 
bool setBoolParam (const BoolParam param, const bool value, const bool init=true)
 sets boolean parameter value; returns true on success More...
 
bool setIntParam (const IntParam param, const int value, const bool init=true)
 sets integer parameter value; returns true on success More...
 
bool setRealParam (const RealParam param, const Real value, const bool init=true)
 sets real parameter value; returns true on success More...
 
bool setSettings (const Settings &newSettings, const bool init=true)
 sets parameter settings; returns true on success More...
 
void resetSettings (const bool quiet=false, const bool init=true)
 resets default parameter settings More...
 
void printUserSettings ()
 print non-default parameter values More...
 
bool saveSettingsFile (const char *filename, const bool onlyChanged=false) const
 writes settings file; returns true on success More...
 
bool loadSettingsFile (const char *filename)
 reads settings file; returns true on success More...
 
bool parseSettingsString (char *line)
 parses one setting string and returns true on success; note that string is modified More...
 
enum  RangeType {
  RANGETYPE_FREE = 0, RANGETYPE_LOWER = 1, RANGETYPE_UPPER = 2, RANGETYPE_BOXED = 3,
  RANGETYPE_FIXED = 4
}
 type of bounds and sides More...
 
SPxLPRational_rationalLP
 
SLUFactorRational _rationalLUSolver
 
DataArray< int > _rationalLUSolverBind
 
LPColSetRational _slackCols
 
DVectorRational _unboundedLower
 
DVectorRational _unboundedUpper
 
DVectorRational _unboundedLhs
 
DVectorRational _unboundedRhs
 
DSVectorRational _tauColVector
 
DVectorRational _feasObj
 
DVectorRational _feasLhs
 
DVectorRational _feasRhs
 
DVectorRational _feasLower
 
DVectorRational _feasUpper
 
DVectorRational _modLower
 
DVectorRational _modUpper
 
DVectorRational _modLhs
 
DVectorRational _modRhs
 
DVectorRational _modObj
 
DSVectorRational _primalDualDiff
 
DataArray< SPxSolver::VarStatus_storedBasisStatusRows
 
DataArray< SPxSolver::VarStatus_storedBasisStatusCols
 
DataArray< UnitVectorRational *> _unitMatrixRational
 
bool _storedBasis
 
int _beforeLiftRows
 
int _beforeLiftCols
 
DataArray< RangeType_colTypes
 
DataArray< RangeType_rowTypes
 
enum  decompStatus { DECOMP_ORIG = 0, DECOMP_RED = 1, DECOMP_COMP = 2 }
 
enum  DualSign { IS_POS = 0, IS_NEG = 1, IS_FREE = 2 }
 
SPxSolver _compSolver
 
SLUFactor _compSlufactor
 
SPxBasis _decompTransBasis
 
DVector _transformedObj
 
DVector _decompFeasVector
 
LPRowSet _transformedRows
 
SPxColId _compSlackColId
 
SPxRowId _compSlackDualRowId
 
bool * _decompReducedProbRows
 
bool * _decompReducedProbCols
 
int * _decompRowStatus
 
int * _decompColStatus
 
int * _decompCompProbColIDsIdx
 
DataArray< SPxRowId_decompReducedProbRowIDs
 
DataArray< SPxRowId_decompReducedProbColRowIDs
 
DataArray< SPxColId_decompReducedProbColIDs
 
DataArray< SPxRowId_decompPrimalRowIDs
 
DataArray< SPxColId_decompPrimalColIDs
 
DataArray< SPxRowId_decompElimPrimalRowIDs
 
DataArray< SPxRowId_decompDualRowIDs
 
DataArray< SPxColId_decompDualColIDs
 
DataArray< SPxColId_decompFixedVarDualIDs
 
DataArray< SPxColId_decompVarBoundDualIDs
 
DataArray< SPxColId_decompCompPrimalFixedVarIDs
 
DataArray< SPxColId_decompCompPrimalVarBoundIDs
 
DataArray< SPxRowId_decompCompPrimalRowIDs
 
DataArray< SPxColId_decompCompPrimalColIDs
 
int _nDecompViolBounds
 
int _nDecompViolRows
 
int * _decompViolatedBounds
 
int * _decompViolatedRows
 
int * _fixedOrigVars
 
int _nPrimalRows
 
int _nPrimalCols
 
int _nElimPrimalRows
 
int _nDualRows
 
int _nDualCols
 
int _nCompPrimalRows
 
int _nCompPrimalCols
 
int _decompDisplayLine
 
NameSet_rowNames
 
NameSet_colNames
 
int numIncludedRows
 
int numDecompIter
 
int numRedProbIter
 
int numCompProbIter
 
int numProbRows
 
int numProbCols
 
int numNonzeros
 
Real minAbsNonzero
 
Real maxAbsNonzero
 
int origCountLower
 
int origCountUpper
 
int origCountBoxed
 
int origCountFreeCol
 
int origCountLhs
 
int origCountRhs
 
int origCountRanged
 
int origCountFreeRow
 
decompStatus _currentProb
 

Detailed Description

Preconfigured SoPlex LP-solver.

Definition at line 90 of file soplex.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

values for parameter OBJSENSE

Enumerator
OBJSENSE_MINIMIZE 

minimization

OBJSENSE_MAXIMIZE 

maximization

Definition at line 1029 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter RATIOTESTER

Enumerator
RATIOTESTER_TEXTBOOK 

textbook ratio test without stabilization

RATIOTESTER_HARRIS 

standard Harris ratio test

RATIOTESTER_FAST 

modified Harris ratio test

RATIOTESTER_BOUNDFLIPPING 

bound flipping ratio test for long steps in the dual simplex

Definition at line 1164 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter SYNCMODE

Enumerator
SYNCMODE_ONLYREAL 

store only real LP

SYNCMODE_AUTO 

automatic sync of real and rational LP

SYNCMODE_MANUAL 

user sync of real and rational LP

Definition at line 1180 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter READMODE

Enumerator
READMODE_REAL 

standard floating-point parsing

READMODE_RATIONAL 

rational parsing

Definition at line 1193 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter SOLVEMODE

Enumerator
SOLVEMODE_REAL 

apply standard floating-point algorithm

SOLVEMODE_AUTO 

decide depending on tolerances whether to apply iterative refinement

SOLVEMODE_RATIONAL 

force iterative refinement

Definition at line 1203 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter CHECKMODE

Enumerator
CHECKMODE_REAL 

floating-point check

CHECKMODE_AUTO 

decide according to READMODE

CHECKMODE_RATIONAL 

rational check

Definition at line 1216 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter TIMER

Enumerator
TIMER_OFF 

disable timing

TIMER_CPU 

cpu or user time

TIMER_WALLCLOCK 

wallclock time

Definition at line 1229 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter HYPER_PRICING

Enumerator
HYPER_PRICING_OFF 

never

HYPER_PRICING_AUTO 

decide according to problem size

HYPER_PRICING_ON 

always

Definition at line 1242 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter SOLUTION_POLISHING

Enumerator
POLISHING_OFF 

no solution polishing

POLISHING_INTEGRALITY 

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

POLISHING_FRACTIONALITY 

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

Definition at line 1255 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter REPRESENTATION

Enumerator
REPRESENTATION_AUTO 

automatic choice according to number of rows and columns

REPRESENTATION_COLUMN 

column representation Ax - s = 0, lower <= x <= upper, lhs <= s <= rhs

REPRESENTATION_ROW 

row representation (lower,lhs) <= (x,Ax) <= (upper,rhs)

Definition at line 1039 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter ALGORITHM

Enumerator
ALGORITHM_PRIMAL 

primal simplex algorithm, i.e., entering for column and leaving for row representation

ALGORITHM_DUAL 

dual simplex algorithm, i.e., leaving for column and entering for row representation

Definition at line 1052 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter FACTOR_UPDATE_TYPE

Enumerator
FACTOR_UPDATE_TYPE_ETA 

product form update

FACTOR_UPDATE_TYPE_FT 

Forrest-Tomlin type update.

Definition at line 1062 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter VERBOSITY

Enumerator
VERBOSITY_ERROR 

only error output

VERBOSITY_WARNING 

only error and warning output

VERBOSITY_DEBUG 

only error, warning, and debug output

VERBOSITY_NORMAL 

standard verbosity level

VERBOSITY_HIGH 

high verbosity level

VERBOSITY_FULL 

full verbosity level

Definition at line 1072 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter SIMPLIFIER

Enumerator
SIMPLIFIER_OFF 

no simplifier

SIMPLIFIER_AUTO 

automatic choice

Definition at line 1094 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter SCALER

Enumerator
SCALER_OFF 

no scaler

SCALER_UNIEQUI 

equilibrium scaling on rows or columns

SCALER_BIEQUI 

equilibrium scaling on rows and columns

SCALER_GEO1 

geometric mean scaling on rows and columns, max 1 round

SCALER_GEO8 

geometric mean scaling on rows and columns, max 8 rounds

SCALER_LEASTSQ 

least square scaling

Definition at line 1104 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter STARTER

Enumerator
STARTER_OFF 

slack basis

STARTER_WEIGHT 

greedy crash basis weighted by objective, bounds, and sides

STARTER_SUM 

crash basis from a greedy solution

STARTER_VECTOR 

generic solution-based crash basis

Definition at line 1126 of file soplex.h.

◆ anonymous enum

anonymous enum

values for parameter PRICER

Enumerator
PRICER_AUTO 

automatic pricer

PRICER_DANTZIG 

Dantzig pricer.

PRICER_PARMULT 

partial multiple pricer based on Dantzig pricing

PRICER_DEVEX 

devex pricer

PRICER_QUICKSTEEP 

steepest edge pricer with initialization to unit norms

PRICER_STEEP 

steepest edge pricer with exact initialization of norms

Definition at line 1142 of file soplex.h.

◆ BoolParam

enum BoolParam

boolean parameters

Enumerator
LIFTING 

should lifting be used to reduce range of nonzero matrix coefficients?

EQTRANS 

should LP be transformed to equality form before a rational solve?

TESTDUALINF 

should dual infeasibility be tested in order to try to return a dual solution even if primal infeasible?

RATFAC 

should a rational factorization be performed after iterative refinement?

USEDECOMPDUALSIMPLEX 

should the decomposition based dual simplex be used to solve the LP? Setting this to true forces the solve mode to SOLVEMODE_REAL and the basis representation to REPRESENTATION_ROW

COMPUTEDEGEN 

should the degeneracy be computed for each basis?

USECOMPDUAL 

should the dual of the complementary problem be used in the decomposition simplex?

EXPLICITVIOL 

should row and bound violations be computed explicitly in the update of reduced problem in the decomposition simplex

ACCEPTCYCLING 

should cycling solutions be accepted during iterative refinement?

RATREC 

apply rational reconstruction after each iterative refinement?

POWERSCALING 

round scaling factors for iterative refinement to powers of two?

RATFACJUMP 

continue iterative refinement with exact basic solution if not optimal?

ROWBOUNDFLIPS 

use bound flipping also for row representation?

PERSISTENTSCALING 

use persistent scaling?

FULLPERTURBATION 

perturb the entire problem or only the relevant bounds of s single pivot?

BOOLPARAM_COUNT 

number of boolean parameters

Definition at line 882 of file soplex.h.

◆ decompStatus

enum decompStatus
private
Enumerator
DECOMP_ORIG 
DECOMP_RED 
DECOMP_COMP 

Definition at line 1700 of file soplex.h.

◆ DualSign

enum DualSign
private
Enumerator
IS_POS 
IS_NEG 
IS_FREE 

Definition at line 1713 of file soplex.h.

◆ IntParam

enum IntParam

integer parameters

Enumerator
OBJSENSE 

objective sense

REPRESENTATION 

type of computational form, i.e., column or row representation

ALGORITHM 

type of algorithm, i.e., primal or dual

FACTOR_UPDATE_TYPE 

type of LU update

FACTOR_UPDATE_MAX 

maximum number of updates without fresh factorization

ITERLIMIT 

iteration limit (-1 if unlimited)

REFLIMIT 

refinement limit (-1 if unlimited)

STALLREFLIMIT 

stalling refinement limit (-1 if unlimited)

DISPLAYFREQ 

display frequency

VERBOSITY 

verbosity level

SIMPLIFIER 

type of simplifier

SCALER 

type of scaler

STARTER 

type of starter used to create crash basis

PRICER 

type of pricer

RATIOTESTER 

type of ratio test

SYNCMODE 

mode for synchronizing real and rational LP

READMODE 

mode for reading LP files

SOLVEMODE 

mode for iterative refinement strategy

CHECKMODE 

mode for a posteriori feasibility checks

TIMER 

type of timer

HYPER_PRICING 

mode for hyper sparse pricing

RATFAC_MINSTALLS 

minimum number of stalling refinements since last pivot to trigger rational factorization

LEASTSQ_MAXROUNDS 

maximum number of conjugate gradient iterations in least square scaling

SOLUTION_POLISHING 

mode for solution polishing

DECOMP_ITERLIMIT 

the number of iterations before the decomposition simplex initialisation is terminated.

DECOMP_MAXADDEDROWS 

the maximum number of rows that are added in each iteration of the decomposition based simplex

DECOMP_DISPLAYFREQ 

the iteration frequency at which the decomposition solve output is displayed.

DECOMP_VERBOSITY 

the verbosity of the decomposition based simplex

PRINTCONDITION 

print condition number during the solve

INTPARAM_COUNT 

number of integer parameters

Definition at line 935 of file soplex.h.

◆ RangeType

enum RangeType
private

type of bounds and sides

Enumerator
RANGETYPE_FREE 

both bounds are infinite

RANGETYPE_LOWER 

lower bound is finite, upper bound is infinite

RANGETYPE_UPPER 

upper bound is finite, lower bound is infinite

RANGETYPE_BOXED 

lower and upper bound finite, but different

RANGETYPE_FIXED 

lower bound equals upper bound

Definition at line 1641 of file soplex.h.

◆ RealParam

enum RealParam

real parameters

Enumerator
FEASTOL 

primal feasibility tolerance

OPTTOL 

dual feasibility tolerance

EPSILON_ZERO 

general zero tolerance

EPSILON_FACTORIZATION 

zero tolerance used in factorization

EPSILON_UPDATE 

zero tolerance used in update of the factorization

EPSILON_PIVOT 

pivot zero tolerance used in factorization

INFTY 

infinity threshold

TIMELIMIT 

time limit in seconds (INFTY if unlimited)

OBJLIMIT_LOWER 

lower limit on objective value

OBJLIMIT_UPPER 

upper limit on objective value

FPFEASTOL 

working tolerance for feasibility in floating-point solver during iterative refinement

FPOPTTOL 

working tolerance for optimality in floating-point solver during iterative refinement

MAXSCALEINCR 

maximum increase of scaling factors between refinements

LIFTMINVAL 

lower threshold in lifting (nonzero matrix coefficients with smaller absolute value will be reformulated)

LIFTMAXVAL 

upper threshold in lifting (nonzero matrix coefficients with larger absolute value will be reformulated)

SPARSITY_THRESHOLD 

sparse pricing threshold (#violations < dimension * SPARSITY_THRESHOLD activates sparse pricing)

REPRESENTATION_SWITCH 

threshold on number of rows vs. number of columns for switching from column to row representations in auto mode

RATREC_FREQ 

geometric frequency at which to apply rational reconstruction

MINRED 

minimal reduction (sum of removed rows/cols) to continue simplification

REFAC_BASIS_NNZ 

refactor threshold for nonzeros in last factorized basis matrix compared to updated basis matrix

REFAC_UPDATE_FILL 

refactor threshold for fill-in in current factor update compared to fill-in in last factorization

REFAC_MEM_FACTOR 

refactor threshold for memory growth in factorization since last refactorization

LEASTSQ_ACRCY 

accuracy of conjugate gradient method in least squares scaling (higher value leads to more iterations)

OBJ_OFFSET 

objective offset

REALPARAM_COUNT 

number of real parameters

Definition at line 1268 of file soplex.h.

Constructor & Destructor Documentation

◆ SoPlex() [1/2]

◆ SoPlex() [2/2]

SoPlex ( const SoPlex rhs)

copy constructor

Todo:
improve performance by implementing a separate copy constructor

Definition at line 734 of file soplex.cpp.

References SoPlex::_currentSettings, SoPlex::_statistics, and soplex::spx_alloc().

◆ ~SoPlex()

Member Function Documentation

◆ _addColReal() [1/2]

◆ _addColReal() [2/2]

◆ _addColsReal()

◆ _addRowReal() [1/2]

◆ _addRowReal() [2/2]

◆ _addRowsReal()

◆ _changeBoundsReal() [1/2]

◆ _changeBoundsReal() [2/2]

void _changeBoundsReal ( int  i,
const Real lower,
const Real upper 
)
private

◆ _changeColReal()

◆ _changeElementReal()

◆ _changeLhsReal() [1/2]

◆ _changeLhsReal() [2/2]

◆ _changeLowerReal() [1/2]

◆ _changeLowerReal() [2/2]

◆ _changeRangeReal() [1/2]

◆ _changeRangeReal() [2/2]

void _changeRangeReal ( int  i,
const Real lhs,
const Real rhs 
)
private

◆ _changeRhsReal() [1/2]

◆ _changeRhsReal() [2/2]

◆ _changeRowReal()

◆ _changeUpperReal() [1/2]

◆ _changeUpperReal() [2/2]

◆ _checkBasisScaling()

◆ _checkOriginalProblemOptimality()

◆ _checkScaling()

◆ _completeRangeTypesRational()

◆ _computeBasisInverseRational()

◆ _computeInfeasBox()

void _computeInfeasBox ( SolRational sol,
bool  transformed 
)
private

computes radius of infeasibility box implied by an approximate Farkas' proof

Given constraints of the form \( lhs <= Ax <= rhs \), a farkas proof y should satisfy \( y^T A = 0 \) and \( y_+^T lhs - y_-^T rhs > 0 \), where \( y_+, y_- \) denote the positive and negative parts of \( y \). If \( y \) is approximate, it may not satisfy \( y^T A = 0 \) exactly, but the proof is still valid as long as the following holds for all potentially feasible \( x \):

\[ y^T Ax < (y_+^T lhs - y_-^T rhs) (*) \]

we may therefore calculate \( y^T A \) and \( y_+^T lhs - y_-^T rhs \) exactly and check if the upper and lower bounds on \( x \) imply that all feasible \( x \) satisfy (*), and if not then compute bounds on \( x \) to guarantee (*). The simplest way to do this is to compute

\[ B = (y_+^T lhs - y_-^T rhs) / \sum_i(|(y^T A)_i|) \]

noting that if every component of \( x \) has \( |x_i| < B \), then (*) holds.

\( B \) can be increased by iteratively including variable bounds smaller than \( B \). The speed of this method can be further improved by using interval arithmetic for all computations. For related information see Sec. 4 of Neumaier and Shcherbina, Mathematical Programming A, 2004.

Set transformed to true if this method is called after _transformFeasibility().

Todo:
this currently works only if all constraints are equations aggregate rows and sides using the multipliers of the Farkas ray

Definition at line 2852 of file solverational.cpp.

References SoPlex::_colTypes, SolBase< R >::_dualFarkas, SoPlex::_feasLhs, SoPlex::_feasLower, SoPlex::_feasRhs, SoPlex::_feasUpper, SoPlex::_lowerFinite(), SoPlex::_rationalLP, SoPlex::_rationalNegInfty, SoPlex::_rationalPosInfty, SoPlex::_upperFinite(), Rational::addProduct(), SSVectorBase< R >::clear(), SSVectorBase< R >::clearNum(), SolBase< R >::hasDualFarkas(), SSVectorBase< R >::index(), SSVectorBase< R >::isSetup(), SoPlex::lhsRational(), SoPlex::lowerRational(), MSG_DEBUG, MSG_INFO1, SoPlex::numColsRational(), SoPlex::numRowsRational(), soplex::rationalToString(), SSVectorBase< R >::reDim(), SoPlex::rhsRational(), SPxLPBase< R >::rowVector(), SSVectorBase< R >::setEpsilon(), SSVectorBase< R >::setup(), SSVectorBase< R >::setValue(), SSVectorBase< R >::size(), soplex::spxAbs(), SoPlex::spxout, Rational::subProduct(), SoPlex::upperRational(), and SSVectorBase< R >::value().

Referenced by SoPlex::_performFeasIRStable().

◆ _computeReducedProbObjCoeff()

◆ _createDecompReducedAndComplementaryProblems()

◆ _decompResolveWithoutPreprocessing()

◆ _decompSimplifyAndSolve()

void _decompSimplifyAndSolve ( SPxSolver solver,
SLUFactor sluFactor,
bool  fromScratch,
bool  applyPreprocessing 
)
private

simplifies the problem and solves

Todo:
implement for both objective senses
Todo:
this should not fail even if the basis is invalid (wrong dimension or wrong number of basic entries); fix either in SPxSolver or in SPxBasis

Definition at line 859 of file solvedbds.cpp.

References SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SoPlex::_currentProb, SoPlex::_decompLP, SoPlex::_disableSimplifierAndScaler(), SoPlex::_enableSimplifierAndScaler(), SoPlex::_evaluateSolutionDecomp(), SoPlex::_hasBasis, SoPlex::_isRealLPLoaded, SoPlex::_scaler, SoPlex::_simplifier, SoPlex::_solver, SoPlex::_statistics, SoPlex::_status, SoPlex::Statistics::boundflips, SPxSolver::boundFlips(), SPxLPBase< R >::changeObjOffset(), SoPlex::DECOMP_COMP, SoPlex::DECOMP_ORIG, SoPlex::DECOMP_RED, SoPlex::Statistics::degenPivotsDual, SoPlex::Statistics::degenPivotsPrimal, SPxSolver::dualDegeneratePivots(), SoPlex::EPSILON_ZERO, SPxSolver::ERROR, SoPlex::FEASTOL, DataArray< T >::get_const_ptr(), SLUFactor::getFactorCount(), SLUFactor::getFactorTime(), SPxSimplifier::getObjoffset(), SLUFactor::getSolveCount(), SLUFactor::getSolveTime(), SoPlex::INFTY, SoPlex::Statistics::iterations, SPxSolver::iterations(), SoPlex::Statistics::iterationsCompProb, SoPlex::Statistics::iterationsFromBasis, SoPlex::Statistics::iterationsInit, SoPlex::Statistics::iterationsPrimal, SoPlex::Statistics::iterationsRedProb, SPxSolver::loadLP(), SoPlex::Statistics::luFactorizationsReal, SoPlex::Statistics::luFactorizationTimeReal, SoPlex::Statistics::luSolvesReal, SoPlex::Statistics::luSolveTimeReal, MSG_ERROR, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SoPlex::OBJ_OFFSET, SoPlex::OBJLIMIT_UPPER, SPxSimplifier::OKAY, SoPlex::OPTTOL, SoPlex::Statistics::preprocessingTime, SPxSolver::primalDegeneratePivots(), SPxSolver::primalIterations(), SoPlex::realParam(), SPxSolver::reLoad(), SLUFactor::resetCounters(), SPxScaler::scale(), SPxSolver::setBasis(), SPxSolver::setTerminationTime(), SPxSolver::setTerminationValue(), SoPlex::Statistics::simplexTime, SPxSimplifier::simplify(), DataArray< T >::size(), SPxSolver::solve(), SoPlex::Statistics::solvingTime, soplex::spx_alloc(), soplex::spx_free(), SoPlex::spxout, SPxLPBase< R >::spxSense(), Timer::start(), Timer::stop(), SoPlex::Statistics::sumDualDegen, SPxSolver::sumDualDegeneracy(), SoPlex::Statistics::sumPrimalDegen, SPxSolver::sumPrimalDegeneracy(), Timer::time(), SoPlex::TIMELIMIT, and SPxException::what().

Referenced by SoPlex::_decompResolveWithoutPreprocessing(), SoPlex::_evaluateSolutionDecomp(), and SoPlex::_solveDecompositionDualSimplex().

◆ _deleteAndUpdateRowsComplementaryProblem()

◆ _disableSimplifierAndScaler()

void _disableSimplifierAndScaler ( )
private

◆ _enableSimplifierAndScaler()

◆ _ensureDSVectorRationalMemory()

void _ensureDSVectorRationalMemory ( DSVectorRational vec,
const int  newmax 
) const
private

extends sparse vector to hold newmax entries if and only if it holds no more free entries

Definition at line 7150 of file soplex.cpp.

References SVectorBase< R >::max(), DSVectorBase< R >::setMax(), and SVectorBase< R >::size().

Referenced by SoPlex::_performOptIRStable().

◆ _ensureRationalLP()

void _ensureRationalLP ( )
private

ensures that the rational LP is available; performs no sync

Definition at line 7979 of file soplex.cpp.

References SoPlex::_rationalLP, SPxLPBase< R >::setOutstream(), soplex::spx_alloc(), and SoPlex::spxout.

Referenced by SoPlex::_readFileRational(), SoPlex::_syncLPRational(), and SoPlex::setIntParam().

◆ _ensureRealLPLoaded()

◆ _evaluateSolutionDecomp()

◆ _evaluateSolutionReal()

◆ _factorizeColumnRational()

void _factorizeColumnRational ( SolRational sol,
DataArray< SPxSolver::VarStatus > &  basisStatusRows,
DataArray< SPxSolver::VarStatus > &  basisStatusCols,
bool &  stoppedTime,
bool &  stoppedIter,
bool &  error,
bool &  optimal 
)
private

factorizes rational basis matrix in column representation

Definition at line 3570 of file solverational.cpp.

References SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SoPlex::_colTypes, SoPlex::_computeBasisInverseRational(), SolBase< R >::_dual, SoPlex::_hasBasis, SolBase< R >::_isDualFeasible, SolBase< R >::_isPrimalFeasible, SoPlex::_isSolveStopped(), SolBase< R >::_primal, SoPlex::_rationalLP, SoPlex::_rationalLUSolver, SoPlex::_rationalLUSolverBind, SolBase< R >::_redCost, SoPlex::_rowTypes, SolBase< R >::_slacks, SoPlex::_statistics, SoPlex::_workSol, SPxSolver::BASIC, SoPlex::boolParam(), SoPlex::colVectorRational(), SPxLPBase< R >::computePrimalActivity(), SLUFactorRational::dim(), SPxSolver::FIXED, SLUFactorRational::getSolveTime(), SoPlex::INFTY, SoPlex::intParam(), SoPlex::lhsRational(), SoPlex::lowerRational(), SoPlex::Statistics::luSolveTimeRational, MSG_DEBUG, MSG_INFO1, MSG_INFO2, MSG_WARNING, VectorBase< R >::multAdd(), SoPlex::numColsRational(), SoPlex::numRowsRational(), SoPlex::objRational(), SoPlex::OBJSENSE, SoPlex::OBJSENSE_MAXIMIZE, SLinSolverRational::OK, SPxSolver::ON_LOWER, SPxSolver::ON_UPPER, SoPlex::RANGETYPE_FIXED, SoPlex::RATFACJUMP, SoPlex::Statistics::rationalTime, soplex::rationalToString(), SoPlex::realParam(), DVectorBase< R >::reDim(), SLUFactorRational::resetCounters(), DataArray< T >::reSize(), SoPlex::rhsRational(), SLUFactorRational::setTimeLimit(), DataArray< T >::size(), SLUFactorRational::solveLeft(), SLUFactorRational::solveRight(), SoPlex::Statistics::solvingTime, SoPlex::spxout, Timer::start(), SLUFactorRational::status(), Timer::stop(), SLinSolverRational::TIME, Timer::time(), SoPlex::TIMELIMIT, SPxSolver::UNDEFINED, SLinSolverRational::UNLOADED, SoPlex::upperRational(), and SPxSolver::ZERO.

Referenced by SoPlex::_performOptIRStable().

◆ _findViolatedRows()

◆ _formDecompComplementaryProblem()

◆ _formDecompReducedProblem()

◆ _getCompatibleBoundCons()

◆ _getCompatibleColumns()

◆ _getRowsForRemovalComplementaryProblem()

void _getRowsForRemovalComplementaryProblem ( int *  nonposind,
int *  bind,
int *  rowsforremoval,
int *  nrowsforremoval,
int  nnonposind 
)
private

computes the rows to remove from the complementary problem

Definition at line 1978 of file solvedbds.cpp.

◆ _getZeroDualMultiplierIndices()

void _getZeroDualMultiplierIndices ( Vector  feasVector,
int *  nonposind,
int *  colsforremoval,
int *  nnonposind,
bool &  stop 
)
private

◆ _identifyComplementaryDualFixedPrimalVars()

◆ _identifyComplementaryPrimalFixedPrimalVars()

void _identifyComplementaryPrimalFixedPrimalVars ( int *  currFixedVars)
private

◆ _idxToPerm()

void _idxToPerm ( int *  idx,
int  idxSize,
int *  perm,
int  permSize 
) const
private

creates a permutation for removing rows/columns from an array of indices

Definition at line 7160 of file soplex.cpp.

Referenced by SoPlex::removeColsRational(), SoPlex::removeColsReal(), SoPlex::removeRowsRational(), and SoPlex::removeRowsReal().

◆ _invalidateSolution()

void _invalidateSolution ( )
private

◆ _isConsistent()

◆ _isSolveStopped()

◆ _lift()

◆ _loadRealLP()

void _loadRealLP ( bool  initBasis)
private

load original LP and possibly setup a slack basis

Definition at line 627 of file solvereal.cpp.

References SoPlex::_isRealLPLoaded, SoPlex::_realLP, SoPlex::_solver, SPxSolver::init(), SPxSolver::loadLP(), and soplex::spx_free().

Referenced by SoPlex::_storeSolutionReal(), and SoPlex::_storeSolutionRealFromPresol().

◆ _lowerFinite()

◆ _optimizeRational()

void _optimizeRational ( )
private

solves rational LP

Todo:
implement row objectives with row representation
Todo:
implement handling of row objectives in Cplex interface
Todo:
this should be stored already earlier, possible switch use solRational above and solFeas here
Todo:
set status to ABORT_VALUE if optimal solution exceeds objective limit

Definition at line 28 of file solverational.cpp.

References SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SolBase< R >::_dual, SoPlex::_hasBasis, SolBase< R >::_hasPrimalRay, SoPlex::_hasSolRational, SolBase< R >::_isDualFeasible, SoPlex::_isRealLPLoaded, SoPlex::_isSolveStopped(), SoPlex::_lastSolveMode, SoPlex::_lift(), SoPlex::_performFeasIRStable(), SoPlex::_performOptIRStable(), SoPlex::_performUnboundedIRStable(), SolBase< R >::_primalRay, SoPlex::_project(), SoPlex::_realLP, SolBase< R >::_redCost, SoPlex::_restoreBasis(), SoPlex::_restoreLPReal(), SoPlex::_solRational, SoPlex::_solver, SoPlex::_statistics, SoPlex::_status, SoPlex::_storeBasis(), SoPlex::_storedBasis, SoPlex::_storeLPReal(), SoPlex::_transformEquality(), SoPlex::_untransformEquality(), SPxSolver::ABORT_ITER, SPxSolver::ABORT_TIME, SPxSolver::basis(), SoPlex::boolParam(), SoPlex::EQTRANS, SPxSolver::ERROR, DataArray< T >::get_const_ptr(), DataArray< T >::get_ptr(), SPxSolver::getBasis(), SolBase< R >::hasPrimalRay(), SPxSolver::INFEASIBLE, SoPlex::INFTY, SoPlex::intParam(), SoPlex::LIFTING, SPxSolver::loadLP(), MSG_INFO1, MSG_INFO2, SPxBasis::NO_PROBLEM, SoPlex::numColsReal(), SoPlex::numRowsReal(), SoPlex::OBJLIMIT_LOWER, SoPlex::OBJLIMIT_UPPER, SPxSolver::OPTIMAL, SoPlex::Statistics::preprocessingTime, SoPlex::RATIOTESTER, SoPlex::RATIOTESTER_FAST, SoPlex::realParam(), SoPlex::REPRESENTATION, SoPlex::REPRESENTATION_COLUMN, DataArray< T >::reSize(), SPxSolver::setBasis(), SoPlex::setBoolParam(), SoPlex::setIntParam(), SPxSolver::setTerminationValue(), DataArray< T >::size(), SoPlex::SOLVEMODE_RATIONAL, SoPlex::Statistics::solvingTime, soplex::spx_free(), SoPlex::spxout, Timer::start(), SPxBasis::status(), Timer::stop(), SoPlex::TESTDUALINF, and SPxSolver::UNBOUNDED.

Referenced by SoPlex::optimize().

◆ _optimizeReal()

◆ _parseSettingsLine()

◆ _performFeasIRStable()

◆ _performOptIRStable()

void _performOptIRStable ( SolRational sol,
bool  acceptUnbounded,
bool  acceptInfeasible,
int  minRounds,
bool &  primalFeasible,
bool &  dualFeasible,
bool &  infeasible,
bool &  unbounded,
bool &  stopped,
bool &  stoppedIter,
bool &  error 
)
private

solves current problem with iterative refinement and recovery mechanism

Todo:
remove _modObj and use dualScale * sol._redCost directly

Definition at line 353 of file solverational.cpp.

References SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SoPlex::_colTypes, SolBase< R >::_dual, SolBase< R >::_dualFarkas, SoPlex::_ensureDSVectorRationalMemory(), SoPlex::_factorizeColumnRational(), SoPlex::_hasBasis, SolBase< R >::_hasDualFarkas, SolBase< R >::_isDualFeasible, SolBase< R >::_isPrimalFeasible, SoPlex::_isSolveStopped(), SoPlex::_lowerFinite(), SoPlex::_modLhs, SoPlex::_modLower, SoPlex::_modObj, SoPlex::_modRhs, SoPlex::_modUpper, SolBase< R >::_objVal, SolBase< R >::_primal, SoPlex::_primalDualDiff, SoPlex::_rationalFeastol, SoPlex::_rationalLP, SoPlex::_rationalLUSolver, SoPlex::_rationalMaxscaleincr, SoPlex::_rationalNegInfty, SoPlex::_rationalOpttol, SoPlex::_rationalPosInfty, SoPlex::_rationalPosone, SoPlex::_realLP, SoPlex::_reconstructSolutionRational(), SolBase< R >::_redCost, SoPlex::_rowTypes, SoPlex::_slackCols, SolBase< R >::_slacks, SoPlex::_solver, SoPlex::_solveRealStable(), SoPlex::_statistics, SoPlex::_upperFinite(), SPxSolver::ABORT_ITER, SPxSolver::ABORT_TIME, DSVectorBase< R >::add(), SPxLPBase< R >::addDualActivity(), SPxLPBase< R >::addPrimalActivity(), SPxSolver::BASIC, SPxSolver::basis(), SoPlex::boolParam(), SPxSolver::changeLhs(), SPxSolver::changeLower(), SPxSolver::changeObj(), SPxSolver::changeRhs(), SPxSolver::changeRowObj(), SPxSolver::changeUpper(), SLUFactorRational::clear(), SVectorBase< R >::clear(), SPxSolver::clearRowObjs(), LPColSetBase< R >::colVector(), SPxLPBase< R >::computePrimalActivity(), SPxBasis::desc(), SPxBasis::Desc::dump(), SoPlex::EQTRANS, SPxSolver::FIXED, SoPlex::FPFEASTOL, SoPlex::FPOPTTOL, DataArray< T >::get_const_ptr(), SPxLPBase< R >::getObj(), SVectorBase< R >::index(), SPxSolver::INFEASIBLE, SoPlex::INFTY, SoPlex::intParam(), Rational::invert(), SoPlex::Statistics::iterations, SoPlex::lhsRational(), SoPlex::lowerRational(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::maxRowObj(), MSG_DEBUG, MSG_INFO1, MSG_INFO2, MSG_WARNING, SPxBasis::NO_PROBLEM, LPColSetBase< R >::num(), SoPlex::numColsRational(), SoPlex::numRowsRational(), SPxLPBase< R >::obj(), SoPlex::OBJSENSE, SoPlex::OBJSENSE_MAXIMIZE, SoPlex::OBJSENSE_MINIMIZE, SPxSolver::ON_LOWER, SPxSolver::ON_UPPER, SPxSolver::OPTIMAL, SPxSolver::opttol(), SoPlex::Statistics::pivotRefinements, SoPlex::POWERSCALING, Rational::powRound(), SoPlex::RANGETYPE_FIXED, SoPlex::RATFAC, SoPlex::RATFAC_MINSTALLS, SoPlex::RATFACJUMP, SoPlex::Statistics::rationalTime, soplex::rationalToString(), SoPlex::RATREC, SoPlex::RATREC_FREQ, SoPlex::realParam(), DVectorBase< R >::reDim(), SoPlex::Statistics::refinements, SPxBasis::REGULAR, SoPlex::rhsRational(), SPxSolver::setBasis(), SPxSolver::setFeastol(), SPxSolver::setOpttol(), SVectorBase< R >::size(), DataArray< T >::size(), SoPlex::Statistics::solvingTime, soplex::spxAbs(), SoPlex::spxout, SoPlex::Statistics::stallRefinements, Timer::start(), SPxBasis::status(), Timer::stop(), SPxLPBase< R >::subDualActivity(), Timer::time(), SPxSolver::UNBOUNDED, SPxSolver::UNKNOWN, SoPlex::upperRational(), SVectorBase< R >::value(), and SPxSolver::ZERO.

Referenced by SoPlex::_optimizeRational(), SoPlex::_performFeasIRStable(), and SoPlex::_performUnboundedIRStable().

◆ _performUnboundedIRStable()

void _performUnboundedIRStable ( SolRational sol,
bool &  hasUnboundedRay,
bool &  stopped,
bool &  stoppedIter,
bool &  error 
)
private

◆ _preprocessAndSolveReal()

void _preprocessAndSolveReal ( bool  applyPreprocessing)
private

solves real LP with/without preprocessing

Definition at line 187 of file solvereal.cpp.

References SoPlex::_applyPolishing, SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SoPlex::_disableSimplifierAndScaler(), SoPlex::_enableSimplifierAndScaler(), SoPlex::_evaluateSolutionReal(), SoPlex::_hasBasis, SoPlex::_isRealLPLoaded, SoPlex::_isRealLPScaled, SoPlex::_realLP, SoPlex::_scaler, SoPlex::_simplifier, SoPlex::_solver, SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_statistics, SoPlex::boolParam(), SPxLPBase< R >::changeObjOffset(), SoPlex::EPSILON_ZERO, SoPlex::FEASTOL, DataArray< T >::get_const_ptr(), SPxSimplifier::getObjoffset(), SoPlex::intParam(), SPxLPBase< R >::isScaled(), SPxSolver::loadLP(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SoPlex::numColsReal(), SoPlex::numRowsReal(), SoPlex::OBJ_OFFSET, SoPlex::OBJLIMIT_LOWER, SoPlex::OBJLIMIT_UPPER, SoPlex::OBJSENSE, SoPlex::OBJSENSE_MINIMIZE, SPxSimplifier::OKAY, SoPlex::OPTTOL, SPxSolver::POLISH_OFF, SoPlex::Statistics::preprocessingTime, SoPlex::RATIOTESTER, SoPlex::RATIOTESTER_BOUNDFLIPPING, SoPlex::realParam(), SoPlex::REPRESENTATION, SoPlex::REPRESENTATION_AUTO, SoPlex::REPRESENTATION_ROW, SoPlex::REPRESENTATION_SWITCH, SoPlex::ROWBOUNDFLIPS, SPxScaler::scale(), SPxSolver::setBasis(), SPxLPBase< R >::setScalingInfo(), SPxSolver::setSolutionPolishing(), SPxSolver::setTerminationValue(), SPxSimplifier::simplify(), DataArray< T >::size(), soplex::spx_alloc(), soplex::spx_free(), Timer::start(), and Timer::stop().

Referenced by SoPlex::_evaluateSolutionReal(), SoPlex::_optimizeReal(), SoPlex::_resolveWithoutPreprocessing(), SoPlex::_solveDecompositionDualSimplex(), SoPlex::_storeSolutionReal(), SoPlex::_storeSolutionRealFromPresol(), and SoPlex::_verifySolutionReal().

◆ _project()

◆ _rangeToPerm()

void _rangeToPerm ( int  start,
int  end,
int *  perm,
int  permSize 
) const
private

creates a permutation for removing rows/columns from a range of indices

Definition at line 7181 of file soplex.cpp.

Referenced by SoPlex::removeColRangeRational(), SoPlex::removeColRangeReal(), SoPlex::removeRowRangeRational(), and SoPlex::removeRowRangeReal().

◆ _rangeTypeRational()

◆ _rangeTypeReal()

◆ _readFileRational()

◆ _readFileReal()

◆ _reapplyPersistentScaling()

bool _reapplyPersistentScaling ( ) const
private

check whether persistent scaling is supposed to be reapplied again after unscaling

Definition at line 84 of file solvereal.cpp.

References SoPlex::_optimizeCalls, SoPlex::_unscaleCalls, ALLOWED_UNSCALE_PERCENTAGE, and MIN_OPT_CALLS_WITH_SCALING.

Referenced by SoPlex::_optimizeReal().

◆ _recomputeRangeTypesRational()

◆ _recomputeRangeTypesReal()

◆ _reconstructSolutionRational()

bool _reconstructSolutionRational ( SolRational sol,
DataArray< SPxSolver::VarStatus > &  basisStatusRows,
DataArray< SPxSolver::VarStatus > &  basisStatusCols,
const Rational denomBoundSquared 
)
private

◆ _removeColRangeReal()

void _removeColRangeReal ( int  start,
int  end,
int  perm[] 
)
private

removes columns start to end including both; an array perm of size numColsReal() may be passed as buffer memory

◆ _removeColReal()

◆ _removeColsReal() [1/2]

void _removeColsReal ( int  perm[])
private

removes all columns with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where column i has been moved to; note that perm must point to an array of size at least numColsReal()

Definition at line 7869 of file soplex.cpp.

References SoPlex::_basisStatusCols, SoPlex::_hasBasis, SoPlex::_isRealLPLoaded, SoPlex::_rationalLUSolver, SoPlex::_realLP, SoPlex::_solver, SPxSolver::BASIC, SPxSolver::basis(), SLUFactorRational::clear(), SPxBasis::NO_PROBLEM, SoPlex::numColsReal(), SPxLPBase< R >::removeCols(), DataArray< T >::reSize(), and SPxBasis::status().

Referenced by SoPlex::removeColsRational(), and SoPlex::removeColsReal().

◆ _removeColsReal() [2/2]

void _removeColsReal ( int  idx[],
int  n,
int  perm[] 
)
private

remove all columns with indices in array idx of size n; an array perm of size numColsReal() may be passed as buffer memory

◆ _removeComplementaryDualFixedPrimalVars()

◆ _removeRowRangeReal()

void _removeRowRangeReal ( int  start,
int  end,
int  perm[] 
)
private

removes rows start to end including both; an array perm of size numRowsReal() may be passed as buffer memory

◆ _removeRowReal()

◆ _removeRowsReal() [1/2]

void _removeRowsReal ( int  perm[])
private

removes all rows with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the new index where row i has been moved to; note that perm must point to an array of size at least numRowsReal()

Definition at line 7805 of file soplex.cpp.

References SoPlex::_basisStatusRows, SoPlex::_hasBasis, SoPlex::_isRealLPLoaded, SoPlex::_rationalLUSolver, SoPlex::_realLP, SoPlex::_solver, SPxSolver::BASIC, SPxSolver::basis(), SLUFactorRational::clear(), SPxBasis::NO_PROBLEM, SoPlex::numRowsReal(), SPxLPBase< R >::removeRows(), DataArray< T >::reSize(), and SPxBasis::status().

Referenced by SoPlex::removeRowsRational(), and SoPlex::removeRowsReal().

◆ _removeRowsReal() [2/2]

void _removeRowsReal ( int  idx[],
int  n,
int  perm[] 
)
private

remove all rows with indices in array idx of size n; an array perm of size numRowsReal() may be passed as buffer memory

◆ _resolveWithoutPreprocessing()

◆ _restoreBasis()

◆ _restoreLPReal()

◆ _setComplementaryDualOriginalObjective()

◆ _setComplementaryPrimalOriginalObjective()

void _setComplementaryPrimalOriginalObjective ( )
private

◆ _solveDecompositionDualSimplex()

void _solveDecompositionDualSimplex ( )
private

solves LP using the decomposition based dual simplex

solves LP using the decomposition dual simplex

Definition at line 48 of file solvedbds.cpp.

References SoPlex::_checkOriginalProblemOptimality(), SoPlex::_compSlufactor, SoPlex::_compSolver, SoPlex::_createDecompReducedAndComplementaryProblems(), SoPlex::_currentProb, SoPlex::_decompCompProbColIDsIdx, SoPlex::_decompDisplayLine, SoPlex::_decompDualColIDs, SoPlex::_decompDualRowIDs, SoPlex::_decompFeasVector, SoPlex::_decompLP, SoPlex::_decompPrimalColIDs, SoPlex::_decompPrimalRowIDs, SoPlex::_decompReducedProbCols, SoPlex::_decompReducedProbRows, SoPlex::_decompSimplifyAndSolve(), SoPlex::_decompViolatedBounds, SoPlex::_decompViolatedRows, SoPlex::_fixedOrigVars, SoPlex::_formDecompComplementaryProblem(), SoPlex::_formDecompReducedProblem(), SoPlex::_hasBasis, SoPlex::_hasSolReal, SoPlex::_isRealLPLoaded, SoPlex::_lastSolveMode, SoPlex::_nDecompViolBounds, SoPlex::_nDecompViolRows, SoPlex::_nDualCols, SoPlex::_nDualRows, SoPlex::_nPrimalCols, SoPlex::_nPrimalRows, SoPlex::_preprocessAndSolveReal(), SolBase< R >::_primal, SoPlex::_realLP, SoPlex::_setComplementaryDualOriginalObjective(), SoPlex::_setComplementaryPrimalOriginalObjective(), SoPlex::_slufactor, SoPlex::_solReal, SoPlex::_solver, SoPlex::_statistics, SoPlex::_storeSolutionReal(), SoPlex::_updateDecompComplementaryDualProblem(), SoPlex::_updateDecompComplementaryPrimalProblem(), SoPlex::_updateDecompReducedProblem(), SoPlex::_updateDecompReducedProblemViol(), SPxSolver::ABORT_EXDECOMP, SPxSolver::ABORT_ITER, SPxSolver::ABORT_TIME, SPxSolver::ABORT_VALUE, SPxSolver::basis(), SoPlex::boolParam(), SPxLPBase< R >::buildDualProblem(), SoPlex::Statistics::callsReducedProb, SPxSolver::changeObj(), SPxSolver::changeSense(), SoPlex::checkBasisDualFeasibility(), SoPlex::Statistics::compProbStatus, SoPlex::DECOMP_COMP, SoPlex::DECOMP_ITERLIMIT, SoPlex::DECOMP_ORIG, SoPlex::DECOMP_RED, SoPlex::DECOMP_VERBOSITY, SoPlex::decompTerminate(), DEGENCHECK_OFFSET, SPxSolver::DONTFINDSTARTBASIS, SoPlex::EXPLICITVIOL, SoPlex::Statistics::finalCompObj, SPxSolver::FINDSTARTBASIS, soplex::GE(), DataArray< T >::get_ptr(), SPxSolver::getBasis(), SoPlex::getDecompBoundViolation(), SoPlex::getDecompRowViolation(), SPxSolver::getDegeneracyLevel(), SPxSolver::getDual(), SoPlex::getOriginalProblemStatistics(), SPxSolver::getPrimal(), SPxSolver::getRedCost(), SPxOut::getVerbosity(), SPxSolver::INFEASIBLE, SoPlex::intParam(), SoPlex::Statistics::iterations, SPxSolver::iterations(), SPxSolver::LEAVE, SPxSolver::loadLP(), MAX_DEGENCHECK, SPxLPBase< R >::maxObj(), MSG_INFO1, MSG_INFO2, MSG_WARNING, SPxLPBase< R >::nCols(), SPxSolver::NO_PROBLEM, SPxSolver::NOT_INIT, SPxLPBase< R >::nRows(), SoPlex::numColsReal(), SoPlex::numCompProbIter, SoPlex::numDecompIter, SoPlex::numIncludedRows, SoPlex::Statistics::numRedProbCols, SoPlex::numRedProbIter, SoPlex::Statistics::numRedProbRows, SoPlex::numRowsReal(), SoPlex::OBJSENSE, SoPlex::OBJSENSE_MINIMIZE, SPxSolver::objValue(), SPxSolver::OPTIMAL, SoPlex::printDecompDisplayLine(), SPxSolver::printDisplayLine(), SoPlex::realParam(), DVectorBase< R >::reDim(), SoPlex::Statistics::redProbStatus, SPxSolver::rep(), DataArray< T >::reSize(), SPxSolver::ROW, SPxSolver::setDecompIterationLimit(), SPxSolver::setDecompStatus(), SPxSolver::setDegenCompOffset(), SPxOut::setVerbosity(), DataArray< T >::size(), SPxBasis::solve(), SoPlex::SOLVEMODE_REAL, SoPlex::Statistics::solvingTime, soplex::spx_free(), SoPlex::spxout, SPxLPBase< R >::spxSense(), Timer::start(), SPxSolver::status(), Timer::stop(), SoPlex::TIMELIMIT, SPxSolver::type(), SPxSolver::UNBOUNDED, and SoPlex::USECOMPDUAL.

Referenced by SoPlex::optimize().

◆ _solveDecompReducedProblem()

void _solveDecompReducedProblem ( )
private

solves the reduced problem

◆ _solveRealForRational()

SPxSolver::Status _solveRealForRational ( bool  fromscratch,
VectorReal primal,
VectorReal dual,
DataArray< SPxSolver::VarStatus > &  basisStatusRows,
DataArray< SPxSolver::VarStatus > &  basisStatusCols,
bool &  returnedBasis 
)
private

solves real LP during iterative refinement

Todo:
move to private helper methods
Todo:
move to private helper methods
Todo:
catch exception

Definition at line 3079 of file solverational.cpp.

References SoPlex::_disableSimplifierAndScaler(), SoPlex::_enableSimplifierAndScaler(), SoPlex::_hasBasis, SoPlex::_isConsistent(), SoPlex::_rationalLUSolver, SoPlex::_scaler, SoPlex::_simplifier, SoPlex::_solver, SoPlex::_solveRealLPAndRecordStatistics(), SoPlex::_statistics, SPxSolver::ABORT_CYCLING, SPxSolver::ABORT_ITER, SPxSolver::ABORT_TIME, SPxSolver::ABORT_VALUE, SoPlex::ACCEPTCYCLING, SoPlex::boolParam(), SLUFactorRational::clear(), VectorBase< R >::dim(), SPxSimplifier::DUAL_INFEASIBLE, SoPlex::EPSILON_ZERO, SPxSolver::ERROR, SoPlex::FPFEASTOL, SoPlex::FPOPTTOL, DataArray< T >::get_ptr(), SPxSimplifier::getBasis(), SPxSolver::getBasis(), SPxSolver::getDual(), SPxSolver::getDualfarkas(), SPxSolver::getPrimal(), SPxSolver::getRedCost(), SPxSolver::getSlacks(), SPxSimplifier::INFEASIBLE, SPxSolver::INFEASIBLE, SPxSolver::INForUNBD, SoPlex::intParam(), SPxSimplifier::isUnsimplified(), SPxSolver::loadLP(), MSG_INFO1, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SoPlex::numColsRational(), SoPlex::numRowsRational(), SPxSimplifier::OKAY, SPxSolver::OPTIMAL, SoPlex::RATIOTESTER, SoPlex::RATIOTESTER_BOUNDFLIPPING, SoPlex::realParam(), SPxSolver::REGULAR, DataArray< T >::reSize(), SPxSolver::RUNNING, SPxScaler::scale(), SPxSolver::setBasis(), SPxSimplifier::simplify(), SPxSolver::SINGULAR, DataArray< T >::size(), soplex::spx_alloc(), soplex::spx_free(), SoPlex::spxout, Timer::start(), SPxSolver::status(), Timer::stop(), SoPlex::Statistics::syncTime, SPxSimplifier::UNBOUNDED, SPxSolver::UNBOUNDED, SPxSolver::UNKNOWN, SPxScaler::unscaleDual(), SPxScaler::unscalePrimal(), SPxScaler::unscaleRedCost(), SPxScaler::unscaleSlacks(), SPxSimplifier::unsimplifiedDual(), SPxSimplifier::unsimplifiedPrimal(), SPxSimplifier::unsimplify(), and SPxSimplifier::VANISHED.

Referenced by SoPlex::_solveRealStable().

◆ _solveRealLPAndRecordStatistics()

void _solveRealLPAndRecordStatistics ( )
private

call floating-point solver and update statistics on iterations etc.

Definition at line 8019 of file soplex.cpp.

References SoPlex::_hasBasis, SoPlex::_rationalLUSolver, SoPlex::_slufactor, SoPlex::_solver, SoPlex::_statistics, SoPlex::_status, SoPlex::ALGORITHM, SoPlex::ALGORITHM_DUAL, SoPlex::ALGORITHM_PRIMAL, SoPlex::Statistics::boundflips, SPxSolver::boundFlips(), SLUFactorRational::clear(), SPxSolver::COLUMN, SoPlex::Statistics::degenPivotsDual, SoPlex::Statistics::degenPivotsPrimal, SPxSolver::dualDegeneratePivots(), SPxSolver::ENTER, SPxSolver::ERROR, SPxSolver::feastol(), SLUFactor::getFactorCount(), SLUFactor::getFactorTime(), SLUFactor::getSolveCount(), SLUFactor::getSolveTime(), SoPlex::HYPER_PRICING, SoPlex::HYPER_PRICING_AUTO, SoPlex::HYPER_PRICING_OFF, SoPlex::HYPER_PRICING_ON, SPxSolver::hyperPricing(), HYPERPRICINGTHRESHOLD, SoPlex::INFTY, SoPlex::intParam(), SoPlex::Statistics::iterations, SPxSolver::iterations(), SoPlex::Statistics::iterationsFromBasis, SoPlex::Statistics::iterationsPolish, SoPlex::Statistics::iterationsPrimal, SoPlex::ITERLIMIT, SPxSolver::LEAVE, SoPlex::Statistics::luFactorizationsReal, SoPlex::Statistics::luFactorizationTimeReal, SoPlex::Statistics::luSolvesReal, SoPlex::Statistics::luSolveTimeReal, MSG_INFO1, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxSolver::opttol(), SPxSolver::polishIterations(), SPxSolver::primalDegeneratePivots(), SPxSolver::primalIterations(), SoPlex::realParam(), SoPlex::REFAC_BASIS_NNZ, SoPlex::REFAC_MEM_FACTOR, SoPlex::REFAC_UPDATE_FILL, SPxSolver::rep(), SoPlex::REPRESENTATION, SoPlex::REPRESENTATION_AUTO, SoPlex::REPRESENTATION_COLUMN, SoPlex::REPRESENTATION_ROW, SoPlex::REPRESENTATION_SWITCH, SLUFactor::resetCounters(), SPxSolver::ROW, SPxSolver::setFeastol(), SPxSolver::setFillFactor(), SPxSolver::setMemFactor(), SPxSolver::setNonzeroFactor(), SPxSolver::setOpttol(), SPxSolver::setRep(), SPxSolver::setSparsePricingFactor(), SPxSolver::setTerminationIter(), SPxSolver::setTerminationTime(), SPxSolver::setType(), SoPlex::Statistics::simplexTime, SPxSolver::solve(), SoPlex::Statistics::solvingTime, SoPlex::SPARSITY_THRESHOLD, SoPlex::spxout, Timer::start(), Timer::stop(), SoPlex::Statistics::sumDualDegen, SPxSolver::sumDualDegeneracy(), SoPlex::Statistics::sumPrimalDegen, SPxSolver::sumPrimalDegeneracy(), Timer::time(), SoPlex::TIMELIMIT, SPxSolver::type(), and SPxException::what().

Referenced by SoPlex::_preprocessAndSolveReal(), and SoPlex::_solveRealForRational().

◆ _solveRealStable()

◆ _storeBasis()

◆ _storeLPReal()

◆ _storeSolutionReal()

void _storeSolutionReal ( bool  verify = true)
private

stores solution of the real LP; before calling this, the real LP must be loaded in the solver and solved (again)

stores solution data from the solver, possibly after applying unscaling and unsimplifying

Definition at line 412 of file solvereal.cpp.

References SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SolBase< R >::_dual, SolBase< R >::_dualFarkas, SoPlex::_hasBasis, SolBase< R >::_hasDualFarkas, SolBase< R >::_hasPrimalRay, SoPlex::_hasSolReal, SolBase< R >::_isDualFeasible, SolBase< R >::_isPrimalFeasible, SoPlex::_isRealLPLoaded, SoPlex::_isRealLPScaled, SoPlex::_loadRealLP(), SolBase< R >::_objVal, SoPlex::_preprocessAndSolveReal(), SolBase< R >::_primal, SolBase< R >::_primalRay, SoPlex::_realLP, SolBase< R >::_redCost, SoPlex::_scaler, SoPlex::_simplifier, SolBase< R >::_slacks, SoPlex::_solReal, SoPlex::_solver, SoPlex::_unscaleSolutionReal(), SoPlex::_verifySolutionReal(), SPxSolver::basis(), SPxBasis::DUAL, SoPlex::EPSILON_ZERO, SPxSolver::ERROR, SPxSolver::forceRecompNonbasicValue(), DataArray< T >::get_const_ptr(), DataArray< T >::get_ptr(), SPxSimplifier::getBasis(), SPxSolver::getBasis(), SPxSolver::getDual(), SPxSolver::getDualfarkas(), SPxSolver::getPrimal(), SPxSolver::getPrimalray(), SPxSolver::getRedCost(), SPxSolver::getSlacks(), SPxBasis::INFEASIBLE, SPxSolver::INFEASIBLE, SPxLPBase< R >::isScaled(), SPxSimplifier::isUnsimplified(), MSG_INFO1, SPxLPBase< R >::nCols(), SPxSolver::NO_PRICER, SPxBasis::NO_PROBLEM, SPxSolver::NO_PROBLEM, SPxSolver::NO_RATIOTESTER, SPxSolver::NO_SOLVER, SPxSolver::NOT_INIT, SPxLPBase< R >::nRows(), SoPlex::numColsReal(), SoPlex::numRowsReal(), SPxSolver::objValue(), SPxSimplifier::OKAY, SPxSolver::OPTIMAL, SPxBasis::PRIMAL, SoPlex::realParam(), DVectorBase< R >::reDim(), SPxBasis::REGULAR, DataArray< T >::reSize(), SPxSimplifier::result(), SPxSolver::setBasis(), SPxSolver::setBasisStatus(), SPxSolver::shift(), SPxSolver::SINGULAR, DataArray< T >::size(), SoPlex::spxout, SPxBasis::status(), SoPlex::status(), SPxBasis::UNBOUNDED, SPxSolver::UNBOUNDED, SPxSimplifier::unsimplifiedDual(), SPxSimplifier::unsimplifiedPrimal(), SPxSimplifier::unsimplifiedRedCost(), SPxSimplifier::unsimplifiedSlacks(), SPxSimplifier::unsimplify(), and SPxException::what().

Referenced by SoPlex::_evaluateSolutionReal(), and SoPlex::_solveDecompositionDualSimplex().

◆ _storeSolutionRealFromPresol()

◆ _switchRangeType()

SoPlex::RangeType _switchRangeType ( const RangeType rangeType) const
private

switches RANGETYPE_LOWER to RANGETYPE_UPPER and vice versa

Definition at line 7284 of file soplex.cpp.

References SoPlex::RANGETYPE_LOWER, and SoPlex::RANGETYPE_UPPER.

Referenced by SoPlex::_transformEquality(), and SoPlex::_untransformEquality().

◆ _syncLPRational()

◆ _syncLPReal()

void _syncLPReal ( bool  time = true)
private

synchronizes real LP with rational LP, i.e., copies (rounded) rational LP into real LP, without looking at the sync mode

Todo:
try loading old basis

Definition at line 8251 of file soplex.cpp.

References SoPlex::_hasBasis, SoPlex::_isRealLPLoaded, SoPlex::_rationalLP, SoPlex::_rationalLUSolver, SoPlex::_realLP, SoPlex::_solver, SoPlex::_statistics, SLUFactorRational::clear(), SPxSolver::loadLP(), Timer::start(), Timer::stop(), and SoPlex::Statistics::syncTime.

Referenced by SoPlex::_readFileRational(), and SoPlex::syncLPReal().

◆ _syncRationalSolution()

◆ _syncRealSolution()

◆ _transformEquality()

◆ _transformFeasibility()

void _transformFeasibility ( )
private

transforms LP to feasibility problem by removing the objective function, shifting variables, and homogenizing the right-hand side

Todo:
exploit this case by returning without LP solving

Definition at line 2391 of file solverational.cpp.

References SoPlex::_basisStatusCols, SoPlex::_colTypes, SoPlex::_feasLhs, SoPlex::_feasLower, SoPlex::_feasObj, SoPlex::_feasRhs, SoPlex::_feasUpper, SoPlex::_hasBasis, SoPlex::_lowerFinite(), SoPlex::_rationalLP, SoPlex::_rationalLUSolver, SoPlex::_rationalNegInfty, SoPlex::_rationalNegone, SoPlex::_rationalPosInfty, SoPlex::_rationalPosone, SoPlex::_realLP, SoPlex::_rowTypes, SoPlex::_statistics, SoPlex::_tauColVector, SoPlex::_upperFinite(), DSVectorBase< R >::add(), SPxLPBase< R >::addCol(), DataArray< T >::append(), SPxLPBase< R >::changeBounds(), SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::changeRange(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeUpper(), SLUFactorRational::clear(), SVectorBase< R >::clear(), SoPlex::colVectorRational(), SVectorBase< R >::index(), SoPlex::INFTY, SoPlex::intParam(), SPxLPBase< R >::lhs(), SoPlex::lhsRational(), SPxLPBase< R >::lower(), SoPlex::lowerRational(), SoPlex::lowerReal(), SPxLPBase< R >::maxObj(), MSG_DEBUG, MSG_INFO1, MSG_INFO3, SoPlex::numColsRational(), SoPlex::numRowsRational(), SoPlex::OBJSENSE, SoPlex::OBJSENSE_MAXIMIZE, SPxSolver::ON_UPPER, SoPlex::RANGETYPE_BOXED, SoPlex::realParam(), DVectorBase< R >::reDim(), SPxLPBase< R >::rhs(), SoPlex::rhsRational(), SoPlex::rhsReal(), SVectorBase< R >::size(), SoPlex::spxout, Timer::start(), Timer::stop(), SoPlex::Statistics::transformTime, SPxLPBase< R >::upper(), SoPlex::upperRational(), SoPlex::upperReal(), SVectorBase< R >::value(), and SPxLPBase< R >::writeFile().

Referenced by SoPlex::_performFeasIRStable().

◆ _transformUnbounded()

void _transformUnbounded ( )
private

transforms LP to unboundedness problem by moving the objective function to the constraints, changing right-hand side and bounds to zero, and adding an auxiliary variable for the decrease in the objective function

Todo:
implement this without copying the objective function

Definition at line 2117 of file solverational.cpp.

References SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SoPlex::_colTypes, SoPlex::_hasBasis, SoPlex::_lowerFinite(), SoPlex::_rationalLP, SoPlex::_rationalLUSolver, SoPlex::_rationalNegInfty, SoPlex::_rationalPosInfty, SoPlex::_realLP, SoPlex::_rowTypes, SoPlex::_statistics, SoPlex::_unboundedLhs, SoPlex::_unboundedLower, SoPlex::_unboundedRhs, SoPlex::_unboundedUpper, SoPlex::_upperFinite(), DSVectorBase< R >::add(), SPxLPBase< R >::addRow(), DataArray< T >::append(), SPxSolver::BASIC, SPxLPBase< R >::changeBounds(), SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::changeObj(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeUpper(), SLUFactorRational::clear(), SoPlex::INFTY, SPxLPBase< R >::lhs(), SoPlex::lhsRational(), SPxLPBase< R >::lower(), SoPlex::lowerRational(), SPxLPBase< R >::maxObj(), MSG_DEBUG, MSG_INFO1, SoPlex::numColsRational(), SoPlex::numRowsRational(), SPxSolver::ON_UPPER, SoPlex::RANGETYPE_FIXED, SoPlex::RANGETYPE_UPPER, SoPlex::realParam(), DVectorBase< R >::reDim(), SPxLPBase< R >::rhs(), SoPlex::rhsRational(), SoPlex::spxout, Timer::start(), Timer::stop(), SoPlex::Statistics::transformTime, SPxLPBase< R >::upper(), SoPlex::upperRational(), and SPxLPBase< R >::writeFile().

Referenced by SoPlex::_performUnboundedIRStable().

◆ _unitVectorRational()

const UnitVectorRational * _unitVectorRational ( const int  i)
private

returns pointer to a constant unit vector available until destruction of the SoPlex class

Definition at line 8318 of file soplex.cpp.

References SoPlex::_unitMatrixRational, and soplex::spx_alloc().

Referenced by SoPlex::_computeBasisInverseRational(), SoPlex::_transformEquality(), SoPlex::getBasisInverseColRational(), and SoPlex::getBasisInverseRowRational().

◆ _unscaleSolutionReal()

◆ _untransformEquality()

◆ _untransformFeasibility()

void _untransformFeasibility ( SolRational sol,
bool  infeasible 
)
private

undoes transformation to feasibility problem

Definition at line 2657 of file solverational.cpp.

References SoPlex::_basisStatusCols, SoPlex::_colTypes, SolBase< R >::_dual, SolBase< R >::_dualFarkas, SoPlex::_feasLhs, SoPlex::_feasLower, SoPlex::_feasObj, SoPlex::_feasRhs, SoPlex::_feasUpper, SoPlex::_hasBasis, SolBase< R >::_hasDualFarkas, SolBase< R >::_hasPrimalRay, SolBase< R >::_isDualFeasible, SolBase< R >::_isPrimalFeasible, SoPlex::_lowerFinite(), SolBase< R >::_primal, SoPlex::_rationalLP, SoPlex::_rationalLUSolver, SoPlex::_rationalNegInfty, SoPlex::_rationalPosInfty, SoPlex::_realLP, SoPlex::_rowTypes, SolBase< R >::_slacks, SoPlex::_statistics, SoPlex::_upperFinite(), SPxSolver::BASIC, SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeUpper(), SLUFactorRational::clear(), SPxLPBase< R >::colVector(), SPxLPBase< R >::computePrimalActivity(), SoPlex::INFTY, SPxLPBase< R >::lhs(), SoPlex::lhsRational(), SoPlex::lhsReal(), SPxLPBase< R >::lower(), SoPlex::lowerRational(), SoPlex::lowerReal(), MSG_DEBUG, VectorBase< R >::multAdd(), SoPlex::numColsRational(), SoPlex::numRowsRational(), SoPlex::realParam(), DVectorBase< R >::reDim(), SPxLPBase< R >::removeCol(), DataArray< T >::reSize(), SPxLPBase< R >::rhs(), SoPlex::rhsRational(), SoPlex::rhsReal(), Timer::start(), Timer::stop(), SoPlex::Statistics::transformTime, SPxLPBase< R >::upper(), SoPlex::upperRational(), SoPlex::upperReal(), and SPxLPBase< R >::writeFile().

Referenced by SoPlex::_performFeasIRStable().

◆ _untransformUnbounded()

void _untransformUnbounded ( SolRational sol,
bool  unbounded 
)
private

undoes transformation to unboundedness problem

Definition at line 2234 of file solverational.cpp.

References SoPlex::_basisStatusCols, SoPlex::_basisStatusRows, SoPlex::_colTypes, SolBase< R >::_dual, SoPlex::_hasBasis, SolBase< R >::_hasDualFarkas, SolBase< R >::_hasPrimalRay, SolBase< R >::_isDualFeasible, SolBase< R >::_isPrimalFeasible, SoPlex::_lowerFinite(), SolBase< R >::_primal, SolBase< R >::_primalRay, SoPlex::_rationalFeastol, SoPlex::_rationalLP, SoPlex::_rationalLUSolver, SoPlex::_rationalNegInfty, SoPlex::_rationalPosInfty, SoPlex::_rationalPosone, SoPlex::_realLP, SolBase< R >::_redCost, SoPlex::_rowTypes, SoPlex::_statistics, SoPlex::_unboundedLhs, SoPlex::_unboundedLower, SoPlex::_unboundedRhs, SoPlex::_unboundedUpper, SoPlex::_upperFinite(), SPxSolver::BASIC, SoPlex::boolParam(), SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeUpper(), SLUFactorRational::clear(), SVectorBase< R >::index(), SoPlex::INFTY, SolBase< R >::invalidate(), SoPlex::lhsRational(), SoPlex::lhsReal(), SoPlex::lowerRational(), SoPlex::lowerReal(), MSG_DEBUG, SoPlex::numColsRational(), SoPlex::numRowsRational(), SoPlex::realParam(), DVectorBase< R >::reDim(), SPxLPBase< R >::removeCol(), SPxLPBase< R >::removeRow(), DataArray< T >::reSize(), SoPlex::rhsRational(), SoPlex::rhsReal(), SPxLPBase< R >::rowVector(), SVectorBase< R >::size(), Timer::start(), Timer::stop(), SoPlex::TESTDUALINF, SoPlex::Statistics::transformTime, SoPlex::upperRational(), SoPlex::upperReal(), SVectorBase< R >::value(), and SPxLPBase< R >::writeFile().

Referenced by SoPlex::_performUnboundedIRStable().

◆ _updateComplementaryDualFixedPrimalVars()

◆ _updateComplementaryDualSlackColCoeff()

◆ _updateComplementaryPrimalFixedPrimalVars()

void _updateComplementaryPrimalFixedPrimalVars ( int *  currFixedVars)
private

◆ _updateComplementaryPrimalSlackColCoeff()

void _updateComplementaryPrimalSlackColCoeff ( )
private

updating the slack column coefficients to adjust for equality constraints

◆ _updateDecompComplementaryDualProblem()

void _updateDecompComplementaryDualProblem ( bool  origObj)
private

update the dual complementary problem with additional columns and rows

Definition at line 2070 of file solvedbds.cpp.

References SoPlex::_compSlackDualRowId, SoPlex::_compSolver, SoPlex::_decompCompProbColIDsIdx, SoPlex::_decompDualColIDs, SoPlex::_decompDualRowIDs, SoPlex::_decompElimPrimalRowIDs, SoPlex::_decompPrimalColIDs, SoPlex::_decompPrimalRowIDs, SoPlex::_decompReducedProbColIDs, SoPlex::_decompReducedProbRowIDs, SoPlex::_decompReducedProbRows, SoPlex::_fixedOrigVars, SoPlex::_identifyComplementaryDualFixedPrimalVars(), SoPlex::_nDualCols, SoPlex::_nDualRows, SoPlex::_nElimPrimalRows, SoPlex::_nPrimalCols, SoPlex::_nPrimalRows, SoPlex::_realLP, SoPlex::_removeComplementaryDualFixedPrimalVars(), SoPlex::_solver, SoPlex::_updateComplementaryDualFixedPrimalVars(), DSVectorBase< R >::add(), LPColSetBase< R >::add(), SPxLPBase< R >::addCols(), SPxLPBase< R >::addRows(), SPxSolver::basis(), SPxSolver::changeBounds(), SPxSolver::changeObj(), SPxSolver::changeRow(), SPxLPBase< R >::cId(), SPxSolver::colId(), SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::desc(), SoPlex::FEASTOL, SPxLPBase< R >::getRow(), soplex::GT(), soplex::infinity, soplex::LE(), SPxLPBase< R >::lhs(), soplex::LT(), SPxLPBase< R >::maxObj(), MSG_INFO2, SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::number(), SPxLPBase< R >::obj(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::pVec(), SoPlex::realParam(), SPxLPBase< R >::removeCols(), SPxLPBase< R >::rhs(), SPxBasis::Desc::rowStatus(), SPxLPBase< R >::rowType(), LPRowBase< R >::rowVector(), SLACKCOEFF, soplex::spx_alloc(), soplex::spx_free(), and SoPlex::spxout.

Referenced by SoPlex::_formDecompComplementaryProblem(), and SoPlex::_solveDecompositionDualSimplex().

◆ _updateDecompComplementaryPrimalProblem()

void _updateDecompComplementaryPrimalProblem ( bool  origObj)
private

◆ _updateDecompReducedProblem()

void _updateDecompReducedProblem ( Real  objVal,
DVector  dualVector,
DVector  redcostVector,
DVector  compPrimalVector,
DVector  compDualVector 
)
private

◆ _updateDecompReducedProblemViol()

◆ _upperFinite()

◆ _verifySolutionReal()

◆ _writeOriginalProblemBasis()

void _writeOriginalProblemBasis ( const char *  filename,
NameSet rowNames,
NameSet colNames,
bool  cpxFormat 
)
private

◆ addColRational()

◆ addColReal()

◆ addColsRational()

◆ addColsReal()

◆ addRowRational()

◆ addRowReal()

◆ addRowsRational()

◆ addRowsReal()

◆ areLPsInSync()

bool areLPsInSync ( const bool  checkVecVals = true,
const bool  checkMatVals = false,
const bool  quiet = false 
) const

checks if real LP and rational LP are in sync; dimensions will always be compared, vector and matrix values only if the respective parameter is set to true. If quiet is set to true the function will only display which vectors are different.

Definition at line 6875 of file soplex.cpp.

References SoPlex::_rationalLP, SoPlex::_rationalNegInfty, SoPlex::_rationalPosInfty, SoPlex::_realLP, SPxLPBase< R >::colVector(), soplex::GE(), soplex::GT(), SoPlex::INFTY, soplex::LE(), SPxLPBase< R >::lhs(), SPxLPBase< R >::lower(), soplex::LT(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::MINIMIZE, SPxLPBase< Real >::MINIMIZE, MSG_INFO1, SPxLPBase< R >::nCols(), SPxLPBase< R >::nNzos(), SPxLPBase< R >::nRows(), SoPlex::realParam(), SPxLPBase< R >::rhs(), SoPlex::spxout, SPxLPBase< R >::spxSense(), and SPxLPBase< R >::upper().

Referenced by SoPlex::optimize().

◆ basisColStatus()

◆ basisRowStatus()

◆ basisStatus()

◆ boolParam()

◆ changeBoundsRational() [1/2]

◆ changeBoundsRational() [2/2]

◆ changeBoundsReal() [1/2]

◆ changeBoundsReal() [2/2]

void changeBoundsReal ( int  i,
const Real lower,
const Real upper 
)

◆ changeColRational()

◆ changeColReal()

◆ changeElementRational()

void changeElementRational ( int  i,
int  j,
const Rational val 
)

◆ changeElementReal()

void changeElementReal ( int  i,
int  j,
const Real val 
)

◆ changeLhsRational() [1/2]

◆ changeLhsRational() [2/2]

◆ changeLhsReal() [1/2]

◆ changeLhsReal() [2/2]

◆ changeLowerRational() [1/2]

◆ changeLowerRational() [2/2]

◆ changeLowerReal() [1/2]

◆ changeLowerReal() [2/2]

◆ changeObjRational() [1/2]

void changeObjRational ( const VectorRational obj)

◆ changeObjRational() [2/2]

void changeObjRational ( int  i,
const Rational obj 
)

◆ changeObjReal() [1/2]

void changeObjReal ( const VectorReal obj)

◆ changeObjReal() [2/2]

void changeObjReal ( int  i,
const Real obj 
)

◆ changeRangeRational() [1/2]

◆ changeRangeRational() [2/2]

◆ changeRangeReal() [1/2]

◆ changeRangeReal() [2/2]

void changeRangeReal ( int  i,
const Real lhs,
const Real rhs 
)

◆ changeRhsRational() [1/2]

◆ changeRhsRational() [2/2]

◆ changeRhsReal() [1/2]

◆ changeRhsReal() [2/2]

◆ changeRowRational()

◆ changeRowReal()

◆ changeUpperRational() [1/2]

◆ changeUpperRational() [2/2]

◆ changeUpperReal() [1/2]

◆ changeUpperReal() [2/2]

◆ checkBasisDualFeasibility()

◆ clearBasis()

◆ clearLPRational()

◆ clearLPReal()

◆ coefReal()

Real coefReal ( int  row,
int  col 
) const

returns (unscaled) coefficient

Definition at line 838 of file soplex.cpp.

References SoPlex::_realLP, SoPlex::_scaler, SoPlex::colVectorRealInternal(), SPxScaler::getCoefUnscaled(), and SPxLPBase< R >::isScaled().

◆ colVectorRational()

const SVectorRational & colVectorRational ( int  i) const

◆ colVectorRealInternal()

const SVectorReal & colVectorRealInternal ( int  i) const

returns vector of col i, ignoring scaling

Definition at line 941 of file soplex.cpp.

References SoPlex::_realLP, and SPxLPBase< R >::colVector().

Referenced by SoPlex::coefReal().

◆ computeBasisInverseRational()

◆ decompTerminate()

◆ dlcmSizeDualRational()

int dlcmSizeDualRational ( const int  base = 2)

get size of least common multiple of denominators in dual solution

Definition at line 3802 of file soplex.cpp.

References SoPlex::_solRational, SoPlex::_syncRationalSolution(), SolBase< R >::dlcmSizeDual(), SoPlex::hasDual(), and SoPlex::hasDualFarkas().

Referenced by SoPlex::printSolutionStatistics(), and SoPlex::solve().

◆ dlcmSizePrimalRational()

int dlcmSizePrimalRational ( const int  base = 2)

get size of least common multiple of denominators in primal solution

Definition at line 3788 of file soplex.cpp.

References SoPlex::_solRational, SoPlex::_syncRationalSolution(), SolBase< R >::dlcmSizePrimal(), SoPlex::hasPrimal(), and SoPlex::hasPrimalRay().

Referenced by SoPlex::printSolutionStatistics(), and SoPlex::solve().

◆ dmaxSizeDualRational()

int dmaxSizeDualRational ( const int  base = 2)

get size of largest denominator in dual solution

Definition at line 3830 of file soplex.cpp.

References SoPlex::_solRational, SoPlex::_syncRationalSolution(), SolBase< R >::dmaxSizeDual(), SoPlex::hasDual(), and SoPlex::hasDualFarkas().

Referenced by SoPlex::printSolutionStatistics(), and SoPlex::solve().

◆ dmaxSizePrimalRational()

int dmaxSizePrimalRational ( const int  base = 2)

get size of largest denominator in primal solution

Definition at line 3816 of file soplex.cpp.

References SoPlex::_solRational, SoPlex::_syncRationalSolution(), SolBase< R >::dmaxSizePrimal(), SoPlex::hasPrimal(), and SoPlex::hasPrimalRay().

Referenced by SoPlex::printSolutionStatistics(), and SoPlex::solve().

◆ getBasis()

◆ getBasisInd()

void getBasisInd ( int *  bind) const

◆ getBasisIndRational()

bool getBasisIndRational ( DataArray< int > &  bind)

gets an array of indices for the columns of the rational basis matrix; bind[i] >= 0 means that the i-th column of the basis matrix contains variable bind[i]; bind[i] < 0 means that the i-th column of the basis matrix contains the slack variable for row -bind[i]-1; performs rational factorization if not available; returns true on success

Definition at line 4902 of file soplex.cpp.

References SoPlex::_rationalLUSolver, SoPlex::_rationalLUSolverBind, SoPlex::computeBasisInverseRational(), SoPlex::numRowsRational(), SLinSolverRational::OK, DataArray< T >::size(), and SLUFactorRational::status().

Referenced by SoPlex::solve().

◆ getBasisInverseColRational()

bool getBasisInverseColRational ( const int  c,
SSVectorRational vec 
)

◆ getBasisInverseColReal()

bool getBasisInverseColReal ( int  c,
Real coef,
int *  inds = NULL,
int *  ninds = NULL,
bool  unscale = true 
)

computes column c of basis inverse; returns true on success

computes column c of basis inverse; returns true on success

Parameters
cwhich column of the basis inverse is computed
coefvalues of result vector (not packed but scattered)
indsindices of result vector (NULL if not to be used)
nindsnumber of nonzeros in result vector
unscaledetermines whether the result should be unscaled according to the original LP data
Todo:
does not work correctly for the row representation

Definition at line 4286 of file soplex.cpp.

References SoPlex::_ensureRealLPLoaded(), SoPlex::_isRealLPLoaded, SoPlex::_scaler, SoPlex::_solver, SPxBasis::baseId(), SPxSolver::basis(), SPxSolver::COLUMN, SPxBasis::coSolve(), SoPlex::getBasisInd(), SPxScaler::getColScaleExp(), SPxScaler::getRowScaleExp(), SoPlex::hasBasis(), SSVectorBase< R >::index(), SPxSolver::isColBasic(), SPxSolver::isRowBasic(), SPxLPBase< R >::isScaled(), MSG_INFO1, SPxLPBase< R >::number(), SoPlex::numColsReal(), SoPlex::numRowsReal(), SPxSolver::rep(), SPxSolver::ROW, SPxLPBase< R >::rowVector(), SSVectorBase< R >::scaleValue(), SSVectorBase< R >::setup(), SSVectorBase< R >::setValue(), SSVectorBase< R >::size(), SPxBasis::solve(), soplex::spx_alloc(), soplex::spx_free(), soplex::spxLdexp(), SoPlex::spxout, SPxSolver::unitVector(), SSVectorBase< R >::value(), and SPxException::what().

Referenced by SoPlex::_checkBasisScaling(), and SoPlex::solve().

◆ getBasisInverseRowRational()

bool getBasisInverseRowRational ( const int  r,
SSVectorRational vec 
)

◆ getBasisInverseRowReal()

bool getBasisInverseRowReal ( int  r,
Real coef,
int *  inds = NULL,
int *  ninds = NULL,
bool  unscale = true 
)

computes row r of basis inverse; returns true on success

computes row r of basis inverse; returns true on success

Parameters
rwhich row of the basis inverse is computed
coefvalues of result vector (not packed but scattered)
indsindices of result vector (NULL if not to be used)
nindsnumber of nonzeros in result vector
unscaledetermines whether the result should be unscaled according to the original LP data

Definition at line 4100 of file soplex.cpp.

References SoPlex::_ensureRealLPLoaded(), SoPlex::_isRealLPLoaded, SoPlex::_scaler, SoPlex::_solver, SPxBasis::baseId(), SPxSolver::basis(), SPxSolver::COLUMN, SPxBasis::coSolve(), SoPlex::getBasisInd(), SPxScaler::getColScaleExp(), SPxScaler::getRowScaleExp(), SoPlex::hasBasis(), SSVectorBase< R >::index(), SPxSolver::isColBasic(), SPxSolver::isRowBasic(), SPxLPBase< R >::isScaled(), SPxId::isSPxColId(), MSG_INFO1, SPxLPBase< R >::number(), SoPlex::numColsReal(), SoPlex::numRowsReal(), SPxSolver::rep(), SPxSolver::ROW, SPxLPBase< R >::rowVector(), SSVectorBase< R >::scaleValue(), SSVectorBase< R >::setup(), SSVectorBase< R >::size(), SPxBasis::solve(), soplex::spx_alloc(), soplex::spx_free(), soplex::spxLdexp(), SoPlex::spxout, SPxSolver::unitVector(), SVectorBase< R >::value(), and SPxException::what().

Referenced by SoPlex::_checkBasisScaling(), and SoPlex::solve().

◆ getBasisInverseTimesVecRational()

bool getBasisInverseTimesVecRational ( const SVectorRational rhs,
SSVectorRational sol 
)

computes solution of basis matrix B * sol = rhs; performs rational factorization if not available; returns true on success

Definition at line 4967 of file soplex.cpp.

References SoPlex::_rationalLUSolver, SoPlex::computeBasisInverseRational(), MSG_INFO1, SoPlex::numRowsRational(), SLinSolverRational::OK, SSVectorBase< R >::reDim(), SLUFactorRational::solveRight(), SoPlex::spxout, SLUFactorRational::status(), and SPxException::what().

Referenced by SoPlex::solve().

◆ getBasisInverseTimesVecReal()

◆ getBoundViolationRational()

◆ getBoundViolationReal()

◆ getColRational()

void getColRational ( int  i,
LPColRational lpcol 
) const

gets column i

Definition at line 1202 of file soplex.cpp.

References SoPlex::_rationalLP, and SPxLPBase< R >::getCol().

◆ getColsRational()

void getColsRational ( int  start,
int  end,
LPColSetRational lpcolset 
) const

gets columns start, ..., end

Definition at line 1211 of file soplex.cpp.

References SoPlex::_rationalLP, and SPxLPBase< R >::getCols().

◆ getColVectorReal()

void getColVectorReal ( int  i,
DSVectorReal col 
) const

gets vector of col i

Definition at line 950 of file soplex.cpp.

References SoPlex::_realLP, and SPxLPBase< R >::getColVectorUnscaled().

◆ getCompSlackVarCoeff()

Real getCompSlackVarCoeff ( int  primalRowNum)
private

gets the coefficient of the slack variable in the primal complementary problem

Definition at line 3556 of file solvedbds.cpp.

References SoPlex::_compSolver, SoPlex::_decompDualColIDs, SoPlex::_decompPrimalRowIDs, SoPlex::_realLP, SPxLPBase< R >::number(), SPxLPBase< R >::obj(), SPxLPBase< R >::rowType(), and SLACKCOEFF.

Referenced by SoPlex::_findViolatedRows().

◆ getDecompBoundViolation()

◆ getDecompRowViolation()

◆ getDualFarkasRational()

bool getDualFarkasRational ( VectorRational vector)

◆ getDualFarkasReal()

bool getDualFarkasReal ( VectorReal vector)

gets the Farkas proof if available; returns true on success

Definition at line 3044 of file soplex.cpp.

References SoPlex::_solReal, SoPlex::_syncRealSolution(), VectorBase< R >::dim(), SolBase< R >::getDualFarkas(), SoPlex::hasDualFarkas(), and SoPlex::numRowsReal().

Referenced by main(), and SoPlex::solve().

◆ getDualNorms()

bool getDualNorms ( int &  nnormsRow,
int &  nnormsCol,
Real norms 
) const

gets steepest edge norms and returns false if they are not available

Definition at line 1060 of file soplex.cpp.

References SoPlex::_solver, and SPxSolver::getDualNorms().

◆ getDualRational()

bool getDualRational ( VectorRational vector)

gets the dual solution vector if available; returns true on success

Definition at line 3324 of file soplex.cpp.

References SoPlex::_rationalLP, SoPlex::_solRational, SoPlex::_syncRationalSolution(), VectorBase< R >::dim(), SolBase< R >::getDual(), SoPlex::hasDual(), and SoPlex::numRowsRational().

Referenced by SoPlex::getDualViolationRational(), main(), and SoPlex::solve().

◆ getDualReal()

bool getDualReal ( VectorReal vector)

gets the dual solution vector if available; returns true on success

Definition at line 3014 of file soplex.cpp.

References SoPlex::_solReal, SoPlex::_syncRealSolution(), VectorBase< R >::dim(), SolBase< R >::getDual(), SoPlex::hasDual(), and SoPlex::numRowsReal().

Referenced by main(), and SoPlex::solve().

◆ getDualViolationRational()