Skip to main content

Fixed Dest

Tries moving every object in the hot container to a single, fixed destination container. Unlike Single, the destination is not explored---it is pinned in advance---so only the source objects vary. Useful for draining into, or filling, one specific container.

Every object in the source container is evaluated for moving into one fixed destination container

Parameters

ParameterTypeRequiredDefaultDescription
specialContainerstringNo-The fixed destination container objects are moved into
sampleSizeSampleSizeNoall objectsIf set, samples a subset of the destination's objects rather than considering every one
objectBundleFormationHintsObjectBundleFormationHintsNo-For scope items that require objects to move in bundles, describes how those bundles are formed

Behavior

Given the hot container chosen by the common logic and a fixed destination container, the move type evaluates moving each object from the source into that destination (optionally sampling), and applies the best improving move.

Complexity

Roughly objects neighbors are evaluated---one per candidate object---since the destination is fixed.

Example

Configure local search to use only the fixed dest move type, pinning the destination:

FixedDestMoveTypeSpec fixedDest;
fixedDest.specialContainer() = "container1";

LocalSearchSolverSpec localSearch;
localSearch.moveTypeList()->push_back(
ProblemSolver::makeMoveTypeSpec(fixedDest));

solver.addSolver(localSearch);

(source)