Saving LPs in a form suitable for SoPlex. More...
#include <spxlpbase.h>
Public Types | |
Types | |
enum | SPxSense { MAXIMIZE = 1 , MINIMIZE = -1 } |
Optimization sense. More... | |
Public Member Functions | |
void | setOutstream (SPxOut &newOutstream) |
void | unscaleLP () |
unscales the lp and clears basis More... | |
Inquiry | |
const std::shared_ptr< Tolerances > | tolerances () const |
returns current tolerances More... | |
virtual void | setTolerances (std::shared_ptr< Tolerances > tolerances) |
set tolerances More... | |
bool | isScaled () const |
Returns true if and only if the LP is scaled. More... | |
void | setScalingInfo (bool scaled) |
set whether the LP is scaled or not More... | |
int | nRows () const |
Returns number of rows in LP. More... | |
int | nCols () const |
Returns number of columns in LP. More... | |
int | nNzos () const |
Returns number of nonzeros in LP. More... | |
virtual R | minAbsNzo (bool unscaled=true) const |
Absolute smallest non-zero element in (possibly scaled) LP. More... | |
virtual R | maxAbsNzo (bool unscaled=true) const |
Absolute biggest non-zero element in (in rational case possibly scaled) LP. More... | |
void | getRow (int i, LPRowBase< R > &row) const |
Gets i 'th row. More... | |
void | getRow (const SPxRowId &id, LPRowBase< R > &row) const |
Gets row with identifier id . More... | |
void | getRows (int start, int end, LPRowSetBase< R > &set) const |
Gets rows start , ... end . More... | |
const SVectorBase< R > & | rowVector (int i) const |
Gets row vector of row i . More... | |
const SVectorBase< R > & | rowVector (const SPxRowId &id) const |
Gets row vector of row with identifier id . More... | |
void | getRowVectorUnscaled (int i, DSVectorBase< R > &vec) const |
Gets unscaled row vector of row i . More... | |
const VectorBase< R > & | rhs () const |
Returns right hand side vector. More... | |
const R & | rhs (int i) const |
Returns right hand side of row number i . More... | |
const R & | rhs (const SPxRowId &id) const |
Returns right hand side of row with identifier id . More... | |
void | getRhs (VectorBase< R > &vec) const |
Gets (internal and possibly scaled) right hand side vector. More... | |
void | getRhsUnscaled (VectorBase< R > &vec) const |
Gets unscaled right hand side vector. More... | |
R | rhsUnscaled (int i) const |
Returns unscaled right hand side of row number i . More... | |
R | rhsUnscaled (const SPxRowId &id) const |
Returns unscaled right hand side of row with identifier id . More... | |
const VectorBase< R > & | lhs () const |
Returns left hand side vector. More... | |
const R & | lhs (int i) const |
Returns left hand side of row number i . More... | |
const R & | lhs (const SPxRowId &id) const |
Returns left hand side of row with identifier id . More... | |
void | getRowObj (VectorBase< R > &prowobj) const |
Gets row objective function vector. More... | |
R | rowObj (int i) const |
R | rowObj (const SPxRowId &id) const |
Returns row objective function value of row with identifier id . More... | |
const VectorBase< R > & | maxRowObj () const |
const R & | maxRowObj (int i) const |
const R & | maxRowObj (const SPxRowId &id) const |
Returns row objective function value of row with identifier id . More... | |
void | getLhsUnscaled (VectorBase< R > &vec) const |
Returns unscaled left hand side vector. More... | |
R | lhsUnscaled (int i) const |
Returns unscaled left hand side of row number i . More... | |
R | lhsUnscaled (const SPxRowId &id) const |
Returns left hand side of row with identifier id . More... | |
LPRowBase< R >::Type | rowType (int i) const |
Returns the inequality type of the i'th LPRow. More... | |
LPRowBase< R >::Type | rowType (const SPxRowId &id) const |
Returns the inequality type of the row with identifier key . More... | |
void | getCol (int i, LPColBase< R > &col) const |
Gets i 'th column. More... | |
void | getCol (const SPxColId &id, LPColBase< R > &col) const |
Gets column with identifier id . More... | |
void | getCols (int start, int end, LPColSetBase< R > &set) const |
Gets columns start , ..., end . More... | |
const SVectorBase< R > & | colVector (int i) const |
Returns column vector of column i . More... | |
const SVectorBase< R > & | colVector (const SPxColId &id) const |
Returns column vector of column with identifier id . More... | |
void | getColVectorUnscaled (int i, DSVectorBase< R > &vec) const |
Gets column vector of column i . More... | |
void | getColVectorUnscaled (const SPxColId &id, DSVectorBase< R > &vec) const |
Gets column vector of column with identifier id . More... | |
void | getObjUnscaled (VectorBase< R > &pobj) const |
Gets unscaled objective vector. More... | |
void | getObj (VectorBase< R > &pobj) const |
Gets objective vector. More... | |
R | obj (int i) const |
Returns objective value of column i . More... | |
R | obj (const SPxColId &id) const |
Returns objective value of column with identifier id . More... | |
R | objUnscaled (int i) const |
Returns unscaled objective value of column i . More... | |
R | objUnscaled (const SPxColId &id) const |
Returns unscaled objective value of column with identifier id . More... | |
const VectorBase< R > & | maxObj () const |
Returns objective vector for maximization problem. More... | |
const R & | maxObj (int i) const |
Returns objective value of column i for maximization problem. More... | |
const R & | maxObj (const SPxColId &id) const |
Returns objective value of column with identifier id for maximization problem. More... | |
void | maxObjUnscaled (VectorBase< R > &vec) const |
Returns unscaled objective vector for maximization problem. More... | |
R | maxObjUnscaled (int i) const |
Returns unscaled objective value of column i for maximization problem. More... | |
R | maxObjUnscaled (const SPxColId &id) const |
Returns unscaled objective value of column with identifier id for maximization problem. More... | |
const VectorBase< R > & | upper () const |
Returns upper bound vector. More... | |
const R & | upper (int i) const |
Returns upper bound of column i . More... | |
const R & | upper (const SPxColId &id) const |
Returns upper bound of column with identifier id . More... | |
void | getUpperUnscaled (VectorBase< R > &vec) const |
Gets unscaled upper bound vector. More... | |
R | upperUnscaled (int i) const |
Returns unscaled upper bound of column i . More... | |
R | upperUnscaled (const SPxColId &id) const |
Returns unscaled upper bound of column with identifier id . More... | |
const VectorBase< R > & | lower () const |
Returns (internal and possibly scaled) lower bound vector. More... | |
const R & | lower (int i) const |
Returns (internal and possibly scaled) lower bound of column i . More... | |
const R & | lower (const SPxColId &id) const |
Returns (internal and possibly scaled) lower bound of column with identifier id . More... | |
void | getLowerUnscaled (VectorBase< R > &vec) const |
Gets unscaled lower bound vector. More... | |
R | lowerUnscaled (int i) const |
Returns unscaled lower bound of column i . More... | |
R | lowerUnscaled (const SPxColId &id) const |
Returns unscaled lower bound of column with identifier id . More... | |
SPxSense | spxSense () const |
Returns the optimization sense. More... | |
const R & | objOffset () const |
Returns the objective function value offset. More... | |
int | number (const SPxRowId &id) const |
Returns the row number of the row with identifier id . More... | |
int | number (const SPxColId &id) const |
Returns the column number of the column with identifier id . More... | |
int | number (const SPxId &id) const |
Returns the row or column number for identifier id . More... | |
bool | has (const SPxRowId &id) const |
Returns the row number of the row with identifier id . More... | |
bool | has (const SPxColId &id) const |
Returns the column number of the column with identifier id . More... | |
bool | has (const SPxId &id) const |
Returns the row or column number for identifier id . More... | |
SPxRowId | rId (int n) const |
Returns the row identifier for row n . More... | |
SPxColId | cId (int n) const |
Returns the column identifier for column n . More... | |
Extension | |
virtual void | addRow (const LPRowBase< R > &row, bool scale=false) |
virtual void | addRow (const R &lhsValue, const SVectorBase< R > &rowVec, const R &rhsValue, bool scale=false) |
template<class S > | |
void | addRow (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue) |
virtual void | addRow (SPxRowId &id, const LPRowBase< R > &row, bool scale=false) |
Adds row to LPRowSetBase. More... | |
virtual void | addRows (const LPRowSetBase< R > &pset, bool scale=false) |
template<class S > | |
void | addRows (const S *lhsValues, const S *rowValues, const int *rowIndices, const int *rowStarts, const int *rowLengths, const int numRows, const int numValues, const S *rhsValues) |
virtual void | addRows (SPxRowId id[], const LPRowSetBase< R > &set, bool scale=false) |
adds all LPRowBases of pset to LPRowSetBase. More... | |
virtual void | addCol (const LPColBase< R > &col, bool scale=false) |
virtual void | addCol (const R &objValue, const R &lowerValue, const SVectorBase< R > &colVec, const R &upperValue, bool scale=false) |
template<class S > | |
void | addCol (const S *objValue, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue) |
virtual void | addCol (SPxColId &id, const LPColBase< R > &col, bool scale=false) |
Adds col to LPColSetVBase. More... | |
virtual void | addCols (const LPColSetBase< R > &pset, bool scale=false) |
template<class S > | |
void | addCols (const S *objValue, const S *lowerValues, const S *colValues, const int *colIndices, const int *colStarts, const int *colLengths, const int numCols, const int numValues, const S *upperValues) |
virtual void | addCols (SPxColId id[], const LPColSetBase< R > &set, bool scale=false) |
Adds all LPColBases of set to LPColSetBase. More... | |
Shrinking | |
virtual void | removeRow (int i) |
Removes i 'th row. More... | |
virtual void | removeRow (SPxRowId id) |
Removes row with identifier id . More... | |
virtual void | removeRows (int perm[]) |
Removes multiple rows. More... | |
virtual void | removeRows (SPxRowId id[], int n, int perm[]=nullptr) |
virtual void | removeRows (int nums[], int n, int perm[]=nullptr) |
Removes n LPRowBases. More... | |
virtual void | removeRowRange (int start, int end, int perm[]=nullptr) |
Removes rows from start to end (including both). More... | |
virtual void | removeCol (int i) |
Removes i 'th column. More... | |
virtual void | removeCol (SPxColId id) |
Removes column with identifier id . More... | |
virtual void | removeCols (int perm[]) |
Removes multiple columns. More... | |
virtual void | removeCols (SPxColId id[], int n, int perm[]=nullptr) |
virtual void | removeCols (int nums[], int n, int perm[]=nullptr) |
Removes n LPCols. More... | |
virtual void | removeColRange (int start, int end, int perm[]=nullptr) |
Removes columns from start to end (including both). More... | |
virtual void | clear () |
clears the LP. More... | |
IO | |
virtual bool | readLPF (std::istream &in, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr) |
Reads LP in LP format from input stream in . More... | |
virtual bool | readMPS (std::istream &in, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr) |
Reads an LP in MPS format from input stream in . More... | |
virtual bool | read (std::istream &in, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr) |
Reads LP in LP or MPS format from input stream in . More... | |
virtual bool | readFile (const char *filename, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr) |
Reads LP from a file. More... | |
virtual void | writeLPF (std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=nullptr, const bool writeZeroObjective=false) const |
virtual void | writeMPS (std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=nullptr, const bool writeZeroObjective=false) const |
Writes a file in MPS format to out . More... | |
virtual void | writeFileLPBase (const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const DIdxSet *p_intvars=nullptr, const bool writeZeroObjective=false) const |
Write loaded LP to filename . More... | |
void | printProblemStatistics (std::ostream &os) |
Manipulation | |
virtual void | changeObj (const VectorBase< R > &newObj, bool scale=false) |
Changes objective vector to newObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeObj (int i, const R &newVal, bool scale=false) |
changes i 'th objective vector element to newVal . scale determines whether the new data should be scaled More... | |
template<class S > | |
void | changeObj (int i, const S *newVal) |
changes i 'th objective vector element to newVal . More... | |
virtual void | changeObj (SPxColId id, const R &newVal, bool scale=false) |
Changes objective value of column with identifier id to newVal . scale determines whether the new data should be scaled. More... | |
virtual void | changeMaxObj (const VectorBase< R > &newObj, bool scale=false) |
Changes objective vector to newObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeMaxObj (int i, const R &newVal, bool scale=false) |
changes i 'th objective vector element to newVal . scale determines whether the new data should be scaled More... | |
template<class S > | |
void | changeMaxObj (int i, const S *newVal) |
changes i 'th objective vector element to newVal . More... | |
virtual void | changeMaxObj (SPxColId id, const R &newVal, bool scale=false) |
Changes objective value of column with identifier id to newVal . scale determines whether the new data should be scaled. More... | |
virtual void | changeLower (const VectorBase< R > &newLower, bool scale=false) |
Changes vector of lower bounds to newLower . scale determines whether the new data should be scaled. More... | |
virtual void | changeLower (int i, const R &newLower, bool scale=false) |
changes i 'th lower bound to newLower . scale determines whether the new data should be scaled More... | |
template<class S > | |
void | changeLower (int i, const S *newLower) |
changes i 'th lower bound to newLower . More... | |
virtual void | changeLower (SPxColId id, const R &newLower, bool scale=false) |
changes lower bound of column with identifier id to newLower . scale determines whether the new data should be scaled More... | |
virtual void | changeUpper (const VectorBase< R > &newUpper, bool scale=false) |
Changes vector of upper bounds to newUpper . scale determines whether the new data should be scaled. More... | |
virtual void | changeUpper (int i, const R &newUpper, bool scale=false) |
Changes i 'th upper bound to newUpper . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeUpper (int i, const S *newUpper) |
Changes i 'th upper bound to newUpper . More... | |
virtual void | changeUpper (SPxColId id, const R &newUpper, bool scale=false) |
Changes upper bound of column with identifier id to newLower . scale determines whether the new data should be scaled. More... | |
virtual void | changeBounds (const VectorBase< R > &newLower, const VectorBase< R > &newUpper, bool scale=false) |
Changes variable bounds to newLower and newUpper . scale determines whether the new data should be scaled. More... | |
virtual void | changeBounds (int i, const R &newLower, const R &newUpper, bool scale=false) |
Changes bounds of column i to newLower and newUpper . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeBounds (int i, const S *newLower, const S *newUpper) |
Changes bounds of column i to newLower and newUpper . More... | |
virtual void | changeBounds (SPxColId id, const R &newLower, const R &newUpper, bool scale=false) |
Changes bounds of column with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeLhs (const VectorBase< R > &newLhs, bool scale=false) |
Changes left hand side vector for constraints to newLhs . scale determines whether the new data should be scaled. More... | |
virtual void | changeLhs (int i, const R &newLhs, bool scale=false) |
Changes i 'th left hand side value to newLhs . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeLhs (int i, const S *newLhs) |
Changes i 'th left hand side value to newLhs . More... | |
virtual void | changeLhs (SPxRowId id, const R &newLhs, bool scale=false) |
Changes left hand side value for row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeRhs (const VectorBase< R > &newRhs, bool scale=false) |
Changes right hand side vector for constraints to newRhs . scale determines whether the new data should be scaled. More... | |
virtual void | changeRhs (int i, const R &newRhs, bool scale=false) |
Changes i 'th right hand side value to newRhs . scale determines whether the new data should be scaled. More... | |
virtual void | changeRhs (SPxRowId id, const R &newRhs, bool scale=false) |
Changes right hand side value for row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeRange (const VectorBase< R > &newLhs, const VectorBase< R > &newRhs, bool scale=false) |
Changes left and right hand side vectors. scale determines whether the new data should be scaled. More... | |
virtual void | changeRange (int i, const R &newLhs, const R &newRhs, bool scale=false) |
Changes left and right hand side of row i . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeRange (int i, const S *newLhs, const S *newRhs) |
Changes left and right hand side of row i . More... | |
virtual void | changeRange (SPxRowId id, const R &newLhs, const R &newRhs, bool scale=false) |
Changes left and right hand side of row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | changeRowObj (const VectorBase< R > &newRowObj, bool scale=false) |
Changes row objective function vector to newRowObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeRowObj (int i, const R &newRowObj, bool scale=false) |
Changes i 'th row objective function value to newRowObj . scale determines whether the new data should be scaled. More... | |
virtual void | changeRowObj (SPxRowId id, const R &newRowObj, bool scale=false) |
Changes row objective function value for row with identifier id . scale determines whether the new data should be scaled. More... | |
virtual void | clearRowObjs () |
Clears row objective function values for all rows. More... | |
virtual void | changeRow (int n, const LPRowBase< R > &newRow, bool scale=false) |
Replaces i 'th row of LP with newRow . scale determines whether the new data should be scaled. More... | |
virtual void | changeRow (SPxRowId id, const LPRowBase< R > &newRow, bool scale=false) |
Replaces row with identifier id with newRow . scale determines whether the new data should be scaled. More... | |
virtual void | changeCol (int n, const LPColBase< R > &newCol, bool scale=false) |
Replaces i 'th column of LP with newCol . scale determines whether the new data should be scaled. More... | |
virtual void | changeCol (SPxColId id, const LPColBase< R > &newCol, bool scale=false) |
Replaces column with identifier id with newCol . scale determines whether the new data should be scaled. More... | |
virtual void | changeElement (int i, int j, const R &val, bool scale=false) |
Changes LP element (i , j ) to val . scale determines whether the new data should be scaled. More... | |
template<class S > | |
void | changeElement (int i, int j, const S *val) |
Changes LP element (i , j ) to val . More... | |
virtual void | changeElement (SPxRowId rid, SPxColId cid, const R &val, bool scale=false) |
Changes LP element identified by (rid , cid ) to val . scale determines whether the new data should be scaled. More... | |
virtual void | changeSense (SPxSense sns) |
Changes optimization sense to sns . More... | |
template<typename T > | |
void | changeObjOffset (const T &o) |
virtual void | computePrimalActivity (const VectorBase< R > &primal, VectorBase< R > &activity, const bool unscaled=true) const |
Computes activity of the rows for a given primal vector; activity does not need to be zero. More... | |
virtual void | addPrimalActivity (const SVectorBase< R > &primal, VectorBase< R > &activity) const |
Updates activity of the rows for a given primal vector; activity does not need to be zero. More... | |
virtual void | computeDualActivity (const VectorBase< R > &dual, VectorBase< R > &activity, const bool unscaled=true) const |
Computes "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More... | |
virtual void | addDualActivity (const SVectorBase< R > &dual, VectorBase< R > &activity) const |
Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More... | |
virtual void | subDualActivity (const VectorBase< R > &dual, VectorBase< R > &activity) const |
Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero. More... | |
Construction of dual problem | |
virtual void | buildDualProblem (SPxLPBase< R > &dualLP, SPxRowId primalRowIds[]=nullptr, SPxColId primalColIds[]=nullptr, SPxRowId dualRowIds[]=nullptr, SPxColId dualColIds[]=nullptr, int *nprimalrows=nullptr, int *nprimalcols=nullptr, int *ndualrows=nullptr, int *ndualcols=nullptr) |
Building the dual problem from a given LP. More... | |
Miscellaneous | |
bool | isConsistent () const |
Consistency check. More... | |
Constructors / Destructors | |
SPxLPBase () | |
Default constructor. More... | |
virtual | ~SPxLPBase () |
Destructor. More... | |
SPxLPBase (const SPxLPBase< R > &old) | |
Copy constructor. More... | |
template<class S > | |
SPxLPBase (const SPxLPBase< S > &old) | |
Copy constructor. More... | |
SPxLPBase< R > & | operator= (const SPxLPBase< R > &old) |
Assignment operator. More... | |
template<class S > | |
SPxLPBase< R > & | operator= (const SPxLPBase< S > &old) |
Assignment operator. More... | |
Public Attributes | |
SPxOut * | spxout |
Protected Member Functions | |
Protected write access | |
R & | rhs_w (int i) |
Returns right hand side of row i . More... | |
R & | lhs_w (int i) |
Returns left hand side of row i . More... | |
R & | maxRowObj_w (int i) |
Returns objective function value of row i . More... | |
R & | maxObj_w (int i) |
Returns objective value of column i for maximization problem. More... | |
R & | upper_w (int i) |
Returns upper bound of column i . More... | |
R & | lower_w (int i) |
Returns lower bound of column i . More... | |
Protected helpers | |
const LPRowSetBase< R > * | lprowset () const |
Returns the LP as an LPRowSetBase. More... | |
const LPColSetBase< R > * | lpcolset () const |
Returns the LP as an LPColSetBase. More... | |
virtual void | doRemoveRow (int j) |
Internal helper method. More... | |
virtual void | doRemoveRows (int perm[]) |
Internal helper method. More... | |
virtual void | doRemoveCol (int j) |
Internal helper method. More... | |
virtual void | doRemoveCols (int perm[]) |
Internal helper method. More... | |
virtual void | addedRows (int newrows) |
Called after the last n rows have just been added. More... | |
virtual void | addedCols (int newcols) |
Called after the last n columns have just been added. More... | |
void | added2Set (SVSetBase< R > &set, const SVSetBase< R > &addset, int n) |
Protected Member Functions inherited from LPRowSetBase< R > | |
const SVSetBase< R > * | rowSet () const |
Returns the complete SVSet. More... | |
int | num () const |
Returns the number of LPRowBases in LPRowSetBase. More... | |
int | max () const |
Returns the maximum number of LPRowBases that fit. More... | |
const VectorBase< R > & | lhs () const |
Returns the vector of lhs values. More... | |
VectorBase< R > & | lhs_w () |
Returns the vector of lhs values. More... | |
const R & | lhs (int i) const |
Returns the lhs of the i 'th LPRowBase. More... | |
R & | lhs_w (int i) |
Returns the lhs of the i 'th LPRowBase. More... | |
const R & | lhs (const DataKey &k) const |
Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | lhs_w (const DataKey &k) |
Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
const VectorBase< R > & | rhs () const |
Returns the vector of rhs values. More... | |
VectorBase< R > & | rhs_w () |
Returns the vector of rhs values (writeable). More... | |
const R & | rhs (int i) const |
Returns the rhs of the i 'th LPRowBase. More... | |
R & | rhs_w (int i) |
Returns the rhs of the i 'th LPRowBase (writeable). More... | |
const R & | rhs (const DataKey &k) const |
Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | rhs_w (const DataKey &k) |
Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase (writeable). More... | |
const VectorBase< R > & | obj () const |
Returns the vector of objective coefficients. More... | |
VectorBase< R > & | obj_w () |
Returns the vector of objective coefficients (writeable). More... | |
const R & | obj (int i) const |
Returns the objective coefficient of the i 'th LPRowBase. More... | |
R & | obj_w (int i) |
Returns the objective coefficient of the i 'th LPRowBase (writeable). More... | |
const R & | obj (const DataKey &k) const |
Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | obj_w (const DataKey &k) |
Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase (writeable). More... | |
SVectorBase< R > & | rowVector_w (int i) |
Returns a writable rowVector of the i 'th LPRowBase. More... | |
const SVectorBase< R > & | rowVector (int i) const |
Returns the rowVector of the i 'th LPRowBase. More... | |
SVectorBase< R > & | rowVector_w (const DataKey &k) |
Returns a writable rowVector of the LPRowBase with DataKey k . More... | |
const SVectorBase< R > & | rowVector (const DataKey &k) const |
Returns the rowVector of the LPRowBase with DataKey k . More... | |
LPRowBase< R >::Type | type (int i) const |
Returns the inequalitiy type of the i 'th LPRowBase. More... | |
LPRowBase< R >::Type | type (const DataKey &k) const |
Returns the inequality type of the LPRowBase with DataKey k . More... | |
void | setType (int i, typename LPRowBase< R >::Type t) |
Changes the inequality type of row i to type . More... | |
const R & | value (int i) const |
Returns the value of the i'th LPRowBase. More... | |
const R & | value (const DataKey &k) const |
Returns the value of the LPRowBase with DataKey k . More... | |
DataKey | key (int i) const |
Returns the DataKey of the i 'th LPRowBase in LPRowSetBase. More... | |
int | number (const DataKey &k) const |
Returns the number of the LPRowBase with DataKey k in LPRowSetBase. More... | |
bool | has (const DataKey &k) const |
does DataKey k belong to LPRowSetBase ? More... | |
void | add (const LPRowBase< R > &row) |
void | add (DataKey &pkey, const LPRowBase< R > &prow) |
Adds row to LPRowSetBase. More... | |
void | add (const R &plhs, const SVectorBase< R > &prowVector, const R &prhs, const R &pobj=0, const int &pscaleExp=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase. More... | |
template<class S > | |
void | add (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase. More... | |
template<class S > | |
void | add (DataKey &newkey, const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=nullptr) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase, with DataKey key . More... | |
void | add (DataKey &newkey, const R &newlhs, const SVectorBase< R > &newrowVector, const R &newrhs, const R &newobj=0, const int &newscaleExp=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase, with DataKey key . More... | |
void | add (const LPRowSetBase< R > &newset) |
void | add (DataKey keys[], const LPRowSetBase< R > &set) |
Adds all LPRowBases of set to LPRowSetBase. More... | |
void | xtend (int n, int newmax) |
Extends row n to fit newmax nonzeros. More... | |
void | xtend (const DataKey &pkey, int pnewmax) |
Extends row with DataKey key to fit newmax nonzeros. More... | |
void | add2 (const DataKey &k, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to rowVector with DataKey k . More... | |
void | add2 (int i, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to i 'th rowVector. More... | |
template<class S > | |
void | add2 (int i, int n, const int idx[], const S val[]) |
Adds n nonzero (idx , val )-pairs to i 'th rowVector. More... | |
SVectorBase< R > & | create (int pnonzeros=0, const R &plhs=0, const R &prhs=1, const R &pobj=0, const int &pscaleExp=0) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector. More... | |
SVectorBase< R > & | create (DataKey &newkey, int nonzeros=0, const R &newlhs=0, const R &newrhs=1, const R &newobj=0, const int &newscaleExp=0) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector. More... | |
void | remove (int i) |
Removes i 'th LPRowBase. More... | |
void | remove (const DataKey &k) |
Removes LPRowBase with DataKey k . More... | |
void | remove (int perm[]) |
Removes multiple LPRowBases. More... | |
void | remove (const int nums[], int n) |
Removes n LPRowBases with row numbers given by nums . More... | |
void | remove (const int nums[], int n, int *perm) |
Removes n LPRowBases with row numbers given by nums , Stores permutation of row indices in perm . More... | |
void | clear () |
Removes all LPRowBases. More... | |
void | reMax (int newmax=0) |
Reallocates memory to be able to store newmax LPRowBases. More... | |
int | memSize () const |
Returns number of used nonzero entries. More... | |
int | memMax () const |
Returns length of nonzero memory. More... | |
void | memRemax (int newmax) |
Reallocates memory to be able to store newmax nonzeros. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
bool | isConsistent () const |
Checks consistency. More... | |
LPRowSetBase (int pmax=-1, int pmemmax=-1) | |
Default constructor. More... | |
LPRowSetBase< R > & | operator= (const LPRowSetBase< R > &rs) |
Assignment operator. More... | |
template<class S > | |
LPRowSetBase< R > & | operator= (const LPRowSetBase< S > &rs) |
Assignment operator. More... | |
LPRowSetBase (const LPRowSetBase< R > &rs) | |
Copy constructor. More... | |
template<class S > | |
LPRowSetBase (const LPRowSetBase< S > &rs) | |
Copy constructor. More... | |
virtual | ~LPRowSetBase () |
Destructor. More... | |
Protected Member Functions inherited from SVSetBase< R > | |
void | add (const SVectorBase< R > &svec) |
Adds svec to the set. More... | |
void | add (DataKey &nkey, const SVectorBase< R > &svec) |
Adds svec to SVSetBase. More... | |
template<class S > | |
void | add (DataKey &nkey, const S *rowValues, const int *rowIndices, int rowSize) |
Adds svec to SVSetBase. More... | |
void | add (const SVectorBase< R > svec[], int n) |
Adds all n SVectorBases in the array svec to the set. More... | |
void | add (DataKey nkey[], const SVectorBase< R > svec[], int n) |
Adds n SVectorBases to SVSetBase. More... | |
template<class S > | |
void | add (const SVSetBase< S > &pset) |
Adds all SVectorBases in pset to SVSetBase. More... | |
template<class S > | |
void | add (DataKey nkey[], const SVSetBase< S > &pset) |
Adds all SVectorBases of pset to SVSetBase. More... | |
SVectorBase< R > * | create (int idxmax=0) |
Creates new SVectorBase in set. More... | |
SVectorBase< R > * | create (DataKey &nkey, int idxmax=-1) |
Creates new SVectorBase in set. More... | |
void | xtend (SVectorBase< R > &svec, int newmax) |
Extends svec to fit newmax nonzeros. More... | |
void | add2 (SVectorBase< R > &svec, int idx, R val) |
Adds nonzero (idx , val ) to svec of this SVSetBase. More... | |
void | add2 (SVectorBase< R > &svec, int n, const int idx[], const R val[]) |
Adds n nonzeros to svec of this SVSetBase. More... | |
template<class S > | |
void | add2 (SVectorBase< R > &svec, int n, const int idx[], const S val[]) |
Adds n nonzeros to svec of this SVSetBase. More... | |
void | remove (const DataKey &removekey) |
Removes the vector with key removekey from the set. More... | |
void | remove (int removenum) |
Removes the vector with number removenum from the set. More... | |
void | remove (const SVectorBase< R > *svec) |
Removes one SVectorBase from set. More... | |
void | remove (int perm[]) |
Removes multiple elements. More... | |
void | remove (const DataKey keys[], int n) |
Removes n SVectorBases from set. More... | |
void | remove (const int nums[], int n) |
Removes n SVectorBases from set. More... | |
void | remove (const DataKey keys[], int n, int *perm) |
void | remove (const int nums[], int n, int *perm) |
void | clear (int minNewSize=-1) |
Removes all SVectorBases from set. More... | |
SVectorBase< R > & | operator[] (int n) |
Gets SVectorBase by number, writeable. More... | |
const SVectorBase< R > & | operator[] (int n) const |
Gets SVectorBase by number. More... | |
SVectorBase< R > & | operator[] (const DataKey &k) |
Gets SVectorBase by DataKey, writeable. More... | |
const SVectorBase< R > & | operator[] (const DataKey &k) const |
Gets SVectorBase by DataKey. More... | |
int | num () const |
Current number of SVectorBases. More... | |
int | max () const |
Current maximum number of SVectorBases. More... | |
DataKey | key (int n) const |
Gets DataKey of vector number. More... | |
DataKey | key (const SVectorBase< R > *svec) const |
Gets DataKey of SVectorBase. More... | |
int | number (const DataKey &k) const |
Gets vector number of DataKey. More... | |
int | number (const SVectorBase< R > *svec) const |
Gets vector number of SVectorBase. More... | |
bool | has (const DataKey &k) const |
True iff SVSetBase contains a SVectorBase for DataKey k . More... | |
bool | has (int n) const |
True iff SVSetBase contains a SVectorBase for vector number n. More... | |
bool | has (const SVectorBase< R > *svec) const |
Is an SVectorBase in the set? More... | |
int | memSize () const |
Used nonzero memory. More... | |
int | memMax () const |
Length of nonzero memory. More... | |
void | memRemax (int newmax) |
Reset length of nonzero memory. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
void | reMax (int newmax=0) |
Resets maximum number of SVectorBases. More... | |
bool | isConsistent () const |
Consistency check. More... | |
SVSetBase (int pmax=-1, int pmemmax=-1, double pfac=1.1, double pmemFac=1.2) | |
Default constructor. More... | |
virtual | ~SVSetBase () |
Destructor. More... | |
SVSetBase< R > & | operator= (const SVSetBase< R > &rhs) |
Assignment operator. More... | |
template<class S > | |
SVSetBase< R > & | operator= (const SVSetBase< S > &rhs) |
Assignment operator. More... | |
SVSetBase (const SVSetBase< R > &old) | |
Copy constructor. More... | |
template<class S > | |
SVSetBase (const SVSetBase< S > &old) | |
Copy constructor. More... | |
Protected Member Functions inherited from ClassArray< Nonzero< R > > | |
Nonzero< R > & | operator[] (int n) |
Reference to n 'th element. More... | |
const Nonzero< R > & | operator[] (int n) const |
Reference to n 'th const element. More... | |
Nonzero< R > & | last () |
Reference to last element. More... | |
const Nonzero< R > & | last () const |
Reference to last const element. More... | |
Nonzero< R > * | get_ptr () |
Gets a C pointer to the data. More... | |
const Nonzero< R > * | get_const_ptr () const |
Gets a const C pointer to the data. More... | |
void | append (const Nonzero< R > &t) |
Appends element t . More... | |
void | append (int n, const Nonzero< R > t[]) |
Appends n elements from t . More... | |
void | append (const ClassArray< Nonzero< R > > &t) |
Appends all elements from t . More... | |
void | insert (int i, int n) |
Inserts n uninitialized elements before i 'th element. More... | |
void | insert (int i, int n, const Nonzero< R > t[]) |
Inserts n elements from t before i 'the element. More... | |
void | insert (int i, const ClassArray< Nonzero< R > > &t) |
Inserts all elements from t before i 'th element. More... | |
void | remove (int n=0, int m=1) |
Removes m elements starting at n . More... | |
void | removeLast (int m=1) |
Removes m last elements. More... | |
void | clear () |
Removes all elements. More... | |
int | size () const |
Returns number of elements. More... | |
void | reSize (int newsize) |
Resets size to newsize . More... | |
int | max () const |
Returns maximum number of elements. More... | |
ptrdiff_t | reMax (int newMax=1, int newSize=-1) |
Resets maximum number of elements. More... | |
ClassArray & | operator= (const ClassArray &rhs) |
Assignment operator. More... | |
bool | isConsistent () const |
Consistency check. More... | |
ClassArray (const ClassArray &old) | |
Copy constructor. More... | |
ClassArray (int p_size=0, int p_max=0, double p_fac=1.2) | |
Default constructor. More... | |
virtual | ~ClassArray () |
Destructor. More... | |
Protected Member Functions inherited from LPColSetBase< R > | |
const SVSetBase< R > * | colSet () const |
Returns the complete SVSetBase. More... | |
int | num () const |
Returns the number of LPColBases currently in LPColSetBase. More... | |
int | max () const |
Returns maximum number of LPColBases currently fitting into LPColSetBase. More... | |
const VectorBase< R > & | maxObj () const |
VectorBase< R > & | maxObj_w () |
Returns vector of objective values w.r.t. maximization. More... | |
const R & | maxObj (int i) const |
R & | maxObj_w (int i) |
Returns objective value (w.r.t. maximization) of i 'th LPColBase in LPColSetBase. More... | |
const R & | maxObj (const DataKey &k) const |
R & | maxObj_w (const DataKey &k) |
Returns objective value (w.r.t. maximization) of LPColBase with DataKey k in LPColSetBase. More... | |
const VectorBase< R > & | lower () const |
VectorBase< R > & | lower_w () |
Returns vector of lower bound values. More... | |
const R & | lower (int i) const |
R & | lower_w (int i) |
Returns lower bound of i 'th LPColBase in LPColSetBase. More... | |
const R & | lower (const DataKey &k) const |
R & | lower_w (const DataKey &k) |
Returns lower bound of LPColBase with DataKey k in LPColSetBase. More... | |
const VectorBase< R > & | upper () const |
VectorBase< R > & | upper_w () |
Returns vector of upper bound values. More... | |
const R & | upper (int i) const |
R & | upper_w (int i) |
Returns upper bound of i 'th LPColBase in LPColSetBase. More... | |
const R & | upper (const DataKey &k) const |
R & | upper_w (const DataKey &k) |
Returns upper bound of LPColBase with DataKey k in LPColSetBase. More... | |
SVectorBase< R > & | colVector_w (int i) |
const SVectorBase< R > & | colVector (int i) const |
Returns colVector of i 'th LPColBase in LPColSetBase. More... | |
SVectorBase< R > & | colVector_w (const DataKey &k) |
Returns writeable colVector of LPColBase with DataKey k in LPColSetBase. More... | |
const SVectorBase< R > & | colVector (const DataKey &k) const |
Returns colVector of LPColBase with DataKey k in LPColSetBase. More... | |
DataKey | key (int i) const |
Returns DataKey of i 'th LPColBase in LPColSetBase. More... | |
int | number (const DataKey &k) const |
Returns number of LPColBase with DataKey k in LPColSetBase. More... | |
bool | has (const DataKey &k) const |
Does DataKey k belong to LPColSetBase ? More... | |
void | add (const LPColBase< R > &pcol) |
void | add (DataKey &pkey, const LPColBase< R > &pcol) |
Adds p pcol to LPColSetBase. More... | |
void | add (const R &pobj, const R &plower, const SVectorBase< R > &pcolVector, const R &pupper, const int &pscaleExp=0) |
void | add (DataKey &newkey, const R &obj, const R &newlower, const SVectorBase< R > &newcolVector, const R &newupper, const int &newscaleExp=0) |
Adds LPColBase consisting of objective value obj , lower bound lower , column vector colVector and upper bound upper to LPColSetBase. More... | |
template<class S > | |
void | add (const S *obj, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue) |
Adds LPColBase consisting of left hand side lhs , column vector colVector , and right hand side rhs to LPColSetBase. More... | |
template<class S > | |
void | add (DataKey &newkey, const S *objValue, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue) |
Adds LPColBase consisting of left hand side lhs , column vector colVector , and right hand side rhs to LPColSetBase, with DataKey key . More... | |
void | add (const LPColSetBase< R > &newset) |
void | add (DataKey keys[], const LPColSetBase< R > &newset) |
Adds all LPColBases of set to LPColSetBase. More... | |
void | xtend (int n, int newmax) |
Extends column n to fit newmax nonzeros. More... | |
void | xtend (const DataKey &pkey, int pnewmax) |
Extends column with DataKey key to fit newmax nonzeros. More... | |
void | add2 (const DataKey &k, int n, const int idx[], const R val[]) |
void | add2 (int i, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to i 'th colVector. More... | |
template<class S > | |
void | add2 (int i, int n, const int idx[], const S val[]) |
Adds n nonzero (idx , val )-pairs to i 'th colVector. More... | |
SVectorBase< R > & | create (int pnonzeros=0, const R &pobj=1, const R &plw=0, const R &pupp=1, const int &pscaleExp=0) |
SVectorBase< R > & | create (DataKey &newkey, int nonzeros=0, const R &obj=1, const R &newlow=0, const R &newup=1, const int &newscaleExp=0) |
Creates new LPColBase with specified arguments and returns a reference to its column vector. More... | |
void | remove (int i) |
Removes i 'th LPColBase. More... | |
void | remove (const DataKey &k) |
Removes LPColBase with DataKey k . More... | |
void | remove (int perm[]) |
Removes multiple elements. More... | |
void | remove (const int nums[], int n) |
Removes LPColBases with numbers nums , where n is the length of the array nums . More... | |
void | remove (const int nums[], int n, int *perm) |
Removes LPColBases with numbers nums , where n is the length of the array nums , and stores the index permutation in array perm . More... | |
void | clear () |
Removes all LPColBases from the set. More... | |
void | reMax (int newmax=0) |
Reallocates memory to be able to store newmax LPColBases. More... | |
int | memSize () const |
Returns used nonzero memory. More... | |
int | memMax () const |
Returns length of nonzero memory. More... | |
void | memRemax (int newmax) |
Resets length of nonzero memory. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
bool | isConsistent () const |
Checks consistency. More... | |
LPColSetBase (int pmax=-1, int pmemmax=-1) | |
Default constructor. More... | |
LPColSetBase< R > & | operator= (const LPColSetBase< R > &rs) |
Assignment operator. More... | |
template<class S > | |
LPColSetBase< R > & | operator= (const LPColSetBase< S > &rs) |
Assignment operator. More... | |
LPColSetBase (const LPColSetBase< R > &rs) | |
Copy constructor. More... | |
template<class S > | |
LPColSetBase (const LPColSetBase< S > &rs) | |
Copy constructor. More... | |
virtual | ~LPColSetBase () |
Destructor. More... | |
Protected Attributes | |
std::shared_ptr< Tolerances > | _tolerances |
Protected Attributes inherited from LPRowSetBase< R > | |
DataArray< int > | scaleExp |
row scaling factors (stored as bitshift) More... | |
Protected Attributes inherited from ClassArray< Nonzero< R > > | |
int | thesize |
number of used elements in array data More... | |
int | themax |
the length of array data and More... | |
Nonzero< R > * | data |
the array of elements More... | |
double | memFactor |
memory extension factor. More... | |
Protected Attributes inherited from LPColSetBase< R > | |
DataArray< int > | scaleExp |
column scaling factors (stored as bitshift) More... | |
Private Member Functions | |
Private helpers | |
SVectorBase< R > & | colVector_w (int i) |
Returns the LP as an LPRowBase<R>Set. More... | |
SVectorBase< R > & | rowVector_w (int i) |
void | doAddRow (const LPRowBase< R > &row, bool scale=false) |
void | doAddRow (const R &lhsValue, const SVectorBase< R > &rowVec, const R &rhsValue, bool scale=false) |
void | doAddRows (const LPRowSetBase< R > &set, bool scale=false) |
void | doAddCol (const LPColBase< R > &col, bool scale=false) |
void | doAddCol (const R &objValue, const R &lowerValue, const SVectorBase< R > &colVec, const R &upperValue, bool scale=false) |
void | doAddCols (const LPColSetBase< R > &set, bool scale=false) |
Private Attributes | |
friend | SPxBasisBase< R > |
friend | SPxScaler< R > |
friend | SPxEquiliSC< R > |
friend | SPxLeastSqSC< R > |
friend | SPxGeometSC< R > |
friend | SPxMainSM< R > |
Data | |
SPxSense | thesense |
optimization sense. More... | |
R | offset |
offset computed, e.g., in simplification step More... | |
bool | _isScaled |
true, if scaling has been performed More... | |
SPxScaler< R > * | lp_scaler |
points to the scaler if the lp has been scaled, to nullptr otherwise More... | |
Friends | |
template<class S > | |
class | SPxLPBase |
Saving LPs in a form suitable for SoPlex.
Class SPxLPBase provides the data structures required for saving a linear program in the form
\[ \begin{array}{rl} \hbox{max} & c^T x \\ \hbox{s.t.} & l_r \le Ax \le u_r \\ & l_c \le x \le u_c \end{array} \]
suitable for solving with SoPlex. This includes:
Note, that the optimization sense is not saved directly. Instead, the objective function are multiplied by -1 to transform the LP to our standard form maximizing the objective function. However, the sense of the loaded LP can be retrieved with method spxSense().
Further, equality constraints are modeled by \(l_r = u_r\). Analogously, fixed variables have \(l_c = u_c\).
SPxLPBases are saved as an SVSet, both for columns and rows. Note that this is redundant but eases the access.
Definition at line 107 of file spxlpbase.h.
enum SPxSense |
SPxLPBase | ( | ) |
Default constructor.
Definition at line 2831 of file spxlpbase.h.
References SPxLPBase< R >::clear(), and SPxLPBase< R >::isConsistent().
|
virtual |
Destructor.
Definition at line 2839 of file spxlpbase.h.
Copy constructor.
Definition at line 2843 of file spxlpbase.h.
References SPxLPBase< R >::_tolerances, and SPxLPBase< R >::isConsistent().
Copy constructor.
Definition at line 2858 of file spxlpbase.h.
References SPxLPBase< R >::_tolerances, SPxLPBase< R >::isConsistent(), and SPxLPBase< R >::lp_scaler.
|
virtual |
Definition at line 796 of file spxlpbase.h.
References SPxLPBase< R >::doAddCol().
Referenced by SPxLPBase< R >::addCol().
|
virtual |
Definition at line 802 of file spxlpbase.h.
References SPxLPBase< R >::doAddCol().
void addCol | ( | const S * | objValue, |
const S * | lowerValue, | ||
const S * | colValues, | ||
const int * | colIndices, | ||
int | colSize, | ||
const S * | upperValue | ||
) |
Definition at line 810 of file spxlpbase.h.
References LPColSetBase< R >::add(), LPRowSetBase< R >::add2(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::MAXIMIZE, LPColSetBase< R >::maxObj_w(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), and SPxLPBase< R >::thesense.
Adds col
to LPColSetVBase.
Definition at line 845 of file spxlpbase.h.
References SPxLPBase< R >::addCol(), SPxLPBase< R >::cId(), and SPxLPBase< R >::nCols().
|
virtual |
Definition at line 852 of file spxlpbase.h.
References SPxLPBase< R >::doAddCols().
Referenced by SPxLPBase< R >::addCols().
void addCols | ( | const S * | objValue, |
const S * | lowerValues, | ||
const S * | colValues, | ||
const int * | colIndices, | ||
const int * | colStarts, | ||
const int * | colLengths, | ||
const int | numCols, | ||
const int | numValues, | ||
const S * | upperValues | ||
) |
Definition at line 859 of file spxlpbase.h.
References LPColSetBase< R >::add(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::colVector(), SVectorBase< R >::index(), SPxLPBase< R >::MAXIMIZE, LPColSetBase< R >::maxObj_w(), LPColSetBase< R >::memRemax(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rowVector(), SPxLPBase< R >::rowVector_w(), SVectorBase< R >::size(), SPxLPBase< R >::thesense, SVectorBase< R >::value(), and LPRowSetBase< R >::xtend().
|
virtual |
Adds all LPColBases of set
to LPColSetBase.
Definition at line 955 of file spxlpbase.h.
References SPxLPBase< R >::addCols(), SPxLPBase< R >::cId(), SPxLPBase< R >::nCols(), and SVSetBase< R >::set.
|
virtual |
Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero.
SPxInternalCodeException | if dimension of dual vector does not match number of rows or if the dimension of the activity vector does not match the number of columns |
Definition at line 1975 of file spxlpbase.h.
References VectorBase< R >::dim(), SVectorBase< R >::index(), VectorBase< R >::multAdd(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rowVector(), SVectorBase< R >::size(), and SVectorBase< R >::value().
Definition at line 2279 of file spxlpbase.h.
References DataArray< T >::get_ptr(), SVectorBase< R >::index(), SVSetBase< R >::num(), SVSetBase< R >::set, SVectorBase< R >::size(), and SVectorBase< R >::value().
|
protectedvirtual |
Called after the last n
columns have just been added.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 2275 of file spxlpbase.h.
Referenced by SPxLPBase< R >::addCol(), SPxLPBase< R >::addCols(), SPxLPBase< R >::addRow(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), and SPxLPBase< R >::doAddRows().
|
protectedvirtual |
Called after the last n
rows have just been added.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 2271 of file spxlpbase.h.
Referenced by SPxLPBase< R >::addCol(), SPxLPBase< R >::addCols(), SPxLPBase< R >::addRow(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), and SPxLPBase< R >::doAddRows().
|
virtual |
Updates activity of the rows for a given primal vector; activity does not need to be zero.
SPxInternalCodeException | if the dimension of primal vector does not match number of columns or if the dimension of the activity vector does not match the number of rows |
Definition at line 1951 of file spxlpbase.h.
References SPxLPBase< R >::colVector(), VectorBase< R >::dim(), SVectorBase< R >::index(), VectorBase< R >::multAdd(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SVectorBase< R >::size(), and SVectorBase< R >::value().
|
virtual |
Definition at line 624 of file spxlpbase.h.
References SPxLPBase< R >::doAddRow().
Referenced by SPxLPBase< R >::addRow().
|
virtual |
Definition at line 630 of file spxlpbase.h.
References SPxLPBase< R >::doAddRow().
void addRow | ( | const S * | lhsValue, |
const S * | rowValues, | ||
const int * | rowIndices, | ||
int | rowSize, | ||
const S * | rhsValue | ||
) |
Definition at line 638 of file spxlpbase.h.
References LPRowSetBase< R >::add(), LPColSetBase< R >::add2(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::nCols(), and SPxLPBase< R >::nRows().
Adds row
to LPRowSetBase.
Definition at line 675 of file spxlpbase.h.
References SPxLPBase< R >::addRow(), SPxLPBase< R >::nRows(), and SPxLPBase< R >::rId().
|
virtual |
Definition at line 682 of file spxlpbase.h.
References SPxLPBase< R >::doAddRows().
Referenced by SPxLPBase< R >::addRows().
void addRows | ( | const S * | lhsValues, |
const S * | rowValues, | ||
const int * | rowIndices, | ||
const int * | rowStarts, | ||
const int * | rowLengths, | ||
const int | numRows, | ||
const int | numValues, | ||
const S * | rhsValues | ||
) |
Definition at line 689 of file spxlpbase.h.
References LPRowSetBase< R >::add(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::colVector(), SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), LPRowSetBase< R >::memRemax(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rowVector(), SVectorBase< R >::size(), SVectorBase< R >::value(), and LPColSetBase< R >::xtend().
|
virtual |
adds all LPRowBases of pset
to LPRowSetBase.
Definition at line 786 of file spxlpbase.h.
References SPxLPBase< R >::addRows(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rId(), and SVSetBase< R >::set.
|
virtual |
Building the dual problem from a given LP.
|
virtual |
Changes variable bounds to newLower
and newUpper
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1558 of file spxlpbase.h.
References SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeUpper(), and SPxLPBase< R >::isConsistent().
Referenced by SPxLPBase< R >::changeBounds().
|
virtual |
Changes bounds of column i
to newLower
and newUpper
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1567 of file spxlpbase.h.
References SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeUpper(), and SPxLPBase< R >::isConsistent().
void changeBounds | ( | int | i, |
const S * | newLower, | ||
const S * | newUpper | ||
) |
Changes bounds of column i
to newLower
and newUpper
.
Definition at line 1576 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), LPColSetBase< R >::lower_w(), and LPColSetBase< R >::upper_w().
|
virtual |
Changes bounds of column with identifier id
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1584 of file spxlpbase.h.
References SPxLPBase< R >::changeBounds(), and SPxLPBase< R >::number().
|
virtual |
Replaces i
'th column of LP with newCol
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1794 of file spxlpbase.h.
References LPColSetBase< R >::add2(), LPRowSetBase< R >::add2(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeObj(), SPxLPBase< R >::changeUpper(), SVectorBase< R >::clear(), LPColBase< R >::colVector(), SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), SPxLPBase< R >::isConsistent(), LPColBase< R >::lower(), LPColBase< R >::obj(), SVectorBase< R >::pos(), SVectorBase< R >::remove(), SPxLPBase< R >::rowVector_w(), SVectorBase< R >::size(), soplex::spxLdexp(), LPColBase< R >::upper(), and SVectorBase< R >::value().
Referenced by SPxLPBase< R >::changeCol().
Replaces column with identifier id
with newCol
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1837 of file spxlpbase.h.
References SPxLPBase< R >::changeCol(), and SPxLPBase< R >::number().
|
virtual |
Changes LP element (i
, j
) to val
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1843 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, LPColSetBase< R >::add2(), LPRowSetBase< R >::add2(), SPxLPBase< R >::colVector_w(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, SVectorBase< R >::pos(), SVectorBase< R >::remove(), SPxLPBase< R >::rowVector_w(), SPxLPBase< R >::tolerances(), and SVectorBase< R >::value().
Referenced by SPxLPBase< R >::changeElement().
void changeElement | ( | int | i, |
int | j, | ||
const S * | val | ||
) |
Changes LP element (i
, j
) to val
.
Definition at line 1886 of file spxlpbase.h.
References LPColSetBase< R >::add2(), LPRowSetBase< R >::add2(), SPxLPBase< R >::colVector_w(), SPxLPBase< R >::isConsistent(), SVectorBase< R >::pos(), SVectorBase< R >::remove(), SPxLPBase< R >::rowVector_w(), and SVectorBase< R >::value().
|
virtual |
Changes LP element identified by (rid
, cid
) to val
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1917 of file spxlpbase.h.
References SPxLPBase< R >::changeElement(), and SPxLPBase< R >::number().
|
virtual |
Changes left hand side vector for constraints to newLhs
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1590 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, VectorBase< R >::dim(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), and SPxLPBase< R >::lp_scaler.
Referenced by SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeRange(), and SPxLPBase< R >::changeRow().
|
virtual |
Changes i
'th left hand side value to newLhs
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1609 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, soplex::infinity, SPxLPBase< R >::isConsistent(), LPRowSetBase< R >::lhs_w(), and SPxLPBase< R >::lp_scaler.
void changeLhs | ( | int | i, |
const S * | newLhs | ||
) |
Changes i
'th left hand side value to newLhs
.
Definition at line 1625 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), and LPRowSetBase< R >::lhs_w().
|
virtual |
Changes left hand side value for row with identifier id
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1632 of file spxlpbase.h.
References SPxLPBase< R >::changeLhs(), and SPxLPBase< R >::number().
|
virtual |
Changes vector of lower bounds to newLower
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1462 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, VectorBase< R >::dim(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lower(), LPColSetBase< R >::lower_w(), and SPxLPBase< R >::lp_scaler.
Referenced by SPxLPBase< R >::changeBounds(), SPxLPBase< R >::changeCol(), and SPxLPBase< R >::changeLower().
|
virtual |
changes i
'th lower bound to newLower
. scale
determines whether the new data should be scaled
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1481 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, soplex::infinity, SPxLPBase< R >::isConsistent(), LPColSetBase< R >::lower_w(), and SPxLPBase< R >::lp_scaler.
void changeLower | ( | int | i, |
const S * | newLower | ||
) |
changes i
'th lower bound to newLower
.
Definition at line 1497 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), and LPColSetBase< R >::lower_w().
|
virtual |
changes lower bound of column with identifier id
to newLower
. scale
determines whether the new data should be scaled
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1504 of file spxlpbase.h.
References SPxLPBase< R >::changeLower(), and SPxLPBase< R >::number().
|
virtual |
Changes objective vector to newObj
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1414 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, VectorBase< R >::dim(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::maxObj(), and LPColSetBase< R >::maxObj_w().
Referenced by SPxLPBase< R >::changeMaxObj(), and SPxLPBase< R >::changeObj().
|
virtual |
changes i
'th objective vector element to newVal
. scale
determines whether the new data should be scaled
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1433 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, and LPColSetBase< R >::maxObj_w().
void changeMaxObj | ( | int | i, |
const S * | newVal | ||
) |
changes i
'th objective vector element to newVal
.
Definition at line 1449 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), and LPColSetBase< R >::maxObj_w().
|
virtual |
Changes objective value of column with identifier id
to newVal
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1456 of file spxlpbase.h.
References SPxLPBase< R >::changeMaxObj(), and SPxLPBase< R >::number().
|
virtual |
Changes objective vector to newObj
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1378 of file spxlpbase.h.
References SPxLPBase< R >::changeMaxObj(), LPColSetBase< R >::maxObj_w(), SPxLPBase< R >::MINIMIZE, and SPxLPBase< R >::spxSense().
Referenced by SPxLPBase< R >::changeCol(), and SPxLPBase< R >::changeObj().
|
virtual |
changes i
'th objective vector element to newVal
. scale
determines whether the new data should be scaled
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1387 of file spxlpbase.h.
References SPxLPBase< R >::changeMaxObj(), LPColSetBase< R >::maxObj_w(), SPxLPBase< R >::MINIMIZE, and SPxLPBase< R >::spxSense().
void changeObj | ( | int | i, |
const S * | newVal | ||
) |
changes i
'th objective vector element to newVal
.
Definition at line 1397 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), LPColSetBase< R >::maxObj_w(), SPxLPBase< R >::MINIMIZE, and SPxLPBase< R >::spxSense().
|
virtual |
Changes objective value of column with identifier id
to newVal
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1408 of file spxlpbase.h.
References SPxLPBase< R >::changeObj(), and SPxLPBase< R >::number().
void changeObjOffset | ( | const T & | o | ) |
Definition at line 1935 of file spxlpbase.h.
References SPxLPBase< R >::offset.
|
virtual |
Changes left and right hand side vectors. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1678 of file spxlpbase.h.
References SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeRhs(), and SPxLPBase< R >::isConsistent().
Referenced by SPxLPBase< R >::changeRange().
|
virtual |
Changes left and right hand side of row i
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1687 of file spxlpbase.h.
References SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeRhs(), and SPxLPBase< R >::isConsistent().
void changeRange | ( | int | i, |
const S * | newLhs, | ||
const S * | newRhs | ||
) |
Changes left and right hand side of row i
.
Definition at line 1696 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), LPRowSetBase< R >::lhs_w(), and LPRowSetBase< R >::rhs_w().
|
virtual |
Changes left and right hand side of row with identifier id
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1704 of file spxlpbase.h.
References SPxLPBase< R >::changeRange(), and SPxLPBase< R >::number().
|
virtual |
Changes right hand side vector for constraints to newRhs
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1638 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, VectorBase< R >::dim(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::rhs(), and LPRowSetBase< R >::rhs_w().
Referenced by SPxLPBase< R >::changeRange(), SPxLPBase< R >::changeRhs(), and SPxLPBase< R >::changeRow().
|
virtual |
Changes i
'th right hand side value to newRhs
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1657 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, soplex::infinity, SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, and LPRowSetBase< R >::rhs_w().
|
virtual |
Changes right hand side value for row with identifier id
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1672 of file spxlpbase.h.
References SPxLPBase< R >::changeRhs(), and SPxLPBase< R >::number().
|
virtual |
Replaces i
'th row of LP with newRow
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1745 of file spxlpbase.h.
References LPColSetBase< R >::add2(), LPRowSetBase< R >::add2(), SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeRowObj(), SVectorBase< R >::clear(), SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), SPxLPBase< R >::isConsistent(), LPRowBase< R >::lhs(), LPRowBase< R >::obj(), SVectorBase< R >::pos(), SVectorBase< R >::remove(), LPRowBase< R >::rhs(), LPRowBase< R >::rowVector(), SPxLPBase< R >::rowVector_w(), SVectorBase< R >::size(), soplex::spxLdexp(), and SVectorBase< R >::value().
Referenced by SPxLPBase< R >::changeRow().
Replaces row with identifier id
with newRow
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1788 of file spxlpbase.h.
References SPxLPBase< R >::changeRow(), and SPxLPBase< R >::number().
|
virtual |
Changes row objective function vector to newRowObj
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1710 of file spxlpbase.h.
References VectorBase< R >::dim(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::MINIMIZE, LPRowSetBase< R >::obj_w(), and SPxLPBase< R >::spxSense().
Referenced by SPxLPBase< R >::changeRow(), and SPxLPBase< R >::changeRowObj().
|
virtual |
Changes i
'th row objective function value to newRowObj
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1722 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), SPxLPBase< R >::MINIMIZE, LPRowSetBase< R >::obj_w(), and SPxLPBase< R >::spxSense().
|
virtual |
Changes row objective function value for row with identifier id
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1733 of file spxlpbase.h.
References SPxLPBase< R >::changeRowObj(), and SPxLPBase< R >::number().
|
virtual |
Changes optimization sense to sns
.
Definition at line 1923 of file spxlpbase.h.
References LPColSetBase< R >::maxObj_w(), LPRowSetBase< R >::obj_w(), and SPxLPBase< R >::thesense.
|
virtual |
Changes vector of upper bounds to newUpper
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1510 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, VectorBase< R >::dim(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::upper(), and LPColSetBase< R >::upper_w().
Referenced by SPxLPBase< R >::changeBounds(), SPxLPBase< R >::changeCol(), and SPxLPBase< R >::changeUpper().
|
virtual |
Changes i
'th upper bound to newUpper
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1529 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, soplex::infinity, SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, and LPColSetBase< R >::upper_w().
void changeUpper | ( | int | i, |
const S * | newUpper | ||
) |
Changes i
'th upper bound to newUpper
.
Definition at line 1545 of file spxlpbase.h.
References SPxLPBase< R >::isConsistent(), and LPColSetBase< R >::upper_w().
|
virtual |
Changes upper bound of column with identifier id
to newLower
. scale
determines whether the new data should be scaled.
Reimplemented in SPxSolverBase< BP >, and SPxSolverBase< R >.
Definition at line 1552 of file spxlpbase.h.
References SPxLPBase< R >::changeUpper(), and SPxLPBase< R >::number().
SPxColId cId | ( | int | n | ) | const |
Returns the column identifier for column n
.
Definition at line 612 of file spxlpbase.h.
Referenced by SPxLPBase< R >::addCol(), SPxLPBase< R >::addCols(), SPxSolverBase< R >::coId(), SPxSolverBase< R >::colId(), and SPxSolverBase< R >::id().
|
virtual |
clears the LP.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 1172 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, LPColSetBase< R >::clear(), LPRowSetBase< R >::clear(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::MAXIMIZE, SPxLPBase< R >::offset, and SPxLPBase< R >::thesense.
Referenced by SPxLPBase< R >::SPxLPBase().
|
virtual |
Clears row objective function values for all rows.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 1739 of file spxlpbase.h.
References LPRowSetBase< R >::obj_w().
Referenced by SPxSolverBase< R >::clearRowObjs().
const SVectorBase< R > & colVector | ( | const SPxColId & | id | ) | const |
Returns column vector of column with identifier id
.
Definition at line 422 of file spxlpbase.h.
References LPColSetBase< R >::colVector().
const SVectorBase< R > & colVector | ( | int | i | ) | const |
Returns column vector of column i
.
Definition at line 416 of file spxlpbase.h.
References LPColSetBase< R >::colVector().
Referenced by SPxLPBase< R >::addCols(), SPxLPBase< R >::addPrimalActivity(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::doRemoveCol(), SPxMainSM< R >::ForceConstraintPS::ForceConstraintPS(), SPxLPBase< R >::getCol(), SPxLPBase< R >::getCols(), SPxLPBase< R >::isConsistent(), and SPxLPBase< R >::nNzos().
|
private |
Returns the LP as an LPRowBase<R>Set.
Definition at line 2340 of file spxlpbase.h.
References LPColSetBase< R >::colVector_w().
Referenced by SPxLPBase< R >::addRows(), SPxLPBase< R >::changeCol(), SPxLPBase< R >::changeElement(), SPxLPBase< R >::changeRow(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::doRemoveRow(), and SPxLPBase< R >::doRemoveRows().
|
virtual |
Computes "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero.
SPxInternalCodeException | if dimension of dual vector does not match number of rows or if the dimension of the activity vector does not match the number of columns |
|
virtual |
Computes activity of the rows for a given primal vector; activity does not need to be zero.
SPxInternalCodeException | if the dimension of primal vector does not match number of columns or if the dimension of the activity vector does not match the number of rows unscaled determines whether the returned data should be unscaled (if scaling was applied prior) |
|
private |
Definition at line 2582 of file spxlpbase.h.
References LPColSetBase< R >::add(), LPRowSetBase< R >::add2(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), soplex::infinity, SPxLPBase< R >::lower(), LPColSetBase< R >::lower_w(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::MAXIMIZE, LPColSetBase< R >::maxObj_w(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SVectorBase< R >::size(), soplex::spxLdexp(), SPxLPBase< R >::thesense, SPxLPBase< R >::upper(), LPColSetBase< R >::upper_w(), and SVectorBase< R >::value().
Referenced by SPxLPBase< R >::addCol().
|
private |
Definition at line 2642 of file spxlpbase.h.
References LPColSetBase< R >::add(), LPRowSetBase< R >::add2(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), soplex::infinity, SPxLPBase< R >::lower(), LPColSetBase< R >::lower_w(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::MAXIMIZE, LPColSetBase< R >::maxObj_w(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SVectorBase< R >::size(), soplex::spxLdexp(), SPxLPBase< R >::thesense, SPxLPBase< R >::upper(), LPColSetBase< R >::upper_w(), and SVectorBase< R >::value().
|
private |
Definition at line 2702 of file spxlpbase.h.
References LPColSetBase< R >::add(), LPRowSetBase< R >::add(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), soplex::infinity, SPxLPBase< R >::lower(), LPColSetBase< R >::lower_w(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::MAXIMIZE, LPColSetBase< R >::maxObj_w(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), DataArray< T >::reSize(), SPxLPBase< R >::rowVector(), SPxLPBase< R >::rowVector_w(), SVSetBase< R >::set, SVectorBase< R >::size(), soplex::spxLdexp(), SPxLPBase< R >::thesense, SPxLPBase< R >::upper(), LPColSetBase< R >::upper_w(), SVectorBase< R >::value(), and LPRowSetBase< R >::xtend().
Referenced by SPxLPBase< R >::addCols().
|
private |
Definition at line 2352 of file spxlpbase.h.
References LPRowSetBase< R >::add(), LPColSetBase< R >::add2(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SVectorBase< R >::index(), soplex::infinity, SPxLPBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::maxRowObj_w(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rhs(), LPRowSetBase< R >::rhs_w(), SPxLPBase< R >::rowVector_w(), SVectorBase< R >::size(), soplex::spxLdexp(), and SVectorBase< R >::value().
Referenced by SPxLPBase< R >::addRow().
|
private |
Definition at line 2409 of file spxlpbase.h.
References LPRowSetBase< R >::add(), LPColSetBase< R >::add2(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SVectorBase< R >::index(), soplex::infinity, SPxLPBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::maxRowObj_w(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rhs(), LPRowSetBase< R >::rhs_w(), SPxLPBase< R >::rowVector_w(), SVectorBase< R >::size(), soplex::spxLdexp(), and SVectorBase< R >::value().
|
private |
Definition at line 2467 of file spxlpbase.h.
References LPColSetBase< R >::add(), LPRowSetBase< R >::add(), SPxLPBase< R >::addedCols(), SPxLPBase< R >::addedRows(), SPxLPBase< R >::colVector(), SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), soplex::infinity, SPxLPBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::maxRowObj_w(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), DataArray< T >::reSize(), SPxLPBase< R >::rhs(), LPRowSetBase< R >::rhs_w(), SPxLPBase< R >::rowVector_w(), SVSetBase< R >::set, SVectorBase< R >::size(), soplex::spxLdexp(), SVectorBase< R >::value(), and LPColSetBase< R >::xtend().
Referenced by SPxLPBase< R >::addRows().
|
protectedvirtual |
Internal helper method.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 2207 of file spxlpbase.h.
References SPxLPBase< R >::colVector(), SVectorBase< R >::index(), SPxLPBase< R >::nCols(), SVectorBase< R >::pos(), LPColSetBase< R >::remove(), SVectorBase< R >::remove(), SPxLPBase< R >::rowVector_w(), and SVectorBase< R >::size().
Referenced by SPxLPBase< R >::removeCol().
|
protectedvirtual |
Internal helper method.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 2248 of file spxlpbase.h.
References SVectorBase< R >::index(), SPxLPBase< R >::nRows(), LPColSetBase< R >::remove(), SVectorBase< R >::remove(), SPxLPBase< R >::rowVector_w(), and SVectorBase< R >::size().
Referenced by SPxLPBase< R >::removeCols().
|
protectedvirtual |
Internal helper method.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 2146 of file spxlpbase.h.
References SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), SPxLPBase< R >::nRows(), SVectorBase< R >::pos(), LPRowSetBase< R >::remove(), SVectorBase< R >::remove(), SPxLPBase< R >::rowVector(), and SVectorBase< R >::size().
Referenced by SPxLPBase< R >::removeRow().
|
protectedvirtual |
Internal helper method.
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 2184 of file spxlpbase.h.
References SPxLPBase< R >::colVector_w(), SVectorBase< R >::index(), SPxLPBase< R >::nCols(), LPRowSetBase< R >::remove(), SVectorBase< R >::remove(), and SVectorBase< R >::size().
Referenced by SPxLPBase< R >::removeRows().
Gets column with identifier id
.
Definition at line 387 of file spxlpbase.h.
References SPxLPBase< R >::getCol(), and SPxLPBase< R >::number().
void getCol | ( | int | i, |
LPColBase< R > & | col | ||
) | const |
Gets i
'th column.
Definition at line 378 of file spxlpbase.h.
References SPxLPBase< R >::colVector(), SPxLPBase< R >::lower(), LPRowSetBase< R >::obj(), LPColBase< R >::setColVector(), LPColBase< R >::setLower(), LPColBase< R >::setObj(), LPColBase< R >::setUpper(), and SPxLPBase< R >::upper().
Referenced by SPxLPBase< R >::getCol(), and SPxLPBase< R >::getCols().
void getCols | ( | int | start, |
int | end, | ||
LPColSetBase< R > & | set | ||
) | const |
Gets columns start
, ..., end
.
Definition at line 393 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, SPxLPBase< R >::colVector(), SPxLPBase< R >::getCol(), SPxLPBase< R >::lower(), LPRowSetBase< R >::obj(), SVSetBase< R >::set, and SPxLPBase< R >::upper().
void getColVectorUnscaled | ( | const SPxColId & | id, |
DSVectorBase< R > & | vec | ||
) | const |
Gets column vector of column with identifier id
.
void getColVectorUnscaled | ( | int | i, |
DSVectorBase< R > & | vec | ||
) | const |
Gets column vector of column i
.
void getLhsUnscaled | ( | VectorBase< R > & | vec | ) | const |
Returns unscaled left hand side vector.
void getLowerUnscaled | ( | VectorBase< R > & | vec | ) | const |
Gets unscaled lower bound vector.
void getObj | ( | VectorBase< R > & | pobj | ) | const |
Gets objective vector.
Definition at line 437 of file spxlpbase.h.
References LPColSetBase< R >::maxObj(), SPxLPBase< R >::MINIMIZE, and SPxLPBase< R >::spxSense().
void getObjUnscaled | ( | VectorBase< R > & | pobj | ) | const |
Gets unscaled objective vector.
void getRhs | ( | VectorBase< R > & | vec | ) | const |
Gets (internal and possibly scaled) right hand side vector.
Definition at line 279 of file spxlpbase.h.
References LPRowSetBase< R >::rhs().
void getRhsUnscaled | ( | VectorBase< R > & | vec | ) | const |
Gets unscaled right hand side vector.
Gets row with identifier id
.
Definition at line 230 of file spxlpbase.h.
References SPxLPBase< R >::getRow(), and SPxLPBase< R >::number().
void getRow | ( | int | i, |
LPRowBase< R > & | row | ||
) | const |
Gets i
'th row.
Definition at line 221 of file spxlpbase.h.
References SPxLPBase< R >::lhs(), SPxLPBase< R >::rhs(), SPxLPBase< R >::rowObj(), SPxLPBase< R >::rowVector(), LPRowBase< R >::setLhs(), LPRowBase< R >::setObj(), LPRowBase< R >::setRhs(), and LPRowBase< R >::setRowVector().
Referenced by SPxLPBase< R >::getRow().
void getRowObj | ( | VectorBase< R > & | prowobj | ) | const |
Gets row objective function vector.
Definition at line 312 of file spxlpbase.h.
References SPxLPBase< R >::MINIMIZE, LPRowSetBase< R >::obj(), and SPxLPBase< R >::spxSense().
void getRows | ( | int | start, |
int | end, | ||
LPRowSetBase< R > & | set | ||
) | const |
Gets rows start
, ... end
.
Definition at line 236 of file spxlpbase.h.
References SPxLPBase< R >::lhs(), SPxLPBase< R >::rhs(), SPxLPBase< R >::rowObj(), SPxLPBase< R >::rowVector(), and SVSetBase< R >::set.
void getRowVectorUnscaled | ( | int | i, |
DSVectorBase< R > & | vec | ||
) | const |
Gets unscaled row vector of row i
.
void getUpperUnscaled | ( | VectorBase< R > & | vec | ) | const |
Gets unscaled upper bound vector.
bool has | ( | const SPxColId & | id | ) | const |
Returns the column number of the column with identifier id
.
Definition at line 592 of file spxlpbase.h.
References LPColSetBase< R >::has().
bool has | ( | const SPxId & | id | ) | const |
Returns the row or column number for identifier id
.
Definition at line 598 of file spxlpbase.h.
References SPxId::COL_ID, LPColSetBase< R >::has(), LPRowSetBase< R >::has(), and LPRowSetBase< R >::type().
bool has | ( | const SPxRowId & | id | ) | const |
Returns the row number of the row with identifier id
.
Definition at line 586 of file spxlpbase.h.
References LPRowSetBase< R >::has().
bool isConsistent | ( | ) | const |
Consistency check.
Definition at line 2034 of file spxlpbase.h.
References SPxLPBase< R >::_tolerances, SPxLPBase< R >::colVector(), SVectorBase< R >::index(), LPColSetBase< R >::isConsistent(), LPRowSetBase< R >::isConsistent(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SVectorBase< R >::pos(), SPxLPBase< R >::rowVector(), SVectorBase< R >::size(), SPX_MSG_INCONSISTENT, and SVectorBase< R >::value().
Referenced by SPxLPBase< R >::changeBounds(), SPxLPBase< R >::changeCol(), SPxLPBase< R >::changeElement(), SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::changeObj(), SPxLPBase< R >::changeRange(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeRow(), SPxLPBase< R >::changeRowObj(), SPxLPBase< R >::changeUpper(), SPxLPBase< R >::operator=(), and SPxLPBase< R >::SPxLPBase().
bool isScaled | ( | ) | const |
Returns true if and only if the LP is scaled.
Definition at line 179 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled.
const VectorBase< R > & lhs | ( | ) | const |
Returns left hand side vector.
Definition at line 294 of file spxlpbase.h.
References LPRowSetBase< R >::lhs().
Referenced by SPxLPBase< R >::changeLhs(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxMainSM< R >::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxSolverBase< R >::getLhs(), SPxLPBase< R >::getRow(), SPxLPBase< R >::getRows(), and SPxLPBase< R >::printProblemStatistics().
const R & lhs | ( | const SPxRowId & | id | ) | const |
Returns left hand side of row with identifier id
.
Definition at line 306 of file spxlpbase.h.
References LPRowSetBase< R >::lhs().
const R & lhs | ( | int | i | ) | const |
Returns left hand side of row number i
.
Definition at line 300 of file spxlpbase.h.
References LPRowSetBase< R >::lhs().
|
protected |
Returns left hand side of row i
.
Definition at line 2098 of file spxlpbase.h.
References LPRowSetBase< R >::lhs_w().
R lhsUnscaled | ( | const SPxRowId & | id | ) | const |
Returns left hand side of row with identifier id
.
R lhsUnscaled | ( | int | i | ) | const |
Returns unscaled left hand side of row number i
.
const VectorBase< R > & lower | ( | ) | const |
Returns (internal and possibly scaled) lower bound vector.
Definition at line 527 of file spxlpbase.h.
References LPColSetBase< R >::lower().
Referenced by SPxLPBase< R >::changeLower(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxMainSM< R >::FixBoundsPS::FixBoundsPS(), SPxLPBase< R >::getCol(), SPxLPBase< R >::getCols(), SPxSolverBase< R >::getLower(), and SPxLPBase< R >::printProblemStatistics().
const R & lower | ( | const SPxColId & | id | ) | const |
Returns (internal and possibly scaled) lower bound of column with identifier id
.
Definition at line 539 of file spxlpbase.h.
References LPColSetBase< R >::lower().
const R & lower | ( | int | i | ) | const |
Returns (internal and possibly scaled) lower bound of column i
.
Definition at line 533 of file spxlpbase.h.
References LPColSetBase< R >::lower().
|
protected |
Returns lower bound of column i
.
Definition at line 2122 of file spxlpbase.h.
References LPColSetBase< R >::lower_w().
R lowerUnscaled | ( | const SPxColId & | id | ) | const |
Returns unscaled lower bound of column with identifier id
.
R lowerUnscaled | ( | int | i | ) | const |
Returns unscaled lower bound of column i
.
|
protected |
Returns the LP as an LPColSetBase.
Definition at line 2140 of file spxlpbase.h.
Referenced by SPxSolverBase< R >::cols().
|
protected |
Returns the LP as an LPRowSetBase.
Definition at line 2134 of file spxlpbase.h.
Referenced by SPxSolverBase< R >::rows().
|
virtual |
Absolute biggest non-zero element in (in rational case possibly scaled) LP.
Referenced by SPxLPBase< R >::printProblemStatistics().
const VectorBase< R > & maxObj | ( | ) | const |
Returns objective vector for maximization problem.
Methods maxObj() return the objective vector or its elements, after transformation to a maximization problem. Since this is how SPxLPBase internally stores any LP these methods are generally faster. The following condition holds: obj() = spxSense() * maxObj().
Definition at line 473 of file spxlpbase.h.
References LPColSetBase< R >::maxObj().
Referenced by SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::maxObj(), and SPxLPBase< R >::obj().
const R & maxObj | ( | const SPxColId & | id | ) | const |
Returns objective value of column with identifier id
for maximization problem.
Definition at line 485 of file spxlpbase.h.
References SPxLPBase< R >::maxObj(), and SPxLPBase< R >::number().
const R & maxObj | ( | int | i | ) | const |
Returns objective value of column i
for maximization problem.
Definition at line 479 of file spxlpbase.h.
References LPColSetBase< R >::maxObj().
|
protected |
Returns objective value of column i
for maximization problem.
Definition at line 2110 of file spxlpbase.h.
References LPColSetBase< R >::maxObj_w().
R maxObjUnscaled | ( | const SPxColId & | id | ) | const |
Returns unscaled objective value of column with identifier id
for maximization problem.
R maxObjUnscaled | ( | int | i | ) | const |
Returns unscaled objective value of column i
for maximization problem.
void maxObjUnscaled | ( | VectorBase< R > & | vec | ) | const |
Returns unscaled objective vector for maximization problem.
const VectorBase< R > & maxRowObj | ( | ) | const |
Definition at line 339 of file spxlpbase.h.
References LPRowSetBase< R >::obj().
Referenced by SPxLPBase< R >::changeRowObj(), and SPxLPBase< R >::rowObj().
const R & maxRowObj | ( | const SPxRowId & | id | ) | const |
Returns row objective function value of row with identifier id
.
Definition at line 351 of file spxlpbase.h.
References LPRowSetBase< R >::obj().
const R & maxRowObj | ( | int | i | ) | const |
Definition at line 345 of file spxlpbase.h.
References LPRowSetBase< R >::obj().
|
protected |
Returns objective function value of row i
.
Definition at line 2104 of file spxlpbase.h.
References LPRowSetBase< R >::obj_w().
Referenced by SPxLPBase< R >::doAddRow(), and SPxLPBase< R >::doAddRows().
|
virtual |
Absolute smallest non-zero element in (possibly scaled) LP.
Referenced by SPxLPBase< R >::printProblemStatistics().
int nCols | ( | ) | const |
Returns number of columns in LP.
Definition at line 197 of file spxlpbase.h.
References LPColSetBase< R >::num().
Referenced by SPxLPBase< R >::addCol(), SPxLPBase< R >::addCols(), SPxLPBase< R >::addDualActivity(), SPxLPBase< R >::addPrimalActivity(), SPxLPBase< R >::addRow(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::doRemoveCol(), SPxLPBase< R >::doRemoveRows(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::nNzos(), SPxLPBase< R >::printProblemStatistics(), SPxMainSM< R >::removeCol(), SPxLPBase< R >::removeColRange(), SPxLPBase< R >::removeCols(), and SPxLPBase< R >::subDualActivity().
int nNzos | ( | ) | const |
Returns number of nonzeros in LP.
Definition at line 203 of file spxlpbase.h.
References SPxLPBase< R >::colVector(), and SPxLPBase< R >::nCols().
Referenced by SPxLPBase< R >::printProblemStatistics().
int nRows | ( | ) | const |
Returns number of rows in LP.
Definition at line 191 of file spxlpbase.h.
References LPRowSetBase< R >::num().
Referenced by SPxLPBase< R >::addCol(), SPxLPBase< R >::addCols(), SPxLPBase< R >::addDualActivity(), SPxLPBase< R >::addPrimalActivity(), SPxLPBase< R >::addRow(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::doRemoveCols(), SPxLPBase< R >::doRemoveRow(), SPxLPBase< R >::isConsistent(), SPxLPBase< R >::printProblemStatistics(), SPxMainSM< R >::removeRow(), SPxLPBase< R >::removeRowRange(), SPxLPBase< R >::removeRows(), and SPxLPBase< R >::subDualActivity().
int number | ( | const SPxColId & | id | ) | const |
Returns the column number of the column with identifier id
.
Definition at line 572 of file spxlpbase.h.
References LPColSetBase< R >::number().
int number | ( | const SPxId & | id | ) | const |
Returns the row or column number for identifier id
.
Definition at line 578 of file spxlpbase.h.
References SPxId::COL_ID, LPColSetBase< R >::number(), LPRowSetBase< R >::number(), and LPRowSetBase< R >::type().
int number | ( | const SPxRowId & | id | ) | const |
Returns the row number of the row with identifier id
.
Definition at line 566 of file spxlpbase.h.
References LPRowSetBase< R >::number().
Referenced by SPxLPBase< R >::changeBounds(), SPxSolverBase< R >::changeBounds(), SPxLPBase< R >::changeCol(), SPxSolverBase< R >::changeCol(), SPxLPBase< R >::changeElement(), SPxSolverBase< R >::changeElement(), SPxLPBase< R >::changeLhs(), SPxSolverBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxSolverBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxSolverBase< R >::changeMaxObj(), SPxLPBase< R >::changeObj(), SPxSolverBase< R >::changeObj(), SPxLPBase< R >::changeRange(), SPxSolverBase< R >::changeRange(), SPxLPBase< R >::changeRhs(), SPxSolverBase< R >::changeRhs(), SPxLPBase< R >::changeRow(), SPxSolverBase< R >::changeRow(), SPxLPBase< R >::changeRowObj(), SPxSolverBase< R >::changeRowObj(), SPxLPBase< R >::changeUpper(), SPxSolverBase< R >::changeUpper(), SPxSolverBase< R >::coVector(), SPxLPBase< R >::getCol(), SPxLPBase< R >::getRow(), SPxSolverBase< R >::isBasic(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::obj(), SPxLPBase< R >::removeCol(), SPxLPBase< R >::removeCols(), SPxLPBase< R >::removeRow(), SPxLPBase< R >::removeRows(), and SPxSolverBase< R >::vector().
R obj | ( | const SPxColId & | id | ) | const |
Returns objective value of column with identifier id
.
Definition at line 457 of file spxlpbase.h.
References SPxLPBase< R >::number(), and LPRowSetBase< R >::obj().
R obj | ( | int | i | ) | const |
Returns objective value of column i
.
Definition at line 446 of file spxlpbase.h.
References SPxLPBase< R >::maxObj(), SPxLPBase< R >::MINIMIZE, and SPxLPBase< R >::spxSense().
Referenced by SPxMainSM< R >::FixVariablePS::FixVariablePS(), SPxMainSM< R >::ForceConstraintPS::ForceConstraintPS(), and SPxMainSM< R >::FreeColSingletonPS::FreeColSingletonPS().
const R & objOffset | ( | ) | const |
Returns the objective function value offset.
Definition at line 560 of file spxlpbase.h.
References SPxLPBase< R >::offset.
R objUnscaled | ( | const SPxColId & | id | ) | const |
Returns unscaled objective value of column with identifier id
.
R objUnscaled | ( | int | i | ) | const |
Returns unscaled objective value of column i
.
Assignment operator.
Definition at line 2872 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, SPxLPBase< R >::_tolerances, SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::offset, LPColSetBase< R >::operator=(), LPRowSetBase< R >::operator=(), SPxLPBase< R >::spxout, and SPxLPBase< R >::thesense.
Assignment operator.
Definition at line 2893 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled, SPxLPBase< R >::_tolerances, SPxLPBase< R >::isConsistent(), SPxLPBase< R >::lp_scaler, SPxLPBase< R >::offset, LPColSetBase< R >::operator=(), LPRowSetBase< R >::operator=(), SPxLPBase< R >::spxout, and SPxLPBase< R >::thesense.
void printProblemStatistics | ( | std::ostream & | os | ) |
prints problem statistics
Definition at line 1278 of file spxlpbase.h.
References soplex::EQ(), soplex::infinity, SPxLPBase< R >::lhs(), SPxLPBase< R >::lower(), SPxLPBase< R >::maxAbsNzo(), SPxLPBase< R >::minAbsNzo(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nNzos(), SPxLPBase< R >::nRows(), SPxLPBase< R >::rhs(), SPxOut::setFixed(), SPxLPBase< R >::tolerances(), and SPxLPBase< R >::upper().
|
virtual |
Reads LP in LP or MPS format from input stream in
.
in | input stream. |
rowNames | contains after the call the names of the constraints (rows) in the same order as the rows in the LP. Constraints without a name (only possible with LPF files) are automatically assigned a name. Maybe 0 if the names are not needed. |
colNames | contains after the call the names of the variables (columns) in the same order as the columns in the LP. Maybe 0 if the names are not needed. |
intVars | contains after the call the indices of those variables that where marked as beeing integer in the file. Maybe 0 if the information is not needed. |
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 1210 of file spxlpbase.h.
References SPxLPBase< R >::readLPF(), and SPxLPBase< R >::readMPS().
Referenced by SPxLPBase< R >::readFile().
|
virtual |
Reads LP from a file.
Definition at line 1231 of file spxlpbase.h.
References SPxLPBase< R >::read().
|
virtual |
Reads LP in LP format from input stream in
.
Referenced by SPxLPBase< R >::read().
|
virtual |
Reads an LP in MPS format from input stream in
.
Referenced by SPxLPBase< R >::read().
|
virtual |
Removes i
'th column.
Definition at line 1072 of file spxlpbase.h.
References SPxLPBase< R >::doRemoveCol().
Referenced by SPxLPBase< R >::removeCol(), and SPxMainSM< R >::removeCol().
|
virtual |
Removes column with identifier id
.
Definition at line 1081 of file spxlpbase.h.
References SPxLPBase< R >::number(), and SPxLPBase< R >::removeCol().
|
virtual |
Removes columns from start
to end
(including both).
Definition at line 1142 of file spxlpbase.h.
References DataArray< T >::get_ptr(), SPxLPBase< R >::nCols(), and SPxLPBase< R >::removeCols().
|
virtual |
Removes n
LPCols.
Removing multiple columns with one method invocation is available in two flavours. An array perm
can be passed as third argument or not. If given, perm
must be an array at least of size nCols(). It is used to return the permutations resulting from this removal: perm
[i] < 0 indicates, that the element to index i
has been removed. Otherwise, perm
[i] is the new index of the element with index i
before the removal.
Definition at line 1122 of file spxlpbase.h.
References DataArray< T >::get_ptr(), SPxLPBase< R >::nCols(), and SPxLPBase< R >::removeCols().
|
virtual |
Removes multiple columns.
This method removes all LPColBases from the SPxLPBase with an index i
such that perm
[i] < 0. Upon completion, perm
[i] >= 0 indicates the new index where the i
'th LPColBase has been moved to due to this removal. Note, that perm
must point to an array of at least nCols() ints.
Definition at line 1091 of file spxlpbase.h.
References SPxLPBase< R >::doRemoveCols().
Referenced by SPxLPBase< R >::removeColRange(), and SPxLPBase< R >::removeCols().
|
virtual |
Definition at line 1097 of file spxlpbase.h.
References DataArray< T >::get_ptr(), SPxLPBase< R >::nCols(), SPxLPBase< R >::number(), and SPxLPBase< R >::removeCols().
|
virtual |
Removes i
'th row.
Definition at line 972 of file spxlpbase.h.
References SPxLPBase< R >::doRemoveRow().
Referenced by SPxMainSM< R >::removeRow(), and SPxLPBase< R >::removeRow().
|
virtual |
Removes row with identifier id
.
Definition at line 981 of file spxlpbase.h.
References SPxLPBase< R >::number(), and SPxLPBase< R >::removeRow().
|
virtual |
Removes rows from start
to end
(including both).
Definition at line 1042 of file spxlpbase.h.
References DataArray< T >::get_ptr(), SPxLPBase< R >::nRows(), and SPxLPBase< R >::removeRows().
|
virtual |
Removes n
LPRowBases.
Removing multiple rows with one method invocation is available in two flavours. An array perm
can be passed as third argument or not. If given, perm
must be an array at least of size nRows(). It is used to return the permutations resulting from this removal: perm
[i] < 0 indicates, that the element to index i
has been removed. Otherwise, perm
[i] is the new index of the element with index i
before the removal.
Definition at line 1022 of file spxlpbase.h.
References DataArray< T >::get_ptr(), SPxLPBase< R >::nRows(), and SPxLPBase< R >::removeRows().
|
virtual |
Removes multiple rows.
This method removes all LPRowBases from the SPxLPBase with an index i
such that perm
[i] < 0. Upon completion, perm
[i] >= 0 indicates the new index where the i'th
LPRowBase<R> has been moved to due to this removal. Note that perm
must point to an array of at least nRows() ints.
Definition at line 991 of file spxlpbase.h.
References SPxLPBase< R >::doRemoveRows().
Referenced by SPxLPBase< R >::removeRowRange(), and SPxLPBase< R >::removeRows().
|
virtual |
Definition at line 997 of file spxlpbase.h.
References DataArray< T >::get_ptr(), SPxLPBase< R >::nRows(), SPxLPBase< R >::number(), and SPxLPBase< R >::removeRows().
const VectorBase< R > & rhs | ( | ) | const |
Returns right hand side vector.
Definition at line 260 of file spxlpbase.h.
References LPRowSetBase< R >::rhs().
Referenced by SPxLPBase< R >::changeRhs(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxMainSM< R >::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxSolverBase< R >::getRhs(), SPxLPBase< R >::getRow(), SPxLPBase< R >::getRows(), and SPxLPBase< R >::printProblemStatistics().
const R & rhs | ( | const SPxRowId & | id | ) | const |
Returns right hand side of row with identifier id
.
Definition at line 273 of file spxlpbase.h.
References LPRowSetBase< R >::rhs().
const R & rhs | ( | int | i | ) | const |
Returns right hand side of row number i
.
Definition at line 266 of file spxlpbase.h.
References LPRowSetBase< R >::rhs().
|
protected |
Returns right hand side of row i
.
Definition at line 2092 of file spxlpbase.h.
References LPRowSetBase< R >::rhs_w().
R rhsUnscaled | ( | const SPxRowId & | id | ) | const |
Returns unscaled right hand side of row with identifier id
.
R rhsUnscaled | ( | int | i | ) | const |
Returns unscaled right hand side of row number i
.
SPxRowId rId | ( | int | n | ) | const |
Returns the row identifier for row n
.
Definition at line 606 of file spxlpbase.h.
Referenced by SPxLPBase< R >::addRow(), SPxLPBase< R >::addRows(), SPxSolverBase< R >::coId(), SPxSolverBase< R >::id(), and SPxSolverBase< R >::rowId().
R rowObj | ( | const SPxRowId & | id | ) | const |
Returns row objective function value of row with identifier id
.
Definition at line 330 of file spxlpbase.h.
References SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::MINIMIZE, and SPxLPBase< R >::spxSense().
R rowObj | ( | int | i | ) | const |
Definition at line 321 of file spxlpbase.h.
References SPxLPBase< R >::maxRowObj(), SPxLPBase< R >::MINIMIZE, and SPxLPBase< R >::spxSense().
Referenced by SPxMainSM< R >::DuplicateRowsPS::DuplicateRowsPS(), SPxMainSM< R >::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxLPBase< R >::getRow(), and SPxLPBase< R >::getRows().
Returns the inequality type of the row with identifier key
.
Definition at line 372 of file spxlpbase.h.
References LPRowSetBase< R >::type().
LPRowBase< R >::Type rowType | ( | int | i | ) | const |
Returns the inequality type of the i'th
LPRow.
Definition at line 366 of file spxlpbase.h.
References LPRowSetBase< R >::type().
const SVectorBase< R > & rowVector | ( | const SPxRowId & | id | ) | const |
Gets row vector of row with identifier id
.
Definition at line 251 of file spxlpbase.h.
References LPRowSetBase< R >::rowVector().
const SVectorBase< R > & rowVector | ( | int | i | ) | const |
Gets row vector of row i
.
Definition at line 245 of file spxlpbase.h.
References LPRowSetBase< R >::rowVector().
Referenced by SPxLPBase< R >::addCols(), SPxLPBase< R >::addDualActivity(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doRemoveRow(), SPxMainSM< R >::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxLPBase< R >::getRow(), SPxLPBase< R >::getRows(), SPxLPBase< R >::isConsistent(), and SPxLPBase< R >::subDualActivity().
|
private |
Definition at line 2346 of file spxlpbase.h.
References LPRowSetBase< R >::rowVector_w().
Referenced by SPxLPBase< R >::addCols(), SPxLPBase< R >::changeCol(), SPxLPBase< R >::changeElement(), SPxLPBase< R >::changeRow(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::doRemoveCol(), and SPxLPBase< R >::doRemoveCols().
void setOutstream | ( | SPxOut & | newOutstream | ) |
Definition at line 153 of file spxlpbase.h.
References SPxLPBase< R >::spxout.
void setScalingInfo | ( | bool | scaled | ) |
set whether the LP is scaled or not
Definition at line 185 of file spxlpbase.h.
References SPxLPBase< R >::_isScaled.
|
virtual |
set tolerances
Reimplemented in SPxSolverBase< R >, and SPxSolverBase< BP >.
Definition at line 173 of file spxlpbase.h.
References SPxLPBase< R >::_tolerances, and SPxLPBase< R >::tolerances().
SPxSense spxSense | ( | ) | const |
Returns the optimization sense.
Definition at line 554 of file spxlpbase.h.
References SPxLPBase< R >::thesense.
Referenced by SPxLPBase< R >::changeObj(), SPxLPBase< R >::changeRowObj(), SPxMainSM< R >::ForceConstraintPS::ForceConstraintPS(), SPxLPBase< R >::getObj(), SPxLPBase< R >::getRowObj(), SPxLPBase< R >::obj(), SPxLPBase< R >::rowObj(), and SPxSolverBase< R >::sense().
|
virtual |
Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero.
SPxInternalCodeException | if dimension of dual vector does not match number of rows or if the dimension of the activity vector does not match the number of columns |
Definition at line 1993 of file spxlpbase.h.
References VectorBase< R >::dim(), VectorBase< R >::multSub(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), and SPxLPBase< R >::rowVector().
const std::shared_ptr< Tolerances > tolerances | ( | ) | const |
returns current tolerances
Definition at line 167 of file spxlpbase.h.
References SPxLPBase< R >::_tolerances.
Referenced by SPxLPBase< R >::changeElement(), SPxLPBase< R >::printProblemStatistics(), and SPxLPBase< R >::setTolerances().
void unscaleLP | ( | ) |
unscales the lp and clears basis
const VectorBase< R > & upper | ( | ) | const |
Returns upper bound vector.
Definition at line 500 of file spxlpbase.h.
References LPColSetBase< R >::upper().
Referenced by SPxLPBase< R >::changeUpper(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxMainSM< R >::FixBoundsPS::FixBoundsPS(), SPxLPBase< R >::getCol(), SPxLPBase< R >::getCols(), SPxSolverBase< R >::getUpper(), and SPxLPBase< R >::printProblemStatistics().
const R & upper | ( | const SPxColId & | id | ) | const |
Returns upper bound of column with identifier id
.
Definition at line 512 of file spxlpbase.h.
References LPColSetBase< R >::upper().
const R & upper | ( | int | i | ) | const |
Returns upper bound of column i
.
Definition at line 506 of file spxlpbase.h.
References LPColSetBase< R >::upper().
|
protected |
Returns upper bound of column i
.
Definition at line 2116 of file spxlpbase.h.
References LPColSetBase< R >::upper_w().
R upperUnscaled | ( | const SPxColId & | id | ) | const |
Returns unscaled upper bound of column with identifier id
.
R upperUnscaled | ( | int | i | ) | const |
Returns unscaled upper bound of column i
.
|
virtual |
Write loaded LP to filename
.
Definition at line 1258 of file spxlpbase.h.
References SPxLPBase< R >::writeLPF(), and SPxLPBase< R >::writeMPS().
|
virtual |
Writes a file in LP format to out
. If rowNames
and colNames
are NULL
, default names are used for the constraints and variables. If intVars
is not NULL
, the variables contained in it are marked as integer in the output.
Referenced by SPxLPBase< R >::writeFileLPBase().
|
virtual |
Writes a file in MPS format to out
.
Referenced by SPxLPBase< R >::writeFileLPBase().
|
friend |
Definition at line 109 of file spxlpbase.h.
|
private |
true, if scaling has been performed
Definition at line 140 of file spxlpbase.h.
Referenced by SPxLPBase< R >::changeElement(), SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeUpper(), SPxLPBase< R >::clear(), SPxLPBase< R >::getCols(), SPxLPBase< R >::isScaled(), SPxLPBase< R >::operator=(), and SPxLPBase< R >::setScalingInfo().
|
protected |
Definition at line 2085 of file spxlpbase.h.
Referenced by SPxLPBase< R >::isConsistent(), SPxLPBase< R >::operator=(), SPxSolverBase< R >::setTolerances(), SPxLPBase< R >::setTolerances(), SPxLPBase< R >::SPxLPBase(), SPxLPBase< R >::tolerances(), and SPxSolverBase< R >::tolerances().
|
private |
points to the scaler if the lp has been scaled, to nullptr otherwise
Definition at line 142 of file spxlpbase.h.
Referenced by SPxLPBase< R >::changeElement(), SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeLower(), SPxLPBase< R >::changeMaxObj(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::changeUpper(), SPxLPBase< R >::clear(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::operator=(), and SPxLPBase< R >::SPxLPBase().
|
private |
offset computed, e.g., in simplification step
Definition at line 139 of file spxlpbase.h.
Referenced by SPxLPBase< R >::changeObjOffset(), SPxLPBase< R >::clear(), SPxLPBase< R >::objOffset(), and SPxLPBase< R >::operator=().
|
private |
Definition at line 110 of file spxlpbase.h.
|
private |
Definition at line 112 of file spxlpbase.h.
|
private |
Definition at line 114 of file spxlpbase.h.
|
private |
Definition at line 113 of file spxlpbase.h.
|
private |
Definition at line 115 of file spxlpbase.h.
SPxOut* spxout |
Definition at line 149 of file spxlpbase.h.
Referenced by SPxLPBase< R >::operator=(), and SPxLPBase< R >::setOutstream().
|
private |
Definition at line 111 of file spxlpbase.h.
|
private |
optimization sense.
Definition at line 138 of file spxlpbase.h.
Referenced by SPxLPBase< R >::addCol(), SPxLPBase< R >::addCols(), SPxLPBase< R >::changeSense(), SPxLPBase< R >::clear(), SPxLPBase< R >::doAddCol(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::operator=(), and SPxLPBase< R >::spxSense().