Expand description
Contains structures and traits to define the decision making procedure of the Solver.
In general, it provides 3 traits:
- The
Brancherwhich defines how a branching procedure (which selects an unfixed variable and splits the domain in some way, see Section 4.3.1 of [1] for more information) should operate; the main method of this trait is theBrancher::next_decisionmethod. An example implementation of this trait is theIndependentVariableValueBrancher. - The
VariableSelectorwhich defines the method required of a variable selector (including the hooks into the solver); the main method of this trait is theVariableSelector::select_variablemethod. An example implementation of this trait is theAntiFirstFailstrategy. - The
ValueSelectorwhich defines the method required of a value selector (including the hooks into the solver); the main method of this trait is theValueSelector::select_valuemethod.
A Brancher is expected to be passed to Solver::satisfy, and Solver::optimise:
[1] F. Rossi, P. Van Beek, and T. Walsh, Handbook of constraint programming. Elsevier, 2006.
Modules§
- branchers
- Provides several implementations of
Branchers. - tie_
breaking - Contains structures for tie-breaking.
- value_
selection - Provides the
ValueSelectortrait which is required for value selectors to implement; the main method in this trait relies onValueSelector::select_value. - variable_
selection - Provides the
VariableSelectortrait which is required for variable selectors to implement; the main method in this trait relies onVariableSelector::select_variable.
Structs§
- Selection
Context - The context provided to the
Brancher, it allows the retrieval of domain values of variables and access to methods from aRandomgenerator.
Enums§
- Brancher
Event - The events which can occur for a
Brancher. Used for returning which events are relevant inBrancher::subscribe_to_events,VariableSelector::subscribe_to_events, andValueSelector::subscribe_to_events.
Traits§
- Brancher
- A trait for definining a branching strategy (oftentimes utilising a
VariableSelectorand aValueSelector).