|
Limbo
|
Heuristic to search for feasible solutions by smoothing dense bins. More...
#include <MultiKnapsackLagRelax.h>
Classes | |
| struct | CompareConstraintSlack |
| Compare constraints by their slackness. More... | |
| struct | CompareVariableMoveCost |
| Compare variables by its move cost. More... | |
| struct | VariableMoveCost |
| Wrapper for the move cost of an item. More... | |
Public Member Functions | |
| SearchByBinSmoothing (solver_type *solver) | |
| constructor More... | |
| ~SearchByBinSmoothing () | |
| destructor | |
| virtual SolverProperty | operator() (updater_type *) |
| API to search for feasible solutions. More... | |
Public Member Functions inherited from limbo::solvers::SearchByAdjustCoefficient< T, V > | |
| SearchByAdjustCoefficient (solver_type *solver, coefficient_value_type convergeRatio=0.1) | |
| constructor More... | |
| ~SearchByAdjustCoefficient () | |
| destructor | |
Public Member Functions inherited from limbo::solvers::FeasibleSearcher< T, V > | |
| FeasibleSearcher (solver_type *solver) | |
| constructor More... | |
| virtual | ~FeasibleSearcher () |
| destructor | |
Protected Member Functions | |
| void | mapVariable2Constraint () |
| construct mapping from variables to constraints | |
| void | computeMoveCost (constraint_type const &constr, std::vector< VariableMoveCost > &vVariableMoveCost) const |
| compute move cost for an item to move out from current bin More... | |
Protected Member Functions inherited from limbo::solvers::SearchByAdjustCoefficient< T, V > | |
| void | mapVariable2Group () |
| construct mapping from variables to groups | |
| void | computeMoveCost (constraint_type const &constr, std::vector< bool > const &vVariableProcess, std::vector< VariableMoveCost > &vVariableMoveCost) const |
| compute move cost for an item to move out from current bin More... | |
Protected Member Functions inherited from limbo::solvers::FeasibleSearcher< T, V > | |
| void | computeSlackness () |
| compute slackness in an iteration | |
| SolverProperty | solveSubproblems (updater_type *updater, unsigned int beginIter, unsigned int endIter) |
| kernel lagrangian iterations More... | |
Protected Attributes | |
|
std::vector< std::vector < std::pair< unsigned int, unsigned int > > > | m_mVariable2Constr |
| map variables to constraints by pair of (constraint index, term index), a variable may have multiple constraints | |
|
std::vector < coefficient_value_type > | m_vObjCoefOrig |
| original coefficient of variable in objective | |
Protected Attributes inherited from limbo::solvers::SearchByAdjustCoefficient< T, V > | |
| std::vector< unsigned int > | m_vVariable2Group |
| map variables to groups | |
| coefficient_value_type | m_convergeRatio |
| ratio for convergence criteria, how much percent the number of negative slacks reduced | |
Protected Attributes inherited from limbo::solvers::FeasibleSearcher< T, V > | |
| solver_type * | m_solver |
| problem solver | |
| model_type *const & | m_model |
| model for the problem | |
| coefficient_value_type *& | m_vObjCoef |
| coefficients variables in objective | |
| matrix_type const & | m_constrMatrix |
| constraint matrix \(A\) | |
| coefficient_value_type *const & | m_vConstrRhs |
| constraint right hand side \(b\) | |
| variable_type *const & | m_vGroupedVariable |
| array of grouped variables according to item | |
| unsigned int *const & | m_vVariableGroupBeginIndex |
| begin index of grouped variable | |
| unsigned int const & | m_numGroups |
| number of groups | |
| std::vector< unsigned int > const & | m_vConstraintPartition |
| indices of constraints, the first partition is capacity constraints | |
| coefficient_value_type *& | m_vLagMultiplier |
| array of lagrangian multipliers | |
| coefficient_value_type *& | m_vSlackness |
| array of slackness values in each iteration, \( b-Ax \) | |
|
std::vector < coefficient_value_type > const & | m_vScalingFactor |
| scaling factor for constraints and objective, last entry is for objective | |
| coefficient_value_type & | m_objConstant |
| constant value in objective from lagrangian relaxation | |
| coefficient_value_type & | m_lagObj |
| current objective of the lagrangian subproblem | |
| unsigned int & | m_iter |
| current iteration | |
| unsigned int & | m_maxIters |
| maximum number of iterations | |
| bool & | m_useInitialSol |
| whether use initial solutions or not | |
|
std::vector < variable_value_type > & | m_vBestVariableSol |
| best feasible solution found so far | |
| coefficient_value_type & | m_bestObj |
| best objective found so far | |
Heuristic to search for feasible solutions by smoothing dense bins.
| T | coefficient value type |
| V | variable value type |
Definition at line 1487 of file MultiKnapsackLagRelax.h.
|
inline |
constructor
| solver | problem solver |
Definition at line 1562 of file MultiKnapsackLagRelax.h.
|
inlineprotected |
compute move cost for an item to move out from current bin
| constr | constraint or bin |
| vVariableMoveCost | array of move cost |
Definition at line 1668 of file MultiKnapsackLagRelax.h.
|
inlinevirtual |
API to search for feasible solutions.
param updater updater for lagrangian multipliers
Reimplemented from limbo::solvers::SearchByAdjustCoefficient< T, V >.
Definition at line 1570 of file MultiKnapsackLagRelax.h.
1.8.8