Interface CpSolverResponseOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
CpSolverResponse
,CpSolverResponse.Builder
@Generated
public interface CpSolverResponseOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptiongetAdditionalSolutions
(int index) If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here.int
If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here.If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here.getAdditionalSolutionsOrBuilder
(int index) If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here.List
<? extends CpSolverSolutionOrBuilder> If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here.double
Only make sense for an optimization problem.double
double deterministic_time = 17;
double
The integral of log(1 + absolute_objective_gap) over time.long
Advanced usage.Contains the integer objective optimized internally.Contains the integer objective optimized internally.long
int64 num_binary_propagations = 13;
long
int64 num_booleans = 10;
long
int64 num_branches = 12;
long
int64 num_conflicts = 11;
long
int64 num_fixed_booleans = 31;
long
int64 num_integer_propagations = 14;
long
Some statistics about the solve.long
int64 num_lp_iterations = 25;
long
int64 num_restarts = 24;
double
Only make sense for an optimization problem.long
getSolution
(int index) A feasible solution to the given problem.int
A feasible solution to the given problem.Additional information about how the solution was found.com.google.protobuf.ByteString
Additional information about how the solution was found.A feasible solution to the given problem.The solve log will be filled if the parameter log_to_response is set to true.com.google.protobuf.ByteString
The solve log will be filled if the parameter log_to_response is set to true.The status of the solve.int
The status of the solve.int
getSufficientAssumptionsForInfeasibility
(int index) A subset of the model "assumptions" field.int
A subset of the model "assumptions" field.A subset of the model "assumptions" field.getTightenedVariables
(int index) Advanced usage.int
Advanced usage.Advanced usage.getTightenedVariablesOrBuilder
(int index) Advanced usage.List
<? extends IntegerVariableProtoOrBuilder> Advanced usage.double
double user_time = 16;
double
The time counted from the beginning of the Solve() call.boolean
Contains the integer objective optimized internally.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getStatusValue
int getStatusValue()The status of the solve.
.operations_research.sat.CpSolverStatus status = 1;
- Returns:
- The enum numeric value on the wire for status.
-
getStatus
CpSolverStatus getStatus()The status of the solve.
.operations_research.sat.CpSolverStatus status = 1;
- Returns:
- The status.
-
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.
-
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.
-
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.
-
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.
-
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.
-
getAdditionalSolutionsList
List<CpSolverSolution> getAdditionalSolutionsList()If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here. Note that the one returned in the solution field will likely appear here too. Do not rely on the solutions order as it depends on our internal representation (after postsolve).
repeated .operations_research.sat.CpSolverSolution additional_solutions = 27;
-
getAdditionalSolutions
If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here. Note that the one returned in the solution field will likely appear here too. Do not rely on the solutions order as it depends on our internal representation (after postsolve).
repeated .operations_research.sat.CpSolverSolution additional_solutions = 27;
-
getAdditionalSolutionsCount
int getAdditionalSolutionsCount()If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here. Note that the one returned in the solution field will likely appear here too. Do not rely on the solutions order as it depends on our internal representation (after postsolve).
repeated .operations_research.sat.CpSolverSolution additional_solutions = 27;
-
getAdditionalSolutionsOrBuilderList
List<? extends CpSolverSolutionOrBuilder> getAdditionalSolutionsOrBuilderList()If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here. Note that the one returned in the solution field will likely appear here too. Do not rely on the solutions order as it depends on our internal representation (after postsolve).
repeated .operations_research.sat.CpSolverSolution additional_solutions = 27;
-
getAdditionalSolutionsOrBuilder
If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here. Note that the one returned in the solution field will likely appear here too. Do not rely on the solutions order as it depends on our internal representation (after postsolve).
repeated .operations_research.sat.CpSolverSolution additional_solutions = 27;
-
getTightenedVariablesList
List<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. Warning: if you didn't set keep_all_feasible_solutions_in_presolve, then these domains might exclude valid feasible solution. Otherwise for a feasibility problem, all feasible solution should be there. Warning: For an optimization problem, these will correspond to valid bounds for the problem of finding an improving solution to the best one found so far. It might be better to solve a feasibility version if one just want to explore the feasible region.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
-
getTightenedVariables
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. Warning: if you didn't set keep_all_feasible_solutions_in_presolve, then these domains might exclude valid feasible solution. Otherwise for a feasibility problem, all feasible solution should be there. Warning: For an optimization problem, these will correspond to valid bounds for the problem of finding an improving solution to the best one found so far. It might be better to solve a feasibility version if one just want to explore the feasible region.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
-
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. Warning: if you didn't set keep_all_feasible_solutions_in_presolve, then these domains might exclude valid feasible solution. Otherwise for a feasibility problem, all feasible solution should be there. Warning: For an optimization problem, these will correspond to valid bounds for the problem of finding an improving solution to the best one found so far. It might be better to solve a feasibility version if one just want to explore the feasible region.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
-
getTightenedVariablesOrBuilderList
List<? extends 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. Warning: if you didn't set keep_all_feasible_solutions_in_presolve, then these domains might exclude valid feasible solution. Otherwise for a feasibility problem, all feasible solution should be there. Warning: For an optimization problem, these will correspond to valid bounds for the problem of finding an improving solution to the best one found so far. It might be better to solve a feasibility version if one just want to explore the feasible region.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
-
getTightenedVariablesOrBuilder
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. Warning: if you didn't set keep_all_feasible_solutions_in_presolve, then these domains might exclude valid feasible solution. Otherwise for a feasibility problem, all feasible solution should be there. Warning: For an optimization problem, these will correspond to valid bounds for the problem of finding an improving solution to the best one found so far. It might be better to solve a feasibility version if one just want to explore the feasible region.
repeated .operations_research.sat.IntegerVariableProto tightened_variables = 21;
-
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. Important: Currently, this is minimized only in single-thread and if the problem is not an optimization problem, otherwise, it will always include all the assumptions. TODO(user): Allows for returning multiple core at once.
repeated int32 sufficient_assumptions_for_infeasibility = 23;
- Returns:
- A list containing the sufficientAssumptionsForInfeasibility.
-
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. Important: Currently, this is minimized only in single-thread and if the problem is not an optimization problem, otherwise, it will always include all the assumptions. TODO(user): Allows for returning multiple core at once.
repeated int32 sufficient_assumptions_for_infeasibility = 23;
- Returns:
- The count of sufficientAssumptionsForInfeasibility.
-
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. Important: Currently, this is minimized only in single-thread and if the problem is not an optimization problem, otherwise, it will always include all the assumptions. 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.
-
hasIntegerObjective
boolean hasIntegerObjective()Contains the integer objective optimized internally. This is only filled if the problem had a floating point objective, and on the final response, not the ones given to callbacks.
.operations_research.sat.CpObjectiveProto integer_objective = 28;
- Returns:
- Whether the integerObjective field is set.
-
getIntegerObjective
CpObjectiveProto getIntegerObjective()Contains the integer objective optimized internally. This is only filled if the problem had a floating point objective, and on the final response, not the ones given to callbacks.
.operations_research.sat.CpObjectiveProto integer_objective = 28;
- Returns:
- The integerObjective.
-
getIntegerObjectiveOrBuilder
CpObjectiveProtoOrBuilder getIntegerObjectiveOrBuilder()Contains the integer objective optimized internally. This is only filled if the problem had a floating point objective, and on the final response, not the ones given to callbacks.
.operations_research.sat.CpObjectiveProto integer_objective = 28;
-
getInnerObjectiveLowerBound
long getInnerObjectiveLowerBound()Advanced usage. A lower bound on the integer expression of the objective. This is either a bound on the expression in the returned integer_objective or on the integer expression of the original objective if the problem already has an integer objective. TODO(user): This should be renamed integer_objective_lower_bound.
int64 inner_objective_lower_bound = 29;
- Returns:
- The innerObjectiveLowerBound.
-
getNumIntegers
long getNumIntegers()Some statistics about the solve. Important: in multithread, this correspond the statistics of the first subsolver. Which is usually the one with the user defined parameters. Or the default-search if none are specified.
int64 num_integers = 30;
- Returns:
- The numIntegers.
-
getNumBooleans
long getNumBooleans()int64 num_booleans = 10;
- Returns:
- The numBooleans.
-
getNumFixedBooleans
long getNumFixedBooleans()int64 num_fixed_booleans = 31;
- Returns:
- The numFixedBooleans.
-
getNumConflicts
long getNumConflicts()int64 num_conflicts = 11;
- Returns:
- The numConflicts.
-
getNumBranches
long getNumBranches()int64 num_branches = 12;
- Returns:
- The numBranches.
-
getNumBinaryPropagations
long getNumBinaryPropagations()int64 num_binary_propagations = 13;
- Returns:
- The numBinaryPropagations.
-
getNumIntegerPropagations
long getNumIntegerPropagations()int64 num_integer_propagations = 14;
- Returns:
- The numIntegerPropagations.
-
getNumRestarts
long getNumRestarts()int64 num_restarts = 24;
- Returns:
- The numRestarts.
-
getNumLpIterations
long getNumLpIterations()int64 num_lp_iterations = 25;
- Returns:
- The numLpIterations.
-
getWallTime
double getWallTime()The time counted from the beginning of the Solve() call.
double wall_time = 15;
- Returns:
- The wallTime.
-
getUserTime
double getUserTime()double user_time = 16;
- Returns:
- The userTime.
-
getDeterministicTime
double getDeterministicTime()double deterministic_time = 17;
- Returns:
- The deterministicTime.
-
getGapIntegral
double getGapIntegral()The integral of log(1 + absolute_objective_gap) over time.
double gap_integral = 22;
- Returns:
- The gapIntegral.
-
getSolutionInfo
String getSolutionInfo()Additional information about how the solution was found. It also stores model or parameters errors that caused the model to be invalid.
string solution_info = 20;
- Returns:
- The solutionInfo.
-
getSolutionInfoBytes
com.google.protobuf.ByteString getSolutionInfoBytes()Additional information about how the solution was found. It also stores model or parameters errors that caused the model to be invalid.
string solution_info = 20;
- Returns:
- The bytes for solutionInfo.
-
getSolveLog
String getSolveLog()The solve log will be filled if the parameter log_to_response is set to true.
string solve_log = 26;
- Returns:
- The solveLog.
-
getSolveLogBytes
com.google.protobuf.ByteString getSolveLogBytes()The solve log will be filled if the parameter log_to_response is set to true.
string solve_log = 26;
- Returns:
- The bytes for solveLog.
-