scsolver::numeric::lp::RevisedSimplexImpl Class Reference

Collaboration diagram for scsolver::numeric::lp::RevisedSimplexImpl:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 RevisedSimplexImpl (RevisedSimplex *)
 ~RevisedSimplexImpl ()
void solve ()
void setEnableTwoPhaseSearch (bool b)
bool isTwoPhaseSearchEnabled ()

Private Member Functions

ModelgetModel () const
void convertVarRange (Model &)
void runNormalInitSearch ()
void runTwoPhaseInitSearch (const std::vector< size_t > &)
void printIterateHeader () const
bool iterate ()
Matrix solvePriceVector (std::vector< size_t >, const Matrix &, const Matrix &)
void getLambda (const Matrix &, const Matrix &, double &, size_t &) const

Private Attributes

RevisedSimplexm_pSelf
bool m_bTwoPhaseAllowed
Matrix m_aBasicInv
Matrix m_aUpdateMatrix
Matrix m_aPriceVector
Matrix m_aX
size_t m_nIter
Model m_Model
Matrix m_A
Matrix m_B
Matrix m_C
std::vector< bool > m_aBasicVar
std::vector< size_t > m_aBasicVarId
std::list< size_t > m_cnPermVarIndex
std::list< ConstDecVarm_cnConstDecVarList

Classes

struct  ConstDecVar


Detailed Description

Definition at line 68 of file lpsimplex.cxx.


Constructor & Destructor Documentation

scsolver::numeric::lp::RevisedSimplexImpl::RevisedSimplexImpl ( RevisedSimplex p  ) 

Definition at line 120 of file lpsimplex.cxx.

scsolver::numeric::lp::RevisedSimplexImpl::~RevisedSimplexImpl (  ) 

Definition at line 127 of file lpsimplex.cxx.


Member Function Documentation

void scsolver::numeric::lp::RevisedSimplexImpl::solve (  ) 

Definition at line 167 of file lpsimplex.cxx.

References scsolver::numeric::Matrix::clear(), convertVarRange(), scsolver::numeric::EQUAL, scsolver::numeric::lp::BaseAlgorithm::getCanonicalModel(), scsolver::numeric::lp::BaseAlgorithm::getSolution(), scsolver::numeric::lp::Model::getVerbose(), scsolver::numeric::GREATER_EQUAL, iterate(), scsolver::numeric::LESS_EQUAL, m_A, m_aBasicInv, m_aBasicVar, m_aBasicVarId, m_aPriceVector, m_aUpdateMatrix, m_aX, m_B, m_C, m_Model, m_nIter, m_pSelf, scsolver::numeric::Matrix::print(), printElements(), runNormalInitSearch(), runTwoPhaseInitSearch(), scsolver::numeric::lp::BaseAlgorithm::setCanonicalSolution(), solvePriceVector(), and scsolver::numeric::Matrix::trans().

void scsolver::numeric::lp::RevisedSimplexImpl::setEnableTwoPhaseSearch ( bool  b  )  [inline]

Definition at line 75 of file lpsimplex.cxx.

References m_bTwoPhaseAllowed.

bool scsolver::numeric::lp::RevisedSimplexImpl::isTwoPhaseSearchEnabled (  )  [inline]

Definition at line 76 of file lpsimplex.cxx.

References m_bTwoPhaseAllowed.

Model* scsolver::numeric::lp::RevisedSimplexImpl::getModel (  )  const [inline, private]

Definition at line 107 of file lpsimplex.cxx.

References scsolver::numeric::lp::BaseAlgorithm::getModel(), and m_pSelf.

void scsolver::numeric::lp::RevisedSimplexImpl::convertVarRange ( Model aModel  )  [private]

Convert variable ranges into a constraint matrix. Also extracts those variables with identical upper and lower ranges into equality constraints, which are ultimately treated as constant values.

Parameters:
aModel object representing a model

Definition at line 139 of file lpsimplex.cxx.

References scsolver::numeric::lp::Model::addConstraint(), scsolver::numeric::BOUND_LOWER, scsolver::numeric::BOUND_UPPER, scsolver::numeric::Matrix::cols(), scsolver::numeric::lp::Model::getCostVector(), scsolver::numeric::lp::Model::getVarBound(), scsolver::numeric::GREATER_EQUAL, scsolver::numeric::lp::Model::isVarBounded(), and scsolver::numeric::LESS_EQUAL.

Referenced by solve().

void scsolver::numeric::lp::RevisedSimplexImpl::runNormalInitSearch (  )  [private]

Find an initial X via normal (non two-phase) search, and set the following member variables: m_aBasicInv : an invert basic matrix m_aX : an initial X

Definition at line 326 of file lpsimplex.cxx.

