scsolver::numeric::lp::Model Class Reference

#include <lpmodel.hxx>

List of all members.

Public Member Functions

 Model ()
 Model (const Model &)
 ~Model ()
void print () const
size_t getDecisionVarSize () const
size_t getConstraintCount () const
double getCost (size_t rowid) const
::scsolver::numeric::Matrix getCostVector () const
void setCostVectorElement (size_t, double)
void setCostVector (const ::std::vector< double > &)
double getVarBound (size_t, BoundType) const
void setVarBound (size_t, BoundType, double)
bool isVarBounded (size_t, BoundType) const
void deleteVariables (const ::std::vector< size_t > &)
GoalType getGoal () const
void setGoal (GoalType)
double getObjectiveFuncConstant () const
void setObjectiveFuncConstant (double)
unsigned long getPrecision () const
void setPrecision (unsigned long)
bool getVarPositive () const
void setVarPositive (bool)
bool getVarInteger () const
void setVarInteger (bool b)
bool getVerbose () const
void setVerbose (bool)
double getConstraint (size_t, size_t) const
::scsolver::numeric::Matrix getConstraintMatrix () const
::scsolver::numeric::Matrix getRhsVector () const
double getRhsValue (size_t) const
void setRhsValue (size_t, double)
::std::vector
< ::scsolver::numeric::EqualityType
getEqualityVector () const
::scsolver::numeric::EqualityType getEquality (size_t) const
void addConstraint (const ::std::vector< double > &, EqualityType, double)
void setStandardConstraintMatrix (const ::scsolver::numeric::Matrix &, const ::scsolver::numeric::Matrix &)

Private Attributes

std::auto_ptr
< ModelImpl
m_pImpl


Detailed Description

This class is responsible for constructing an LP model which is to be solved by using an LP algorithm class defined separately.

Definition at line 50 of file lpmodel.hxx.


Constructor & Destructor Documentation

scsolver::numeric::lp::Model::Model (  ) 

Definition at line 495 of file lpmodel.cxx.

scsolver::numeric::lp::Model::Model ( const Model other  ) 

Definition at line 499 of file lpmodel.cxx.

scsolver::numeric::lp::Model::~Model (  ) 

Definition at line 503 of file lpmodel.cxx.


Member Function Documentation

void scsolver::numeric::lp::Model::print (  )  const

Definition at line 507 of file lpmodel.cxx.

References m_pImpl.

size_t scsolver::numeric::lp::Model::getDecisionVarSize (  )  const

Definition at line 512 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::LpSolveImpl::solve().

size_t scsolver::numeric::lp::Model::getConstraintCount (  )  const

This returns the number of constraints defined in the model, which is equivalent of the row size of the constraint matrix.

Returns:
size_t number of constraints

Definition at line 517 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::LpSolveImpl::solve().

double scsolver::numeric::lp::Model::getCost ( size_t  rowid  )  const

Definition at line 522 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::LpSolveImpl::solve().

Matrix scsolver::numeric::lp::Model::getCostVector (  )  const

get a matrix representing a cost vector. Note that a cost vector is a row matrix i.e. it only has one row.

Returns:
row matrix representing a cost vector

Definition at line 532 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::convertVarRange(), scsolver::numeric::lp::BaseAlgorithmImpl::initPermIndex(), scsolver::numeric::lp::BaseAlgorithmImpl::setCanonicalSolution(), and scsolver::numeric::lp::UnoAlgorithmImpl::solve().

void scsolver::numeric::lp::Model::setCostVectorElement ( size_t  i,
double  fVal 
)

Definition at line 537 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::LpModelBuilderImpl::getModel().

void scsolver::numeric::lp::Model::setCostVector ( const ::std::vector< double > &   ) 

double scsolver::numeric::lp::Model::getVarBound ( size_t  i,
BoundType  e 
) const

Beware that the caller is responsible for making sure that the specified boundary exists by calling isVarBounded(...) beforehand.

Definition at line 551 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::convertVarRange().

void scsolver::numeric::lp::Model::setVarBound ( size_t  i,
BoundType  e,
double  fValue 
)

Definition at line 556 of file lpmodel.cxx.

References m_pImpl.

bool scsolver::numeric::lp::Model::isVarBounded ( size_t  i,
BoundType  e 
) const

Definition at line 561 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::convertVarRange().

void scsolver::numeric::lp::Model::deleteVariables ( const ::std::vector< size_t > &   ) 

GoalType scsolver::numeric::lp::Model::getGoal (  )  const

