Interface MPSosConstraintOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
MPSosConstraint, MPSosConstraint.Builder

@Generated public interface MPSosConstraintOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    optional .operations_research.MPSosConstraint.Type type = 1 [default = SOS1_DEFAULT];
    int
    getVarIndex(int index)
    Variable index (w.r.t. the "variable" field of MPModelProto) of the variables in the SOS.
    int
    Variable index (w.r.t. the "variable" field of MPModelProto) of the variables in the SOS.
    Variable index (w.r.t. the "variable" field of MPModelProto) of the variables in the SOS.
    double
    getWeight(int index)
    Optional: SOS weights.
    int
    Optional: SOS weights.
    Optional: SOS weights.
    boolean
    optional .operations_research.MPSosConstraint.Type type = 1 [default = SOS1_DEFAULT];

    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

    • hasType

      boolean hasType()
      optional .operations_research.MPSosConstraint.Type type = 1 [default = SOS1_DEFAULT];
      Returns:
      Whether the type field is set.
    • getType

      optional .operations_research.MPSosConstraint.Type type = 1 [default = SOS1_DEFAULT];
      Returns:
      The type.
    • getVarIndexList

      List<Integer> getVarIndexList()
       Variable index (w.r.t. the "variable" field of MPModelProto) of the
       variables in the SOS.
       
      repeated int32 var_index = 2;
      Returns:
      A list containing the varIndex.
    • getVarIndexCount

      int getVarIndexCount()
       Variable index (w.r.t. the "variable" field of MPModelProto) of the
       variables in the SOS.
       
      repeated int32 var_index = 2;
      Returns:
      The count of varIndex.
    • getVarIndex

      int getVarIndex(int index)
       Variable index (w.r.t. the "variable" field of MPModelProto) of the
       variables in the SOS.
       
      repeated int32 var_index = 2;
      Parameters:
      index - The index of the element to return.
      Returns:
      The varIndex at the given index.
    • getWeightList

      List<Double> getWeightList()
       Optional: SOS weights. If non-empty, must be of the same size as
       "var_index", and strictly increasing. If empty and required by the
       underlying solver, the 1..n sequence will be given as weights.
       SUBTLE: The weights can help the solver make branch-and-bound decisions
       that fit the underlying optimization model: after each LP relaxation, it
       will compute the "average weight" of the SOS variables, weighted by value
       (this is confusing: here we're using the values as weights), and the binary
       branch decision will be: is the non-zero variable above or below that?
       (weights are strictly monotonous, so the "cutoff" average weight
       corresponds to a "cutoff" index in the var_index sequence).
       
      repeated double weight = 3;
      Returns:
      A list containing the weight.
    • getWeightCount

      int getWeightCount()
       Optional: SOS weights. If non-empty, must be of the same size as
       "var_index", and strictly increasing. If empty and required by the
       underlying solver, the 1..n sequence will be given as weights.
       SUBTLE: The weights can help the solver make branch-and-bound decisions
       that fit the underlying optimization model: after each LP relaxation, it
       will compute the "average weight" of the SOS variables, weighted by value
       (this is confusing: here we're using the values as weights), and the binary
       branch decision will be: is the non-zero variable above or below that?
       (weights are strictly monotonous, so the "cutoff" average weight
       corresponds to a "cutoff" index in the var_index sequence).
       
      repeated double weight = 3;
      Returns:
      The count of weight.
    • getWeight

      double getWeight(int index)
       Optional: SOS weights. If non-empty, must be of the same size as
       "var_index", and strictly increasing. If empty and required by the
       underlying solver, the 1..n sequence will be given as weights.
       SUBTLE: The weights can help the solver make branch-and-bound decisions
       that fit the underlying optimization model: after each LP relaxation, it
       will compute the "average weight" of the SOS variables, weighted by value
       (this is confusing: here we're using the values as weights), and the binary
       branch decision will be: is the non-zero variable above or below that?
       (weights are strictly monotonous, so the "cutoff" average weight
       corresponds to a "cutoff" index in the var_index sequence).
       
      repeated double weight = 3;
      Parameters:
      index - The index of the element to return.
      Returns:
      The weight at the given index.