Class CumulativeConstraintProto

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.ortools.sat.CumulativeConstraintProto
All Implemented Interfaces:
CumulativeConstraintProtoOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class CumulativeConstraintProto extends com.google.protobuf.GeneratedMessage implements CumulativeConstraintProtoOrBuilder
 The sum of the demands of the intervals at each interval point cannot exceed
 a capacity. Note that intervals are interpreted as [start, end) and as
 such intervals like [2,3) and [3,4) do not overlap for the point of view of
 this constraint. Moreover, intervals of size zero are ignored.

 All demands must not contain any negative value in their domains. This is
 checked at validation. Even if there are no intervals, this constraint
 implicit enforces capacity >= 0. In other words, a negative capacity is
 considered valid but always infeasible.
 
Protobuf type operations_research.sat.CumulativeConstraintProto
See Also:
  • Field Details

  • 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
    • hasCapacity

      public boolean hasCapacity()
      .operations_research.sat.LinearExpressionProto capacity = 1;
      Specified by:
      hasCapacity in interface CumulativeConstraintProtoOrBuilder
      Returns:
      Whether the capacity field is set.
    • getCapacity

      public LinearExpressionProto getCapacity()
      .operations_research.sat.LinearExpressionProto capacity = 1;
      Specified by:
      getCapacity in interface CumulativeConstraintProtoOrBuilder
      Returns:
      The capacity.
    • getCapacityOrBuilder

      public LinearExpressionProtoOrBuilder getCapacityOrBuilder()
      .operations_research.sat.LinearExpressionProto capacity = 1;
      Specified by:
      getCapacityOrBuilder in interface CumulativeConstraintProtoOrBuilder
    • getIntervalsList

      public List<Integer> getIntervalsList()
      repeated int32 intervals = 2;
      Specified by:
      getIntervalsList in interface CumulativeConstraintProtoOrBuilder
      Returns:
      A list containing the intervals.
    • getIntervalsCount

      public int getIntervalsCount()
      repeated int32 intervals = 2;
      Specified by:
      getIntervalsCount in interface CumulativeConstraintProtoOrBuilder
      Returns:
      The count of intervals.
    • getIntervals

      public int getIntervals(int index)
      repeated int32 intervals = 2;
      Specified by:
      getIntervals in interface CumulativeConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The intervals at the given index.
    • getDemandsList

      public List<LinearExpressionProto> getDemandsList()
       Same size as intervals.
       
      repeated .operations_research.sat.LinearExpressionProto demands = 3;
      Specified by:
      getDemandsList in interface CumulativeConstraintProtoOrBuilder
    • getDemandsOrBuilderList

      public List<? extends LinearExpressionProtoOrBuilder> getDemandsOrBuilderList()
       Same size as intervals.
       
      repeated .operations_research.sat.LinearExpressionProto demands = 3;
      Specified by:
      getDemandsOrBuilderList in interface CumulativeConstraintProtoOrBuilder
    • getDemandsCount

      public int getDemandsCount()
       Same size as intervals.
       
      repeated .operations_research.sat.LinearExpressionProto demands = 3;
      Specified by:
      getDemandsCount in interface CumulativeConstraintProtoOrBuilder
    • getDemands

      public LinearExpressionProto getDemands(int index)
       Same size as intervals.
       
      repeated .operations_research.sat.LinearExpressionProto demands = 3;
      Specified by:
      getDemands in interface CumulativeConstraintProtoOrBuilder
    • getDemandsOrBuilder

      public LinearExpressionProtoOrBuilder getDemandsOrBuilder(int index)
       Same size as intervals.
       
      repeated .operations_research.sat.LinearExpressionProto demands = 3;
      Specified by:
      getDemandsOrBuilder in interface CumulativeConstraintProtoOrBuilder
    • 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 CumulativeConstraintProto parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static CumulativeConstraintProto.Builder newBuilder()
    • newBuilder

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

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

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

      public static CumulativeConstraintProto getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<CumulativeConstraintProto> 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 CumulativeConstraintProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder