Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SPxLP Class Reference
[Algorithmic Classes]

Saving LPs in a form suitable for SoPlex.

Class SPxLP 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:

More...

#include <spxlp.h>

Inheritance diagram for SPxLP:

Inheritance graph
[legend]
Collaboration diagram for SPxLP:

Collaboration graph
[legend]
List of all members.

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 SVectorrowVector (int i) const
 gets row vector of row i.
const SVectorrowVector (const SPxRowId &id) const
 gets row vector of row with identifier id.
const Vectorrhs () 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 Vectorlhs () 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 SVectorcolVector (int i) const
 returns column vector of column i.
const SVectorcolVector (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 VectormaxObj () 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 Vectorupper () 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 Vectorlower () 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.
SPxLPoperator= (const SPxLP &old)
 assignment operator

Protected Member Functions

Protected write access
Realrhs_w (int i)
 returns right hand side of row i.
Reallhs_w (int i)
 returns left hand side of row i.
RealmaxObj_w (int i)
 returns objective value of column i for maximization problem.
Realupper_w (int i)
 returns upper bound of column i.
Reallower_w (int i)
 returns lower bound of column i.
Protected helpers
const LPRowSetlprowset () const
 returns the LP as an LPRowSet.
const LPColSetlpcolset () 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
SVectorcolVector_w (int i)
 returns the LP as an LPRowSet.
SVectorrowVector_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.

Detailed Description

Saving LPs in a form suitable for SoPlex.

Class SPxLP 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 retreived with method spxSense().

Further, equality constraints are modelled by $l_r = u_r$ . Analogously, fixed variables have $l_c = u_c$ .

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.


Member Enumeration Documentation

enum SPxSense
 

optimization sense.

Enumerator:
MAXIMIZE 
MINIMIZE 

Definition at line 90 of file spxlp.h.


Constructor & Destructor Documentation

SPxLP  ) 
 

default constructor.

Definition at line 732 of file spxlp.h.

References SPxLP::clear().

virtual ~SPxLP  )  [virtual]
 

destructor.

Definition at line 738 of file spxlp.h.


Member Function Documentation

virtual void addCol SPxColId id,
const LPCol col
[virtual]
 

adds col to LPColSet.

Definition at line 369 of file spxlp.h.

References SPxLP::addCol(), SPxLP::cId(), and SPxLP::nCols().

virtual void addCol const LPCol col  )  [virtual]
 

Definition at line 364 of file spxlp.h.

References SPxLP::doAddCol().

Referenced by SPxLP::addCol().

void addCols SPxColId  id[],
const LPColSet set
[virtual]
 

adds all LPCols of set to LPColSet.

Definition at line 384 of file spxlp.cpp.

References SPxLP::addCols(), SPxLP::cId(), METHOD, and SPxLP::nCols().

virtual void addCols const LPColSet pset  )  [virtual]
 

Definition at line 376 of file spxlp.h.

References SPxLP::doAddCols().

Referenced by SPxLP::addCols(), and SPxLP::readLPF().

void added2Set SVSet set,
const SVSet add,
int  n
[protected]
 

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().

virtual void addedCols int   )  [protected, virtual]
 

called after the last n columns have just been added.

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().

virtual void addedRows int   )  [protected, virtual]
 

called after the last n rows have just been added.

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().

virtual void addRow SPxRowId id,
const LPRow row
[virtual]
 

adds row to LPRowSet.

Definition at line 349 of file spxlp.h.

References SPxLP::addRow(), SPxLP::nRows(), and SPxLP::rId().

virtual void addRow const LPRow row  )  [virtual]
 

Definition at line 344 of file spxlp.h.

References SPxLP::doAddRow().

Referenced by SPxLP::addRow().

void addRows SPxRowId  id[],
const LPRowSet set
[virtual]
 

adds all LPRows of pset to LPRowSet.

Definition at line 375 of file spxlp.cpp.

References SPxLP::addRows(), METHOD, SPxLP::nRows(), and SPxLP::rId().

virtual void addRows const LPRowSet pset  )  [virtual]
 

Definition at line 356 of file spxlp.h.

References SPxLP::doAddRows().

Referenced by SPxLP::addRows(), and SPxLP::readLPF().

virtual void changeBounds SPxColId  id,
Real  newLower,
Real  newUpper
[virtual]
 

changes bounds of column with identifier id.

Reimplemented in SPxSolver.

Definition at line 549 of file spxlp.h.

References SPxLP::changeBounds(), and SPxLP::number().

