Class ValueRangeManager<Solution_>

java.lang.Object
ai.timefold.solver.core.impl.score.director.ValueRangeManager<Solution_>

@NullMarked public final class ValueRangeManager<Solution_> extends Object
Caches value ranges for the current working solution, allowing to quickly access these cached value ranges when needed.

Outside a ProblemChange, value ranges are not allowed to change. Call reset(Object) every time the working solution changes through a problem fact, so that all caches can be invalidated.

Two score directors can never share the same instance of this class; this class contains state that is specific to a particular instance of a working solution. Even a clone of that same solution must not share the same instance of this class, unless reset(Object) is called with the clone; failing to follow this rule will result in score corruptions as the cached value ranges reference objects from the original working solution pre-clone.

See Also: