Package com.google.ortools.sat
Class CpSolverResponse
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.ortools.sat.CpSolverResponse
- All Implemented Interfaces:
CpSolverResponseOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.io.Serializable
public final class CpSolverResponse extends com.google.protobuf.GeneratedMessageV3 implements CpSolverResponseOrBuilder
The response returned by a solver trying to solve a CpModelProto. TODO(user): support returning multiple solutions. Look at the Stubby streaming API as we probably wants to get them as they are found. Next id: 27Protobuf type
operations_research.sat.CpSolverResponse- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCpSolverResponse.BuilderThe response returned by a solver trying to solve a CpModelProto.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameterNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
Fields Modifier and Type Field Description static intALL_SOLUTIONS_WERE_FOUND_FIELD_NUMBERstatic intBEST_OBJECTIVE_BOUND_FIELD_NUMBERstatic intDETERMINISTIC_TIME_FIELD_NUMBERstatic intNUM_BINARY_PROPAGATIONS_FIELD_NUMBERstatic intNUM_BOOLEANS_FIELD_NUMBERstatic intNUM_BRANCHES_FIELD_NUMBERstatic intNUM_CONFLICTS_FIELD_NUMBERstatic intNUM_INTEGER_PROPAGATIONS_FIELD_NUMBERstatic intNUM_LP_ITERATIONS_FIELD_NUMBERstatic intNUM_RESTARTS_FIELD_NUMBERstatic intOBJECTIVE_VALUE_FIELD_NUMBERstatic intPRIMAL_INTEGRAL_FIELD_NUMBERstatic intSOLUTION_FIELD_NUMBERstatic intSOLUTION_INFO_FIELD_NUMBERstatic intSOLUTION_LOWER_BOUNDS_FIELD_NUMBERstatic intSOLUTION_UPPER_BOUNDS_FIELD_NUMBERstatic intSOLVE_LOG_FIELD_NUMBERstatic intSTATUS_FIELD_NUMBERstatic intSUFFICIENT_ASSUMPTIONS_FOR_INFEASIBILITY_FIELD_NUMBERstatic intTIGHTENED_VARIABLES_FIELD_NUMBERstatic intUSER_TIME_FIELD_NUMBERstatic intWALL_TIME_FIELD_NUMBERFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)booleangetAllSolutionsWereFound()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.doublegetBestObjectiveBound()Only make sense for an optimization problem.static CpSolverResponsegetDefaultInstance()CpSolverResponsegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()doublegetDeterministicTime()double deterministic_time = 17;longgetNumBinaryPropagations()int64 num_binary_propagations = 13;longgetNumBooleans()Some statistics about the solve.longgetNumBranches()int64 num_branches = 12;longgetNumConflicts()int64 num_conflicts = 11;longgetNumIntegerPropagations()int64 num_integer_propagations = 14;longgetNumLpIterations()int64 num_lp_iterations = 25;longgetNumRestarts()int64 num_restarts = 24;doublegetObjectiveValue()Only make sense for an optimization problem.com.google.protobuf.Parser<CpSolverResponse>getParserForType()doublegetPrimalIntegral()double primal_integral = 22;intgetSerializedSize()longgetSolution(int index)A feasible solution to the given problem.intgetSolutionCount()A feasible solution to the given problem.java.lang.StringgetSolutionInfo()Additional information about how the solution was found.com.google.protobuf.ByteStringgetSolutionInfoBytes()Additional information about how the solution was found.java.util.List<java.lang.Long>getSolutionList()A feasible solution to the given problem.longgetSolutionLowerBounds(int index)Advanced usage.intgetSolutionLowerBoundsCount()Advanced usage.java.util.List<java.lang.Long>getSolutionLowerBoundsList()Advanced usage.longgetSolutionUpperBounds(int index)repeated int64 solution_upper_bounds = 19;intgetSolutionUpperBoundsCount()repeated int64 solution_upper_bounds = 19;java.util.List<java.lang.Long>getSolutionUpperBoundsList()repeated int64 solution_upper_bounds = 19;java.lang.StringgetSolveLog()The solve log will be filled if the parameter log_to_response is set to true.com.google.protobuf.ByteStringgetSolveLogBytes()The solve log will be filled if the parameter log_to_response is set to true.CpSolverStatusgetStatus()The status of the solve.intgetStatusValue()The status of the solve.intgetSufficientAssumptionsForInfeasibility(int index)A subset of the model "assumptions" field.intgetSufficientAssumptionsForInfeasibilityCount()A subset of the model "assumptions" field.java.util.List<java.lang.Integer>getSufficientAssumptionsForInfeasibilityList()A subset of the model "assumptions" field.IntegerVariableProtogetTightenedVariables(int index)Advanced usage.intgetTightenedVariablesCount()Advanced usage.java.util.List<IntegerVariableProto>getTightenedVariablesList()Advanced usage.IntegerVariableProtoOrBuildergetTightenedVariablesOrBuilder(int index)Advanced usage.java.util.List<? extends IntegerVariableProtoOrBuilder>getTightenedVariablesOrBuilderList()Advanced usage.com.google.protobuf.UnknownFieldSetgetUnknownFields()doublegetUserTime()double user_time = 16;doublegetWallTime()double wall_time = 15;inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static CpSolverResponse.BuildernewBuilder()static CpSolverResponse.BuildernewBuilder(CpSolverResponse prototype)CpSolverResponse.BuildernewBuilderForType()protected CpSolverResponse.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static CpSolverResponseparseDelimitedFrom(java.io.InputStream input)static CpSolverResponseparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CpSolverResponseparseFrom(byte[] data)static CpSolverResponseparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CpSolverResponseparseFrom(com.google.protobuf.ByteString data)static CpSolverResponseparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CpSolverResponseparseFrom(com.google.protobuf.CodedInputStream input)static CpSolverResponseparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CpSolverResponseparseFrom(java.io.InputStream input)static CpSolverResponseparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CpSolverResponseparseFrom(java.nio.ByteBuffer data)static CpSolverResponseparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<CpSolverResponse>parser()CpSolverResponse.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
-
Field Details
-
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER- See Also:
- Constant Field Values
-
SOLUTION_FIELD_NUMBER
public static final int SOLUTION_FIELD_NUMBER- See Also:
- Constant Field Values
-
OBJECTIVE_VALUE_FIELD_NUMBER
public static final int OBJECTIVE_VALUE_FIELD_NUMBER- See Also:
- Constant Field Values
-
BEST_OBJECTIVE_BOUND_FIELD_NUMBER
public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER- See Also:
- Constant Field Values
-
SOLUTION_LOWER_BOUNDS_FIELD_NUMBER
public static final int SOLUTION_LOWER_BOUNDS_FIELD_NUMBER- See Also:
- Constant Field Values
-
SOLUTION_UPPER_BOUNDS_FIELD_NUMBER
public static final int SOLUTION_UPPER_BOUNDS_FIELD_NUMBER- See Also:
- Constant Field Values
-
TIGHTENED_VARIABLES_FIELD_NUMBER
public static final int TIGHTENED_VARIABLES_FIELD_NUMBER- See Also:
- Constant Field Values
-
SUFFICIENT_ASSUMPTIONS_FOR_INFEASIBILITY_FIELD_NUMBER
public static final int SUFFICIENT_ASSUMPTIONS_FOR_INFEASIBILITY_FIELD_NUMBER- See Also:
- Constant Field Values
-
ALL_SOLUTIONS_WERE_FOUND_FIELD_NUMBER
public static final int ALL_SOLUTIONS_WERE_FOUND_FIELD_NUMBER- See Also:
- Constant Field Values
-
NUM_BOOLEANS_FIELD_NUMBER
public static final int NUM_BOOLEANS_FIELD_NUMBER- See Also:
- Constant Field Values
-
NUM_CONFLICTS_FIELD_NUMBER
public static final int NUM_CONFLICTS_FIELD_NUMBER- See Also:
- Constant Field Values
-
NUM_BRANCHES_FIELD_NUMBER
public static final int NUM_BRANCHES_FIELD_NUMBER- See Also:
- Constant Field Values
-
NUM_BINARY_PROPAGATIONS_FIELD_NUMBER
public static final int NUM_BINARY_PROPAGATIONS_FIELD_NUMBER- See Also:
- Constant Field Values
-
NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER
public static final int NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER- See Also:
- Constant Field Values
-
NUM_RESTARTS_FIELD_NUMBER
public static final int NUM_RESTARTS_FIELD_NUMBER- See Also:
- Constant Field Values
-
NUM_LP_ITERATIONS_FIELD_NUMBER
public static final int NUM_LP_ITERATIONS_FIELD_NUMBER- See Also:
- Constant Field Values
-
WALL_TIME_FIELD_NUMBER
public static final int WALL_TIME_FIELD_NUMBER- See Also:
- Constant Field Values
-
USER_TIME_FIELD_NUMBER
public static final int USER_TIME_FIELD_NUMBER- See Also:
- Constant Field Values
-
DETERMINISTIC_TIME_FIELD_NUMBER
public static final int DETERMINISTIC_TIME_FIELD_NUMBER- See Also:
- Constant Field Values
-
PRIMAL_INTEGRAL_FIELD_NUMBER
public static final int PRIMAL_INTEGRAL_FIELD_NUMBER- See Also:
- Constant Field Values
-
SOLUTION_INFO_FIELD_NUMBER
public static final int SOLUTION_INFO_FIELD_NUMBER- See Also:
- Constant Field Values
-
SOLVE_LOG_FIELD_NUMBER
public static final int SOLVE_LOG_FIELD_NUMBER- See Also:
- Constant Field Values
-
-
Method Details
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getStatusValue
public int getStatusValue()The status of the solve.
.operations_research.sat.CpSolverStatus status = 1;- Specified by:
getStatusValuein interfaceCpSolverResponseOrBuilder- Returns:
- The enum numeric value on the wire for status.
-
getStatus
The status of the solve.
.operations_research.sat.CpSolverStatus status = 1;- Specified by:
getStatusin interfaceCpSolverResponseOrBuilder- Returns:
- The status.
-
getSolutionList
public 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;- Specified by:
getSolutionListin interfaceCpSolverResponseOrBuilder- Returns:
- A list containing the solution.
-
getSolutionCount
public 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;- Specified by:
getSolutionCountin interfaceCpSolverResponseOrBuilder- Returns:
- The count of solution.
-
getSolution
public 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;- Specified by:
getSolutionin interfaceCpSolverResponseOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The solution at the given index.
-
getObjectiveValue
public 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;- Specified by:
getObjectiveValuein interfaceCpSolverResponseOrBuilder- Returns:
- The objectiveValue.
-
getBestObjectiveBound
public 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;- Specified by:
getBestObjectiveBoundin interfaceCpSolverResponseOrBuilder- Returns:
- The bestObjectiveBound.
-
getSolutionLowerBoundsList
public 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;- Specified by:
getSolutionLowerBoundsListin interfaceCpSolverResponseOrBuilder- Returns:
- A list containing the solutionLowerBounds.
-
getSolutionLowerBoundsCount
public 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;- Specified by:
getSolutionLowerBoundsCountin interfaceCpSolverResponseOrBuilder- Returns:
- The count of solutionLowerBounds.
-
getSolutionLowerBounds
public 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;- Specified by:
getSolutionLowerBoundsin interfaceCpSolverResponseOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The solutionLowerBounds at the given index.
-
getSolutionUpperBoundsList
public java.util.List<java.lang.Long> getSolutionUpperBoundsList()repeated int64 solution_upper_bounds = 19;- Specified by:
getSolutionUpperBoundsListin interfaceCpSolverResponseOrBuilder- Returns:
- A list containing the solutionUpperBounds.
-
getSolutionUpperBoundsCount
public int getSolutionUpperBoundsCount()repeated int64 solution_upper_bounds = 19;- Specified by:
getSolutionUpperBoundsCountin interfaceCpSolverResponseOrBuilder- Returns:
- The count of solutionUpperBounds.
-
getSolutionUpperBounds
public long getSolutionUpperBounds(int index)repeated int64 solution_upper_bounds = 19;- Specified by:
getSolutionUpperBoundsin interfaceCpSolverResponseOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The solutionUpperBounds at the given index.
-
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;- Specified by:
getTightenedVariablesListin interfaceCpSolverResponseOrBuilder
-
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;- Specified by:
getTightenedVariablesOrBuilderListin interfaceCpSolverResponseOrBuilder
-
getTightenedVariablesCount
public 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;- Specified by:
getTightenedVariablesCountin interfaceCpSolverResponseOrBuilder
-
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. 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;- Specified by:
getTightenedVariablesin interfaceCpSolverResponseOrBuilder
-
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. 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;- Specified by:
getTightenedVariablesOrBuilderin interfaceCpSolverResponseOrBuilder
-
getSufficientAssumptionsForInfeasibilityList
public 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;- Specified by:
getSufficientAssumptionsForInfeasibilityListin interfaceCpSolverResponseOrBuilder- Returns:
- A list containing the sufficientAssumptionsForInfeasibility.
-
getSufficientAssumptionsForInfeasibilityCount
public 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;- Specified by:
getSufficientAssumptionsForInfeasibilityCountin interfaceCpSolverResponseOrBuilder- Returns:
- The count of sufficientAssumptionsForInfeasibility.
-
getSufficientAssumptionsForInfeasibility
public 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;- Specified by:
getSufficientAssumptionsForInfeasibilityin interfaceCpSolverResponseOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The sufficientAssumptionsForInfeasibility at the given index.
-
getAllSolutionsWereFound
public 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;- Specified by:
getAllSolutionsWereFoundin interfaceCpSolverResponseOrBuilder- Returns:
- The allSolutionsWereFound.
-
getNumBooleans
public long getNumBooleans()Some statistics about the solve.
int64 num_booleans = 10;- Specified by:
getNumBooleansin interfaceCpSolverResponseOrBuilder- Returns:
- The numBooleans.
-
getNumConflicts
public long getNumConflicts()int64 num_conflicts = 11;- Specified by:
getNumConflictsin interfaceCpSolverResponseOrBuilder- Returns:
- The numConflicts.
-
getNumBranches
public long getNumBranches()int64 num_branches = 12;- Specified by:
getNumBranchesin interfaceCpSolverResponseOrBuilder- Returns:
- The numBranches.
-
getNumBinaryPropagations
public long getNumBinaryPropagations()int64 num_binary_propagations = 13;- Specified by:
getNumBinaryPropagationsin interfaceCpSolverResponseOrBuilder- Returns:
- The numBinaryPropagations.
-
getNumIntegerPropagations
public long getNumIntegerPropagations()int64 num_integer_propagations = 14;- Specified by:
getNumIntegerPropagationsin interfaceCpSolverResponseOrBuilder- Returns:
- The numIntegerPropagations.
-
getNumRestarts
public long getNumRestarts()int64 num_restarts = 24;- Specified by:
getNumRestartsin interfaceCpSolverResponseOrBuilder- Returns:
- The numRestarts.
-
getNumLpIterations
public long getNumLpIterations()int64 num_lp_iterations = 25;- Specified by:
getNumLpIterationsin interfaceCpSolverResponseOrBuilder- Returns:
- The numLpIterations.
-
getWallTime
public double getWallTime()double wall_time = 15;- Specified by:
getWallTimein interfaceCpSolverResponseOrBuilder- Returns:
- The wallTime.
-
getUserTime
public double getUserTime()double user_time = 16;- Specified by:
getUserTimein interfaceCpSolverResponseOrBuilder- Returns:
- The userTime.
-
getDeterministicTime
public double getDeterministicTime()double deterministic_time = 17;- Specified by:
getDeterministicTimein interfaceCpSolverResponseOrBuilder- Returns:
- The deterministicTime.
-
getPrimalIntegral
public double getPrimalIntegral()double primal_integral = 22;- Specified by:
getPrimalIntegralin interfaceCpSolverResponseOrBuilder- Returns:
- The primalIntegral.
-
getSolutionInfo
public java.lang.String getSolutionInfo()Additional information about how the solution was found.
string solution_info = 20;- Specified by:
getSolutionInfoin interfaceCpSolverResponseOrBuilder- Returns:
- The solutionInfo.
-
getSolutionInfoBytes
public com.google.protobuf.ByteString getSolutionInfoBytes()Additional information about how the solution was found.
string solution_info = 20;- Specified by:
getSolutionInfoBytesin interfaceCpSolverResponseOrBuilder- Returns:
- The bytes for solutionInfo.
-
getSolveLog
public java.lang.String getSolveLog()The solve log will be filled if the parameter log_to_response is set to true.
string solve_log = 26;- Specified by:
getSolveLogin interfaceCpSolverResponseOrBuilder- Returns:
- The solveLog.
-
getSolveLogBytes
public 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;- Specified by:
getSolveLogBytesin interfaceCpSolverResponseOrBuilder- Returns:
- The bytes for solveLog.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(java.lang.Object obj)- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CpSolverResponse parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CpSolverResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CpSolverResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CpSolverResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CpSolverResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CpSolverResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
java.io.IOException
-
parseFrom
public static CpSolverResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException- Throws:
java.io.IOException
-
parseDelimitedFrom
public static CpSolverResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException- Throws:
java.io.IOException
-
parseDelimitedFrom
public static CpSolverResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException- Throws:
java.io.IOException
-
parseFrom
public static CpSolverResponse parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException- Throws:
java.io.IOException
-
parseFrom
public static CpSolverResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException- Throws:
java.io.IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CpSolverResponse.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-