C++ Reference: class IntervalVar
This documentation is automatically generated.
Represents a Interval variable.
An interval variable is both a constraint and a variable. It is defined by three integer variables: start, size, and end.
It is a constraint because, internally, it enforces that start + size == end.
It is also a variable as it can appear in specific scheduling constraints: NoOverlap, NoOverlap2D, Cumulative.
Optionally, a presence literal can be added to this constraint. This presence literal is understood by the same constraints. These constraints ignore interval variables with precence literals assigned to false. Conversely, these constraints will also set these presence literals to false if they cannot fit these intervals into the schedule.
It can only be constructed via \c CpModelBuilder.NewIntervalVar().
Returns a debug std::string.
Returns the end variable.
Returns the index of the interval constraint in the model.
Returns the mutable underlying protobuf object (useful for model edition).
Returns the name of the interval (or the empty std::string if not set).
Returns a BoolVar indicating the presence of this interval. It returns \c CpModelBuilder.TrueVar() if the interval is not optional.
Returns the underlying protobuf object (useful for testing).
Returns the size variable.
Returns the start variable.
Sets the name of the variable.