Swap Full With Empty Containers
Evaluates moving all objects in the hot container into an empty container, for every possible empty destination. Destination containers are processed in parallel.
Parameters
SwapFullWithEmptyContainersMoveTypeSpec 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 a different container that is currently empty (the "other container").
- Evaluate moving all objects from the hot container into the other container.
Every empty container is tried and the best move is selected.
Complexity
Roughly objects * (empty containers) neighbors are evaluated.
Example
Configure local search to use only the swap full with empty containers move type:
LocalSearchSolverSpec localSearch;
localSearch.moveTypeList()->push_back(
ProblemSolver::makeMoveTypeSpec(SwapFullWithEmptyContainersMoveTypeSpec()));
solver.addSolver(localSearch);
(source)