Class MPSolutionResponse

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.ortools.linearsolver.MPSolutionResponse
All Implemented Interfaces:
MPSolutionResponseOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class MPSolutionResponse extends com.google.protobuf.GeneratedMessage implements MPSolutionResponseOrBuilder
 Next id: 12.
 
Protobuf type operations_research.MPSolutionResponse
See Also:
  • Field Details

    • STATUS_FIELD_NUMBER

      public static final int STATUS_FIELD_NUMBER
      See Also:
    • STATUS_STR_FIELD_NUMBER

      public static final int STATUS_STR_FIELD_NUMBER
      See Also:
    • OBJECTIVE_VALUE_FIELD_NUMBER

      public static final int OBJECTIVE_VALUE_FIELD_NUMBER
      See Also:
    • BEST_OBJECTIVE_BOUND_FIELD_NUMBER

      public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER
      See Also:
    • VARIABLE_VALUE_FIELD_NUMBER

      public static final int VARIABLE_VALUE_FIELD_NUMBER
      See Also:
    • SOLVE_INFO_FIELD_NUMBER

      public static final int SOLVE_INFO_FIELD_NUMBER
      See Also:
    • SOLVER_SPECIFIC_INFO_FIELD_NUMBER

      public static final int SOLVER_SPECIFIC_INFO_FIELD_NUMBER
      See Also:
    • DUAL_VALUE_FIELD_NUMBER

      public static final int DUAL_VALUE_FIELD_NUMBER
      See Also:
    • REDUCED_COST_FIELD_NUMBER

      public static final int REDUCED_COST_FIELD_NUMBER
      See Also:
    • ADDITIONAL_SOLUTIONS_FIELD_NUMBER

      public static final int ADDITIONAL_SOLUTIONS_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • hasStatus

      public boolean hasStatus()
       Result of the optimization.
       
      optional .operations_research.MPSolverResponseStatus status = 1 [default = MPSOLVER_UNKNOWN_STATUS];
      Specified by:
      hasStatus in interface MPSolutionResponseOrBuilder
      Returns:
      Whether the status field is set.
    • getStatus

      public MPSolverResponseStatus getStatus()
       Result of the optimization.
       
      optional .operations_research.MPSolverResponseStatus status = 1 [default = MPSOLVER_UNKNOWN_STATUS];
      Specified by:
      getStatus in interface MPSolutionResponseOrBuilder
      Returns:
      The status.
    • hasStatusStr

      public 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;
      Specified by:
      hasStatusStr in interface MPSolutionResponseOrBuilder
      Returns:
      Whether the statusStr field is set.
    • getStatusStr

      public 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;
      Specified by:
      getStatusStr in interface MPSolutionResponseOrBuilder
      Returns:
      The statusStr.
    • getStatusStrBytes

      public 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;
      Specified by:
      getStatusStrBytes in interface MPSolutionResponseOrBuilder
      Returns:
      The bytes for statusStr.
    • hasObjectiveValue

      public 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;
      Specified by:
      hasObjectiveValue in interface MPSolutionResponseOrBuilder
      Returns:
      Whether the objectiveValue field is set.
    • getObjectiveValue

      public 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;
      Specified by:
      getObjectiveValue in interface MPSolutionResponseOrBuilder
      Returns:
      The objectiveValue.
    • hasBestObjectiveBound

      public 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;
      Specified by:
      hasBestObjectiveBound in interface MPSolutionResponseOrBuilder
      Returns:
      Whether the bestObjectiveBound field is set.
    • getBestObjectiveBound

      public 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;
      Specified by:
      getBestObjectiveBound in interface MPSolutionResponseOrBuilder
      Returns:
      The bestObjectiveBound.
    • getVariableValueList

      public List<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];
      Specified by:
      getVariableValueList in interface MPSolutionResponseOrBuilder
      Returns:
      A list containing the variableValue.
    • getVariableValueCount

      public 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];
      Specified by:
      getVariableValueCount in interface MPSolutionResponseOrBuilder
      Returns:
      The count of variableValue.
    • getVariableValue

      public 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];
      Specified by:
      getVariableValue in interface MPSolutionResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The variableValue at the given index.
    • hasSolveInfo

      public 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;
      Specified by:
      hasSolveInfo in interface MPSolutionResponseOrBuilder
      Returns:
      Whether the solveInfo field is set.
    • getSolveInfo

      public 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;
      Specified by:
      getSolveInfo in interface MPSolutionResponseOrBuilder
      Returns:
      The solveInfo.
    • getSolveInfoOrBuilder

      public 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;
      Specified by:
      getSolveInfoOrBuilder in interface MPSolutionResponseOrBuilder
    • hasSolverSpecificInfo

      public boolean hasSolverSpecificInfo()
       Opaque solver-specific information.
       For the PDLP solver, this is a serialized pdlp::SolveLog proto.
       
      optional bytes solver_specific_info = 11;
      Specified by:
      hasSolverSpecificInfo in interface MPSolutionResponseOrBuilder
      Returns:
      Whether the solverSpecificInfo field is set.
    • getSolverSpecificInfo

      public 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;
      Specified by:
      getSolverSpecificInfo in interface MPSolutionResponseOrBuilder
      Returns:
      The solverSpecificInfo.
    • getDualValueList

      public List<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];
      Specified by:
      getDualValueList in interface MPSolutionResponseOrBuilder
      Returns:
      A list containing the dualValue.
    • getDualValueCount

      public 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];
      Specified by:
      getDualValueCount in interface MPSolutionResponseOrBuilder
      Returns:
      The count of dualValue.
    • getDualValue

      public 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];
      Specified by:
      getDualValue in interface MPSolutionResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The dualValue at the given index.
    • getReducedCostList

      public List<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];
      Specified by:
      getReducedCostList in interface MPSolutionResponseOrBuilder
      Returns:
      A list containing the reducedCost.
    • getReducedCostCount

      public 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];
      Specified by:
      getReducedCostCount in interface MPSolutionResponseOrBuilder
      Returns:
      The count of reducedCost.
    • getReducedCost

      public 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];
      Specified by:
      getReducedCost in interface MPSolutionResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The reducedCost at the given index.
    • getAdditionalSolutionsList

      public 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;
      Specified by:
      getAdditionalSolutionsList in interface MPSolutionResponseOrBuilder
    • getAdditionalSolutionsOrBuilderList

      public 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;
      Specified by:
      getAdditionalSolutionsOrBuilderList in interface MPSolutionResponseOrBuilder
    • getAdditionalSolutionsCount

      public 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;
      Specified by:
      getAdditionalSolutionsCount in interface MPSolutionResponseOrBuilder
    • getAdditionalSolutions

      public 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;
      Specified by:
      getAdditionalSolutions in interface MPSolutionResponseOrBuilder
    • getAdditionalSolutionsOrBuilder

      public 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;
      Specified by:
      getAdditionalSolutionsOrBuilder in interface MPSolutionResponseOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static MPSolutionResponse parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MPSolutionResponse parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MPSolutionResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MPSolutionResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MPSolutionResponse parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MPSolutionResponse parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MPSolutionResponse parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MPSolutionResponse parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public MPSolutionResponse.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static MPSolutionResponse.Builder newBuilder()
    • newBuilder

      public static MPSolutionResponse.Builder newBuilder(MPSolutionResponse prototype)
    • toBuilder

      public MPSolutionResponse.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected MPSolutionResponse.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static MPSolutionResponse getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<MPSolutionResponse> parser()
    • getParserForType

      public com.google.protobuf.Parser<MPSolutionResponse> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public MPSolutionResponse getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder