Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Sat.CpSolver Class Reference

Wrapper around the SAT solver. More...

Public Member Functions

CpSolverStatus Solve (CpModel model, SolutionCallback cb=null)
 Solves the given model, and returns the solve status.
 
CpSolverStatus SolveWithSolutionCallback (CpModel model, SolutionCallback cb)
 Deprecated, use Solve() instead.
 
CpSolverStatus SearchAllSolutions (CpModel model, SolutionCallback cb)
 Deprecated, use Solve() instead.
 
void StopSearch ()
 Stops the search asynchronously.
 
String ResponseStats ()
 Statistics on the solution found as a string.
 
void SetLogCallback (StringToVoidDelegate del)
 
void ClearLogCallback ()
 
void SetBestBoundCallback (DoubleToVoidDelegate del)
 
void ClearBestBoundCallback ()
 
long Value (IntVar intVar)
 Returns the value of an integer variable in the last solution found.
 
long Value (LinearExpr e)
 Returns the value of a linear expression in the last solution found.
 
Boolean BooleanValue (ILiteral literal)
 Returns the Boolean value of a literal in the last solution found.
 
long NumBranches ()
 Returns the number of branches explored during search.
 
long NumConflicts ()
 Returns the number of conflicts created during search.
 
double WallTime ()
 Returns the wall time of the search.
 
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.
 

Properties

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

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.

Member Function Documentation

◆ BooleanValue()

Boolean Google.OrTools.Sat.CpSolver.BooleanValue ( ILiteral literal)
inline

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

Definition at line 249 of file CpSolver.cs.

◆ ClearBestBoundCallback()

void Google.OrTools.Sat.CpSolver.ClearBestBoundCallback ( )
inline

Definition at line 158 of file CpSolver.cs.

◆ ClearLogCallback()

void Google.OrTools.Sat.CpSolver.ClearLogCallback ( )
inline

Definition at line 148 of file CpSolver.cs.

◆ NumBranches()

long Google.OrTools.Sat.CpSolver.NumBranches ( )
inline

Returns the number of branches explored during search.

Definition at line 270 of file CpSolver.cs.

◆ NumConflicts()

long Google.OrTools.Sat.CpSolver.NumConflicts ( )
inline

Returns the number of conflicts created during search.

Definition at line 276 of file CpSolver.cs.

◆ ResponseStats()

String Google.OrTools.Sat.CpSolver.ResponseStats ( )
inline

Statistics on the solution found as a string.

Definition at line 107 of file CpSolver.cs.

◆ SearchAllSolutions()

CpSolverStatus Google.OrTools.Sat.CpSolver.SearchAllSolutions ( CpModel model,
SolutionCallback cb )
inline

Deprecated, use Solve() instead.

Definition at line 75 of file CpSolver.cs.

◆ SetBestBoundCallback()

void Google.OrTools.Sat.CpSolver.SetBestBoundCallback ( DoubleToVoidDelegate del)
inline

Definition at line 153 of file CpSolver.cs.

◆ SetLogCallback()

void Google.OrTools.Sat.CpSolver.SetLogCallback ( StringToVoidDelegate del)
inline

Definition at line 143 of file CpSolver.cs.

◆ SolutionInfo()

String Google.OrTools.Sat.CpSolver.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 298 of file CpSolver.cs.

◆ Solve()

CpSolverStatus Google.OrTools.Sat.CpSolver.Solve ( CpModel model,
SolutionCallback cb = null )
inline

Solves the given model, and returns the solve status.

Setup search.

Cleanup search.

Definition at line 32 of file CpSolver.cs.

◆ SolveWithSolutionCallback()

CpSolverStatus Google.OrTools.Sat.CpSolver.SolveWithSolutionCallback ( CpModel model,
SolutionCallback cb )
inline

Deprecated, use Solve() instead.

Definition at line 67 of file CpSolver.cs.

◆ StopSearch()

void Google.OrTools.Sat.CpSolver.StopSearch ( )
inline

Stops the search asynchronously.

Definition at line 86 of file CpSolver.cs.

◆ SufficientAssumptionsForInfeasibility()

IList< int > Google.OrTools.Sat.CpSolver.SufficientAssumptionsForInfeasibility ( )
inline

Definition at line 287 of file CpSolver.cs.

◆ Value() [1/2]

long Google.OrTools.Sat.CpSolver.Value ( IntVar intVar)
inline

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

Definition at line 175 of file CpSolver.cs.

◆ Value() [2/2]

long Google.OrTools.Sat.CpSolver.Value ( LinearExpr e)
inline

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

Definition at line 187 of file CpSolver.cs.

◆ WallTime()

double Google.OrTools.Sat.CpSolver.WallTime ( )
inline

Returns the wall time of the search.

Definition at line 282 of file CpSolver.cs.

Property Documentation

◆ BestObjectiveBound

double Google.OrTools.Sat.CpSolver.BestObjectiveBound
get

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

Definition at line 125 of file CpSolver.cs.

◆ ObjectiveValue

double Google.OrTools.Sat.CpSolver.ObjectiveValue
get

The best objective value found during search.

Definition at line 113 of file CpSolver.cs.

◆ Response

CpSolverResponse Google.OrTools.Sat.CpSolver.Response
get

Definition at line 163 of file CpSolver.cs.

◆ StringParameters

string Google.OrTools.Sat.CpSolver.StringParameters
getset

The parameters of the search, stored as a string

Definition at line 133 of file CpSolver.cs.


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