
Public Member Functions | |
| RevisedSimplexImpl (RevisedSimplex *) | |
| ~RevisedSimplexImpl () | |
| void | solve () |
| void | setEnableTwoPhaseSearch (bool b) |
| bool | isTwoPhaseSearchEnabled () |
Private Member Functions | |
| Model * | getModel () 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 | |
| RevisedSimplex * | m_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< ConstDecVar > | m_cnConstDecVarList |
Classes | |
| struct | ConstDecVar |
Definition at line 68 of file lpsimplex.cxx.
| 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.
| 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] |
| bool scsolver::numeric::lp::RevisedSimplexImpl::isTwoPhaseSearchEnabled | ( | ) | [inline] |
| 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.
| 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().
| 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().
Definition at line 81 of file lpsimplex.cxx.
Referenced by isTwoPhaseSearchEnabled(), and setEnableTwoPhaseSearch().
Definition at line 83 of file lpsimplex.cxx.
Referenced by iterate(), printIterateHeader(), runNormalInitSearch(), and solve().
Definition at line 85 of file lpsimplex.cxx.
Referenced by iterate(), printIterateHeader(), and solve().
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().
Definition at line 89 of file lpsimplex.cxx.
Referenced by iterate(), printIterateHeader(), runNormalInitSearch(), and solve().
Definition at line 90 of file lpsimplex.cxx.
Referenced by iterate(), runNormalInitSearch(), and solve().
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.
1.5.3