Delegate SolveEventHandler
Callback function called during search to notify when the search is finished or a model is ready.
If a(non-recoverable) clingo API function fails in this callback, it must return false. In case of errors not related to clingo, set error code clingo_error_unknown and return false to stop solving with an error.
The event is either a pointer to a model, a pointer to two statistics objects (per step and accumulated statistics), or a solve result.
Namespace: ClingoSharp.CoreServices.EventHandlers
Assembly: ClingoSharp.CoreServices.dll
Syntax
public delegate bool SolveEventHandler(SolveEventType type, IntPtr eventData, out bool goon);
Parameters
| Type | Name | Description |
|---|---|---|
| SolveEventType | type | the current event |
| System.IntPtr | eventData | user data of the callback |
| System.Boolean | goon | can be set to false to stop solving |
Returns
| Type | Description |
|---|---|
| System.Boolean | whether the call was successful |
Remarks
If the search is finished, the model is null.