Class FilteringValueRangeSelector<Solution_>

java.lang.Object
ai.timefold.solver.core.impl.heuristic.selector.AbstractSelector<Solution_>
ai.timefold.solver.core.impl.heuristic.selector.AbstractDemandEnabledSelector<Solution_>
ai.timefold.solver.core.impl.heuristic.selector.value.decorator.FilteringValueRangeSelector<Solution_>
Type Parameters:
Solution_ - the solution type
All Implemented Interfaces:
IterableSelector<Solution_,Object>, Selector<Solution_>, IterableValueSelector<Solution_>, ValueSelector<Solution_>, PhaseLifecycleListener<Solution_>, SolverLifecycleListener<Solution_>, Iterable<Object>, EventListener

public final class FilteringValueRangeSelector<Solution_> extends AbstractDemandEnabledSelector<Solution_> implements IterableValueSelector<Solution_>
The decorator returns a list of reachable values for a specific value. It enables the creation of a filtering tier when using entity-provided value ranges, ensuring only valid and reachable values are returned. A value is considered reachable to another value if both exist within their respective entity value ranges.

The decorator can only be applied to list variables.

e1 = entity_range[v1, v2, v3] e2 = entity_range[v1, v4] v1 = [v2, v3, v4] v2 = [v1, v3] v3 = [v1, v2] v4 = [v1]

This node is currently used by the ListChangeMoveSelector and ListSwapMoveSelector selectors. To illustrate its usage, let’s assume how moves are generated for the list swap type. Initially, the swap move selector used a left value selector to choose a value. After that, it uses a right value selector to choose another value to swap them.

Based on the previously described process and the current goal of this node, we can observe that once a value is selected using the left value selector, the right node can filter out all non-reachable values and generate a valid move. A move is considered valid only if both entities accept each other's values. The filtering process of invalid values allows the solver to explore the solution space more efficiently.

See Also: