DotNet Reference

.Net Reference

Detailed Description

Wrapper around the SAT solver.

This class proposes a Solve() method, as well as accessors to get the values of variables in the best solution, as well as general statistics of the search.

Definition at line 29 of file CpSolver.cs.

Public Member Functions

CpSolverStatus Solve (CpModel model, SolutionCallback cb=null)
 Solves the given model, and returns the solve status. More...
 
CpSolverStatus SolveWithSolutionCallback (CpModel model, SolutionCallback cb)
 Deprecated, use Solve() instead. More...
 
CpSolverStatus SearchAllSolutions (CpModel model, SolutionCallback cb)
 Deprecated, use Solve() instead. More...
 
void StopSearch ()
 Stops the search asynchronously. More...
 
String ResponseStats ()
 Statistics on the solution found as a string. More...
 
void SetLogCallback (StringToVoidDelegate del)
 
long Value (IntVar intVar)
 Returns the value of an integer variable in the last solution found. More...
 
long Value (LinearExpr e)
 Returns the value of a linear expression in the last solution found. More...
 
Boolean BooleanValue (ILiteral literal)
 Returns the Boolean value of a literal in the last solution found. More...
 
long NumBranches ()
 Returns the number of branches explored during search. More...
 
long NumConflicts ()
 Returns the number of conflicts created during search. More...
 
double WallTime ()
 Returns the wall time of the search. More...
 
IList< int > SufficientAssumptionsForInfeasibility ()
 
String SolutionInfo ()
 Returns some information on how the solution was found, or the reason why the model or the parameters are invalid. More...
 

Properties

double ObjectiveValue [get]
 The best objective value found during search. More...
 
double BestObjectiveBound [get]
 The best lower bound found when minimizing, of the best upper bound found when maximizing More...
 
string StringParameters [get, set]
 The parameters of the search, stored as a string. More...
 
CpSolverResponse Response [get]
 

Member Function Documentation

◆ BooleanValue()

Boolean BooleanValue ( ILiteral  literal)
inline

Returns the Boolean value of a literal in the last solution found.

Definition at line 230 of file CpSolver.cs.

◆ NumBranches()

long NumBranches ( )
inline

Returns the number of branches explored during search.

Definition at line 251 of file CpSolver.cs.

◆ NumConflicts()

long NumConflicts ( )
inline

Returns the number of conflicts created during search.

Definition at line 257 of file CpSolver.cs.

◆ ResponseStats()

String ResponseStats ( )
inline

Statistics on the solution found as a string.

Definition at line 103 of file CpSolver.cs.

◆ SearchAllSolutions()

CpSolverStatus SearchAllSolutions ( CpModel  model,
SolutionCallback  cb 
)
inline

Deprecated, use Solve() instead.

Definition at line 71 of file CpSolver.cs.

◆ SetLogCallback()

void SetLogCallback ( StringToVoidDelegate  del)
inline

Definition at line 139 of file CpSolver.cs.

◆ SolutionInfo()

String SolutionInfo ( )
inline

Returns some information on how the solution was found, or the reason why the model or the parameters are invalid.

Definition at line 279 of file CpSolver.cs.

◆ Solve()

CpSolverStatus Solve ( CpModel  model,
SolutionCallback  cb = null 
)
inline

Solves the given model, and returns the solve status.

Definition at line 32 of file CpSolver.cs.

◆ SolveWithSolutionCallback()

CpSolverStatus SolveWithSolutionCallback ( CpModel  model,
SolutionCallback  cb 
)
inline

Deprecated, use Solve() instead.

Definition at line 63 of file CpSolver.cs.

◆ StopSearch()

void StopSearch ( )
inline

Stops the search asynchronously.

Definition at line 82 of file CpSolver.cs.

◆ SufficientAssumptionsForInfeasibility()

IList< int > SufficientAssumptionsForInfeasibility ( )
inline

Definition at line 268 of file CpSolver.cs.

◆ Value() [1/2]

long Value ( IntVar  intVar)
inline

Returns the value of an integer variable in the last solution found.

Definition at line 156 of file CpSolver.cs.

◆ Value() [2/2]

long Value ( LinearExpr  e)
inline

Returns the value of a linear expression in the last solution found.

Definition at line 168 of file CpSolver.cs.

◆ WallTime()

double WallTime ( )
inline

Returns the wall time of the search.

Definition at line 263 of file CpSolver.cs.

Property Documentation

◆ BestObjectiveBound

double BestObjectiveBound
get

The best lower bound found when minimizing, of the best upper bound found when maximizing

Definition at line 121 of file CpSolver.cs.

◆ ObjectiveValue

double ObjectiveValue
get

The best objective value found during search.

Definition at line 109 of file CpSolver.cs.

◆ Response

CpSolverResponse Response
get

Definition at line 144 of file CpSolver.cs.

◆ StringParameters

string StringParameters
getset

The parameters of the search, stored as a string.

Definition at line 129 of file CpSolver.cs.


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