void changeBounds int  i,
Real  newLower,
Real  newUpper
[virtual]
 

changes bounds of column i to newLower and newUpper.

Reimplemented in SPxSolver.

Definition at line 665 of file spxlp.cpp.

References SPxLP::changeLower(), SPxLP::changeUpper(), SPxLP::isConsistent(), and METHOD.

void changeBounds const Vector newLower,
const Vector newUpper
[virtual]
 

changes variable bounds to newLower and newUpper.

Reimplemented in SPxSolver.

Definition at line 657 of file spxlp.cpp.

References SPxLP::changeLower(), SPxLP::changeUpper(), SPxLP::isConsistent(), and METHOD.

Referenced by SPxLP::changeBounds().

virtual void changeCol SPxColId  id,
const LPCol newCol
[virtual]
 

replaces column with identifier id with newCol.

Reimplemented in SPxSolver.

Definition at line 603 of file spxlp.h.

References SPxLP::changeCol(), and SPxLP::number().

void changeCol int  i,
const LPCol newCol
[virtual]
 

replaces i 'th column of LP with newCol.

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().

virtual void changeElement SPxRowId  rid,
SPxColId  cid,
Real  val
[virtual]
 

changes LP element identified by (rid, cid) to val.

Reimplemented in SPxSolver.

Definition at line 612 of file spxlp.h.

References SPxLP::changeElement(), and SPxLP::number().

void changeElement int  i,
int  j,
Real  val
[virtual]
 

changes LP element (i, j) to val.

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().

virtual void changeLhs SPxRowId  id,
Real  newLhs
[virtual]
 

changes left hand side value for row with identifier id.

Reimplemented in SPxSolver.

Definition at line 561 of file spxlp.h.

References SPxLP::changeLhs(), and SPxLP::number().

void changeLhs int  i,
Real  newLhs
[virtual]
 

changes i 'th left hand side value to newLhs.

Reimplemented in SPxSolver.

Definition at line 673 of file spxlp.cpp.

References SPxLP::isConsistent(), LPRowSet::lhs_w(), and METHOD.

void changeLhs const Vector newLhs  )  [virtual]
 

changes left hand side vector for constraints to newLhs.

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().

virtual void changeLower SPxColId  id,
Real  newLower
[virtual]
 

changes lower bound of column with identifier id to newLower.

Reimplemented in SPxSolver.

Definition at line 525 of file spxlp.h.

References SPxLP::changeLower(), and SPxLP::number().

void changeLower int  i,
Real  newLower
[virtual]
 

changes i 'th lower bound to newLower.

Reimplemented in SPxSolver.

Definition at line 627 of file spxlp.cpp.

References SPxLP::isConsistent(), LPColSet::lower_w(), and METHOD.

void changeLower const Vector newLower  )  [virtual]
 

changes vector of lower bounds to newLower.

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().

virtual void changeObj SPxColId  id,
Real  newVal
[virtual]
 

change objective value of column with identifier id to newVal.

Reimplemented in SPxSolver.

Definition at line 513 of file spxlp.h.

References SPxLP::changeObj(), and SPxLP::number().

void changeObj int  i,
Real  newVal
[virtual]
 

changes i 'th objective vector element to newVal.

Reimplemented in SPxSolver.

Definition at line 612 of file spxlp.cpp.

References SPxLP::isConsistent(), LPColSet::maxObj_w(), METHOD, and SPxLP::spxSense().

void changeObj const Vector newObj  )  [virtual]
 

changes objective vector to newObj.

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().

virtual void changeRange SPxRowId  id,
Real  newLhs,
Real  newRhs
[virtual]
 

changes left and right hand side of row with identifier id.

Reimplemented in SPxSolver.

Definition at line 585 of file spxlp.h.

References SPxLP::changeRange(), and SPxLP::number().

void changeRange int  i,
Real  newLhs,
Real  newRhs
[virtual]
 

changes left and right hand side of row i.

Reimplemented in SPxSolver.

Definition at line 703 of file spxlp.cpp.

References SPxLP::changeLhs(), SPxLP::changeRhs(), SPxLP::isConsistent(), and METHOD.

void changeRange const Vector newLhs,
const Vector newRhs
[virtual]
 

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().

virtual void changeRhs SPxRowId  id,
Real  newRhs
[virtual]
 

changes right hand side value for row with identifier id.

Reimplemented in SPxSolver.

Definition at line 573 of file spxlp.h.

References SPxLP::changeRhs(), and SPxLP::number().

