Clingo
|
Interface for user-defined propagators with a decision heuristic. More...
#include <propagate.hh>
Public Member Functions | |
Heuristic ()=default | |
The default constructor. | |
auto | decide (ProgramId thread_id, Assignment assignment, SolverLiteral literal) -> SolverLiteral |
Callback to decide on the next literal to assign. | |
![]() | |
Propagator ()=default | |
The default constructor. | |
Propagator (Propagator &&other)=delete | |
Disable copy and move operations. | |
virtual | ~Propagator ()=default |
The default destructor. | |
void | init (PropagateInit init) |
Callback to initialize the propagator before each solving step. | |
void | propagate (PropagateControl ctl, ProgramLiteralSpan changes) |
Callback to propagate consequences of the given literals. | |
void | undo (ProgramId thread_id, Assignment assignment, ProgramLiteralSpan changes) |
Called when the solver backtracks to a previous decision level. | |
void | check (PropagateControl ctl) |
Callback that is called on propagation fixpoints or total assignments. | |
Interface for user-defined propagators with a decision heuristic.
|
inline |
Callback to decide on the next literal to assign.
The fallback literal indicates the literal the solver would have assigned. This choice can be overridden by returning a different literal.
thread_id | the id of the current solver thread |
assignment | the current assignment of the solver |
literal | the fallback literal |