Definition at line 571 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::iterate(), scsolver::numeric::lp::UnoAlgorithmImpl::solve(), and scsolver::numeric::lp::LpSolveImpl::solve().

void scsolver::numeric::lp::Model::setGoal ( GoalType  e  ) 

Definition at line 576 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::LpModelBuilderImpl::getModel().

double scsolver::numeric::lp::Model::getObjectiveFuncConstant (  )  const

Definition at line 581 of file lpmodel.cxx.

References m_pImpl.

void scsolver::numeric::lp::Model::setObjectiveFuncConstant ( double  f  ) 

Definition at line 586 of file lpmodel.cxx.

References m_pImpl.

unsigned long scsolver::numeric::lp::Model::getPrecision (  )  const

Definition at line 591 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::iterate(), and scsolver::numeric::lp::RevisedSimplexImpl::printIterateHeader().

void scsolver::numeric::lp::Model::setPrecision ( unsigned long  i  ) 

Definition at line 596 of file lpmodel.cxx.

References m_pImpl.

bool scsolver::numeric::lp::Model::getVarPositive (  )  const

Definition at line 601 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::LpSolveImpl::solve().

void scsolver::numeric::lp::Model::setVarPositive ( bool  b  ) 

Definition at line 606 of file lpmodel.cxx.

References m_pImpl.

bool scsolver::numeric::lp::Model::getVarInteger (  )  const

Definition at line 611 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::LpSolveImpl::solve().

void scsolver::numeric::lp::Model::setVarInteger ( bool  b  ) 

Definition at line 616 of file lpmodel.cxx.

References m_pImpl.

bool scsolver::numeric::lp::Model::getVerbose (  )  const

Definition at line 621 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::iterate(), scsolver::numeric::lp::BoundedRevisedSimplexImpl::queryEnteringNBVar(), scsolver::numeric::lp::RevisedSimplexImpl::runNormalInitSearch(), and scsolver::numeric::lp::RevisedSimplexImpl::solve().

void scsolver::numeric::lp::Model::setVerbose ( bool  b  ) 

Definition at line 626 of file lpmodel.cxx.

References m_pImpl.

double scsolver::numeric::lp::Model::getConstraint ( size_t  nRow,
size_t  nCol 
) const

Definition at line 631 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::LpSolveImpl::solve().

Matrix scsolver::numeric::lp::Model::getConstraintMatrix (  )  const

Definition at line 636 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::UnoAlgorithmImpl::solve().

Matrix scsolver::numeric::lp::Model::getRhsVector (  )  const

Definition at line 641 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::UnoAlgorithmImpl::solve().

double scsolver::numeric::lp::Model::getRhsValue ( size_t  nId  )  const

Definition at line 646 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::LpSolveImpl::solve().

void scsolver::numeric::lp::Model::setRhsValue ( size_t  nId,
double  fVal 
)

Definition at line 651 of file lpmodel.cxx.

References m_pImpl.

std::vector< EqualityType > scsolver::numeric::lp::Model::getEqualityVector (  )  const

Definition at line 656 of file lpmodel.cxx.

References m_pImpl.

EqualityType scsolver::numeric::lp::Model::getEquality ( size_t  i  )  const

Definition at line 661 of file lpmodel.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::UnoAlgorithmImpl::solve(), and scsolver::numeric::lp::LpSolveImpl::solve().

void scsolver::numeric::lp::Model::addConstraint ( const ::std::vector< double > &  ,
EqualityType  ,
double   
)

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::convertVarRange(), and scsolver::LpModelBuilderImpl::getModel().

void scsolver::numeric::lp::Model::setStandardConstraintMatrix ( const ::scsolver::numeric::Matrix ,
const ::scsolver::numeric::Matrix  
)


Member Data Documentation

std::auto_ptr<ModelImpl> scsolver::numeric::lp::Model::m_pImpl [private]

Definition at line 111 of file lpmodel.hxx.

Referenced by getConstraint(), getConstraintCount(), getConstraintMatrix(), getCost(), getCostVector(), getDecisionVarSize(), getEquality(), getEqualityVector(), getGoal(), getObjectiveFuncConstant(), getPrecision(), getRhsValue(), getRhsVector(), getVarBound(), getVarInteger(), getVarPositive(), getVerbose(), isVarBounded(), print(), setCostVectorElement(), setGoal(), setObjectiveFuncConstant(), setPrecision(), setRhsValue(), setVarBound(), setVarInteger(), setVarPositive(), and setVerbose().


The documentation for this class was generated from the following files:
Generated on Mon Jul 28 09:13:50 2008 for scsolver by  doxygen 1.5.3