Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Sat.CumulativeConstraintProto Class Referencesealed

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. More...

Inheritance diagram for Google.OrTools.Sat.CumulativeConstraintProto:

Public Member Functions

 CumulativeConstraintProto ()
 
 CumulativeConstraintProto (CumulativeConstraintProto other)
 
CumulativeConstraintProto Clone ()
 
override bool Equals (object other)
 
bool Equals (CumulativeConstraintProto other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (CumulativeConstraintProto other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int CapacityFieldNumber = 1
 Field number for the "capacity" field.
 
const int IntervalsFieldNumber = 2
 Field number for the "intervals" field.
 
const int DemandsFieldNumber = 3
 Field number for the "demands" field.
 

Properties

static pb::MessageParser< CumulativeConstraintProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
global::Google.OrTools.Sat.LinearExpressionProto Capacity [get, set]
 
pbc::RepeatedField< int > Intervals [get]
 
pbc::RepeatedField< global::Google.OrTools.Sat.LinearExpressionProto > Demands [get]
 Same size as intervals.
 

Detailed Description

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.

Definition at line 2816 of file CpModel.pb.cs.

Constructor & Destructor Documentation

◆ CumulativeConstraintProto() [1/2]

Google.OrTools.Sat.CumulativeConstraintProto.CumulativeConstraintProto ( )
inline

Definition at line 2841 of file CpModel.pb.cs.

◆ CumulativeConstraintProto() [2/2]

Google.OrTools.Sat.CumulativeConstraintProto.CumulativeConstraintProto ( CumulativeConstraintProto other)
inline

Definition at line 2849 of file CpModel.pb.cs.

Member Function Documentation

◆ CalculateSize()

int Google.OrTools.Sat.CumulativeConstraintProto.CalculateSize ( )
inline

Definition at line 2975 of file CpModel.pb.cs.

◆ Clone()

CumulativeConstraintProto Google.OrTools.Sat.CumulativeConstraintProto.Clone ( )
inline

Definition at line 2858 of file CpModel.pb.cs.

◆ Equals() [1/2]

bool Google.OrTools.Sat.CumulativeConstraintProto.Equals ( CumulativeConstraintProto other)
inline

Definition at line 2907 of file CpModel.pb.cs.

◆ Equals() [2/2]

override bool Google.OrTools.Sat.CumulativeConstraintProto.Equals ( object other)
inline

Definition at line 2901 of file CpModel.pb.cs.

◆ GetHashCode()

override int Google.OrTools.Sat.CumulativeConstraintProto.GetHashCode ( )
inline

Definition at line 2922 of file CpModel.pb.cs.

◆ MergeFrom() [1/2]

void Google.OrTools.Sat.CumulativeConstraintProto.MergeFrom ( CumulativeConstraintProto other)
inline

Definition at line 2990 of file CpModel.pb.cs.

◆ MergeFrom() [2/2]

void Google.OrTools.Sat.CumulativeConstraintProto.MergeFrom ( pb.CodedInputStream input)
inline

Definition at line 3007 of file CpModel.pb.cs.

◆ ToString()

override string Google.OrTools.Sat.CumulativeConstraintProto.ToString ( )
inline

Definition at line 2935 of file CpModel.pb.cs.

◆ WriteTo()

void Google.OrTools.Sat.CumulativeConstraintProto.WriteTo ( pb.CodedOutputStream output)
inline

Definition at line 2941 of file CpModel.pb.cs.

Member Data Documentation

◆ CapacityFieldNumber

const int Google.OrTools.Sat.CumulativeConstraintProto.CapacityFieldNumber = 1
static

Field number for the "capacity" field.

Definition at line 2863 of file CpModel.pb.cs.

◆ DemandsFieldNumber

const int Google.OrTools.Sat.CumulativeConstraintProto.DemandsFieldNumber = 3
static

Field number for the "demands" field.

Definition at line 2886 of file CpModel.pb.cs.

◆ IntervalsFieldNumber

const int Google.OrTools.Sat.CumulativeConstraintProto.IntervalsFieldNumber = 2
static

Field number for the "intervals" field.

Definition at line 2875 of file CpModel.pb.cs.

Property Documentation

◆ Capacity

global.Google.OrTools.Sat.LinearExpressionProto Google.OrTools.Sat.CumulativeConstraintProto.Capacity
getset

Definition at line 2867 of file CpModel.pb.cs.

◆ Demands

pbc.RepeatedField<global.Google.OrTools.Sat.LinearExpressionProto> Google.OrTools.Sat.CumulativeConstraintProto.Demands
get

Same size as intervals.

Definition at line 2895 of file CpModel.pb.cs.

◆ Descriptor

pbr.MessageDescriptor Google.OrTools.Sat.CumulativeConstraintProto.Descriptor
staticget

Definition at line 2829 of file CpModel.pb.cs.

◆ Intervals

pbc.RepeatedField<int> Google.OrTools.Sat.CumulativeConstraintProto.Intervals
get

Definition at line 2881 of file CpModel.pb.cs.

◆ Parser

pb.MessageParser<CumulativeConstraintProto> Google.OrTools.Sat.CumulativeConstraintProto.Parser
staticget

Definition at line 2825 of file CpModel.pb.cs.


The documentation for this class was generated from the following file: