
In other words, this class acts as a liason between the model in a spreadsheet form and the model in a form of class lp::Model.
Definition at line 224 of file lpbuilder.cxx.
| scsolver::LpModelBuilderImpl::LpModelBuilderImpl | ( | ) |
Definition at line 280 of file lpbuilder.cxx.
| scsolver::LpModelBuilderImpl::~LpModelBuilderImpl | ( | ) | throw () |
Definition at line 285 of file lpbuilder.cxx.
| numeric::lp::Model scsolver::LpModelBuilderImpl::getModel | ( | ) |
Construct an object of class numeric::lp::Model based on the related parameters derived prior to calling this method, and return it to the caller when it's successfully created.
Definition at line 292 of file lpbuilder.cxx.
References scsolver::numeric::lp::Model::addConstraint(), scsolver::numeric::Matrix::cols(), getConstraintEquality(), getGoal(), m_cnDecisionVars, m_mxConstraint, m_mxRHS, scsolver::numeric::Matrix::rows(), scsolver::numeric::lp::Model::setCostVectorElement(), and scsolver::numeric::lp::Model::setGoal().
| numeric::GoalType scsolver::LpModelBuilderImpl::getGoal | ( | ) | const |
| void scsolver::LpModelBuilderImpl::setGoal | ( | numeric::GoalType | e | ) |
| CellAddress scsolver::LpModelBuilderImpl::getObjectiveFormulaAddress | ( | ) | const |
| void scsolver::LpModelBuilderImpl::setObjectiveFormulaAddress | ( | const table::CellAddress & | aAddr | ) |
| sal_uInt32 scsolver::LpModelBuilderImpl::getConstraintId | ( | const ConstraintAddress & | aConstAddr | ) |
| void scsolver::LpModelBuilderImpl::setConstraintAddress | ( | const ConstraintAddress & | aItem | ) |
| std::vector< ConstraintAddress > scsolver::LpModelBuilderImpl::getAllConstraintAddresses | ( | ) | const [inline] |
Definition at line 242 of file lpbuilder.cxx.
| void scsolver::LpModelBuilderImpl::setConstraintMatrixSize | ( | size_t | nRow, | |
| size_t | nCol | |||
| ) |
Definition at line 354 of file lpbuilder.cxx.
References m_mxConstraint, and scsolver::numeric::Matrix::resize().
| void scsolver::LpModelBuilderImpl::setConstraintCoefficient | ( | const CellAddress & | , | |
| const ConstraintAddress & | , | |||
| double | , | |||
| double | ||||
| ) |
| void scsolver::LpModelBuilderImpl::clearConstraintAddresses | ( | ) | [inline] |
Definition at line 245 of file lpbuilder.cxx.
| numeric::EqualityType scsolver::LpModelBuilderImpl::getConstraintEquality | ( | sal_uInt32 | i | ) | const |
Returns a value of Equality enum by constraint ID. A constraint ID corresponds to an appropriate row ID of the constraint matrix.
Definition at line 385 of file lpbuilder.cxx.
References scsolver::numeric::EQUAL, and m_cnConstraintAddress.
Referenced by getModel(), and stripConstConstraint().
| sal_uInt32 scsolver::LpModelBuilderImpl::getDecisionVarId | ( | const CellAddress & | ) |
| void scsolver::LpModelBuilderImpl::setDecisionVarAddress | ( | const CellAddress & | ) |
| vector< CellAddress > scsolver::LpModelBuilderImpl::getAllDecisionVarAddresses | ( | ) | const |
| void scsolver::LpModelBuilderImpl::clearDecisionVarAddresses | ( | ) | [inline] |
Definition at line 251 of file lpbuilder.cxx.
| double scsolver::LpModelBuilderImpl::getCostVector | ( | const CellAddress & | ) |
| void scsolver::LpModelBuilderImpl::setCostVector | ( | const CellAddress & | , | |
| double | ||||
| ) |
| const rtl::OUString scsolver::LpModelBuilderImpl::getTempCellFormula | ( | const CellAddress & | ) | const |
| void scsolver::LpModelBuilderImpl::setTempCellFormula | ( | const table::CellAddress & | aAddr, | |
| const rtl::OUString & | sStr | |||
| ) |
Definition at line 473 of file lpbuilder.cxx.
References scsolver::CellAttr::Address, scsolver::CellAttr::Formula, and m_cnCellAttrs.
| void scsolver::LpModelBuilderImpl::stripConstConstraint | ( | ) |
Remove constraint and right-hand-side row(s) if all elements of the constraint row is zero and the constraint is already satisfied.
Definition at line 483 of file lpbuilder.cxx.
References scsolver::Debug(), scsolver::numeric::Matrix::deleteRows(), scsolver::numeric::EQUAL, getConstraintEquality(), scsolver::numeric::GREATER_EQUAL, scsolver::numeric::LESS_EQUAL, m_mxConstraint, m_mxRHS, printElements(), scsolver::numeric::Matrix::rows(), and scsolver::numeric::Matrix::swap().
| void scsolver::LpModelBuilderImpl::stripZeroCostDecisionVar | ( | ) |
Remove decision variables and their corresponding constraint columns if and only if they all have a zero cost coefficient and all elements in their constraint column.
Definition at line 520 of file lpbuilder.cxx.
References scsolver::numeric::Matrix::cols(), scsolver::Debug(), scsolver::numeric::Matrix::deleteColumns(), scsolver::numeric::Matrix::isColumnEmpty(), m_cnDecisionVars, m_mxConstraint, scsolver::numeric::Matrix::print(), printElements(), scsolver::numeric::Matrix::rows(), and scsolver::numeric::Matrix::swap().
table::CellAddress scsolver::LpModelBuilderImpl::m_aObjFormulaAddr [private] |
Definition at line 267 of file lpbuilder.cxx.
Referenced by getObjectiveFormulaAddress(), and setObjectiveFormulaAddress().
std::vector< DecisionVar > scsolver::LpModelBuilderImpl::m_cnDecisionVars [private] |
Definition at line 268 of file lpbuilder.cxx.
Referenced by getAllDecisionVarAddresses(), getModel(), and stripZeroCostDecisionVar().
std::vector< ConstraintAddress > scsolver::LpModelBuilderImpl::m_cnConstraintAddress [private] |
Definition at line 269 of file lpbuilder.cxx.
Referenced by getConstraintEquality(), getConstraintId(), and setConstraintAddress().
Definition at line 272 of file lpbuilder.cxx.
Referenced by getModel(), setConstraintMatrixSize(), stripConstConstraint(), and stripZeroCostDecisionVar().
Matrix scsolver::LpModelBuilderImpl::m_mxRHS [private] |
std::vector< CellAttr > scsolver::LpModelBuilderImpl::m_cnCellAttrs [private] |
1.5.3