void changeRhs int  i,
Real  newRhs
[virtual]
 

changes i 'th right hand side value to newRhs.

Reimplemented in SPxSolver.

Definition at line 688 of file spxlp.cpp.

References SPxLP::isConsistent(), METHOD, and LPRowSet::rhs_w().

void changeRhs const Vector newRhs  )  [virtual]
 

changes right hand side vector for constraints to newRhs.

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().

virtual void changeRow SPxRowId  id,
const LPRow newRow
[virtual]
 

replaces row with identifier id with newRow.

Reimplemented in SPxSolver.

Definition at line 594 of file spxlp.h.

References SPxLP::changeRow(), and SPxLP::number().

void changeRow int  i,
const LPRow newRow
[virtual]
 

replaces i 'th row of LP with newRow.

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().

virtual void changeSense SPxSense  sns  )  [virtual]
 

changes optimization sense to sns.

Definition at line 618 of file spxlp.h.

References LPColSet::maxObj_w(), and SPxLP::thesense.

Referenced by SPxSolver::changeSense(), SPxLP::readLPF(), and SPxLP::readMPS().

virtual void changeUpper SPxColId  id,
Real  newUpper
[virtual]
 

changes upper bound of column with identifier id to newLower.

Reimplemented in SPxSolver.

Definition at line 537 of file spxlp.h.

References SPxLP::changeUpper(), and SPxLP::number().

void changeUpper int  i,
Real  newUpper
[virtual]
 

changes i 'th upper bound to newUpper.

Reimplemented in SPxSolver.

Definition at line 642 of file spxlp.cpp.

References SPxLP::isConsistent(), METHOD, and LPColSet::upper_w().

void changeUpper const Vector newUpper  )  [virtual]
 

changes vector of upper bounds to newUpper.

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().

SPxColId cId int  n  )  const
 

returns the column identifier for column n.

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().

void clear  )  [virtual]
 

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().

const SVector& colVector const SPxColId id  )  const
 

returns column vector of column with identifier id.

Definition at line 221 of file spxlp.h.

References LPColSet::colVector().

const SVector& colVector int  i  )  const
 

returns column vector of column i.

Reimplemented from LPColSet.

Definition at line 215 of file spxlp.h.

References LPColSet::colVector().

Referenced by SPxLP::doAddCols(), SPxLP::doAddRows(), SPxLP::doRemoveCol(), SPxMainSM::DoubletonEquationPS::DoubletonEquationPS(), SPxMainSM::duplicateCols(), SPxMainSM::duplicateRows(), SPxMainSM::DuplicateRowsPS::DuplicateRowsPS(), SPxMainSM::fixColumn(), SPxMainSM::FixVariablePS::FixVariablePS(), SPxMainSM::ForceConstraintPS::ForceConstraintPS(), SPxMainSM::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxLP::getCol(), SPxLP::getCols(), SPxLP::isConsistent(), SPxLP::maxAbsNzo(), SPxScaler::maxColRatio(), SPxLP::minAbsNzo(), SPxLP::nNzos(), SPxMainSM::removeEmpty(), SPxMainSM::RowSingletonPS::RowSingletonPS(), SPxWeightST::setupWeights(), SPxVectorST::setupWeights(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyDual(), and SPxLP::writeMPS().

SVector& colVector_w int  i  )  [private]
 

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().

void doAddCol const LPCol col  )  [private]
 

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().

void doAddCols const LPColSet set  )  [private]
 

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().

void doAddRow const LPRow row  )  [private]
 

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().

void doAddRows const LPRowSet set  )  [private]
 

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().

void doRemoveCol int  i  )  [protected, virtual]
 

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().

void doRemoveCols int  perm[]  )  [protected, virtual]
 

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().

void doRemoveRow int  i  )  [protected, virtual]
 

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().

void doRemoveRows int  perm[]  )  [protected, virtual]
 

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().

void dumpFile const char *  filename  )  const [virtual]
 

dump loaded LP to filename in LPF format.

Definition at line 76 of file spxfileio.cpp.

References METHOD.

void getCol const SPxColId id,
LPCol col
const
 

gets column with identifier id.

Definition at line 206 of file spxlp.h.

References SPxLP::getCol(), and SPxLP::number().

void getCol int  i,
LPCol column
const
 

gets i 'th column.

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().

void getCols int  start,
int  end,
LPColSet set
const
 

gets columns start, ..., end.

Definition at line 96 of file spxlp.cpp.

