DotNet Reference

.Net Reference

Detailed Description

This "special" constraint not only enforces (start + size == end) and (size >= 0) but can also be referred by other constraints using this "interval" concept.

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

Public Member Functions

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

Static Public Attributes

const int StartFieldNumber = 1
 Field number for the "start" field. More...
 
const int EndFieldNumber = 2
 Field number for the "end" field. More...
 
const int SizeFieldNumber = 3
 Field number for the "size" field. More...
 
const int StartViewFieldNumber = 4
 Field number for the "start_view" field. More...
 
const int EndViewFieldNumber = 5
 Field number for the "end_view" field. More...
 
const int SizeViewFieldNumber = 6
 Field number for the "size_view" field. More...
 

Properties

static pb::MessageParser< IntervalConstraintProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
int Start [get, set]
 
int End [get, set]
 
int Size [get, set]
 
global::Google.OrTools.Sat.LinearExpressionProto StartView [get, set]
 EXPERIMENTAL: This will become the new way to specify an interval. More...
 
global::Google.OrTools.Sat.LinearExpressionProto EndView [get, set]
 
global::Google.OrTools.Sat.LinearExpressionProto SizeView [get, set]
 

Constructor & Destructor Documentation

◆ IntervalConstraintProto() [1/2]

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

◆ IntervalConstraintProto() [2/2]

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

Member Function Documentation

◆ CalculateSize()

int CalculateSize ( )
inline

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

◆ Clone()

IntervalConstraintProto Clone ( )
inline

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

◆ Equals() [1/2]

bool Equals ( IntervalConstraintProto  other)
inline

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

◆ Equals() [2/2]

override bool Equals ( object  other)
inline

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

◆ GetHashCode()

override int GetHashCode ( )
inline

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

◆ MergeFrom() [1/2]

void MergeFrom ( IntervalConstraintProto  other)
inline

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

◆ MergeFrom() [2/2]

void MergeFrom ( pb::CodedInputStream  input)
inline

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

◆ ToString()

override string ToString ( )
inline

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

◆ WriteTo()

void WriteTo ( pb::CodedOutputStream  output)
inline

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

Member Data Documentation

◆ EndFieldNumber

const int EndFieldNumber = 2
static

Field number for the "end" field.

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

◆ EndViewFieldNumber

const int EndViewFieldNumber = 5
static

Field number for the "end_view" field.

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

◆ SizeFieldNumber

const int SizeFieldNumber = 3
static

Field number for the "size" field.

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

◆ SizeViewFieldNumber

const int SizeViewFieldNumber = 6
static

Field number for the "size_view" field.

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

◆ StartFieldNumber

const int StartFieldNumber = 1
static

Field number for the "start" field.

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

◆ StartViewFieldNumber

const int StartViewFieldNumber = 4
static

Field number for the "start_view" field.

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

Property Documentation

◆ Descriptor

pbr.MessageDescriptor Descriptor
staticget

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

◆ End

int End
getset

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

◆ EndView

global.Google.OrTools.Sat.LinearExpressionProto EndView
getset

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

◆ Parser

pb.MessageParser<IntervalConstraintProto> Parser
staticget

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

◆ Size

int Size
getset

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

◆ SizeView

global.Google.OrTools.Sat.LinearExpressionProto SizeView
getset

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

◆ Start

int Start
getset

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

◆ StartView

global.Google.OrTools.Sat.LinearExpressionProto StartView
getset

EXPERIMENTAL: This will become the new way to specify an interval.

Depending on the parameters, the presolve will convert the old way to the new way. Do not forget to add an associated linear constraint if you use this directly.

If any of this field is set, then all must be set and the ones above will be ignored.

IMPORTANT: For now, this constraint do not enforce any relations on the view, and a linear constraint must be added together with this to enforce enforcement => start_view + size_view == end_view. An enforcement => size_view >=0 might also be needed.

IMPORTANT: For now, we just support affine relation. We could easily create an intermediate variable to support full linear expression, but this isn't done currently.

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


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