Java Reference
Java Reference
Detailed Description
Definition at line 6 of file CpSolverResponseOrBuilder.java.
Member Function Documentation
◆ getAllSolutionsWereFound()
boolean getAllSolutionsWereFound | ( | ) |
This will be true iff the solver was asked to find all solutions to a satisfiability problem (or all optimal solutions to an optimization problem), and it was successful in doing so. TODO(user): Remove as we also use the OPTIMAL vs FEASIBLE status for that.
bool all_solutions_were_found = 5;
- Returns
- The allSolutionsWereFound.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getBestObjectiveBound()
double getBestObjectiveBound | ( | ) |
Only make sense for an optimization problem. A proven lower-bound on the objective for a minimization problem, or a proven upper-bound for a maximization problem.
double best_objective_bound = 4;
- Returns
- The bestObjectiveBound.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getDeterministicTime()
double getDeterministicTime | ( | ) |
double deterministic_time = 17;
- Returns
- The deterministicTime.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getLogs()
java.lang.String getLogs | ( | ) |
Optional logs of the solver. They will be filled only if the parameter 'fill_logs_in_response' is set.
string logs = 26;
- Returns
- The logs.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getLogsBytes()
com.google.protobuf.ByteString getLogsBytes | ( | ) |
Optional logs of the solver. They will be filled only if the parameter 'fill_logs_in_response' is set.
string logs = 26;
- Returns
- The bytes for logs.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getNumBinaryPropagations()
long getNumBinaryPropagations | ( | ) |
int64 num_binary_propagations = 13;
- Returns
- The numBinaryPropagations.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getNumBooleans()
long getNumBooleans | ( | ) |
Some statistics about the solve.
int64 num_booleans = 10;
- Returns
- The numBooleans.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getNumBranches()
long getNumBranches | ( | ) |
int64 num_branches = 12;
- Returns
- The numBranches.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getNumConflicts()
long getNumConflicts | ( | ) |
int64 num_conflicts = 11;
- Returns
- The numConflicts.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getNumIntegerPropagations()
long getNumIntegerPropagations | ( | ) |
int64 num_integer_propagations = 14;
- Returns
- The numIntegerPropagations.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getNumLpIterations()
long getNumLpIterations | ( | ) |
int64 num_lp_iterations = 25;
- Returns
- The numLpIterations.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getNumRestarts()
long getNumRestarts | ( | ) |
int64 num_restarts = 24;
- Returns
- The numRestarts.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getObjectiveValue()
double getObjectiveValue | ( | ) |
Only make sense for an optimization problem. The objective value of the returned solution if it is non-empty. If there is no solution, then for a minimization problem, this will be an upper-bound of the objective of any feasible solution, and a lower-bound for a maximization problem.
double objective_value = 3;
- Returns
- The objectiveValue.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getPrimalIntegral()
double getPrimalIntegral | ( | ) |
double primal_integral = 22;
- Returns
- The primalIntegral.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolution()
long getSolution | ( | int | index | ) |
A feasible solution to the given problem. Depending on the returned status it may be optimal or just feasible. This is in one-to-one correspondence with a CpModelProto::variables repeated field and list the values of all the variables.
repeated int64 solution = 2;
- Parameters
-
index The index of the element to return.
- Returns
- The solution at the given index.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionCount()
int getSolutionCount | ( | ) |
A feasible solution to the given problem. Depending on the returned status it may be optimal or just feasible. This is in one-to-one correspondence with a CpModelProto::variables repeated field and list the values of all the variables.
repeated int64 solution = 2;
- Returns
- The count of solution.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionInfo()
java.lang.String getSolutionInfo | ( | ) |
Additional information about how the solution was found.
string solution_info = 20;
- Returns
- The solutionInfo.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionInfoBytes()
com.google.protobuf.ByteString getSolutionInfoBytes | ( | ) |
Additional information about how the solution was found.
string solution_info = 20;
- Returns
- The bytes for solutionInfo.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionList()
java.util.List<java.lang.Long> getSolutionList | ( | ) |
A feasible solution to the given problem. Depending on the returned status it may be optimal or just feasible. This is in one-to-one correspondence with a CpModelProto::variables repeated field and list the values of all the variables.
repeated int64 solution = 2;
- Returns
- A list containing the solution.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionLowerBounds()
long getSolutionLowerBounds | ( | int | index | ) |
Advanced usage. If the problem has some variables that are not fixed at the end of the search (because of a particular search strategy in the CpModelProto) then this will be used instead of filling the solution above. The two fields will then contains the lower and upper bounds of each variable as they were when the best "solution" was found.
repeated int64 solution_lower_bounds = 18;
- Parameters
-
index The index of the element to return.
- Returns
- The solutionLowerBounds at the given index.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionLowerBoundsCount()
int getSolutionLowerBoundsCount | ( | ) |
Advanced usage. If the problem has some variables that are not fixed at the end of the search (because of a particular search strategy in the CpModelProto) then this will be used instead of filling the solution above. The two fields will then contains the lower and upper bounds of each variable as they were when the best "solution" was found.
repeated int64 solution_lower_bounds = 18;
- Returns
- The count of solutionLowerBounds.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionLowerBoundsList()
java.util.List<java.lang.Long> getSolutionLowerBoundsList | ( | ) |
Advanced usage. If the problem has some variables that are not fixed at the end of the search (because of a particular search strategy in the CpModelProto) then this will be used instead of filling the solution above. The two fields will then contains the lower and upper bounds of each variable as they were when the best "solution" was found.
repeated int64 solution_lower_bounds = 18;
- Returns
- A list containing the solutionLowerBounds.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionUpperBounds()
long getSolutionUpperBounds | ( | int | index | ) |
repeated int64 solution_upper_bounds = 19;
- Parameters
-
index The index of the element to return.
- Returns
- The solutionUpperBounds at the given index.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionUpperBoundsCount()
int getSolutionUpperBoundsCount | ( | ) |
repeated int64 solution_upper_bounds = 19;
- Returns
- The count of solutionUpperBounds.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSolutionUpperBoundsList()
java.util.List<java.lang.Long> getSolutionUpperBoundsList | ( | ) |
repeated int64 solution_upper_bounds = 19;
- Returns
- A list containing the solutionUpperBounds.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getStatus()
com.google.ortools.sat.CpSolverStatus getStatus | ( | ) |
The status of the solve.
.operations_research.sat.CpSolverStatus status = 1;
- Returns
- The status.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getStatusValue()
int getStatusValue | ( | ) |
The status of the solve.
.operations_research.sat.CpSolverStatus status = 1;
- Returns
- The enum numeric value on the wire for status.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSufficientAssumptionsForInfeasibility()
int getSufficientAssumptionsForInfeasibility | ( | int | index | ) |
A subset of the model "assumptions" field. This will only be filled if the status is INFEASIBLE. This subset of assumption will be enough to still get an infeasible problem. This is related to what is called the irreducible inconsistent subsystem or IIS. Except one is only concerned by the provided assumptions. There is also no guarantee that we return an irreducible (aka minimal subset). However, this is based on SAT explanation and there is a good chance it is not too large. If you really want a minimal subset, a possible way to get one is by changing your model to minimize the number of assumptions at false, but this is likely an harder problem to solve. TODO(user): Allows for returning multiple core at once.
repeated int32 sufficient_assumptions_for_infeasibility = 23;
- Parameters
-
index The index of the element to return.
- Returns
- The sufficientAssumptionsForInfeasibility at the given index.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSufficientAssumptionsForInfeasibilityCount()
int getSufficientAssumptionsForInfeasibilityCount | ( | ) |
A subset of the model "assumptions" field. This will only be filled if the status is INFEASIBLE. This subset of assumption will be enough to still get an infeasible problem. This is related to what is called the irreducible inconsistent subsystem or IIS. Except one is only concerned by the provided assumptions. There is also no guarantee that we return an irreducible (aka minimal subset). However, this is based on SAT explanation and there is a good chance it is not too large. If you really want a minimal subset, a possible way to get one is by changing your model to minimize the number of assumptions at false, but this is likely an harder problem to solve. TODO(user): Allows for returning multiple core at once.
repeated int32 sufficient_assumptions_for_infeasibility = 23;
- Returns
- The count of sufficientAssumptionsForInfeasibility.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getSufficientAssumptionsForInfeasibilityList()
java.util.List<java.lang.Integer> getSufficientAssumptionsForInfeasibilityList | ( | ) |
A subset of the model "assumptions" field. This will only be filled if the status is INFEASIBLE. This subset of assumption will be enough to still get an infeasible problem. This is related to what is called the irreducible inconsistent subsystem or IIS. Except one is only concerned by the provided assumptions. There is also no guarantee that we return an irreducible (aka minimal subset). However, this is based on SAT explanation and there is a good chance it is not too large. If you really want a minimal subset, a possible way to get one is by changing your model to minimize the number of assumptions at false, but this is likely an harder problem to solve. TODO(user): Allows for returning multiple core at once.
repeated int32 sufficient_assumptions_for_infeasibility = 23;
- Returns
- A list containing the sufficientAssumptionsForInfeasibility.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getTightenedVariables()
com.google.ortools.sat.IntegerVariableProto getTightenedVariables | ( | int | index | ) |
Advanced usage. If the option fill_tightened_domains_in_response is set, then this field will be a copy of the CpModelProto.variables where each domain has been reduced using the information the solver was able to derive. Note that this is only filled with the info derived during a normal search and we do not have any dedicated algorithm to improve it. If the problem is a feasibility problem, then these bounds will be valid for any feasible solution. If the problem is an optimization problem, then these bounds will only be valid for any OPTIMAL solutions, it can exclude sub-optimal feasible ones.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getTightenedVariablesCount()
int getTightenedVariablesCount | ( | ) |
Advanced usage. If the option fill_tightened_domains_in_response is set, then this field will be a copy of the CpModelProto.variables where each domain has been reduced using the information the solver was able to derive. Note that this is only filled with the info derived during a normal search and we do not have any dedicated algorithm to improve it. If the problem is a feasibility problem, then these bounds will be valid for any feasible solution. If the problem is an optimization problem, then these bounds will only be valid for any OPTIMAL solutions, it can exclude sub-optimal feasible ones.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getTightenedVariablesList()
java.util.List<com.google.ortools.sat.IntegerVariableProto> getTightenedVariablesList | ( | ) |
Advanced usage. If the option fill_tightened_domains_in_response is set, then this field will be a copy of the CpModelProto.variables where each domain has been reduced using the information the solver was able to derive. Note that this is only filled with the info derived during a normal search and we do not have any dedicated algorithm to improve it. If the problem is a feasibility problem, then these bounds will be valid for any feasible solution. If the problem is an optimization problem, then these bounds will only be valid for any OPTIMAL solutions, it can exclude sub-optimal feasible ones.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getTightenedVariablesOrBuilder()
com.google.ortools.sat.IntegerVariableProtoOrBuilder getTightenedVariablesOrBuilder | ( | int | index | ) |
Advanced usage. If the option fill_tightened_domains_in_response is set, then this field will be a copy of the CpModelProto.variables where each domain has been reduced using the information the solver was able to derive. Note that this is only filled with the info derived during a normal search and we do not have any dedicated algorithm to improve it. If the problem is a feasibility problem, then these bounds will be valid for any feasible solution. If the problem is an optimization problem, then these bounds will only be valid for any OPTIMAL solutions, it can exclude sub-optimal feasible ones.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getTightenedVariablesOrBuilderList()
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder> getTightenedVariablesOrBuilderList | ( | ) |
Advanced usage. If the option fill_tightened_domains_in_response is set, then this field will be a copy of the CpModelProto.variables where each domain has been reduced using the information the solver was able to derive. Note that this is only filled with the info derived during a normal search and we do not have any dedicated algorithm to improve it. If the problem is a feasibility problem, then these bounds will be valid for any feasible solution. If the problem is an optimization problem, then these bounds will only be valid for any OPTIMAL solutions, it can exclude sub-optimal feasible ones.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getUserTime()
double getUserTime | ( | ) |
double user_time = 16;
- Returns
- The userTime.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
◆ getWallTime()
double getWallTime | ( | ) |
double wall_time = 15;
- Returns
- The wallTime.
Implemented in CpSolverResponse.Builder, and CpSolverResponse.
The documentation for this interface was generated from the following file: