Package com.google.ortools.linearsolver
Interface MPSolutionResponseOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
MPSolutionResponse,MPSolutionResponse.Builder
public interface MPSolutionResponseOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MPSolutiongetAdditionalSolutions(int index)[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available.intgetAdditionalSolutionsCount()[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available.java.util.List<MPSolution>getAdditionalSolutionsList()[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available.MPSolutionOrBuildergetAdditionalSolutionsOrBuilder(int index)[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available.java.util.List<? extends MPSolutionOrBuilder>getAdditionalSolutionsOrBuilderList()[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available.doublegetBestObjectiveBound()This field is only filled for MIP problems.doublegetDualValue(int index)[Advanced usage.] Values of the dual variables values in the same order as the MPModelProto::constraint field.intgetDualValueCount()[Advanced usage.] Values of the dual variables values in the same order as the MPModelProto::constraint field.java.util.List<java.lang.Double>getDualValueList()[Advanced usage.] Values of the dual variables values in the same order as the MPModelProto::constraint field.doublegetObjectiveValue()Objective value corresponding to the "variable_value" below, taking into account the source "objective_offset" and "objective_coefficient".doublegetReducedCost(int index)[Advanced usage.] Values of the reduced cost of the variables in the same order as the MPModelProto::variable.intgetReducedCostCount()[Advanced usage.] Values of the reduced cost of the variables in the same order as the MPModelProto::variable.java.util.List<java.lang.Double>getReducedCostList()[Advanced usage.] Values of the reduced cost of the variables in the same order as the MPModelProto::variable.MPSolveInfogetSolveInfo()Contains extra information about the solve, populated if the underlying solver (and its interface) supports it.MPSolveInfoOrBuildergetSolveInfoOrBuilder()Contains extra information about the solve, populated if the underlying solver (and its interface) supports it.com.google.protobuf.ByteStringgetSolverSpecificInfo()Opaque solver-specific information.MPSolverResponseStatusgetStatus()Result of the optimization.java.lang.StringgetStatusStr()Human-readable string giving more details about the status.com.google.protobuf.ByteStringgetStatusStrBytes()Human-readable string giving more details about the status.doublegetVariableValue(int index)Variable values in the same order as the MPModelProto::variable field.intgetVariableValueCount()Variable values in the same order as the MPModelProto::variable field.java.util.List<java.lang.Double>getVariableValueList()Variable values in the same order as the MPModelProto::variable field.booleanhasBestObjectiveBound()This field is only filled for MIP problems.booleanhasObjectiveValue()Objective value corresponding to the "variable_value" below, taking into account the source "objective_offset" and "objective_coefficient".booleanhasSolveInfo()Contains extra information about the solve, populated if the underlying solver (and its interface) supports it.booleanhasSolverSpecificInfo()Opaque solver-specific information.booleanhasStatus()Result of the optimization.booleanhasStatusStr()Human-readable string giving more details about the status.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
hasStatus
boolean hasStatus()
Result of the optimization.
optional .operations_research.MPSolverResponseStatus status = 1 [default = MPSOLVER_UNKNOWN_STATUS];- Returns:
- Whether the status field is set.
-
getStatus
MPSolverResponseStatus getStatus()
Result of the optimization.
optional .operations_research.MPSolverResponseStatus status = 1 [default = MPSOLVER_UNKNOWN_STATUS];- Returns:
- The status.
-
hasStatusStr
boolean hasStatusStr()
Human-readable string giving more details about the status. For example, when the status is MPSOLVER_INVALID_MODE, this can hold a description of why the model is invalid. This isn't always filled: don't depend on its value or even its presence.
optional string status_str = 7;- Returns:
- Whether the statusStr field is set.
-
getStatusStr
java.lang.String getStatusStr()
Human-readable string giving more details about the status. For example, when the status is MPSOLVER_INVALID_MODE, this can hold a description of why the model is invalid. This isn't always filled: don't depend on its value or even its presence.
optional string status_str = 7;- Returns:
- The statusStr.
-
getStatusStrBytes
com.google.protobuf.ByteString getStatusStrBytes()
Human-readable string giving more details about the status. For example, when the status is MPSOLVER_INVALID_MODE, this can hold a description of why the model is invalid. This isn't always filled: don't depend on its value or even its presence.
optional string status_str = 7;- Returns:
- The bytes for statusStr.
-
hasObjectiveValue
boolean hasObjectiveValue()
Objective value corresponding to the "variable_value" below, taking into account the source "objective_offset" and "objective_coefficient". This is set iff 'status' is OPTIMAL or FEASIBLE.
optional double objective_value = 2;- Returns:
- Whether the objectiveValue field is set.
-
getObjectiveValue
double getObjectiveValue()
Objective value corresponding to the "variable_value" below, taking into account the source "objective_offset" and "objective_coefficient". This is set iff 'status' is OPTIMAL or FEASIBLE.
optional double objective_value = 2;- Returns:
- The objectiveValue.
-
hasBestObjectiveBound
boolean hasBestObjectiveBound()
This field is only filled for MIP problems. For a minimization problem, this is a lower bound on the optimal objective value. For a maximization problem, it is an upper bound. It is only filled if the status is OPTIMAL or FEASIBLE. In the former case, best_objective_bound should be equal to objective_value (modulo numerical errors).
optional double best_objective_bound = 5;- Returns:
- Whether the bestObjectiveBound field is set.
-
getBestObjectiveBound
double getBestObjectiveBound()
This field is only filled for MIP problems. For a minimization problem, this is a lower bound on the optimal objective value. For a maximization problem, it is an upper bound. It is only filled if the status is OPTIMAL or FEASIBLE. In the former case, best_objective_bound should be equal to objective_value (modulo numerical errors).
optional double best_objective_bound = 5;- Returns:
- The bestObjectiveBound.
-
getVariableValueList
java.util.List<java.lang.Double> getVariableValueList()
Variable values in the same order as the MPModelProto::variable field. This is a dense representation. These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double variable_value = 3 [packed = true];- Returns:
- A list containing the variableValue.
-
getVariableValueCount
int getVariableValueCount()
Variable values in the same order as the MPModelProto::variable field. This is a dense representation. These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double variable_value = 3 [packed = true];- Returns:
- The count of variableValue.
-
getVariableValue
double getVariableValue(int index)
Variable values in the same order as the MPModelProto::variable field. This is a dense representation. These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double variable_value = 3 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The variableValue at the given index.
-
hasSolveInfo
boolean hasSolveInfo()
Contains extra information about the solve, populated if the underlying solver (and its interface) supports it. As of 2021/07/19 this is supported by SCIP and Gurobi proto solves.
optional .operations_research.MPSolveInfo solve_info = 10;- Returns:
- Whether the solveInfo field is set.
-
getSolveInfo
MPSolveInfo getSolveInfo()
Contains extra information about the solve, populated if the underlying solver (and its interface) supports it. As of 2021/07/19 this is supported by SCIP and Gurobi proto solves.
optional .operations_research.MPSolveInfo solve_info = 10;- Returns:
- The solveInfo.
-
getSolveInfoOrBuilder
MPSolveInfoOrBuilder getSolveInfoOrBuilder()
Contains extra information about the solve, populated if the underlying solver (and its interface) supports it. As of 2021/07/19 this is supported by SCIP and Gurobi proto solves.
optional .operations_research.MPSolveInfo solve_info = 10;
-
hasSolverSpecificInfo
boolean hasSolverSpecificInfo()
Opaque solver-specific information. For the PDLP solver, this is a serialized pdlp::SolveLog proto.
optional bytes solver_specific_info = 11;- Returns:
- Whether the solverSpecificInfo field is set.
-
getSolverSpecificInfo
com.google.protobuf.ByteString getSolverSpecificInfo()
Opaque solver-specific information. For the PDLP solver, this is a serialized pdlp::SolveLog proto.
optional bytes solver_specific_info = 11;- Returns:
- The solverSpecificInfo.
-
getDualValueList
java.util.List<java.lang.Double> getDualValueList()
[Advanced usage.] Values of the dual variables values in the same order as the MPModelProto::constraint field. This is a dense representation. These are not set if the problem was solved with a MIP solver (even if it is actually a linear program). These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double dual_value = 4 [packed = true];- Returns:
- A list containing the dualValue.
-
getDualValueCount
int getDualValueCount()
[Advanced usage.] Values of the dual variables values in the same order as the MPModelProto::constraint field. This is a dense representation. These are not set if the problem was solved with a MIP solver (even if it is actually a linear program). These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double dual_value = 4 [packed = true];- Returns:
- The count of dualValue.
-
getDualValue
double getDualValue(int index)
[Advanced usage.] Values of the dual variables values in the same order as the MPModelProto::constraint field. This is a dense representation. These are not set if the problem was solved with a MIP solver (even if it is actually a linear program). These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double dual_value = 4 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The dualValue at the given index.
-
getReducedCostList
java.util.List<java.lang.Double> getReducedCostList()
[Advanced usage.] Values of the reduced cost of the variables in the same order as the MPModelProto::variable. This is a dense representation. These are not set if the problem was solved with a MIP solver (even if it is actually a linear program). These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double reduced_cost = 6 [packed = true];- Returns:
- A list containing the reducedCost.
-
getReducedCostCount
int getReducedCostCount()
[Advanced usage.] Values of the reduced cost of the variables in the same order as the MPModelProto::variable. This is a dense representation. These are not set if the problem was solved with a MIP solver (even if it is actually a linear program). These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double reduced_cost = 6 [packed = true];- Returns:
- The count of reducedCost.
-
getReducedCost
double getReducedCost(int index)
[Advanced usage.] Values of the reduced cost of the variables in the same order as the MPModelProto::variable. This is a dense representation. These are not set if the problem was solved with a MIP solver (even if it is actually a linear program). These are set iff 'status' is OPTIMAL or FEASIBLE.
repeated double reduced_cost = 6 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The reducedCost at the given index.
-
getAdditionalSolutionsList
java.util.List<MPSolution> getAdditionalSolutionsList()
[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available. These additional solutions are different than the main solution described by the above fields `objective_value` and `variable_value`.
repeated .operations_research.MPSolution additional_solutions = 8;
-
getAdditionalSolutions
MPSolution getAdditionalSolutions(int index)
[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available. These additional solutions are different than the main solution described by the above fields `objective_value` and `variable_value`.
repeated .operations_research.MPSolution additional_solutions = 8;
-
getAdditionalSolutionsCount
int getAdditionalSolutionsCount()
[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available. These additional solutions are different than the main solution described by the above fields `objective_value` and `variable_value`.
repeated .operations_research.MPSolution additional_solutions = 8;
-
getAdditionalSolutionsOrBuilderList
java.util.List<? extends MPSolutionOrBuilder> getAdditionalSolutionsOrBuilderList()
[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available. These additional solutions are different than the main solution described by the above fields `objective_value` and `variable_value`.
repeated .operations_research.MPSolution additional_solutions = 8;
-
getAdditionalSolutionsOrBuilder
MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
[Advanced usage.] If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that number of additional solutions may be populated here, if available. These additional solutions are different than the main solution described by the above fields `objective_value` and `variable_value`.
repeated .operations_research.MPSolution additional_solutions = 8;
-
-