References LPColSet::add(), LPColSet::clear(), SPxLP::colVector(), SPxLP::lower(), METHOD, SPxLP::obj(), and SPxLP::upper().

void getObj Vector obj  )  const
 

gets objective vector.

Definition at line 104 of file spxlp.cpp.

References LPColSet::maxObj(), METHOD, SPxLP::MINIMIZE, and SPxLP::spxSense().

void getRow const SPxRowId id,
LPRow row
const
 

gets row with identifier id.

Definition at line 134 of file spxlp.h.

References SPxLP::getRow(), and SPxLP::number().

void getRow int  i,
LPRow row
const
 

gets i 'th row.

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().

void getRows int  start,
int  end,
LPRowSet set
const
 

gets rows start, ... end.

Definition at line 79 of file spxlp.cpp.

References LPRowSet::add(), LPRowSet::clear(), SPxLP::lhs(), METHOD, SPxLP::rhs(), and SPxLP::rowVector().

bool isConsistent  )  const
 

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().

Real lhs const SPxRowId id  )  const
 

returns left hand side of row with identifier id.

Definition at line 185 of file spxlp.h.

References LPRowSet::lhs().

Real lhs int  i  )  const
 

Reimplemented from LPRowSet.

Definition at line 179 of file spxlp.h.

References LPRowSet::lhs().

const Vector& lhs  )  const
 

returns left hand side vector.

Reimplemented from LPRowSet.

Definition at line 173 of file spxlp.h.

References LPRowSet::lhs().

Referenced by SPxScaler::applyScaling(), SPxLP::changeLhs(), SPxSolver::changeRange(), SPxSolver::changeRhs(), SPxSolver::computeEnterCoPrhs4Row(), SPxSolver::computeFrhs(), SPxBasis::dualRowStatus(), soplex::dumpRows(), SPxMainSM::duplicateRows(), SPxMainSM::fixColumn(), SPxMainSM::FreeZeroObjVariablePS::FreeZeroObjVariablePS(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::getLhs(), 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().

Real& lhs_w int  i  )  [protected]
 

returns left hand side of row i.

Reimplemented from LPRowSet.

Definition at line 646 of file spxlp.h.

References LPRowSet::lhs_w().

Referenced by SPxScaler::applyScaling().

Real lower const SPxColId id  )  const
 

returns lower bound of column with identifier id.

Definition at line 295 of file spxlp.h.

References LPColSet::lower().

Real lower int  i  )  const
 

returns lower bound of column i.

Reimplemented from LPColSet.

Definition at line 289 of file spxlp.h.

References LPColSet::lower().

const Vector& lower  )  const
 

returns lower bound vector.

Reimplemented from LPColSet.

Definition at line 283 of file spxlp.h.

References LPColSet::lower().

Referenced by SPxScaler::applyScaling(), SPxLP::changeLower(), SPxSolver::changeLower(), 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::getLower(), SPxSolver::getPrimal(), 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().

Real& lower_w int  i  )  [protected]
 

returns lower bound of column i.

Reimplemented from LPColSet.

Definition at line 661 of file spxlp.h.

References LPColSet::lower_w().

Referenced by SPxScaler::applyScaling().

const LPColSet* lpcolset  )  const [protected]
 

returns the LP as an LPColSet.

Definition at line 677 of file spxlp.h.

Referenced by SPxSolver::cols().

const LPRowSet* lprowset  )  const [protected]
 

returns the LP as an LPRowSet.

Definition at line 671 of file spxlp.h.

Referenced by SPxSolver::rows().

Real maxAbsNzo  )  const
 

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().

Real maxObj const SPxColId id  )  const
 

for maximization problem.

Definition at line 260 of file spxlp.h.

References LPColSet::maxObj().

Real maxObj int  i  )  const
 

returns objective value of column i for maximization problem.

Reimplemented from LPColSet.

Definition at line 253 of file spxlp.h.

References LPColSet::maxObj().

const Vector& 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 SPxLP internally stores any LP these methods are generally faster. The following condition holds: obj() = spxSense() * maxObj().

Reimplemented from LPColSet.

Definition at line 247 of file spxlp.h.

References LPColSet::maxObj().

