class
#include <IUniverseSearchListener.hpp>
IUniverseSearchListener Contents
- Reference
The IUniverseSearchListener interface defines a listener for listening to the events occurring during the search performed by a solver.
Derived classes
Public functions
- void start() virtual
-
void onPositiveDecision(const Universe::
IUniverseVariable& decisionVariable, const Universe:: BigInteger& value) virtual -
void onNegativeDecision(const Universe::
IUniverseVariable& decisionVariable, const Universe:: BigInteger& value) virtual -
void onPropagation(const Universe::
IUniverseVariable& variable, const Universe:: BigInteger& value) virtual -
void onAssignment(const Universe::
IUniverseVariable& variable, const Universe:: BigInteger& value) virtual -
void onFailedAssignment(const Universe::
IUniverseVariable& variable, const Universe:: BigInteger& value) virtual -
void onConflict(const Universe::
IUniverseConstraint& constraint, const Universe:: IUniverseVariable& variable) virtual -
void onLearning(const Universe::
IUniverseConstraint& noGood) virtual - void onBacktrack(int level) virtual
-
void onBacktrack(const Universe::
IUniverseVariable& decisionVariable) virtual -
void onUnassignment(const Universe::
IUniverseVariable& variable) virtual - void onRestart() virtual
- void onCleaning() virtual
-
void onDelete(const Universe::
IUniverseConstraint& noGood) virtual -
void onSolutionFound(const std::map<Universe::
IUniverseVariable*, Universe:: BigInteger>& solution) virtual -
void onSolutionFound(const std::map<Universe::
IUniverseVariable*, Universe:: BigInteger>& solution, const Universe:: BigInteger& cost) virtual -
void end(Universe::
UniverseSolverResult result) virtual
Function documentation
void Universe:: IUniverseSearchListener:: start() virtual
Notifies this listener that the solver starts its search.
void Universe:: IUniverseSearchListener:: onPositiveDecision(const Universe:: IUniverseVariable& decisionVariable,
const Universe:: BigInteger& value) virtual
Parameters | |
---|---|
decisionVariable | The variable on which the decision is taken. |
value | The value assigned to the variable. |
Notifies this listener that a positive decision (a variable assignment x = v) is going to be taken.
void Universe:: IUniverseSearchListener:: onNegativeDecision(const Universe:: IUniverseVariable& decisionVariable,
const Universe:: BigInteger& value) virtual
Parameters | |
---|---|
decisionVariable | The variable on which the decision is taken. |
value | The value refuted for the variable. |
Notifies this listener that a negative decision (a variable refutation x != v) is going to be taken.
void Universe:: IUniverseSearchListener:: onPropagation(const Universe:: IUniverseVariable& variable,
const Universe:: BigInteger& value) virtual
Parameters | |
---|---|
variable | The variable for which an assignment has been enforced. |
value | The value propagated for the variable. |
Notifies this listener that a variable assignment has been enforced by propagation.
void Universe:: IUniverseSearchListener:: onAssignment(const Universe:: IUniverseVariable& variable,
const Universe:: BigInteger& value) virtual
Parameters | |
---|---|
variable | The variable that is being assigned. |
value | The value assigned to the variable. |
Notifies this listener that a variable is being assigned (either following a decision or a propagation).
void Universe:: IUniverseSearchListener:: onFailedAssignment(const Universe:: IUniverseVariable& variable,
const Universe:: BigInteger& value) virtual
Parameters | |
---|---|
variable | The variable that has been assigned. |
value | The value assigned to the variable. |
Notifies this listener that a variable assignment x = v has immediately failed due to propagations.
void Universe:: IUniverseSearchListener:: onConflict(const Universe:: IUniverseConstraint& constraint,
const Universe:: IUniverseVariable& variable) virtual
Parameters | |
---|---|
constraint | A conflicting constraint. |
variable | A conflicting variable in the constraint. |
Notifies this listener that a conflict has occurred.
void Universe:: IUniverseSearchListener:: onLearning(const Universe:: IUniverseConstraint& noGood) virtual
Parameters | |
---|---|
noGood | The learned constraint. |
Notifies this listener that a constraint has been learned, following a conflict analysis or a similar process.
void Universe:: IUniverseSearchListener:: onBacktrack(int level) virtual
Parameters | |
---|---|
level | The decision level at which the solver is backtracking. |
Notifies this listener that the solver is performing a backtrack (or backjump).
void Universe:: IUniverseSearchListener:: onBacktrack(const Universe:: IUniverseVariable& decisionVariable) virtual
Parameters | |
---|---|
decisionVariable | The decision variable to which the solver is backtracking. |
Notifies this listener that the solver is performing a backtrack (or backjump).
void Universe:: IUniverseSearchListener:: onUnassignment(const Universe:: IUniverseVariable& variable) virtual
Parameters | |
---|---|
variable | The variable that is being unassigned. |
Notifies this listener that a variable is being unassigned (during a backtrack for instance).
void Universe:: IUniverseSearchListener:: onRestart() virtual
Notifies this listener that the solver is performing a restart.
void Universe:: IUniverseSearchListener:: onCleaning() virtual
Notifies this listener that the solver is cleaning its no-good database.
void Universe:: IUniverseSearchListener:: onDelete(const Universe:: IUniverseConstraint& noGood) virtual
Parameters | |
---|---|
noGood | The no-good that is being deleted. |
Notifies this listener that the solver is deleting one of its no-goods.
void Universe:: IUniverseSearchListener:: onSolutionFound(const std::map<Universe:: IUniverseVariable*, Universe:: BigInteger>& solution) virtual
Parameters | |
---|---|
solution | The solution that has been found. |
Notifies this listener that the solver has found a solution.
void Universe:: IUniverseSearchListener:: onSolutionFound(const std::map<Universe:: IUniverseVariable*, Universe:: BigInteger>& solution,
const Universe:: BigInteger& cost) virtual
Parameters | |
---|---|
solution | The solution that has been found. |
cost | The cost of the solution (determined by an objective function given to the solver). |
Notifies this listener that the solver has found a solution.
void Universe:: IUniverseSearchListener:: end(Universe:: UniverseSolverResult result) virtual
Parameters | |
---|---|
result | The result obtained by the solver. |
Notifies this listener that the solver has ended its search.