Package com.google.ortools.sat
Class CpSolverSolutionCallback
java.lang.Object
com.google.ortools.sat.SolutionCallback
com.google.ortools.sat.CpSolverSolutionCallback
public class CpSolverSolutionCallback extends SolutionCallback
Parent class to create a callback called at each solution.
From the parent class, it inherits the methods:
long numBooleans() to query the number of boolean variables created.
long numBranches() to query the number of branches explored so far.
long numConflicts() to query the number of conflicts created so far.
long numBinaryPropagations() to query the number of boolean propagations in the SAT
solver so far.
long numIntegerPropagations() to query the number of integer propagations in the SAT
solver so far.
double wallTime() to query wall time passed in the search so far.
double userTime() to query the user time passed in the search so far.
long objectiveValue() to get the best objective value found so far.
-
Field Summary
Fields inherited from class com.google.ortools.sat.SolutionCallback
swigCMemOwn -
Constructor Summary
Constructors Constructor Description CpSolverSolutionCallback() -
Method Summary
Modifier and Type Method Description java.lang.BooleanbooleanValue(Literal literal)Returns the Boolean value of the literal in the current solution.voidonSolutionCallback()Callback method to override.longvalue(IntVar var)Returns the value of the variable in the current solution.Methods inherited from class com.google.ortools.sat.SolutionCallback
bestObjectiveBound, delete, finalize, getCPtr, numBinaryPropagations, numBooleans, numBranches, numConflicts, numIntegerPropagations, objectiveValue, solutionBooleanValue, solutionIntegerValue, stopSearch, swigDirectorDisconnect, swigReleaseOwnership, swigTakeOwnership, userTime, wallTimeMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CpSolverSolutionCallback
public CpSolverSolutionCallback()
-
-
Method Details
-
value
Returns the value of the variable in the current solution. -
booleanValue
Returns the Boolean value of the literal in the current solution. -
onSolutionCallback
public void onSolutionCallback()Callback method to override. It will be called at each new solution.- Overrides:
onSolutionCallbackin classSolutionCallback
-