Referenced by SPxLP::changeObj(), SPxWeightPR::computeCP(), SPxSolver::computeEnterCoPrhs4Col(), SPxSolver::computeFrhs(), SPxSolver::computeLeaveCoPrhs4Col(), SPxWeightPR::computeRP(), SPxMainSM::duplicateCols(), SPxWeightST::generate(), SPxSolver::getRedCost(), SPxWeightPR::load(), SPxSolver::nonbasicValue(), SPxLP::obj(), SoPlex::objValue(), soplex::primalColStatus(), SPxMainSM::removeEmpty(), SPxSolver::setDualColBounds(), SPxWeightST::setupWeights(), SPxVectorST::setupWeights(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyDual(), SPxSolver::test(), SPxSolver::unShift(), and SPxLP::writeMPS().

Real& maxObj_w int  i  )  [protected]
 

returns objective value of column i for maximization problem.

Reimplemented from LPColSet.

Definition at line 651 of file spxlp.h.

References LPColSet::maxObj_w().

Referenced by SPxScaler::applyScaling().

Real minAbsNzo  )  const
 

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().

int nCols  )  const
 

returns number of columns in LP.

Definition at line 117 of file spxlp.h.

References LPColSet::num().

Referenced by SPxLP::addCol(), SPxLP::addCols(), SPxBasis::addedCols(), SPxScaler::applyScaling(), SPxSolver::computeFrhsXtra(), SPxBasis::Desc::Desc(), SPxLP::doAddCol(), SPxLP::doAddCols(), SPxLP::doAddRow(), SPxLP::doAddRows(), SPxLP::doRemoveCol(), SPxSolver::doRemoveCol(), SPxSolver::doRemoveCols(), SPxLP::doRemoveRows(), SPxBasis::dump(), soplex::dumpBounds(), SPxMainSM::duplicateCols(), SPxMainSM::duplicateRows(), SPxWeightST::generate(), SPxSolver::getBasis(), SPxSolver::getBasisColStatus(), soplex::getColName(), SPxSolver::getDual(), SPxSolver::getPrimal(), SPxMainSM::handleExtremes(), soplex::initPrefs(), SPxWeightPR::isConsistent(), SPxSolver::isConsistent(), SPxLP::isConsistent(), SPxBasis::isConsistent(), SPxWeightPR::load(), SPxBasis::load(), SPxBasis::loadDesc(), SPxLP::maxAbsNzo(), SPxScaler::maxColRatio(), SPxLP::minAbsNzo(), SPxLP::nNzos(), SPxSolver::nonbasicValue(), SoPlex::objValue(), soplex::operator<<(), SPxSolver::qualBoundViolation(), SoPlex::qualBoundViolation(), SPxSolver::qualConstraintViolation(), SoPlex::qualConstraintViolation(), SPxSolver::qualSlackViolation(), SPxBasis::readBasis(), SPxSolver::reDim(), SPxBasis::reDim(), SPxMainSM::removeCol(), SPxLP::removeColRange(), SPxLP::removeCols(), SPxBasis::removedCol(), SPxMainSM::removeEmpty(), SPxSolver::setBasis(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxScaler::setup(), SPxSteepPR::setupPrefsX(), SPxWeightST::setupWeights(), SPxVectorST::setupWeights(), SPxSumST::setupWeights(), SPxMainSM::simplify(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyDual(), SPxSolver::solve(), SoPlex::solve(), SPxSolver::unShift(), SoPlex::unsimplify(), SPxBasis::writeBasis(), and SPxLP::writeMPS().

int nNzos  )  const
 

number of nonzeros in LP.

Definition at line 26 of file spxlp.cpp.

References SPxLP::colVector(), METHOD, SPxLP::nCols(), and SVector::size().

int nRows  )  const
 

returns number of rows in LP.

Definition at line 111 of file spxlp.h.

References LPRowSet::num().

