Loading...
Searching...
No Matches
spxlpbase.h
Go to the documentation of this file.
31/* undefine SOPLEX_DEBUG flag from including files; if SOPLEX_DEBUG should be defined in this file, do so below */
96 * Note, that the optimization sense is not saved directly. Instead, the objective function are multiplied by -1 to
97 * transform the LP to our standard form maximizing the objective function. However, the sense of the loaded LP can be
100 * Further, equality constraints are modeled by \f$l_r = u_r\f$. Analogously, fixed variables have \f$l_c = u_c\f$.
102 * #SPxLPBase%s are saved as an SVSet, both for columns and rows. Note that this is redundant but eases the access.
119 // ------------------------------------------------------------------------------------------------------------------
134 // ------------------------------------------------------------------------------------------------------------------
158 // ------------------------------------------------------------------------------------------------------------------
469 /** Methods #maxObj() return the objective vector or its elements, after transformation to a maximization
470 * problem. Since this is how SPxLPBase internally stores any LP these methods are generally faster. The following
619 // ------------------------------------------------------------------------------------------------------------------
689 void addRows(const S* lhsValues, const S* rowValues, const int* rowIndices, const int* rowStarts,
747 /* preset the sizes: beware that this can irritate a consistency check call from xtend(). We need to set the
859 void addCols(const S* objValue, const S* lowerValues, const S* colValues, const int* colIndices,
884 LPColSetBase<R>::add(&(objValue[i]), &(lowerValues[i]), (S*)0, (int*)nullptr, 0, &(upperValues[i]));
916 /* preset the sizes: beware that this can irritate a consistency check call from xtend(). We need to set the
967 // ------------------------------------------------------------------------------------------------------------------
987 /** This method removes all LPRowBase%s from the SPxLPBase with an index \p i such that \p perm[i] < 0. Upon
988 * completion, \p perm[i] >= 0 indicates the new index where the \p i'th LPRowBase<R> has been moved to due to this
1017 /** Removing multiple rows with one method invocation is available in two flavours. An array \p perm can be passed as
1018 * third argument or not. If given, \p perm must be an array at least of size #nRows(). It is used to return the
1019 * permutations resulting from this removal: \p perm[i] < 0 indicates, that the element to index \p i has been
1020 * removed. Otherwise, \p perm[i] is the new index of the element with index \p i before the removal.
1087 /** This method removes all LPColBase%s from the SPxLPBase with an index \p i such that \p perm[i] < 0. Upon
1088 * completion, \p perm[i] >= 0 indicates the new index where the \p i 'th LPColBase has been moved to due to this
1117 /** Removing multiple columns with one method invocation is available in two flavours. An array \p perm can be passed
1118 * as third argument or not. If given, \p perm must be an array at least of size #nCols(). It is used to return the
1119 * permutations resulting from this removal: \p perm[i] < 0 indicates, that the element to index \p i has been
1120 * removed. Otherwise, \p perm[i] is the new index of the element with index \p i before the removal.
1187 // ------------------------------------------------------------------------------------------------------------------
1192 virtual bool readLPF(std::istream& in, NameSet* rowNames = nullptr, NameSet* colNames = nullptr,
1196 virtual bool readMPS(std::istream& in, NameSet* rowNames = nullptr, NameSet* colNames = nullptr,
1201 * @param rowNames contains after the call the names of the constraints (rows) in the same order as the rows in the
1202 * LP. Constraints without a name (only possible with LPF files) are automatically assigned a name.
1204 * @param colNames contains after the call the names of the variables (columns) in the same order as the columns in
1206 * @param intVars contains after the call the indices of those variables that where marked as beeing integer in the
1219 /* MPS starts either with a comment mark '*' or with the keyword 'NAME' at the first column. LPF starts either
1244 /** Writes a file in LP format to \p out. If \p rowNames and \p colNames are \c NULL, default names are used for the
1245 * constraints and variables. If \p intVars is not \c NULL, the variables contained in it are marked as integer in
1373 // ------------------------------------------------------------------------------------------------------------------
1377 /// Changes objective vector to \p newObj. \p scale determines whether the new data should be scaled
1386 /// changes \p i 'th objective vector element to \p newVal. \p scale determines whether the new data should be scaled
1407 /// Changes objective value of column with identifier \p id to \p newVal. \p scale determines whether the new data should be scaled
1413 /// Changes objective vector to \p newObj. \p scale determines whether the new data should be scaled
1432 /// changes \p i 'th objective vector element to \p newVal. \p scale determines whether the new data should be scaled
1455 /// Changes objective value of column with identifier \p id to \p newVal. \p scale determines whether the new data should be scaled
1461 /// Changes vector of lower bounds to \p newLower. \p scale determines whether the new data should be scaled
1480 /// changes \p i 'th lower bound to \p newLower. \p scale determines whether the new data should be scaled
1503 /// changes lower bound of column with identifier \p id to \p newLower. \p scale determines whether the new data should be scaled
1509 /// Changes vector of upper bounds to \p newUpper. \p scale determines whether the new data should be scaled
1528 /// Changes \p i 'th upper bound to \p newUpper. \p scale determines whether the new data should be scaled
1551 /// Changes upper bound of column with identifier \p id to \p newLower. \p scale determines whether the new data should be scaled
1557 /// Changes variable bounds to \p newLower and \p newUpper. \p scale determines whether the new data should be scaled
1566 /// Changes bounds of column \p i to \p newLower and \p newUpper. \p scale determines whether the new data should be scaled
1583 /// Changes bounds of column with identifier \p id. \p scale determines whether the new data should be scaled
1584 virtual void changeBounds(SPxColId id, const R& newLower, const R& newUpper, bool scale = false)
1589 /// Changes left hand side vector for constraints to \p newLhs. \p scale determines whether the new data should be scaled
1608 /// Changes \p i 'th left hand side value to \p newLhs. \p scale determines whether the new data should be scaled
1631 /// Changes left hand side value for row with identifier \p id. \p scale determines whether the new data should be scaled
1637 /// Changes right hand side vector for constraints to \p newRhs. \p scale determines whether the new data should be scaled
1656 /// Changes \p i 'th right hand side value to \p newRhs. \p scale determines whether the new data should be scaled
1671 /// Changes right hand side value for row with identifier \p id. \p scale determines whether the new data should be scaled
1677 /// Changes left and right hand side vectors. \p scale determines whether the new data should be scaled
1686 /// Changes left and right hand side of row \p i. \p scale determines whether the new data should be scaled
1703 /// Changes left and right hand side of row with identifier \p id. \p scale determines whether the new data should be scaled
1709 /// Changes row objective function vector to \p newRowObj. \p scale determines whether the new data should be scaled
1721 /// Changes \p i 'th row objective function value to \p newRowObj. \p scale determines whether the new data should be scaled
1732 /// Changes row objective function value for row with identifier \p id. \p scale determines whether the new data should be scaled
1744 /// Replaces \p i 'th row of LP with \p newRow. \p scale determines whether the new data should be scaled
1787 /// Replaces row with identifier \p id with \p newRow. \p scale determines whether the new data should be scaled
1793 /// Replaces \p i 'th column of LP with \p newCol. \p scale determines whether the new data should be scaled
1836 /// Replaces column with identifier \p id with \p newCol. \p scale determines whether the new data should be scaled
1842 /// Changes LP element (\p i, \p j) to \p val. \p scale determines whether the new data should be scaled
1916 /// Changes LP element identified by (\p rid, \p cid) to \p val. \p scale determines whether the new data should be scaled
1942 /// @throw SPxInternalCodeException if the dimension of primal vector does not match number of columns or if the
1944 /// \p unscaled determines whether the returned data should be unscaled (if scaling was applied prior)
1949 /// @throw SPxInternalCodeException if the dimension of primal vector does not match number of columns or if the
1955 throw SPxInternalCodeException("XSPXLP03 Activity vector computing row activity has wrong dimension");
1966 /// Computes "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero
1967 /// @throw SPxInternalCodeException if dimension of dual vector does not match number of rows or if the dimension of
1972 /// Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero
1973 /// @throw SPxInternalCodeException if dimension of dual vector does not match number of rows or if the dimension of
1979 throw SPxInternalCodeException("XSPXLP04 Activity vector computing dual activity has wrong dimension");
1990 /// Updates "dual" activity of the columns for a given dual vector, i.e., y^T A; activity does not need to be zero
1991 /// @throw SPxInternalCodeException if dimension of dual vector does not match number of rows or if the dimension of
1997 throw SPxInternalCodeException("XSPXLP02 Dual vector for computing dual activity has wrong dimension");
2002 throw SPxInternalCodeException("XSPXLP04 Activity vector computing dual activity has wrong dimension");
2014 // ------------------------------------------------------------------------------------------------------------------
2019 /// @note primalRows must be as large as the number of unranged primal rows + 2 * the number of ranged primal rows.
2029 // ------------------------------------------------------------------------------------------------------------------
2087 // ------------------------------------------------------------------------------------------------------------------
2129 // ------------------------------------------------------------------------------------------------------------------
2335 // ------------------------------------------------------------------------------------------------------------------
2519 /* preset the sizes: beware that this can irritate a consistency check call from xtend(). We need to set the
2826 // ------------------------------------------------------------------------------------------------------------------
Collection of dense, sparse, and semi-sparse vectors. void setColVector(const SVectorBase< R > &p_vec) Sets constraint column vector. Definition lpcolbase.h:177 LPColSetBase< R > & operator=(const LPColSetBase< R > &rs) Assignment operator. Definition lpcolsetbase.h:610 VectorBase< R > & maxObj_w() Returns vector of objective values w.r.t. maximization. Definition lpcolsetbase.h:109 void add2(const DataKey &k, int n, const int idx[], const R val[]) Definition lpcolsetbase.h:381 int number(const DataKey &k) const Returns number of LPColBase with DataKey k in LPColSetBase. Definition lpcolsetbase.h:241 int num() const Returns the number of LPColBases currently in LPColSetBase. Definition lpcolsetbase.h:91 bool has(const DataKey &k) const Does DataKey k belong to LPColSetBase ? Definition lpcolsetbase.h:247 const SVectorBase< R > & colVector(int i) const Returns colVector of i 'th LPColBase in LPColSetBase. Definition lpcolsetbase.h:217 void setRowVector(const DSVectorBase< R > &p_vec) access constraint row vector. Definition lprowbase.h:276 void add2(const DataKey &k, int n, const int idx[], const R val[]) Adds n nonzero (idx, val)-pairs to rowVector with DataKey k. Definition lprowsetbase.h:469 int number(const DataKey &k) const Returns the number of the LPRowBase with DataKey k in LPRowSetBase. Definition lprowsetbase.h:314 SVectorBase< R > & rowVector_w(int i) Returns a writable rowVector of the i 'th LPRowBase. Definition lprowsetbase.h:212 LPRowSetBase< R > & operator=(const LPRowSetBase< R > &rs) Assignment operator. Definition lprowsetbase.h:701 void memRemax(int newmax) Reallocates memory to be able to store newmax nonzeros. Definition lprowsetbase.h:644 const SVectorBase< R > & rowVector(int i) const Returns the rowVector of the i 'th LPRowBase. Definition lprowsetbase.h:218 VectorBase< R > & obj_w() Returns the vector of objective coefficients (writeable). Definition lprowsetbase.h:182 const VectorBase< R > & obj() const Returns the vector of objective coefficients. Definition lprowsetbase.h:176 bool has(const DataKey &k) const does DataKey k belong to LPRowSetBase ? Definition lprowsetbase.h:320 LPRowBase< R >::Type type(int i) const Returns the inequalitiy type of the i 'th LPRowBase. Definition lprowsetbase.h:236 Exception class for things that should NEVER happen. Definition exceptions.h:119 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. Definition spxlpbase.h:1843 const R & upper(const SPxColId &id) const Returns upper bound of column with identifier id. Definition spxlpbase.h:512 void added2Set(SVSetBase< R > &set, const SVSetBase< R > &addset, int n) Definition spxlpbase.h:2279 void changeLower(int i, const S *newLower) changes i 'th lower bound to newLower. Definition spxlpbase.h:1497 int number(const SPxRowId &id) const Returns the row number of the row with identifier id. Definition spxlpbase.h:566 void getLowerUnscaled(VectorBase< R > &vec) const Gets unscaled lower bound vector. 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. Definition spxlpbase.h:1687 virtual void addRow(const LPRowBase< R > &row, bool scale=false) Definition spxlpbase.h:624 void changeBounds(int i, const S *newLower, const S *newUpper) Changes bounds of column i to newLower and newUpper. Definition spxlpbase.h:1576 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 s... Definition spxlpbase.h:1917 R obj(const SPxColId &id) const Returns objective value of column with identifier id. Definition spxlpbase.h:457 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 sca... Definition spxlpbase.h:1433 void getRhsUnscaled(VectorBase< R > &vec) const Gets unscaled right hand side vector. 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... Definition spxlpbase.h:1657 R upperUnscaled(const SPxColId &id) const Returns unscaled upper bound of column with identifier id. R lhsUnscaled(const SPxRowId &id) const Returns left hand side of row with identifier id. virtual void addedCols(int newcols) Called after the last n columns have just been added. Definition spxlpbase.h:2275 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. 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. Definition spxlpbase.h:1788 void doAddCols(const LPColSetBase< R > &set, bool scale=false) Definition spxlpbase.h:2702 const LPColSetBase< R > * lpcolset() const Returns the LP as an LPColSetBase. Definition spxlpbase.h:2140 void printProblemStatistics(std::ostream &os) Definition spxlpbase.h:1278 virtual bool readLPF(std::istream &in, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr) Reads LP in LP format from input stream in. R lhsUnscaled(int i) const Returns unscaled left hand side of row number i. void getLhsUnscaled(VectorBase< R > &vec) const Returns unscaled left hand side vector. 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... Definition spxlpbase.h:1456 virtual void addCols(SPxColId id[], const LPColSetBase< R > &set, bool scale=false) Adds all LPColBases of set to LPColSetBase. Definition spxlpbase.h:955 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 sca... Definition spxlpbase.h:1558 virtual void addCol(const R &objValue, const R &lowerValue, const SVectorBase< R > &colVec, const R &upperValue, bool scale=false) Definition spxlpbase.h:802 void getColVectorUnscaled(const SPxColId &id, DSVectorBase< R > &vec) const Gets column vector of column with identifier id. 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. Definition spxlpbase.h:1258 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 spxlpbase.h:859 void getRow(const SPxRowId &id, LPRowBase< R > &row) const Gets row with identifier id. Definition spxlpbase.h:230 const R & maxObj(int i) const Returns objective value of column i for maximization problem. Definition spxlpbase.h:479 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 t... Definition spxlpbase.h:1993 virtual void removeRowRange(int start, int end, int perm[]=nullptr) Removes rows from start to end (including both). Definition spxlpbase.h:1042 const VectorBase< R > & maxObj() const Returns objective vector for maximization problem. Definition spxlpbase.h:473 int number(const SPxColId &id) const Returns the column number of the column with identifier id. Definition spxlpbase.h:572 const VectorBase< R > & lower() const Returns (internal and possibly scaled) lower bound vector. Definition spxlpbase.h:527 const R & rhs(const SPxRowId &id) const Returns right hand side of row with identifier id. Definition spxlpbase.h:273 const R & maxObj(const SPxColId &id) const Returns objective value of column with identifier id for maximization problem. Definition spxlpbase.h:485 bool has(const SPxRowId &id) const Returns the row number of the row with identifier id. Definition spxlpbase.h:586 void getColVectorUnscaled(int i, DSVectorBase< R > &vec) const Gets column vector of column i. 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. Definition spxlpbase.h:1794 virtual void addCol(const LPColBase< R > &col, bool scale=false) Definition spxlpbase.h:796 virtual void removeRows(int nums[], int n, int perm[]=nullptr) Removes n LPRowBases. Definition spxlpbase.h:1022 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... Definition spxlpbase.h:1722 virtual void addCol(SPxColId &id, const LPColBase< R > &col, bool scale=false) Adds col to LPColSetVBase. Definition spxlpbase.h:845 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 shoul... Definition spxlpbase.h:1638 const std::shared_ptr< Tolerances > tolerances() const returns current tolerances Definition spxlpbase.h:167 bool has(const SPxId &id) const Returns the row or column number for identifier id. Definition spxlpbase.h:598 virtual void clearRowObjs() Clears row objective function values for all rows. Definition spxlpbase.h:1739 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... Definition spxlpbase.h:1632 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 s... Definition spxlpbase.h:1552 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 sho... Definition spxlpbase.h:1704 virtual void addRows(const LPRowSetBase< R > &pset, bool scale=false) Definition spxlpbase.h:682 virtual void addRow(SPxRowId &id, const LPRowBase< R > &row, bool scale=false) Adds row to LPRowSetBase. Definition spxlpbase.h:675 void getCol(const SPxColId &id, LPColBase< R > &col) const Gets column with identifier id. Definition spxlpbase.h:387 void addCol(const S *objValue, const S *lowerValue, const S *colValues, const int *colIndices, int colSize, const S *upperValue) Definition spxlpbase.h:810 void getRowObj(VectorBase< R > &prowobj) const Gets row objective function vector. Definition spxlpbase.h:312 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 t... Definition spxlpbase.h:1975 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. Definition spxlpbase.h:1584 void getCols(int start, int end, LPColSetBase< R > &set) const Gets columns start, ..., end. Definition spxlpbase.h:393 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 scale... Definition spxlpbase.h:1837 virtual R minAbsNzo(bool unscaled=true) const Absolute smallest non-zero element in (possibly scaled) LP. 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. Definition spxlpbase.h:1529 const SVectorBase< R > & rowVector(const SPxRowId &id) const Gets row vector of row with identifier id. Definition spxlpbase.h:251 virtual void changeObj(const VectorBase< R > &newObj, bool scale=false) Changes objective vector to newObj. scale determines whether the new data should be scaled. Definition spxlpbase.h:1378 void getRhs(VectorBase< R > &vec) const Gets (internal and possibly scaled) right hand side vector. Definition spxlpbase.h:279 R objUnscaled(int i) const Returns unscaled objective value of column i. 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. Definition spxlpbase.h:1210 SPxScaler< R > * lp_scaler points to the scaler if the lp has been scaled, to nullptr otherwise Definition spxlpbase.h:142 const R & lower(const SPxColId &id) const Returns (internal and possibly scaled) lower bound of column with identifier id. Definition spxlpbase.h:539 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 shoul... Definition spxlpbase.h:1672 void doAddRows(const LPRowSetBase< R > &set, bool scale=false) Definition spxlpbase.h:2467 virtual void removeColRange(int start, int end, int perm[]=nullptr) Removes columns from start to end (including both). Definition spxlpbase.h:1142 R maxObjUnscaled(const SPxColId &id) const Returns unscaled objective value of column with identifier id for maximization problem. void getRowVectorUnscaled(int i, DSVectorBase< R > &vec) const Gets unscaled row vector of row i. 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. R maxObjUnscaled(int i) const Returns unscaled objective value of column i for maximization problem. void changeObj(int i, const S *newVal) changes i 'th objective vector element to newVal. Definition spxlpbase.h:1397 virtual void changeMaxObj(const VectorBase< R > &newObj, bool scale=false) Changes objective vector to newObj. scale determines whether the new data should be scaled. Definition spxlpbase.h:1414 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. Definition spxlpbase.h:1678 LPRowBase< R >::Type rowType(int i) const Returns the inequality type of the i'th LPRow. Definition spxlpbase.h:366 void getObjUnscaled(VectorBase< R > &pobj) const Gets unscaled objective vector. 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. Definition spxlpbase.h:1510 R rowObj(const SPxRowId &id) const Returns row objective function value of row with identifier id. Definition spxlpbase.h:330 virtual void writeLPF(std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=nullptr, const bool writeZeroObjective=false) const SVectorBase< R > & colVector_w(int i) Returns the LP as an LPRowBase<R>Set. Definition spxlpbase.h:2340 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 s... Definition spxlpbase.h:1710 void changeLhs(int i, const S *newLhs) Changes i 'th left hand side value to newLhs. Definition spxlpbase.h:1625 void maxObjUnscaled(VectorBase< R > &vec) const Returns unscaled objective vector for maximization problem. void changeRange(int i, const S *newLhs, const S *newRhs) Changes left and right hand side of row i. Definition spxlpbase.h:1696 R rhsUnscaled(int i) const Returns unscaled right hand side of row number i. void changeMaxObj(int i, const S *newVal) changes i 'th objective vector element to newVal. Definition spxlpbase.h:1449 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. Definition spxlpbase.h:1951 void getRows(int start, int end, LPRowSetBase< R > &set) const Gets rows start, ... end. Definition spxlpbase.h:236 R upperUnscaled(int i) const Returns unscaled upper bound of column i. 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... Definition spxlpbase.h:1408 virtual void addCols(const LPColSetBase< R > &pset, bool scale=false) Definition spxlpbase.h:852 virtual R maxAbsNzo(bool unscaled=true) const Absolute biggest non-zero element in (in rational case possibly scaled) LP. const R & lhs(const SPxRowId &id) const Returns left hand side of row with identifier id. Definition spxlpbase.h:306 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 Definition spxlpbase.h:1481 const R & lower(int i) const Returns (internal and possibly scaled) lower bound of column i. Definition spxlpbase.h:533 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. void getUpperUnscaled(VectorBase< R > &vec) const Gets unscaled upper bound vector. virtual bool readFile(const char *filename, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr) Reads LP from a file. Definition spxlpbase.h:1231 virtual void setTolerances(std::shared_ptr< Tolerances > tolerances) set tolerances Definition spxlpbase.h:173 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. void doAddRow(const LPRowBase< R > &row, bool scale=false) Definition spxlpbase.h:2352 R rhsUnscaled(const SPxRowId &id) const Returns unscaled right hand side of row with identifier id. 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. Definition spxlpbase.h:1609 bool has(const SPxColId &id) const Returns the column number of the column with identifier id. Definition spxlpbase.h:592 void changeElement(int i, int j, const S *val) Changes LP element (i, j) to val. Definition spxlpbase.h:1886 const R & maxRowObj(const SPxRowId &id) const Returns row objective function value of row with identifier id. Definition spxlpbase.h:351 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 ... Definition spxlpbase.h:1567 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. Definition spxlpbase.h:1462 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... Definition spxlpbase.h:1590 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 s... Definition spxlpbase.h:1504 virtual void addRows(SPxRowId id[], const LPRowSetBase< R > &set, bool scale=false) adds all LPRowBases of pset to LPRowSetBase. Definition spxlpbase.h:786 R & maxObj_w(int i) Returns objective value of column i for maximization problem. Definition spxlpbase.h:2110 virtual void removeRows(SPxRowId id[], int n, int perm[]=nullptr) Definition spxlpbase.h:997 const LPRowSetBase< R > * lprowset() const Returns the LP as an LPRowSetBase. Definition spxlpbase.h:2134 SPxLPBase< R > & operator=(const SPxLPBase< R > &old) Assignment operator. Definition spxlpbase.h:2872 LPRowBase< R >::Type rowType(const SPxRowId &id) const Returns the inequality type of the row with identifier key. Definition spxlpbase.h:372 void changeUpper(int i, const S *newUpper) Changes i 'th upper bound to newUpper. Definition spxlpbase.h:1545 virtual void removeCols(int nums[], int n, int perm[]=nullptr) Removes n LPCols. Definition spxlpbase.h:1122 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. Definition spxlpbase.h:1745 void doAddCol(const R &objValue, const R &lowerValue, const SVectorBase< R > &colVec, const R &upperValue, bool scale=false) Definition spxlpbase.h:2642 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 dat... Definition spxlpbase.h:1733 virtual void addedRows(int newrows) Called after the last n rows have just been added. Definition spxlpbase.h:2271 int number(const SPxId &id) const Returns the row or column number for identifier id. Definition spxlpbase.h:578 R lowerUnscaled(int i) const Returns unscaled lower bound of column i. const SVectorBase< R > & colVector(const SPxColId &id) const Returns column vector of column with identifier id. Definition spxlpbase.h:422 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 spxlpbase.h:689 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 ... R objUnscaled(const SPxColId &id) const Returns unscaled objective value of column with identifier id. virtual void removeCols(SPxColId id[], int n, int perm[]=nullptr) Definition spxlpbase.h:1097 virtual void addRow(const R &lhsValue, const SVectorBase< R > &rowVec, const R &rhsValue, bool scale=false) Definition spxlpbase.h:630 void doAddCol(const LPColBase< R > &col, bool scale=false) Definition spxlpbase.h:2582 void addRow(const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue) Definition spxlpbase.h:638 void doAddRow(const R &lhsValue, const SVectorBase< R > &rowVec, const R &rhsValue, bool scale=false) Definition spxlpbase.h:2409 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 sca... Definition spxlpbase.h:1387 R lowerUnscaled(const SPxColId &id) const Returns unscaled lower bound of column with identifier id. const SVectorBase< R > & colVector(int i) const Returns column vector of column i. Definition spxlpbase.h:416 SPxLPBase< R > & operator=(const SPxLPBase< S > &old) Assignment operator. Definition spxlpbase.h:2893 Wrapper for several output streams. A verbosity level is used to decide which stream to use and wheth... Definition spxout.h:78 static void setFixed(std::ostream &stream, int precision=8) Sets the precision of the stream to 8 and the floatfield to fixed. Definition spxout.h:191 VectorBase< R > & multSub(const S &x, const SVectorBase< T > &vec) Subtraction of scaled vector. Definition basevectors.h:297 VectorBase< R > & multAdd(const S &x, const VectorBase< T > &vec) Addition of scaled vector. Definition vectorbase.h:458 Save arrays of data objects. Entry identifier class for items of a DataSet. Dymnamic index set. LP column. Set of LP columns. (In)equality for LPs. Set of LP columns. Set of strings. Everything should be within this namespace. Debugging, floating point type and parameter definitions. declaration of types for file output Row and columns Id's SPxLP. LP scaling base class.
|