Class MPModelDeltaProto.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
com.google.ortools.linearsolver.MPModelDeltaProto.Builder
All Implemented Interfaces:
MPModelDeltaProtoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
MPModelDeltaProto

public static final class MPModelDeltaProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder> implements MPModelDeltaProtoOrBuilder
 Encodes a full MPModelProto by way of referencing to a "baseline"
 MPModelProto stored in a file, and a "delta" to apply to this model.
 
Protobuf type operations_research.MPModelDeltaProto
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
    • clear

      public MPModelDeltaProto.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
    • getDefaultInstanceForType

      public MPModelDeltaProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public MPModelDeltaProto build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MPModelDeltaProto buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public MPModelDeltaProto.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
    • mergeFrom

      public MPModelDeltaProto.Builder mergeFrom(MPModelDeltaProto other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
    • mergeFrom

      public MPModelDeltaProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
      Throws:
      IOException
    • hasBaselineModelFilePath

      public boolean hasBaselineModelFilePath()
      optional string baseline_model_file_path = 1;
      Specified by:
      hasBaselineModelFilePath in interface MPModelDeltaProtoOrBuilder
      Returns:
      Whether the baselineModelFilePath field is set.
    • getBaselineModelFilePath

      public String getBaselineModelFilePath()
      optional string baseline_model_file_path = 1;
      Specified by:
      getBaselineModelFilePath in interface MPModelDeltaProtoOrBuilder
      Returns:
      The baselineModelFilePath.
    • getBaselineModelFilePathBytes

      public com.google.protobuf.ByteString getBaselineModelFilePathBytes()
      optional string baseline_model_file_path = 1;
      Specified by:
      getBaselineModelFilePathBytes in interface MPModelDeltaProtoOrBuilder
      Returns:
      The bytes for baselineModelFilePath.
    • setBaselineModelFilePath

      public MPModelDeltaProto.Builder setBaselineModelFilePath(String value)
      optional string baseline_model_file_path = 1;
      Parameters:
      value - The baselineModelFilePath to set.
      Returns:
      This builder for chaining.
    • clearBaselineModelFilePath

      public MPModelDeltaProto.Builder clearBaselineModelFilePath()
      optional string baseline_model_file_path = 1;
      Returns:
      This builder for chaining.
    • setBaselineModelFilePathBytes

      public MPModelDeltaProto.Builder setBaselineModelFilePathBytes(com.google.protobuf.ByteString value)
      optional string baseline_model_file_path = 1;
      Parameters:
      value - The bytes for baselineModelFilePath to set.
      Returns:
      This builder for chaining.
    • getVariableOverridesCount

      public int getVariableOverridesCount()
      Description copied from interface: MPModelDeltaProtoOrBuilder
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
      Specified by:
      getVariableOverridesCount in interface MPModelDeltaProtoOrBuilder
    • containsVariableOverrides

      public boolean containsVariableOverrides(int key)
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
      Specified by:
      containsVariableOverrides in interface MPModelDeltaProtoOrBuilder
    • getVariableOverrides

      @Deprecated public Map<Integer, MPVariableProto> getVariableOverrides()
      Deprecated.
      Specified by:
      getVariableOverrides in interface MPModelDeltaProtoOrBuilder
    • getVariableOverridesMap

      public Map<Integer, MPVariableProto> getVariableOverridesMap()
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
      Specified by:
      getVariableOverridesMap in interface MPModelDeltaProtoOrBuilder
    • getVariableOverridesOrDefault

      public MPVariableProto getVariableOverridesOrDefault(int key, MPVariableProto defaultValue)
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
      Specified by:
      getVariableOverridesOrDefault in interface MPModelDeltaProtoOrBuilder
    • getVariableOverridesOrThrow

      public MPVariableProto getVariableOverridesOrThrow(int key)
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
      Specified by:
      getVariableOverridesOrThrow in interface MPModelDeltaProtoOrBuilder
    • clearVariableOverrides

      public MPModelDeltaProto.Builder clearVariableOverrides()
    • removeVariableOverrides

      public MPModelDeltaProto.Builder removeVariableOverrides(int key)
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
    • getMutableVariableOverrides

      @Deprecated public Map<Integer, MPVariableProto> getMutableVariableOverrides()
      Deprecated.
      Use alternate mutation accessors instead.
    • putVariableOverrides

      public MPModelDeltaProto.Builder putVariableOverrides(int key, MPVariableProto value)
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
    • putAllVariableOverrides

      public MPModelDeltaProto.Builder putAllVariableOverrides(Map<Integer, MPVariableProto> values)
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
    • putVariableOverridesBuilderIfAbsent

      public MPVariableProto.Builder putVariableOverridesBuilderIfAbsent(int key)
       The variable protos listed here will override (via MergeFrom()) the ones
       in the baseline model: you only need to specify the fields that change.
       To add a new variable, add it with a new variable index (variable indices
       still need to span a dense integer interval).
       You can't "delete" a variable but you can "neutralize" it by fixing its
       value, setting its objective coefficient to zero, and by nullifying all
       the terms involving it in the constraints.
       
      map<int32, .operations_research.MPVariableProto> variable_overrides = 2;
    • getConstraintOverridesCount

      public int getConstraintOverridesCount()
      Description copied from interface: MPModelDeltaProtoOrBuilder
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
      Specified by:
      getConstraintOverridesCount in interface MPModelDeltaProtoOrBuilder
    • containsConstraintOverrides

      public boolean containsConstraintOverrides(int key)
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
      Specified by:
      containsConstraintOverrides in interface MPModelDeltaProtoOrBuilder
    • getConstraintOverrides

      @Deprecated public Map<Integer, MPConstraintProto> getConstraintOverrides()
      Deprecated.
      Specified by:
      getConstraintOverrides in interface MPModelDeltaProtoOrBuilder
    • getConstraintOverridesMap

      public Map<Integer, MPConstraintProto> getConstraintOverridesMap()
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
      Specified by:
      getConstraintOverridesMap in interface MPModelDeltaProtoOrBuilder
    • getConstraintOverridesOrDefault

      public MPConstraintProto getConstraintOverridesOrDefault(int key, MPConstraintProto defaultValue)
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
      Specified by:
      getConstraintOverridesOrDefault in interface MPModelDeltaProtoOrBuilder
    • getConstraintOverridesOrThrow

      public MPConstraintProto getConstraintOverridesOrThrow(int key)
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
      Specified by:
      getConstraintOverridesOrThrow in interface MPModelDeltaProtoOrBuilder
    • clearConstraintOverrides

      public MPModelDeltaProto.Builder clearConstraintOverrides()
    • removeConstraintOverrides

      public MPModelDeltaProto.Builder removeConstraintOverrides(int key)
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
    • getMutableConstraintOverrides

      @Deprecated public Map<Integer, MPConstraintProto> getMutableConstraintOverrides()
      Deprecated.
      Use alternate mutation accessors instead.
    • putConstraintOverrides

      public MPModelDeltaProto.Builder putConstraintOverrides(int key, MPConstraintProto value)
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
    • putAllConstraintOverrides

      public MPModelDeltaProto.Builder putAllConstraintOverrides(Map<Integer, MPConstraintProto> values)
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;
    • putConstraintOverridesBuilderIfAbsent

      public MPConstraintProto.Builder putConstraintOverridesBuilderIfAbsent(int key)
       Constraints can be changed (or added) in the same way as variables, see
       above. It's mostly like applying MergeFrom(), except that:
       - the "var_index" and "coefficient" fields will be overridden like a map:
       if a key pre-exists, we overwrite its value, otherwise we add it.
       - if you set the lower bound to -inf and the upper bound to +inf, thus
       effectively neutralizing the constraint, the solver will implicitly
       remove all of the constraint's terms.
       
      map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;