Single End Chain
Evaluates two-object chains where the hot container is at the end of the chain: the hot object moves to another container, and an object already in that container moves on to a third container. The hot container gives out an object without receiving one back. This is usually the better default among the chain move types.
Parameters
SingleEndChainMoveTypeSpec takes no parameters. To bound exploration time per hot
container, set timePerMove on the LocalSearchSolverSpec.
Behavior
Given the hot container chosen by the common logic:
- Pick one object from the hot container (the "hot object").
- Pick two other containers, "other container 1" and "other container 2".
- Pick one object from "other container 1" (the "other object").
- Evaluate, at once, moving the hot object to "other container 1" and the other object to "other container 2".
Every such combination is evaluated and the best chain is selected.
Complexity
Roughly (objects ^ 2) * containers neighbors are evaluated.
Example
Configure local search to use only the single end chain move type:
LocalSearchSolverSpec localSearch;
localSearch.moveTypeList()->push_back(
ProblemSolver::makeMoveTypeSpec(SingleEndChainMoveTypeSpec()));
solver.addSolver(localSearch);
(source)