- All Known Implementing Classes:
AllDifferent,BinPacking,CardinalityMax,CardinalityMin,Circuit,Cumulative,Disjunctive,Element1D,Element1DVar,Element2D,Element2DVar,NegTable,Sorted,Table
public interface DecisionVarsProvider
Implemented by constraints and expression nodes that know which of their
sub-expressions play an "index / choice" role and are therefore candidate
decision variables for search and LNS.
The contract is:
- Only leaf
IntVarinstances should be returned. Derived expressions (sums, element results, views, …) must be excluded. - The returned collection must not be modified by callers.
Custom constraints that know which of their arguments are decision
variables should implement this interface directly. The
DecisionVarCollector utility then harvests these declarations
from the full constraint/expression graph.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the sub-expressions of this node that should be considered decision variables (i.e., variables to branch on / freeze in LNS).
-
Method Details
-
decisionVariables
Collection<IntExpression> decisionVariables()Returns the sub-expressions of this node that should be considered decision variables (i.e., variables to branch on / freeze in LNS).- Returns:
- immutable collection of candidate decision variables; never
null, may be empty
-