Java Reference
Java Reference
CpSolver.java
Go to the documentation of this file.
double objectiveValue()
Returns the best objective value found during search.
Definition: CpSolver.java:117
A linear expression (sum (ai * xi) + b).
Definition: LinearExpr.java:19
CpSolverStatus solveWithSolutionCallback(CpModel model, CpSolverSolutionCallback cb)
Solves the given model, passes each incumber solution to the solution callback if not null,...
Definition: CpSolver.java:74
long numBranches()
Returns the number of branches explored during search.
Definition: CpSolver.java:155
.lang.Override double getObjectiveValue()
Definition: CpSolverResponse.java:361
Boolean booleanValue(Literal var)
Returns the Boolean value of a literal in the last solution found.
Definition: CpSolver.java:140
.lang.Override java.util.List< java.lang.Integer > getSufficientAssumptionsForInfeasibilityList()
Definition: CpSolverResponse.java:593
.lang.Override double getWallTime()
Definition: CpSolverResponse.java:805
.lang.Override java.lang.String getSolutionInfo()
Definition: CpSolverResponse.java:858
long value(LinearArgument expr)
Returns the value of a linear expression in the last solution found.
Definition: CpSolver.java:130
CpSolverStatus solve(CpModel model)
Solves the given model, and returns the solve status.
Definition: CpSolver.java:37
void setLogCallback(Consumer< String > cb)
Sets the log callback for the solver.
Definition: CpSolver.java:184
long getOffset()
Returns the constant part of the expression.
int getVariableIndex(int index)
Returns the index of the ith variable.
String getSolutionInfo()
Returns some information on how the solution was found, or the reason why the model or the parameters...
Definition: CpSolver.java:197
void addLogCallback(java.util.function.Consumer< String > log_callback)
Definition: SolveWrapper.java:51
A object that can build a LinearExpr object.
Definition: LinearArgument.java:21
void clearSolutionCallback(SolutionCallback callback)
Definition: SolveWrapper.java:47
CpSolverResponse response()
Returns the internal response protobuf that is returned internally by the SAT solver.
Definition: CpSolver.java:150
long getSolution(int index)
Definition: CpSolverResponse.java:342
static String solverResponseStats(com.google.ortools.sat.CpSolverResponse response)
Definition: CpSatHelper.java:45
SatParameters.Builder getParameters()
Returns the builder of the parameters of the SAT solver for modification.
Definition: CpSolver.java:179
long numConflicts()
Returns the number of conflicts created during search.
Definition: CpSolver.java:160
int getIndex()
.lang.Override double getBestObjectiveBound()
Definition: CpSolverResponse.java:378
static Builder newBuilder()
Definition: SatParameters.java:10937
double bestObjectiveBound()
Returns the best lower bound found when minimizing, of the best upper bound found when maximizing.
Definition: CpSolver.java:125
int numElements()
Returns the number of terms (excluding the constant one) in this expression.
com.google.ortools.sat.CpSolverResponse solve(com.google.ortools.sat.CpModelProto model_proto)
Definition: SolveWrapper.java:55
.lang.Override boolean getEnumerateAllSolutions()
Definition: SatParameters.java:6722
String responseStats()
Returns some statistics on the solution found as a string.
Definition: CpSolver.java:189
Interface to describe a boolean variable or its negation.
Definition: Literal.java:17
CpSolverStatus solve(CpModel model, CpSolverSolutionCallback cb)
Solves the given model, calls the solution callback at each incumbent solution, and returns the solve...
Definition: CpSolver.java:45
.lang.Override com.google.ortools.sat.CpSolverStatus getStatus()
Definition: CpSolverResponse.java:292
void addSolutionCallback(SolutionCallback callback)
Definition: SolveWrapper.java:43
void setParameters(com.google.ortools.sat.SatParameters parameters)
Definition: SolveWrapper.java:39
List< Integer > sufficientAssumptionsForInfeasibility()
Definition: CpSolver.java:174
CpSolverStatus searchAllSolutions(CpModel model, CpSolverSolutionCallback cb)
Searches for all solutions of a satisfiability problem.
Definition: CpSolver.java:93
Parent class to create a callback called at each solution.
Definition: CpSolverSolutionCallback.java:39
long getCoefficient(int index)
Returns the ith coefficient.