References scsolver::numeric::Matrix::cols(), scsolver::Debug(), scsolver::numeric::Matrix::deleteColumns(), scsolver::numeric::lp::Model::getVerbose(), scsolver::numeric::Matrix::inverse(), m_A, m_aBasicInv, m_aBasicVar, m_aX, m_B, m_Model, and printElements().

Referenced by solve().

void scsolver::numeric::lp::RevisedSimplexImpl::runTwoPhaseInitSearch ( const std::vector< size_t > &   )  [private]

Referenced by solve().

void scsolver::numeric::lp::RevisedSimplexImpl::printIterateHeader (  )  const [private]

Definition at line 478 of file lpsimplex.cxx.

References scsolver::numeric::lp::Model::getPrecision(), m_aBasicInv, m_aBasicVar, m_aBasicVarId, m_aPriceVector, m_aX, m_C, m_Model, m_nIter, scsolver::numeric::Matrix::print(), printElements(), scsolver::repeatString(), and scsolver::numeric::Matrix::trans().

Referenced by iterate().

bool scsolver::numeric::lp::RevisedSimplexImpl::iterate (  )  [private]

Definition at line 507 of file lpsimplex.cxx.

References scsolver::numeric::Matrix::cols(), scsolver::numeric::Matrix::getColumn(), scsolver::numeric::lp::Model::getGoal(), getLambda(), scsolver::numeric::lp::Model::getPrecision(), scsolver::numeric::lp::Model::getVerbose(), scsolver::numeric::GOAL_MAXIMIZE, scsolver::numeric::GOAL_MINIMIZE, m_A, m_aBasicInv, m_aBasicVar, m_aBasicVarId, m_aPriceVector, m_aX, m_C, m_Model, m_nIter, scsolver::numeric::Matrix::print(), printIterateHeader(), scsolver::numeric::Matrix::rows(), solvePriceVector(), and scsolver::numeric::Matrix::trans().

Referenced by solve().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::solvePriceVector ( std::vector< size_t >  aBasicVarId,
const Matrix AInv,
const Matrix C 
) [private]

Definition at line 654 of file lpsimplex.cxx.

Referenced by iterate(), and solve().

void scsolver::numeric::lp::RevisedSimplexImpl::getLambda ( const Matrix X,
const Matrix dX,
double &  rLambda,
size_t &  rLeaveVarId 
) const [private]

Definition at line 668 of file lpsimplex.cxx.

References scsolver::numeric::Matrix::rows().

Referenced by iterate().


Member Data Documentation

RevisedSimplex* scsolver::numeric::lp::RevisedSimplexImpl::m_pSelf [private]

Definition at line 79 of file lpsimplex.cxx.

Referenced by getModel(), and solve().

bool scsolver::numeric::lp::RevisedSimplexImpl::m_bTwoPhaseAllowed [private]

Definition at line 81 of file lpsimplex.cxx.

Referenced by isTwoPhaseSearchEnabled(), and setEnableTwoPhaseSearch().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::m_aBasicInv [private]

Definition at line 83 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), runNormalInitSearch(), and solve().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::m_aUpdateMatrix [private]

Definition at line 84 of file lpsimplex.cxx.

Referenced by solve().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::m_aPriceVector [private]

Definition at line 85 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), and solve().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::m_aX [private]

Definition at line 86 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), runNormalInitSearch(), and solve().

size_t scsolver::numeric::lp::RevisedSimplexImpl::m_nIter [private]

Definition at line 87 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), and solve().

Model scsolver::numeric::lp::RevisedSimplexImpl::m_Model [private]

Definition at line 89 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), runNormalInitSearch(), and solve().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::m_A [private]

Definition at line 90 of file lpsimplex.cxx.

Referenced by iterate(), runNormalInitSearch(), and solve().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::m_B [private]

Definition at line 90 of file lpsimplex.cxx.

Referenced by runNormalInitSearch(), and solve().

Matrix scsolver::numeric::lp::RevisedSimplexImpl::m_C [private]

Definition at line 90 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), and solve().

std::vector<bool> scsolver::numeric::lp::RevisedSimplexImpl::m_aBasicVar [private]

Definition at line 91 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), runNormalInitSearch(), and solve().

std::vector<size_t> scsolver::numeric::lp::RevisedSimplexImpl::m_aBasicVarId [private]

Definition at line 92 of file lpsimplex.cxx.

Referenced by iterate(), printIterateHeader(), and solve().

std::list<size_t> scsolver::numeric::lp::RevisedSimplexImpl::m_cnPermVarIndex [private]

permutation of variable indices

Definition at line 95 of file lpsimplex.cxx.

std::list<ConstDecVar> scsolver::numeric::lp::RevisedSimplexImpl::m_cnConstDecVarList [private]

Definition at line 102 of file lpsimplex.cxx.


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