Class SPxLP provides the data structures required for saving a linear program in the form
suitable for solving with SoPlex. This includes:
and
)
and
).
#include <spxlp.h>
Inheritance diagram for SPxLP:


Public Types | |
Types | |
| enum | SPxSense { MAXIMIZE = 1, MINIMIZE = -1 } |
| optimization sense. More... | |
Public Member Functions | |
Inquiry | |
| int | nRows () const |
| returns number of rows in LP. | |
| int | nCols () const |
| returns number of columns in LP. | |
| int | nNzos () const |
| number of nonzeros in LP. | |
| Real | minAbsNzo () const |
| absolute smallest non-zero element in LP. | |
| Real | maxAbsNzo () const |
| absolute biggest non-zero element in LP. | |
| void | getRow (int i, LPRow &row) const |
gets i 'th row. | |
| void | getRow (const SPxRowId &id, LPRow &row) const |
gets row with identifier id. | |
| void | getRows (int start, int end, LPRowSet &set) const |
gets rows start, ... end. | |
| const SVector & | rowVector (int i) const |
gets row vector of row i. | |
| const SVector & | rowVector (const SPxRowId &id) const |
gets row vector of row with identifier id. | |
| const Vector & | rhs () const |
| returns right hand side vector. | |
| Real | rhs (int i) const |
| Real | rhs (const SPxRowId &id) const |
returns right hand side of row with identifier id. | |
| const Vector & | lhs () const |
| returns left hand side vector. | |
| Real | lhs (int i) const |
| Real | lhs (const SPxRowId &id) const |
returns left hand side of row with identifier id. | |
| LPRow::Type | rowType (int i) const |
returns the inequality type of the i'th LPRow. | |
| LPRow::Type | rowType (const SPxRowId &id) const |
returns the inequality type of the row with identifier key. | |
| void | getCol (int i, LPCol &column) const |
gets i 'th column. | |
| void | getCol (const SPxColId &id, LPCol &col) const |
gets column with identifier id. | |
| void | getCols (int start, int end, LPColSet &set) const |
gets columns start, ..., end. | |
| const SVector & | colVector (int i) const |
returns column vector of column i. | |
| const SVector & | colVector (const SPxColId &id) const |
returns column vector of column with identifier id. | |
| void | getObj (Vector &obj) const |
| gets objective vector. | |
| Real | obj (int i) const |
returns objective value of column i. | |
| Real | obj (const SPxColId &id) const |
returns objective value of column with identifier id. | |
| const Vector & | maxObj () const |
| returns objective vector for maximization problem. | |
| Real | maxObj (int i) const |
returns objective value of column i for maximization problem. | |
| Real | maxObj (const SPxColId &id) const |
| for maximization problem. | |
| const Vector & | upper () const |
| returns upper bound vector. | |
| Real | upper (int i) const |
returns upper bound of column i. | |
| Real | upper (const SPxColId &id) const |
returns upper bound of column with identifier id. | |
| const Vector & | lower () const |
| returns lower bound vector. | |
| Real | lower (int i) const |
returns lower bound of column i. | |
| Real | lower (const SPxColId &id) const |
returns lower bound of column with identifier id. | |
| SPxSense | spxSense () const |
| returns the optimization sense. | |
| int | number (const SPxRowId &id) const |
returns the row number of the row with identifier id. | |
| int | number (const SPxColId &id) const |
returns the column number of the column with identifier id. | |
| int | number (const SPxId &id) const |
returns the row or column number for identifier id. | |
| SPxRowId | rId (int n) const |
returns the row identifier for row n. | |
| SPxColId | cId (int n) const |
returns the column identifier for column n. | |
Extension | |
| virtual void | addRow (const LPRow &row) |
| virtual void | addRow (SPxRowId &id, const LPRow &row) |
adds row to LPRowSet. | |
| virtual void | addRows (const LPRowSet &pset) |
| virtual void | addRows (SPxRowId id[], const LPRowSet &set) |
adds all LPRows of pset to LPRowSet. | |
| virtual void | addCol (const LPCol &col) |
| virtual void | addCol (SPxColId &id, const LPCol &col) |
adds col to LPColSet. | |
| virtual void | addCols (const LPColSet &pset) |
| virtual void | addCols (SPxColId id[], const LPColSet &set) |
adds all LPCols of set to LPColSet. | |
Shrinking | |
| virtual void | removeRow (int i) |
removes i 'th row. | |
| virtual void | removeRow (SPxRowId id) |
removes row with identifier id. | |
| virtual void | removeRows (int perm[]) |
| removes multiple rows. | |
| virtual void | removeRows (SPxRowId id[], int n, int perm[]=0) |
| virtual void | removeRows (int nums[], int n, int perm[]=0) |
removes n LPRows. | |
| virtual void | removeRowRange (int start, int end, int perm[]=0) |
removes rows from start to end (including both). | |
| virtual void | removeCol (int i) |
removes i 'th column. | |
| virtual void | removeCol (SPxColId id) |
removes column with identifier id. | |
| virtual void | removeCols (int perm[]) |
| removes multiple columns. | |
| virtual void | removeCols (SPxColId id[], int n, int perm[]=0) |
| virtual void | removeCols (int nums[], int n, int perm[]=0) |
removes n LPCols. | |
| virtual void | removeColRange (int start, int end, int perm[]=0) |
removes columns from start to end (including both). | |
| virtual void | clear () |
| clears the LP. | |
IO | |
| virtual bool | readFile (const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
| reads a file from a file. | |
| virtual bool | read (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
reads a file from input stream in. | |
| virtual bool | readLPF (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
| Read LP in "CPLEX LP File Format". | |
| virtual bool | readMPS (std::istream &in, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0) |
| Read LP in "MPS File Format". | |
| virtual void | writeMPS (std::ostream &out, const NameSet *rowNames, const NameSet *colNames, const DIdxSet *p_intvars=0) const |
| Write LP in "MPS File Format". | |
| virtual void | dumpFile (const char *filename) const |
dump loaded LP to filename in LPF format. | |
Manipulation | |
| virtual void | changeObj (const Vector &newObj) |
changes objective vector to newObj. | |
| virtual void | changeObj (int i, Real newVal) |
changes i 'th objective vector element to newVal. | |
| virtual void | changeObj (SPxColId id, Real newVal) |
change objective value of column with identifier id to newVal. | |
| virtual void | changeLower (const Vector &newLower) |
changes vector of lower bounds to newLower. | |
| virtual void | changeLower (int i, Real newLower) |
changes i 'th lower bound to newLower. | |
| virtual void | changeLower (SPxColId id, Real newLower) |
changes lower bound of column with identifier id to newLower. | |
| virtual void | changeUpper (const Vector &newUpper) |
changes vector of upper bounds to newUpper. | |
| virtual void | changeUpper (int i, Real newUpper) |
changes i 'th upper bound to newUpper. | |
| virtual void | changeUpper (SPxColId id, Real newUpper) |
changes upper bound of column with identifier id to newLower. | |
| virtual void | changeBounds (const Vector &newLower, const Vector &newUpper) |
changes variable bounds to newLower and newUpper. | |
| virtual void | changeBounds (int i, Real newLower, Real newUpper) |
changes bounds of column i to newLower and newUpper. | |
| virtual void | changeBounds (SPxColId id, Real newLower, Real newUpper) |
changes bounds of column with identifier id. | |
| virtual void | changeLhs (const Vector &newLhs) |
changes left hand side vector for constraints to newLhs. | |
| virtual void | changeLhs (int i, Real newLhs) |
changes i 'th left hand side value to newLhs. | |
| virtual void | changeLhs (SPxRowId id, Real newLhs) |
changes left hand side value for row with identifier id. | |
| virtual void | changeRhs (const Vector &newRhs) |
changes right hand side vector for constraints to newRhs. | |
| virtual void | changeRhs (int i, Real newRhs) |
changes i 'th right hand side value to newRhs. | |
| virtual void | changeRhs (SPxRowId id, Real newRhs) |
changes right hand side value for row with identifier id. | |
| virtual void | changeRange (const Vector &newLhs, const Vector &newRhs) |
| changes left and right hand side vectors. | |
| virtual void | changeRange (int i, Real newLhs, Real newRhs) |
changes left and right hand side of row i. | |
| virtual void | changeRange (SPxRowId id, Real newLhs, Real newRhs) |
changes left and right hand side of row with identifier id. | |
| virtual void | changeRow (int i, const LPRow &newRow) |
replaces i 'th row of LP with newRow. | |
| virtual void | changeRow (SPxRowId id, const LPRow &newRow) |
replaces row with identifier id with newRow. | |
| virtual void | changeCol (int i, const LPCol &newCol) |
replaces i 'th column of LP with newCol. | |
| virtual void | changeCol (SPxColId id, const LPCol &newCol) |
replaces column with identifier id with newCol. | |
| virtual void | changeElement (int i, int j, Real val) |
changes LP element (i, j) to val. | |
| virtual void | changeElement (SPxRowId rid, SPxColId cid, Real val) |
changes LP element identified by (rid, cid) to val. | |
| virtual void | changeSense (SPxSense sns) |
changes optimization sense to sns. | |
Miscellaneous | |
| bool | isConsistent () const |
| consistency check. | |
Constructors / Destructors | |
| SPxLP () | |
| default constructor. | |
| virtual | ~SPxLP () |
| destructor. | |
| SPxLP & | operator= (const SPxLP &old) |
| assignment operator | |
Protected Member Functions | |
Protected write access | |
| Real & | rhs_w (int i) |
returns right hand side of row i. | |
| Real & | lhs_w (int i) |
returns left hand side of row i. | |
| Real & | maxObj_w (int i) |
returns objective value of column i for maximization problem. | |
| Real & | upper_w (int i) |
returns upper bound of column i. | |
| Real & | lower_w (int i) |
returns lower bound of column i. | |
Protected helpers | |
| const LPRowSet * | lprowset () const |
| returns the LP as an LPRowSet. | |
| const LPColSet * | lpcolset () const |
| returns the LP as an LPColSet. | |
| virtual void | doRemoveRow (int i) |
| internal helper method | |
| virtual void | doRemoveCols (int perm[]) |
| internal helper method | |
| virtual void | doRemoveRows (int perm[]) |
| internal helper method | |
| virtual void | doRemoveCol (int i) |
| internal helper method | |
| virtual void | addedRows (int) |
called after the last n rows have just been added. | |
| virtual void | addedCols (int) |
called after the last n columns have just been added. | |
| void | added2Set (SVSet &set, const SVSet &add, int n) |
Private Member Functions | |
Private helpers | |
| SVector & | colVector_w (int i) |
| returns the LP as an LPRowSet. | |
| SVector & | rowVector_w (int i) |
| void | doAddRow (const LPRow &row) |
| void | doAddRows (const LPRowSet &set) |
| void | doAddCol (const LPCol &col) |
| void | doAddCols (const LPColSet &set) |
Private Attributes | |
Data | |
| SPxSense | thesense |
| optimization sense. | |
Friends | |
| class | SPxBasis |
| class | SPxScaler |
| class | SPxEquiliSC |
| class | SPxGeometSC |
| class | SPxMainSM |
| std::ostream & | operator<< (std::ostream &os, const SPxLP &lp) |
| output operator. | |
Class SPxLP provides the data structures required for saving a linear program in the form
suitable for solving with SoPlex. This includes:
and
)
and
). 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 retreived with method spxSense().
Further, equality constraints are modelled by
. Analogously, fixed variables have
.
SPxLPs are saved as an SVSet, both for the columns and rows. Note that this is redundant but eases the access.
Definition at line 73 of file spxlp.h.
|
|
optimization sense.
|
|
|
default constructor.
Definition at line 732 of file spxlp.h. References SPxLP::clear(). |
|
|
destructor.
|
|
||||||||||||
|
adds
Definition at line 369 of file spxlp.h. References SPxLP::addCol(), SPxLP::cId(), and SPxLP::nCols(). |
|
|
Definition at line 364 of file spxlp.h. References SPxLP::doAddCol(). Referenced by SPxLP::addCol(). |
|
||||||||||||
|
adds all LPCols of
Definition at line 384 of file spxlp.cpp. References SPxLP::addCols(), SPxLP::cId(), METHOD, and SPxLP::nCols(). |
|
|
Definition at line 376 of file spxlp.h. References SPxLP::doAddCols(). Referenced by SPxLP::addCols(), and SPxLP::readLPF(). |
|
||||||||||||||||
|
Definition at line 173 of file spxlp.cpp. References DataArray::get_ptr(), SVector::index(), SVSet::memMax(), SVSet::memRemax(), METHOD, SVSet::num(), DataArray::size(), SVector::size(), SVector::value(), and SVSet::xtend(). Referenced by SPxLP::readMPS(). |
|
|
called after the last
Reimplemented in SPxSolver. Definition at line 694 of file spxlp.h. Referenced by SPxSolver::addedCols(), SPxLP::doAddCol(), SPxLP::doAddCols(), SPxLP::doAddRow(), SPxLP::doAddRows(), and SPxLP::readMPS(). |
|
|
called after the last
Reimplemented in SPxSolver. Definition at line 691 of file spxlp.h. Referenced by SPxSolver::addedRows(), SPxLP::doAddCol(), SPxLP::doAddCols(), SPxLP::doAddRow(), SPxLP::doAddRows(), and SPxLP::readMPS(). |
|
||||||||||||
|
adds
Definition at line 349 of file spxlp.h. References SPxLP::addRow(), SPxLP::nRows(), and SPxLP::rId(). |
|
|
Definition at line 344 of file spxlp.h. References SPxLP::doAddRow(). Referenced by SPxLP::addRow(). |
|
||||||||||||
|
adds all LPRows of
Definition at line 375 of file spxlp.cpp. References SPxLP::addRows(), METHOD, SPxLP::nRows(), and SPxLP::rId(). |
|
|
Definition at line 356 of file spxlp.h. References SPxLP::doAddRows(). Referenced by SPxLP::addRows(), and SPxLP::readLPF(). |
|
||||||||||||||||
|
changes bounds of column with identifier
Reimplemented in SPxSolver. Definition at line 549 of file spxlp.h. References SPxLP::changeBounds(), and SPxLP::number(). |
|
||||||||||||||||
|
changes bounds of column
Reimplemented in SPxSolver. Definition at line 665 of file spxlp.cpp. References SPxLP::changeLower(), SPxLP::changeUpper(), SPxLP::isConsistent(), and METHOD. |
|
||||||||||||
|
changes variable bounds to
Reimplemented in SPxSolver. Definition at line 657 of file spxlp.cpp. References SPxLP::changeLower(), SPxLP::changeUpper(), SPxLP::isConsistent(), and METHOD. Referenced by SPxLP::changeBounds(). |
|
||||||||||||
|
replaces column with identifier
Reimplemented in SPxSolver. Definition at line 603 of file spxlp.h. References SPxLP::changeCol(), and SPxLP::number(). |
|
||||||||||||
|
replaces
Reimplemented in SPxSolver. Definition at line 737 of file spxlp.cpp. References LPRowSet::add2(), LPColSet::add2(), SPxLP::changeLower(), SPxLP::changeObj(), SPxLP::changeUpper(), SVector::clear(), LPCol::colVector(), SPxLP::colVector_w(), SVector::index(), SPxLP::isConsistent(), LPCol::lower(), METHOD, SVector::number(), LPCol::obj(), SVector::remove(), SPxLP::rowVector_w(), SVector::size(), LPCol::upper(), and SVector::value(). Referenced by SPxLP::changeCol(), and SPxSolver::changeCol(). |
|
||||||||||||||||
|
changes LP element identified by (
Reimplemented in SPxSolver. Definition at line 612 of file spxlp.h. References SPxLP::changeElement(), and SPxLP::number(). |
|
||||||||||||||||
|
changes LP element (
Reimplemented in SPxSolver. Definition at line 763 of file spxlp.cpp. References LPColSet::add2(), LPRowSet::add2(), SPxLP::colVector_w(), SPxLP::isConsistent(), METHOD, SVector::number(), SVector::remove(), SPxLP::rowVector_w(), and SVector::value(). Referenced by SPxLP::changeElement(), and SPxSolver::changeElement(). |
|
||||||||||||
|
changes left hand side value for row with identifier
Reimplemented in SPxSolver. Definition at line 561 of file spxlp.h. References SPxLP::changeLhs(), and SPxLP::number(). |
|
||||||||||||
|
changes
Reimplemented in SPxSolver. Definition at line 673 of file spxlp.cpp. References SPxLP::isConsistent(), LPRowSet::lhs_w(), and METHOD. |
|
|
changes left hand side vector for constraints to
Reimplemented in SPxSolver. Definition at line 649 of file spxlp.cpp. References Vector::dim(), SPxLP::isConsistent(), SPxLP::lhs(), LPRowSet::lhs_w(), and METHOD. Referenced by SPxLP::changeLhs(), SPxSolver::changeLhs(), SPxLP::changeRange(), SPxSolver::changeRange(), SPxLP::changeRow(), SPxMainSM::fixColumn(), SPxMainSM::handleExtremes(), and SPxMainSM::simplifyRows(). |
|
||||||||||||
|
changes lower bound of column with identifier
Reimplemented in SPxSolver. Definition at line 525 of file spxlp.h. References SPxLP::changeLower(), and SPxLP::number(). |
|
||||||||||||
|
changes
Reimplemented in SPxSolver. Definition at line 627 of file spxlp.cpp. References SPxLP::isConsistent(), LPColSet::lower_w(), and METHOD. |
|
|
changes vector of lower bounds to
Reimplemented in SPxSolver. Definition at line 619 of file spxlp.cpp. References Vector::dim(), SPxLP::isConsistent(), SPxLP::lower(), LPColSet::lower_w(), and METHOD. Referenced by SPxLP::changeBounds(), SPxLP::changeCol(), SPxLP::changeLower(), SPxSolver::changeLower(), SPxMainSM::handleExtremes(), SPxMainSM::simplifyCols(), and SPxMainSM::simplifyRows(). |
|
||||||||||||
|
change objective value of column with identifier
Reimplemented in SPxSolver. Definition at line 513 of file spxlp.h. References SPxLP::changeObj(), and SPxLP::number(). |
|
||||||||||||
|
changes
Reimplemented in SPxSolver. Definition at line 612 of file spxlp.cpp. References SPxLP::isConsistent(), LPColSet::maxObj_w(), METHOD, and SPxLP::spxSense(). |
|
|
changes objective vector to
Reimplemented in SPxSolver. Definition at line 603 of file spxlp.cpp. References Vector::dim(), SPxLP::isConsistent(), SPxLP::maxObj(), LPColSet::maxObj_w(), METHOD, and SPxLP::spxSense(). Referenced by SPxLP::changeCol(), SPxLP::changeObj(), SPxSolver::changeObj(), and SPxMainSM::handleExtremes(). |
|
||||||||||||||||
|
changes left and right hand side of row with identifier
Reimplemented in SPxSolver. Definition at line 585 of file spxlp.h. References SPxLP::changeRange(), and SPxLP::number(). |
|
||||||||||||||||
|
changes left and right hand side of row
Reimplemented in SPxSolver. Definition at line 703 of file spxlp.cpp. References SPxLP::changeLhs(), SPxLP::changeRhs(), SPxLP::isConsistent(), and METHOD. |
|
||||||||||||
|
changes left and right hand side vectors.
Reimplemented in SPxSolver. Definition at line 695 of file spxlp.cpp. References SPxLP::changeLhs(), SPxLP::changeRhs(), SPxLP::isConsistent(), and METHOD. Referenced by SPxLP::changeRange(), and SPxMainSM::simplifyCols(). |
|
||||||||||||
|
changes right hand side value for row with identifier
Reimplemented in SPxSolver. Definition at line 573 of file spxlp.h. References SPxLP::changeRhs(), and SPxLP::number(). |
|
||||||||||||
|
changes
Reimplemented in SPxSolver. Definition at line 688 of file spxlp.cpp. References SPxLP::isConsistent(), METHOD, and LPRowSet::rhs_w(). |
|
|
changes right hand side vector for constraints to
Reimplemented in SPxSolver. Definition at line 680 of file spxlp.cpp. References Vector::dim(), SPxLP::isConsistent(), METHOD, SPxLP::rhs(), and LPRowSet::rhs_w(). Referenced by SPxLP::changeRange(), SPxSolver::changeRange(), SPxLP::changeRhs(), SPxSolver::changeRhs(), SPxLP::changeRow(), SPxMainSM::fixColumn(), SPxMainSM::handleExtremes(), and SPxMainSM::simplifyRows(). |
|
||||||||||||
|
replaces row with identifier
Reimplemented in SPxSolver. Definition at line 594 of file spxlp.h. References SPxLP::changeRow(), and SPxLP::number(). |
|
||||||||||||
|
replaces
Reimplemented in SPxSolver. Definition at line 712 of file spxlp.cpp. References LPColSet::add2(), LPRowSet::add2(), SPxLP::changeLhs(), SPxLP::changeRhs(), SVector::clear(), SPxLP::colVector_w(), SVector::index(), SPxLP::isConsistent(), LPRow::lhs(), METHOD, SVector::number(), SVector::remove(), LPRow::rhs(), LPRow::rowVector(), SPxLP::rowVector_w(), SVector::size(), and SVector::value(). Referenced by SPxLP::changeRow(), and SPxSolver::changeRow(). |
|
|
changes optimization sense to
Definition at line 618 of file spxlp.h. References LPColSet::maxObj_w(), and SPxLP::thesense. Referenced by SPxSolver::changeSense(), SPxLP::readLPF(), and SPxLP::readMPS(). |
|
||||||||||||
|
changes upper bound of column with identifier
Reimplemented in SPxSolver. Definition at line 537 of file spxlp.h. References SPxLP::changeUpper(), and SPxLP::number(). |
|
||||||||||||
|
changes
Reimplemented in SPxSolver. Definition at line 642 of file spxlp.cpp. References SPxLP::isConsistent(), METHOD, and LPColSet::upper_w(). |
|
|
changes vector of upper bounds to
Reimplemented in SPxSolver. Definition at line 634 of file spxlp.cpp. References Vector::dim(), SPxLP::isConsistent(), METHOD, SPxLP::upper(), and LPColSet::upper_w(). Referenced by SPxLP::changeBounds(), SPxLP::changeCol(), SPxLP::changeUpper(), SPxSolver::changeUpper(), SPxMainSM::handleExtremes(), SPxMainSM::simplifyCols(), and SPxMainSM::simplifyRows(). |
|
|
returns the column identifier for column
Definition at line 333 of file spxlp.h. References LPColSet::key(). Referenced by SPxLP::addCol(), SPxLP::addCols(), SPxMainSM::cIdx(), SPxSolver::coId(), SPxSolver::colId(), soplex::getColName(), SPxSolver::id(), soplex::initPrefs(), SPxMainSM::removeCol(), SPxWeightPR::selectEnter(), and SPxMainSM::simplify(). |
|
|
clears the LP.
Reimplemented from LPColSet. Reimplemented in SPxSolver. Definition at line 595 of file spxlp.cpp. References LPColSet::clear(), LPRowSet::clear(), SPxLP::MAXIMIZE, METHOD, and SPxLP::thesense. Referenced by SPxSolver::clear(), SPxLP::readLPF(), SPxLP::readMPS(), and SPxLP::SPxLP(). |
|
|
returns column vector of column with identifier
Definition at line 221 of file spxlp.h. References LPColSet::colVector(). |
|
|
|
returns the LP as an LPRowSet.
Reimplemented from LPColSet. Definition at line 707 of file spxlp.h. References LPColSet::colVector_w(). Referenced by SPxScaler::applyScaling(), SPxLP::changeCol(), SPxLP::changeElement(), SPxLP::changeRow(), SPxLP::doAddRows(), SPxLP::doRemoveRow(), SPxLP::doRemoveRows(), and SPxMainSM::handleExtremes(). |
|
|
Definition at line 142 of file spxlp.cpp. References LPRowSet::add(), LPColSet::add(), LPRowSet::add2(), SPxLP::addedCols(), SPxLP::addedRows(), LPCol::colVector(), SVector::index(), LPColSet::maxObj_w(), METHOD, SPxLP::nCols(), SPxLP::nRows(), SVector::size(), SPxLP::thesense, and SVector::value(). Referenced by SPxLP::addCol(). |
|
|
Definition at line 298 of file spxlp.cpp. References LPRowSet::add(), LPColSet::add(), SPxLP::addedCols(), SPxLP::addedRows(), SPxLP::colVector(), SVector::index(), SPxLP::isConsistent(), LPRowSet::isConsistent(), LPColSet::isConsistent(), LPColSet::maxObj_w(), METHOD, SPxLP::nCols(), SPxLP::nRows(), DataArray::reSize(), SPxLP::rowVector(), SPxLP::rowVector_w(), SVector::set_size(), SVector::size(), SPxLP::thesense, SVector::value(), and LPRowSet::xtend(). Referenced by SPxLP::addCols(). |
|
|
Definition at line 112 of file spxlp.cpp. References LPColSet::add(), LPRowSet::add(), LPColSet::add2(), SPxLP::addedCols(), SPxLP::addedRows(), SVector::index(), METHOD, SPxLP::nCols(), SPxLP::nRows(), LPRow::rowVector(), SVector::size(), and SVector::value(). Referenced by SPxLP::addRow(). |
|
|
Definition at line 223 of file spxlp.cpp. References LPColSet::add(), LPRowSet::add(), SPxLP::addedCols(), SPxLP::addedRows(), SPxLP::colVector(), SPxLP::colVector_w(), SVector::index(), LPColSet::isConsistent(), LPRowSet::isConsistent(), METHOD, SPxLP::nCols(), SPxLP::nRows(), DataArray::reSize(), SPxLP::rowVector(), SVector::set_size(), SVector::size(), SVector::value(), and LPColSet::xtend(). Referenced by SPxLP::addRows(). |
|
|
internal helper method
Reimplemented in SPxSolver. Definition at line 420 of file spxlp.cpp. References SPxLP::colVector(), SVector::index(), METHOD, SPxLP::nCols(), SVector::number(), LPColSet::remove(), SVector::remove(), SPxLP::rowVector_w(), and SVector::size(). Referenced by SPxSolver::doRemoveCol(), and SPxLP::removeCol(). |
|
|
internal helper method
Reimplemented in SPxSolver. Definition at line 467 of file spxlp.cpp. References SVector::index(), METHOD, SPxLP::nRows(), SVector::remove(), LPColSet::remove(), SPxLP::rowVector_w(), and SVector::size(). Referenced by SPxSolver::doRemoveCols(), and SPxLP::removeCols(). |
|
|
internal helper method
Reimplemented in SPxSolver. Definition at line 393 of file spxlp.cpp. References SPxLP::colVector_w(), SVector::index(), METHOD, SPxLP::nRows(), SVector::number(), LPRowSet::remove(), SVector::remove(), SPxLP::rowVector(), and SVector::size(). Referenced by SPxSolver::doRemoveRow(), and SPxLP::removeRow(). |
|
|
internal helper method
Reimplemented in SPxSolver. Definition at line 447 of file spxlp.cpp. References SPxLP::colVector_w(), SVector::index(), METHOD, SPxLP::nCols(), SVector::remove(), LPRowSet::remove(), and SVector::size(). Referenced by SPxSolver::doRemoveRows(), and SPxLP::removeRows(). |
|
|
dump loaded LP to
Definition at line 76 of file spxfileio.cpp. References METHOD. |
|
||||||||||||
|
gets column with identifier
Definition at line 206 of file spxlp.h. References SPxLP::getCol(), and SPxLP::number(). |
|
||||||||||||
|
gets
Definition at line 87 of file spxlp.cpp. References SPxLP::colVector(), SPxLP::lower(), METHOD, SPxLP::obj(), LPCol::setColVector(), LPCol::setLower(), LPCol::setObj(), LPCol::setUpper(), and SPxLP::upper(). Referenced by SPxLP::getCol(). |
|
||||||||||||||||
|
gets columns
Definition at line 96 of file spxlp.cpp. References LPColSet::add(), LPColSet::clear(), SPxLP::colVector(), SPxLP::lower(), METHOD, SPxLP::obj(), and SPxLP::upper(). |
|
|
gets objective vector.
Definition at line 104 of file spxlp.cpp. References LPColSet::maxObj(), METHOD, SPxLP::MINIMIZE, and SPxLP::spxSense(). |
|
||||||||||||
|
gets row with identifier
Definition at line 134 of file spxlp.h. References SPxLP::getRow(), and SPxLP::number(). |
|
||||||||||||
|
gets
Definition at line 71 of file spxlp.cpp. References SPxLP::lhs(), METHOD, SPxLP::rhs(), SPxLP::rowVector(), LPRow::setLhs(), LPRow::setRhs(), and LPRow::setRowVector(). Referenced by SPxLP::getRow(). |
|
||||||||||||||||
|
gets rows
Definition at line 79 of file spxlp.cpp. References LPRowSet::add(), LPRowSet::clear(), SPxLP::lhs(), METHOD, SPxLP::rhs(), and SPxLP::rowVector(). |
|
|
consistency check.
Reimplemented from LPColSet. Reimplemented in SPxSolver. Definition at line 791 of file spxlp.cpp. References SPxLP::colVector(), SVector::index(), LPColSet::isConsistent(), LPRowSet::isConsistent(), METHOD, MSGinconsistent, SPxLP::nCols(), SPxLP::nRows(), SVector::number(), SPxLP::rowVector(), SVector::size(), and SVector::value(). Referenced by SPxScaler::applyScaling(), SPxLP::changeBounds(), SPxLP::changeCol(), SPxLP::changeElement(), SPxLP::changeLhs(), SPxLP::changeLower(), SPxLP::changeObj(), SPxLP::changeRange(), SPxLP::changeRhs(), SPxLP::changeRow(), SPxLP::changeUpper(), SPxLP::doAddCols(), SPxMainSM::handleExtremes(), SPxSolver::isConsistent(), SPxLP::readLPF(), SPxLP::readMPS(), SPxScaler::setup(), and SoPlex::SoPlex(). |
|
|
returns left hand side of row with identifier
Definition at line 185 of file spxlp.h. References LPRowSet::lhs(). |
|
|
Reimplemented from LPRowSet. Definition at line 179 of file spxlp.h. References LPRowSet::lhs(). |
|
|
|
returns left hand side of row
Reimplemented from LPRowSet. Definition at line 646 of file spxlp.h. References LPRowSet::lhs_w(). Referenced by SPxScaler::applyScaling(). |
|
|
returns lower bound of column with identifier
Definition at line 295 of file spxlp.h. References LPColSet::lower(). |
|
|
returns lower bound of column
Reimplemented from LPColSet. Definition at line 289 of file spxlp.h. References LPColSet::lower(). |
|
|
|
returns lower bound of column
Reimplemented from LPColSet. Definition at line 661 of file spxlp.h. References LPColSet::lower_w(). Referenced by SPxScaler::applyScaling(). |
|
|
returns the LP as an LPColSet.
Definition at line 677 of file spxlp.h. Referenced by SPxSolver::cols(). |
|
|
returns the LP as an LPRowSet.
Definition at line 671 of file spxlp.h. Referenced by SPxSolver::rows(). |
|
|
absolute biggest non-zero element in LP.
Definition at line 53 of file spxlp.cpp. References SPxLP::colVector(), SVector::maxAbs(), METHOD, and SPxLP::nCols(). Referenced by SPxGeometSC::scale(), and SPxEquiliSC::scale(). |
|
|
for maximization problem.
Definition at line 260 of file spxlp.h. References LPColSet::maxObj(). |
|
|
returns objective value of column
Reimplemented from LPColSet. Definition at line 253 of file spxlp.h. References LPColSet::maxObj(). |
|
|
|
returns objective value of column
Reimplemented from LPColSet. Definition at line 651 of file spxlp.h. References LPColSet::maxObj_w(). Referenced by SPxScaler::applyScaling(). |
|
|
absolute smallest non-zero element in LP.
Definition at line 35 of file spxlp.cpp. References SPxLP::colVector(), soplex::infinity, METHOD, SVector::minAbs(), and SPxLP::nCols(). Referenced by SPxGeometSC::scale(), and SPxEquiliSC::scale(). |
|
|
|
number of nonzeros in LP.
Definition at line 26 of file spxlp.cpp. References SPxLP::colVector(), METHOD, SPxLP::nCols(), and SVector::size(). |
|
|
|
returns the row or column number for identifier
Definition at line 319 of file spxlp.h. References SPxId::COL_ID, LPRowSet::number(), LPColSet::number(), and LPRowSet::type(). |
|
|
returns the column number of the column with identifier
Definition at line 313 of file spxlp.h. References LPColSet::number(). |
|
|
|
returns objective value of column with identifier
Definition at line 236 of file spxlp.h. References SPxLP::maxObj(), and SPxLP::spxSense(). |
|
|
returns objective value of column
Definition at line 230 of file spxlp.h. References SPxLP::maxObj(), and SPxLP::spxSense(). Referenced by SPxMainSM::DuplicateRowsPS::DuplicateRowsPS(), SPxMainSM::ForceConstraintPS::ForceConstraintPS(), SPxLP::getCol(), SPxLP::getCols(), SPxMainSM::handleExtremes(), and soplex::operator<<(). |
|
|
assignment operator
Definition at line 742 of file spxlp.h. References LPColSet::operator=(), LPRowSet::operator=(), and SPxLP::thesense. Referenced by SPxSolver::loadLP(). |
|
||||||||||||||||||||
|
reads a file from input stream
Reimplemented in SPxSolver. Definition at line 52 of file spxio.cpp. References MSG_DEBUG, SPxLP::readLPF(), SPxLP::readMPS(), and soplex::spxout. Referenced by SPxSolver::read(), and SPxLP::readFile(). |
|
||||||||||||||||||||
|
reads a file from a file.
Definition at line 59 of file spxfileio.cpp. References METHOD, and SPxLP::read(). |
|
||||||||||||||||||||
|
Read LP in "CPLEX LP File Format". The specification is taken from the ILOG CPLEX 7.0 Reference Manual, Appendix E, Page 527. This routine should read (most?) valid LP format files. What it will not do, is find all cases where a file is ill formed. If this happens it may complain and read nothing or read "something". Problem: A line ending in '+' or '-' followed by a line starting with a number, will be regarded as an error. The reader will accept the keyword INT[egers] as a synonym for GEN[erals] which is an undocumented feature in CPLEX. A difference to the CPLEX reader, ist that no name for the objective row is required.
< column names. < the set of columns read. < the set of rows read. < reusable empty column. < last assembled row. < last assembled vector (from row).
Definition at line 352 of file spxlpfread.cpp. References NameSet::add(), LPRowSet::add(), DSVector::add(), SPxLP::addCols(), DIdxSet::addIdx(), SPxLP::addRows(), SPxLP::changeSense(), SVector::clear(), SPxLP::clear(), NameSet::clear(), soplex::EQ(), NameSet::has(), soplex::hasKeyword(), soplex::hasRowName(), SVector::index(), soplex::infinity, soplex::isColName(), SPxLP::isConsistent(), soplex::isFree(), soplex::isInfinity(), soplex::isSense(), soplex::isSpace(), soplex::isValue(), LPColSet::lower_w(), MAX_LINE_LEN, SPxLP::MAXIMIZE, LPColSet::maxObj_w(), SPxLP::MINIMIZE, MSG_DEBUG, MSG_ERROR, MSG_INFO2, MSG_WARNING, soplex::NE(), LPRowSet::num(), SVector::number(), soplex::readColName(), soplex::readInfinity(), soplex::readSense(), soplex::readValue(), SVector::remove(), LPRow::setLhs(), LPRow::setRhs(), LPRow::setRowVector(), SVector::size(), soplex::spxout, LPColSet::upper_w(), and SVector::value(). Referenced by SPxLP::read(). |
|
||||||||||||||||||||
|
|
removes column with identifier
Definition at line 436 of file spxlp.h. References SPxLP::number(), and SPxLP::removeCol(). |
|
|
removes
Definition at line 430 of file spxlp.h. References SPxLP::doRemoveCol(). Referenced by SPxMainSM::removeCol(), and SPxLP::removeCol(). |
|
||||||||||||||||
|
removes columns from
Definition at line 573 of file spxlp.cpp. References DataArray::get_ptr(), METHOD, SPxLP::nCols(), and SPxLP::removeCols(). |
|
||||||||||||||||
|
removes
Removing multiple columns with one method invocation is available in two flavours. An array Definition at line 557 of file spxlp.cpp. References DataArray::get_ptr(), METHOD, SPxLP::nCols(), and SPxLP::removeCols(). |
|
||||||||||||||||
|
Definition at line 541 of file spxlp.cpp. References DataArray::get_ptr(), METHOD, SPxLP::nCols(), SPxLP::number(), and SPxLP::removeCols(). |
|
|
removes multiple columns.
This method removes all LPCols from the SPxLP with an index Definition at line 448 of file spxlp.h. References SPxLP::doRemoveCols(). Referenced by SPxLP::removeColRange(), and SPxLP::removeCols(). |
|
|
removes row with identifier
Definition at line 396 of file spxlp.h. References SPxLP::number(), and SPxLP::removeRow(). |
|
|
removes
Definition at line 390 of file spxlp.h. References SPxLP::doRemoveRow(). Referenced by SPxMainSM::removeRow(), and SPxLP::removeRow(). |
|
||||||||||||||||
|
removes rows from
Definition at line 519 of file spxlp.cpp. References DataArray::get_ptr(), METHOD, SPxLP::nRows(), and SPxLP::removeRows(). |
|
||||||||||||||||
|
removes
Removing multiple rows with one method invocation is available in two flavours. An array Definition at line 503 of file spxlp.cpp. References DataArray::get_ptr(), METHOD, SPxLP::nRows(), and SPxLP::removeRows(). |
|
||||||||||||||||
|
Definition at line 487 of file spxlp.cpp. References DataArray::get_ptr(), METHOD, SPxLP::nRows(), SPxLP::number(), and SPxLP::removeRows(). |
|
|
removes multiple rows.
This method removes all LPRows from the SPxLP with an index Definition at line 408 of file spxlp.h. References SPxLP::doRemoveRows(). Referenced by SPxLP::removeRowRange(), and SPxLP::removeRows(). |
|
|
returns right hand side of row with identifier
Definition at line 167 of file spxlp.h. References LPRowSet::rhs(). |
|
|
Reimplemented from LPRowSet. Definition at line 161 of file spxlp.h. References LPRowSet::rhs(). |
|
|
returns right hand side vector.
Reimplemented from LPRowSet. Definition at line 155 of file spxlp.h. References LPRowSet::rhs(). Referenced by SPxScaler::applyScaling(), SPxSolver::changeLhs(), SPxSolver::changeRange(), SPxLP::changeRhs(), SPxSolver::computeEnterCoPrhs4Row(), SPxSolver::computeFrhs(), SPxBasis::dualRowStatus(), soplex::dumpRows(), SPxMainSM::duplicateRows(), SPxMainSM::fixColumn(), SPxMainSM::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::getRhs(), SPxLP::getRow(), SPxLP::getRows(), SPxSolver::getSlacks(), SPxMainSM::handleExtremes(), SPxSolver::nonbasicValue(), SPxSolver::qualConstraintViolation(), SoPlex::qualConstraintViolation(), SPxMainSM::removeEmpty(), SPxSolver::setLeaveBound4Row(), SPxSolver::setPrimalBounds(), SPxWeightST::setPrimalStatus(), SPxWeightST::setupWeights(), SPxVectorST::setupWeights(), SPxSumST::setupWeights(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyDual(), SPxMainSM::simplifyRows(), SPxSolver::solve(), SPxSolver::test(), SPxSolver::unShift(), SPxSolver::varStatusToBasisStatusRow(), and SPxLP::writeMPS(). |
|
|
returns right hand side of row
Reimplemented from LPRowSet. Definition at line 641 of file spxlp.h. References LPRowSet::rhs_w(). Referenced by SPxScaler::applyScaling(). |
|
|
returns the row identifier for row
Definition at line 327 of file spxlp.h. References LPRowSet::key(). Referenced by SPxLP::addRow(), SPxLP::addRows(), SPxSolver::coId(), soplex::getRowName(), SPxSolver::id(), soplex::initPrefs(), SPxMainSM::removeRow(), SPxMainSM::rIdx(), SPxSolver::rowId(), SPxWeightPR::selectEnter(), and SPxMainSM::simplify(). |
|
|
returns the inequality type of the row with identifier
Definition at line 197 of file spxlp.h. References LPRowSet::type(). |
|
|
returns the inequality type of the
Definition at line 191 of file spxlp.h. References LPRowSet::type(). |
|
|
gets row vector of row with identifier
Definition at line 149 of file spxlp.h. References LPRowSet::rowVector(). |
|
|
gets row vector of row
Reimplemented from LPRowSet. Definition at line 143 of file spxlp.h. References LPRowSet::rowVector(). Referenced by SPxWeightPR::computeRP(), SPxLP::doAddCols(), SPxLP::doAddRows(), SPxLP::doRemoveRow(), soplex::dumpRows(), SPxMainSM::duplicateCols(), SPxMainSM::duplicateRows(), SPxMainSM::DuplicateRowsPS::DuplicateRowsPS(), SPxMainSM::ForceConstraintPS::ForceConstraintPS(), SPxMainSM::FreeColSingletonPS::FreeColSingletonPS(), SPxMainSM::FreeConstraintPS::FreeConstraintPS(), SPxMainSM::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxLP::getRow(), SPxLP::getRows(), SPxLP::isConsistent(), SPxScaler::maxRowRatio(), SPxSolver::qualConstraintViolation(), SoPlex::qualConstraintViolation(), SPxSolver::qualSlackViolation(), SPxMainSM::removeEmpty(), SPxWeightST::setupWeights(), SPxVectorST::setupWeights(), SPxSumST::setupWeights(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyRows(), SPxSolver::solve(), and SPxMainSM::ZeroObjColSingletonPS::ZeroObjColSingletonPS(). |
|
|
Reimplemented from LPRowSet. Definition at line 712 of file spxlp.h. References LPRowSet::rowVector_w(). Referenced by SPxScaler::applyScaling(), SPxLP::changeCol(), SPxLP::changeElement(), SPxLP::changeRow(), SPxLP::doAddCols(), SPxLP::doRemoveCol(), SPxLP::doRemoveCols(), and SPxMainSM::handleExtremes(). |
|
|
returns the optimization sense.
Definition at line 301 of file spxlp.h. References SPxLP::thesense. Referenced by SPxLP::changeObj(), SPxSolver::getDual(), SPxLP::getObj(), SPxSolver::getRedCost(), SPxLP::obj(), SoPlex::objValue(), soplex::operator<<(), SPxSolver::sense(), SPxSolver::terminate(), and SPxSolver::value(). |
|
|
returns upper bound of column with identifier
Definition at line 277 of file spxlp.h. References LPColSet::upper(). |
|
|
returns upper bound of column
Reimplemented from LPColSet. Definition at line 272 of file spxlp.h. References LPColSet::upper(). |
|
|
returns upper bound vector.
Reimplemented from LPColSet. Definition at line 266 of file spxlp.h. References LPColSet::upper(). Referenced by SPxScaler::applyScaling(), SPxSolver::changeLower(), SPxLP::changeUpper(), SPxSolver::changeUpper(), SPxSolver::computeEnterCoPrhs4Col(), SPxSolver::computeFrhsXtra(), SPxSolver::coTest(), soplex::dumpBounds(), SPxMainSM::duplicateCols(), SPxMainSM::FixBoundsPS::FixBoundsPS(), SPxMainSM::fixColumn(), SPxMainSM::ForceConstraintPS::ForceConstraintPS(), SPxWeightST::generate(), SPxLP::getCol(), SPxLP::getCols(), SPxSolver::getEnterVals(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::getPrimal(), SPxSolver::getUpper(), SPxMainSM::handleExtremes(), SPxSolver::nonbasicValue(), soplex::primalColStatus(), SPxSolver::qualBoundViolation(), SoPlex::qualBoundViolation(), SPxMainSM::removeEmpty(), SPxSolver::setLeaveBound4Col(), SPxSolver::setPrimalBounds(), SPxSumST::setupWeights(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyDual(), SPxMainSM::simplifyRows(), SPxSolver::solve(), SPxSolver::unShift(), SPxSolver::varStatusToBasisStatusCol(), and SPxLP::writeMPS(). |
|
|
returns upper bound of column
Reimplemented from LPColSet. Definition at line 656 of file spxlp.h. References LPColSet::upper_w(). Referenced by SPxScaler::applyScaling(). |
|
||||||||||||||||||||
|
Write LP in "MPS File Format".
Definition at line 124 of file spxmpswrite.cpp. References SPxLP::colVector(), soplex::getColName(), soplex::getRHS(), soplex::getRowName(), SVector::index(), soplex::infinity, soplex::isNotZero(), SPxLP::lhs(), SPxLP::lower(), SPxLP::maxObj(), METHOD, SPxLP::nCols(), SPxLP::nRows(), IdxSet::number(), SPxLP::rhs(), SVector::size(), IdxSet::size(), SPxLP::upper(), SVector::value(), and soplex::writeRecord(). |
|
||||||||||||
|
output operator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
optimization sense.
Definition at line 102 of file spxlp.h. Referenced by SPxLP::changeSense(), SPxLP::clear(), SPxLP::doAddCol(), SPxLP::doAddCols(), SPxLP::operator=(), and SPxLP::spxSense(). |
1.4.4