Referenced by SPxBasis::addedRows(), SPxLP::addRow(), SPxLP::addRows(), SPxScaler::applyScaling(), SPxSolver::changeLhs(), SPxSolver::changeRange(), SPxSolver::changeRhs(), SPxSolver::computeFrhs(), SPxBasis::Desc::Desc(), SPxLP::doAddCol(), SPxLP::doAddCols(), SPxLP::doAddRow(), SPxLP::doAddRows(), SPxLP::doRemoveCols(), SPxLP::doRemoveRow(), SPxSolver::doRemoveRow(), SPxSolver::doRemoveRows(), SPxBasis::dump(), soplex::dumpRows(), SPxMainSM::duplicateCols(), SPxMainSM::duplicateRows(), SPxWeightST::generate(), SPxSolver::getBasis(), SPxSolver::getBasisRowStatus(), soplex::getRowName(), SPxSolver::getSlacks(), SPxMainSM::handleExtremes(), soplex::initPrefs(), SPxWeightPR::isConsistent(), SPxSolver::isConsistent(), SPxLP::isConsistent(), SPxBasis::isConsistent(), SPxWeightPR::load(), SPxBasis::load(), SPxBasis::loadDesc(), SPxScaler::maxRowRatio(), SPxSolver::nonbasicValue(), SPxSolver::qualConstraintViolation(), SoPlex::qualConstraintViolation(), SPxSolver::qualSlackViolation(), SPxBasis::readBasis(), SPxSolver::reDim(), SPxBasis::reDim(), SPxBasis::removedRow(), SPxMainSM::removeEmpty(), SPxMainSM::removeRow(), SPxLP::removeRowRange(), SPxLP::removeRows(), SPxSolver::setBasis(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxScaler::setup(), SPxSteepPR::setupPrefsX(), SPxWeightST::setupWeights(), SPxVectorST::setupWeights(), SPxSumST::setupWeights(), SPxMainSM::simplify(), SPxMainSM::simplifyDual(), SPxMainSM::simplifyRows(), SPxSolver::solve(), SoPlex::solve(), SPxSolver::unShift(), SoPlex::unsimplify(), SPxBasis::writeBasis(), and SPxLP::writeMPS().

int number const SPxId id  )  const
 

returns the row or column number for identifier id.

Definition at line 319 of file spxlp.h.

References SPxId::COL_ID, LPRowSet::number(), LPColSet::number(), and LPRowSet::type().

int number const SPxColId id  )  const
 

returns the column number of the column with identifier id.

Definition at line 313 of file spxlp.h.

References LPColSet::number().

int number const SPxRowId id  )  const
 

returns the row number of the row with identifier id.

Definition at line 307 of file spxlp.h.

References LPRowSet::number().

Referenced by SPxSolver::changeBounds(), SPxLP::changeBounds(), SPxSolver::changeCol(), SPxLP::changeCol(), SPxSolver::changeElement(), SPxLP::changeElement(), SPxSolver::changeLhs(), SPxLP::changeLhs(), SPxSolver::changeLower(), SPxLP::changeLower(), SPxSolver::changeObj(), SPxLP::changeObj(), SPxSolver::changeRange(), SPxLP::changeRange(), SPxSolver::changeRhs(), SPxLP::changeRhs(), SPxSolver::changeRow(), SPxLP::changeRow(), SPxSolver::changeUpper(), SPxLP::changeUpper(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeEnterCoPrhs4Col(), SPxSolver::computeEnterCoPrhs4Row(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::computeLeaveCoPrhs4Col(), SPxSolver::computeLeaveCoPrhs4Row(), SPxWeightPR::computeLeavePenalty(), SPxSolver::coVector(), SPxBasis::dump(), SPxWeightST::generate(), SPxLP::getCol(), SPxSolver::getDual(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::getPrimal(), SPxSolver::getRedCost(), SPxLP::getRow(), SPxSolver::getSlacks(), SPxSolver::isBasic(), SPxSteepPR::left4(), SPxSolver::rejectEnter(), SPxLP::removeCol(), SPxLP::removeCols(), SPxBasis::removedCol(), SPxBasis::removedRow(), SPxLP::removeRow(), SPxLP::removeRows(), SPxParMultPR::selectEnter(), SPxFastRT::selectEnter(), soplex::setDualStatus(), SPxSolver::setEnterBound4Col(), SPxSolver::setEnterBound4Row(), SPxSolver::setEnterBounds(), SPxSolver::setLeaveBound4Col(), SPxSolver::setLeaveBound4Row(), SPxSolver::setLeaveBounds(), SPxWeightST::setPrimalStatus(), SPxSteepPR::setType(), SPxSolver::solve(), SPxSolver::ungetEnterVal(), SPxSolver::unShift(), and SPxSolver::vector().

Real obj const SPxColId id  )  const
 

returns objective value of column with identifier id.

Definition at line 236 of file spxlp.h.

References SPxLP::maxObj(), and SPxLP::spxSense().

Real obj int  i  )  const
 

returns objective value of column i.

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<<().

SPxLP& operator= const SPxLP old  ) 
 

assignment operator

Definition at line 742 of file spxlp.h.

References LPColSet::operator=(), LPRowSet::operator=(), and SPxLP::thesense.

Referenced by SPxSolver::loadLP().

bool read std::istream &  is,
NameSet rowNames = 0,
NameSet colNames = 0,
DIdxSet intVars = 0
[virtual]
 

reads a file from input stream in.

Parameters:
is 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.
Todo:
Make sure the Id's in the NameSets are the same as in the LP.

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().

