Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Wrapper around the SAT solver.
This class proposes different solve() methods, 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 28 of file CpSolver.java.
com.google.ortools.sat.CpSolver.CpSolver | ( | ) |
Main construction of the CpSolver class.
Definition at line 30 of file CpSolver.java.
com.google.ortools.sat.CpSolver.CpSolver | ( | ) |
Main construction of the CpSolver class.
Definition at line 30 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.bestObjectiveBound | ( | ) |
Returns the best lower bound found when minimizing, of the best upper bound found when maximizing.
Definition at line 129 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.bestObjectiveBound | ( | ) |
Returns the best lower bound found when minimizing, of the best upper bound found when maximizing.
Definition at line 129 of file CpSolver.java.
Boolean com.google.ortools.sat.CpSolver.booleanValue | ( | Literal | var | ) |
Returns the Boolean value of a literal in the last solution found.
Definition at line 144 of file CpSolver.java.
Boolean com.google.ortools.sat.CpSolver.booleanValue | ( | Literal | var | ) |
Returns the Boolean value of a literal in the last solution found.
Definition at line 144 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.clearBestBoundCallback | ( | ) |
Clears the best bound callback.
Definition at line 203 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.clearBestBoundCallback | ( | ) |
Clears the best bound callback.
Definition at line 203 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.clearLogCallback | ( | ) |
Clears the log callback.
Definition at line 193 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.clearLogCallback | ( | ) |
Clears the log callback.
Definition at line 193 of file CpSolver.java.
SatParameters.Builder com.google.ortools.sat.CpSolver.getParameters | ( | ) |
Returns the builder of the parameters of the SAT solver for modification.
Definition at line 183 of file CpSolver.java.
SatParameters.Builder com.google.ortools.sat.CpSolver.getParameters | ( | ) |
Returns the builder of the parameters of the SAT solver for modification.
Definition at line 183 of file CpSolver.java.
String com.google.ortools.sat.CpSolver.getSolutionInfo | ( | ) |
Returns some information on how the solution was found, or the reason why the model or the parameters are invalid.
Definition at line 216 of file CpSolver.java.
String com.google.ortools.sat.CpSolver.getSolutionInfo | ( | ) |
Returns some information on how the solution was found, or the reason why the model or the parameters are invalid.
Definition at line 216 of file CpSolver.java.
long com.google.ortools.sat.CpSolver.numBranches | ( | ) |
Returns the number of branches explored during search.
Definition at line 159 of file CpSolver.java.
long com.google.ortools.sat.CpSolver.numBranches | ( | ) |
Returns the number of branches explored during search.
Definition at line 159 of file CpSolver.java.
long com.google.ortools.sat.CpSolver.numConflicts | ( | ) |
Returns the number of conflicts created during search.
Definition at line 164 of file CpSolver.java.
long com.google.ortools.sat.CpSolver.numConflicts | ( | ) |
Returns the number of conflicts created during search.
Definition at line 164 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.objectiveValue | ( | ) |
Returns the best objective value found during search.
Definition at line 121 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.objectiveValue | ( | ) |
Returns the best objective value found during search.
Definition at line 121 of file CpSolver.java.
CpSolverResponse com.google.ortools.sat.CpSolver.response | ( | ) |
Returns the internal response protobuf that is returned internally by the SAT solver.
Definition at line 154 of file CpSolver.java.
CpSolverResponse com.google.ortools.sat.CpSolver.response | ( | ) |
Returns the internal response protobuf that is returned internally by the SAT solver.
Definition at line 154 of file CpSolver.java.
String com.google.ortools.sat.CpSolver.responseStats | ( | ) |
Returns some statistics on the solution found as a string.
Definition at line 208 of file CpSolver.java.
String com.google.ortools.sat.CpSolver.responseStats | ( | ) |
Returns some statistics on the solution found as a string.
Definition at line 208 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.searchAllSolutions | ( | CpModel | model, |
CpSolverSolutionCallback | cb ) |
Searches for all solutions of a satisfiability problem.
This method searches for all feasible solutions of a given model. Then it feeds the solutions to the callback.
Note that the model cannot have an objective.
model | the model to solve |
cb | the callback that will be called at each solution |
Definition at line 97 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.searchAllSolutions | ( | CpModel | model, |
CpSolverSolutionCallback | cb ) |
Searches for all solutions of a satisfiability problem.
This method searches for all feasible solutions of a given model. Then it feeds the solutions to the callback.
Note that the model cannot have an objective.
model | the model to solve |
cb | the callback that will be called at each solution |
Definition at line 97 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.setBestBoundCallback | ( | Consumer< Double > | cb | ) |
Sets the best bound callback for the solver.
Definition at line 198 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.setBestBoundCallback | ( | Consumer< Double > | cb | ) |
Sets the best bound callback for the solver.
Definition at line 198 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.setLogCallback | ( | Consumer< String > | cb | ) |
Sets the log callback for the solver.
Definition at line 188 of file CpSolver.java.
void com.google.ortools.sat.CpSolver.setLogCallback | ( | Consumer< String > | cb | ) |
Sets the log callback for the solver.
Definition at line 188 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.solve | ( | CpModel | model | ) |
Solves the given model, and returns the solve status.
Definition at line 38 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.solve | ( | CpModel | model | ) |
Solves the given model, and returns the solve status.
Definition at line 38 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.solve | ( | CpModel | model, |
CpSolverSolutionCallback | cb ) |
Solves the given model, calls the solution callback at each incumbent solution, and returns the solve status.
Setup search.
Cleanup search.
Definition at line 46 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.solve | ( | CpModel | model, |
CpSolverSolutionCallback | cb ) |
Solves the given model, calls the solution callback at each incumbent solution, and returns the solve status.
Setup search.
Cleanup search.
Definition at line 46 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.solveWithSolutionCallback | ( | CpModel | model, |
CpSolverSolutionCallback | cb ) |
Solves the given model, passes each incumber solution to the solution callback if not null, and returns the solve status.
Definition at line 78 of file CpSolver.java.
CpSolverStatus com.google.ortools.sat.CpSolver.solveWithSolutionCallback | ( | CpModel | model, |
CpSolverSolutionCallback | cb ) |
Solves the given model, passes each incumber solution to the solution callback if not null, and returns the solve status.
Definition at line 78 of file CpSolver.java.
synchronized void com.google.ortools.sat.CpSolver.stopSearch | ( | ) |
Stops the search asynchronously.
Definition at line 114 of file CpSolver.java.
synchronized void com.google.ortools.sat.CpSolver.stopSearch | ( | ) |
Stops the search asynchronously.
Definition at line 114 of file CpSolver.java.
List< Integer > com.google.ortools.sat.CpSolver.sufficientAssumptionsForInfeasibility | ( | ) |
Definition at line 178 of file CpSolver.java.
List< Integer > com.google.ortools.sat.CpSolver.sufficientAssumptionsForInfeasibility | ( | ) |
Definition at line 178 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.userTime | ( | ) |
Returns the user time of the search.
Definition at line 174 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.userTime | ( | ) |
Returns the user time of the search.
Definition at line 174 of file CpSolver.java.
long com.google.ortools.sat.CpSolver.value | ( | LinearArgument | expr | ) |
Returns the value of a linear expression in the last solution found.
Definition at line 134 of file CpSolver.java.
long com.google.ortools.sat.CpSolver.value | ( | LinearArgument | expr | ) |
Returns the value of a linear expression in the last solution found.
Definition at line 134 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.wallTime | ( | ) |
Returns the wall time of the search.
Definition at line 169 of file CpSolver.java.
double com.google.ortools.sat.CpSolver.wallTime | ( | ) |
Returns the wall time of the search.
Definition at line 169 of file CpSolver.java.