Interface ISolveHandleModule
Interact with a running search.
Namespace: ClingoSharp.CoreServices.Interfaces.Modules
Assembly: ClingoSharp.CoreServices.dll
Syntax
public interface ISolveHandleModule : IClingoModule
Methods
| Improve this Doc View SourceCancel(SolveHandle)
Stop the running search and block until done.
Declaration
bool Cancel(SolveHandle handle)
Parameters
Type | Name | Description |
---|---|---|
SolveHandle | handle | a handle object |
Returns
Type | Description |
---|---|
System.Boolean |
|
Close(SolveHandle)
Stop the running search and block until done.
Declaration
bool Close(SolveHandle handle)
Parameters
Type | Name | Description |
---|---|---|
SolveHandle | handle | a handle object |
Returns
Type | Description |
---|---|
System.Boolean |
|
Get(SolveHandle, out SolveResult)
Get the next solve result.
Blocks until the result is ready. When yielding partial solve results can be obtained, i.e., when a model is ready, the result will be satisfiable but neither the search exhausted nor the optimality proven.
Declaration
bool Get(SolveHandle handle, out SolveResult result)
Parameters
Type | Name | Description |
---|---|---|
SolveHandle | handle | a handle object |
SolveResult | result | the solve result |
Returns
Type | Description |
---|---|
System.Boolean |
|
Model(SolveHandle, out Model)
Get the next model (or zero if there are no more models).
Declaration
bool Model(SolveHandle handle, out Model model)
Parameters
Type | Name | Description |
---|---|---|
SolveHandle | handle | a handle object |
Model | model | the model (it is System.IntPtr.Zero if there are no more models) |
Returns
Type | Description |
---|---|
System.Boolean |
|
Resume(SolveHandle)
Discards the last model and starts the search for the next one.
Declaration
bool Resume(SolveHandle handle)
Parameters
Type | Name | Description |
---|---|---|
SolveHandle | handle | a handle object |
Returns
Type | Description |
---|---|
System.Boolean |
|
Wait(SolveHandle, Double, out Boolean)
Wait for the specified amount of time to check if the next result is ready.
Declaration
void Wait(SolveHandle handle, double timeout, out bool result)
Parameters
Type | Name | Description |
---|---|---|
SolveHandle | handle | a handle object |
System.Double | timeout | the maximum time to wait |
System.Boolean | result |