bool readFile const char *  filename,
NameSet rowNames = 0,
NameSet colNames = 0,
DIdxSet intVars = 0
[virtual]
 

reads a file from a file.

Definition at line 59 of file spxfileio.cpp.

References METHOD, and SPxLP::read().

bool readLPF std::istream &  p_input,
NameSet p_rnames = 0,
NameSet p_cnames = 0,
DIdxSet p_intvars = 0
[virtual]
 

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.

Returns:
true if the file was read correctly
< row names.

< column names.

< the set of columns read.

< the set of rows read.

< reusable empty column.

< last assembled row.

< last assembled vector (from row).

Parameters:
p_rnames  row names.
p_cnames  column names.
p_intvars  integer variables.

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().

bool readMPS std::istream &  p_input,
NameSet p_rnames = 0,
NameSet p_cnames = 0,
DIdxSet p_intvars = 0
[virtual]
 

Read LP in "MPS File Format".

The specification is taken from the

IBM Optimization Library Guide and Reference

Online available at http://www.software.ibm.com/sos/features/libuser.htm

and from the

ILOG CPLEX 7.0 Reference Manual, Appendix E, Page 531.

This routine should read all valid MPS 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".

Returns:
true if the file was read correctly.
< row names.

< column names.

Parameters:
p_rnames  row names.
p_cnames  column names.
p_intvars  integer variables.

Definition at line 604 of file spxmpsread.cpp.

References SPxLP::added2Set(), SPxLP::addedCols(), SPxLP::addedRows(), MPSInput::BOUNDS, SPxLP::changeSense(), SPxLP::clear(), NameSet::clear(), MPSInput::COLUMNS, MPSInput::ENDATA, MPSInput::hasError(), INIT_COLS, INIT_NZOS, SPxLP::isConsistent(), LPColSet::memRemax(), SPxLP::MINIMIZE, MSG_INFO2, LPColSet::num(), LPRowSet::num(), MPSInput::OBJNAME, MPSInput::OBJSEN, MPSInput::objSense(), MPSInput::RANGES, soplex::readBounds(), soplex::readCols(), soplex::readName(), soplex::readObjname(), soplex::readObjsen(), soplex::readRanges(), soplex::readRhs(), soplex::readRows(), LPColSet::reMax(), MPSInput::RHS, MPSInput::ROWS, MPSInput::section(), soplex::spxout, and MPSInput::syntaxError().

Referenced by SPxLP::read().

virtual void removeCol SPxColId  id  )  [virtual]
 

removes column with identifier id.

Definition at line 436 of file spxlp.h.

References SPxLP::number(), and SPxLP::removeCol().

virtual void removeCol int  i  )  [virtual]
 

removes i 'th column.

Definition at line 430 of file spxlp.h.

References SPxLP::doRemoveCol().

Referenced by SPxMainSM::removeCol(), and SPxLP::removeCol().

void removeColRange int  start,
int  end,
int  perm[] = 0
[virtual]
 

removes columns from start to end (including both).

Definition at line 573 of file spxlp.cpp.

References DataArray::get_ptr(), METHOD, SPxLP::nCols(), and SPxLP::removeCols().

void removeCols int  nums[],
int  n,
int  perm[] = 0
[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 557 of file spxlp.cpp.

References DataArray::get_ptr(), METHOD, SPxLP::nCols(), and SPxLP::removeCols().

void removeCols SPxColId  id[],
int  n,
int  perm[] = 0
[virtual]
 

Definition at line 541 of file spxlp.cpp.

References DataArray::get_ptr(), METHOD, SPxLP::nCols(), SPxLP::number(), and SPxLP::removeCols().

virtual void removeCols int  perm[]  )  [virtual]
 

removes multiple columns.

This method removes all LPCols from the SPxLP with an index i such that perm[i] < 0. Upon completion, perm[i] >= 0 indicates the new index where the i 'th LPCol has been moved to due to this removal. Note, that perm must point to an array of at least nCols() ints.

Definition at line 448 of file spxlp.h.

References SPxLP::doRemoveCols().

Referenced by SPxLP::removeColRange(), and SPxLP::removeCols().

virtual void removeRow SPxRowId  id  )  [virtual]
 

removes row with identifier id.

Definition at line 396 of file spxlp.h.

References SPxLP::number(), and SPxLP::removeRow().

virtual void removeRow int  i  )  [virtual]
 

removes i 'th row.

Definition at line 390 of file spxlp.h.

References SPxLP::doRemoveRow().

