Clingo
Loading...
Searching...
No Matches
Clingo::SolveEventHandler Class Reference

Interface to handle events during solving. More...

#include <solve.hh>

Public Member Functions

 SolveEventHandler ()=default
 The default constructor.
 
 SolveEventHandler (SolveEventHandler &&other)=delete
 Disable copy and move operations.
 
virtual ~SolveEventHandler ()=default
 The default destructor.
 
auto model (Model model) -> bool
 Callback to interact with the model found during solving.
 
void unsat (SumSpan lower_bound)
 Callback to inspect lower bounds found during solving.
 
void stats (Stats step, Stats accu)
 Callback to update solving statistics.
 
void finish (SolveResult result) noexcept
 Callback to handle the end of solving.
 

Detailed Description

Interface to handle events during solving.

Member Function Documentation

◆ finish()

void Clingo::SolveEventHandler::finish ( SolveResult  result)
inlinenoexcept

Callback to handle the end of solving.

The main purpose of this callback is synchronization when solving asynchronously.

Parameters
resultthe result of the solving process

◆ model()

auto Clingo::SolveEventHandler::model ( Model  model) -> bool
inline

Callback to interact with the model found during solving.

Parameters
modelthe model found during solving
Returns
whether to continue solving

◆ stats()

void Clingo::SolveEventHandler::stats ( Stats  step,
Stats  accu 
)
inline

Callback to update solving statistics.

Parameters
stepthe statistics for the current step
accuthe accumulated statistics

◆ unsat()

void Clingo::SolveEventHandler::unsat ( SumSpan  lower_bound)
inline

Callback to inspect lower bounds found during solving.

Parameters
lower_boundthe lower bound found during solving

The documentation for this class was generated from the following file: