Module variable_selection

Module variable_selection 

Source
Expand description

Provides the VariableSelector trait which is required for variable selectors to implement; the main method in this trait relies on VariableSelector::select_variable.

Furthermore, it defines several implementations of the VariableSelector trait. Any VariableSelector should only select variables which have a domain of size 2 or larger.

Structs§

AntiFirstFail
A VariableSelector which selects the variable with the largest domain (based on the lower-bound and upper-bound, disregarding holes).
DynamicVariableSelector
Similar to [DynamicBrancher], this is a pass-along structure which should be used when a Sized object is required.
FirstFail
A VariableSelector which selects the variable with the smallest domain (based on the lower-bound and upper-bound, disregarding holes).
InputOrder
A VariableSelector which selects the first variable which is not fixed given the order in the provided list.
Largest
A VariableSelector which selects the variable with the largest value in its domain.
MaxRegret
A VariableSelector which selects the variable with the largest difference between the two smallest values in its domain.
MostConstrained
A VariableSelector which selects the variable with the smallest domain (similar to [FirstFail]).
Occurrence
A VariableSelector which selects the variable with the largest number of attached constraints (where the provided num_occurrences stores the number of attached constraints per variable).
ProportionalDomainSize
RandomSelector
A VariableSelector which selects a random unfixed variable.
Smallest
A VariableSelector which selects the variable with the smallest value in its domain.

Traits§

VariableSelector
A trait containing the interface for VariableSelectors, specifying the appropriate hooks into the solver and the methods required for selecting variables.