Referenced by SPxMainSM::removeRow(), and SPxLP::removeRow().

void removeRowRange int  start,
int  end,
int  perm[] = 0
[virtual]
 

removes rows from start to end (including both).

Definition at line 519 of file spxlp.cpp.

References DataArray::get_ptr(), METHOD, SPxLP::nRows(), and SPxLP::removeRows().

void removeRows int  nums[],
int  n,
int  perm[] = 0
[virtual]
 

removes n LPRows.

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 503 of file spxlp.cpp.

References DataArray::get_ptr(), METHOD, SPxLP::nRows(), and SPxLP::removeRows().

void removeRows SPxRowId  id[],
int  n,
int  perm[] = 0
[virtual]
 

Definition at line 487 of file spxlp.cpp.

References DataArray::get_ptr(), METHOD, SPxLP::nRows(), SPxLP::number(), and SPxLP::removeRows().

virtual void removeRows int  perm[]  )  [virtual]
 

removes multiple rows.

This method removes all LPRows from the SPxLP with an index i such that perm[i] < 0. Upon completion, perm[i] >= 0 indicates the new index where the i'th LPRow has been moved to due to this removal. Note that perm must point to an array of at least nRows() ints.

Definition at line 408 of file spxlp.h.

References SPxLP::doRemoveRows().

Referenced by SPxLP::removeRowRange(), and SPxLP::removeRows().

Real rhs const SPxRowId id  )  const
 

returns right hand side of row with identifier id.

Definition at line 167 of file spxlp.h.

References LPRowSet::rhs().

Real rhs int  i  )  const
 

Reimplemented from LPRowSet.

Definition at line 161 of file spxlp.h.

References LPRowSet::rhs().

const Vector& rhs  )  const
 

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().

Real& rhs_w int  i  )  [protected]
 

returns right hand side of row i.

Reimplemented from LPRowSet.

Definition at line 641 of file spxlp.h.

References LPRowSet::rhs_w().

Referenced by SPxScaler::applyScaling().

SPxRowId rId int  n  )  const
 

returns the row identifier for row n.

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().

LPRow::Type rowType const SPxRowId id  )  const
 

returns the inequality type of the row with identifier key.

Definition at line 197 of file spxlp.h.

References LPRowSet::type().

LPRow::Type rowType int  i  )  const
 

returns the inequality type of the i'th LPRow.

Definition at line 191 of file spxlp.h.

References LPRowSet::type().

const SVector& rowVector const SPxRowId id  )  const
 

gets row vector of row with identifier id.

Definition at line 149 of file spxlp.h.

References LPRowSet::rowVector().

const SVector& rowVector int  i  )  const
 

gets row vector of row i.

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().

SVector& rowVector_w int  i  )  [private]
 

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().

SPxSense spxSense  )  const
 

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().

Real upper const SPxColId id  )  const
 

returns upper bound of column with identifier id.

Definition at line 277 of file spxlp.h.

References LPColSet::upper().

Real upper int  i  )  const
 

returns upper bound of column i.

Reimplemented from LPColSet.

Definition at line 272 of file spxlp.h.

References LPColSet::upper().

const Vector& upper  )  const
 

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().

Real& upper_w int  i  )  [protected]
 

returns upper bound of column i.

Reimplemented from LPColSet.

Definition at line 656 of file spxlp.h.

References LPColSet::upper_w().

Referenced by SPxScaler::applyScaling().

void writeMPS std::ostream &  p_output,
const NameSet p_rnames,
const NameSet p_cnames,
const DIdxSet p_intvars = 0
const [virtual]
 

Write LP in "MPS File Format".

Note:
There will always be a BOUNDS section, even if there are no bounds.
Parameters:
p_rnames  row names.
p_cnames  column names.
p_intvars  integer variables.

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().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
const SPxLP lp
[friend]
 

output operator.

Definition at line 131 of file spxio.cpp.

friend class SPxBasis [friend]
 

Definition at line 75 of file spxlp.h.

friend class SPxEquiliSC [friend]
 

Definition at line 77 of file spxlp.h.

friend class SPxGeometSC [friend]
 

Definition at line 78 of file spxlp.h.

friend class SPxMainSM [friend]
 

Definition at line 79 of file spxlp.h.

friend class SPxScaler [friend]
 

Definition at line 76 of file spxlp.h.


Member Data Documentation

SPxSense thesense [private]
 

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().


Generated on Fri Feb 3 17:48:46 2006 for SoPlex by  doxygen 1.4.4