The event handler interface.
More...
#include <solver.hh>
|
auto | on_model (Model &mdl) -> bool |
| Callback to intercept models.
|
|
void | on_stats (Potassco::AbstractStatistics &stats) |
| Callback to update statistics.
|
|
void | on_unsat (Clasp::SumView bound) |
| Callback to intercept lower bounds.
|
|
void | on_core (Potassco::LitSpan core) |
| The unsatisfiable core of the current problem.
|
|
void | on_finish (SolveResult result) |
| Callback to inform that the search has finished.
|
|
The event handler interface.
◆ on_core()
void CppClingo::Control::EventHandler::on_core |
( |
Potassco::LitSpan |
core | ) |
|
|
inline |
◆ on_finish()
void CppClingo::Control::EventHandler::on_finish |
( |
SolveResult |
result | ) |
|
|
inline |
Callback to inform that the search has finished.
Note that this function is not called from the main thread when solving asynchronously to allow for thread synchronization.
- Parameters
-
◆ on_model()
auto CppClingo::Control::EventHandler::on_model |
( |
Model & |
mdl | ) |
-> bool |
|
inline |
Callback to intercept models.
The function can return false to stop search.
- Parameters
-
- Returns
- whether to continue or stop search
◆ on_stats()
void CppClingo::Control::EventHandler::on_stats |
( |
Potassco::AbstractStatistics & |
stats | ) |
|
|
inline |
Callback to update statistics.
Applications can add user defined statistics here. Statistics should be added under keys "user_step" and "user_accu" to appear in the text output.
- Parameters
-
stats | a handle to the statistics |
◆ on_unsat()
void CppClingo::Control::EventHandler::on_unsat |
( |
Clasp::SumView |
bound | ) |
|
|
inline |
Callback to intercept lower bounds.
Whenever a (sub)problem is unsatisfiable during optimization, the current bound is reported as a lower bound.
- Parameters
-
The documentation for this class was generated from the following file: