C++ Reference: class IntervalVar

Note: This documentation is automatically generated.

Interval variables are often used in scheduling. The main characteristics of an IntervalVar are the start position, duration, and end date. All these characteristics can be queried and set, and demons can be posted on their modifications.

An important aspect is optionality: an IntervalVar can be performed or not. If unperformed, then it simply does not exist, and its characteristics cannot be accessed any more. An interval var is automatically marked as unperformed when it is not consistent anymore (start greater than end, duration < 0...)
Method
Accept

Return type: virtual void

Arguments: ModelVisitor* const visitor

Accepts the given visitor.

CannotBePerformed

Return type: bool

DurationExpr

Return type: virtual IntExpr*

DurationMax

Return type: virtual int64_t

DurationMin

Return type: virtual int64_t

These methods query, set, and watch the duration of the interval var.

EndExpr

Return type: virtual IntExpr*

EndMax

Return type: virtual int64_t

EndMin

Return type: virtual int64_t

These methods query, set, and watch the end position of the interval var.

IntervalVar

Arguments: Solver* const solver, const std::string& name

~IntervalVar

IsPerformedBound

Return type: bool

MayBePerformed

Return type: virtual bool

MustBePerformed

Return type: virtual bool

These methods query, set, and watch the performed status of the interval var.

OldDurationMax

Return type: virtual int64_t

OldDurationMin

Return type: virtual int64_t

OldEndMax

Return type: virtual int64_t

OldEndMin

Return type: virtual int64_t

OldStartMax

Return type: virtual int64_t

OldStartMin

Return type: virtual int64_t

PerformedExpr

Return type: virtual IntExpr*

SafeDurationExpr

Return type: virtual IntExpr*

Arguments: int64_t unperformed_value

SafeEndExpr

Return type: virtual IntExpr*

Arguments: int64_t unperformed_value

SafeStartExpr

Return type: virtual IntExpr*

Arguments: int64_t unperformed_value

These methods create expressions encapsulating the start, end and duration of the interval var. If the interval var is unperformed, they will return the unperformed_value.

SetDurationMax

Return type: virtual void

Arguments: int64_t m

SetDurationMin

Return type: virtual void

Arguments: int64_t m

SetDurationRange

Return type: virtual void

Arguments: int64_t mi, int64_t ma

SetEndMax

Return type: virtual void

Arguments: int64_t m

SetEndMin

Return type: virtual void

Arguments: int64_t m

SetEndRange

Return type: virtual void

Arguments: int64_t mi, int64_t ma

SetPerformed

Return type: virtual void

Arguments: bool val

SetStartMax

Return type: virtual void

Arguments: int64_t m

SetStartMin

Return type: virtual void

Arguments: int64_t m

SetStartRange

Return type: virtual void

Arguments: int64_t mi, int64_t ma

StartExpr

Return type: virtual IntExpr*

These methods create expressions encapsulating the start, end and duration of the interval var. Please note that these must not be used if the interval var is unperformed.

StartMax

Return type: virtual int64_t

StartMin

Return type: virtual int64_t

These methods query, set, and watch the start position of the interval var.

WasPerformedBound

Return type: virtual bool

WhenAnything

Return type: void

Arguments: Demon* const d

Attaches a demon awakened when anything about this interval changes.

WhenAnything

Return type: void

Arguments: Solver::Closure closure

Attaches a closure awakened when anything about this interval changes.

WhenAnything

Return type: void

Arguments: Solver::Action action

Attaches an action awakened when anything about this interval changes.

WhenDurationBound

Return type: virtual void

Arguments: Demon* const d

WhenDurationBound

Return type: void

Arguments: Solver::Closure closure

WhenDurationBound

Return type: void

Arguments: Solver::Action action

WhenDurationRange

Return type: virtual void

Arguments: Demon* const d

WhenDurationRange

Return type: void

Arguments: Solver::Closure closure

WhenDurationRange

Return type: void

Arguments: Solver::Action action

WhenEndBound

Return type: virtual void

Arguments: Demon* const d

WhenEndBound

Return type: void

Arguments: Solver::Closure closure

WhenEndBound

Return type: void

Arguments: Solver::Action action

WhenEndRange

Return type: virtual void

Arguments: Demon* const d

WhenEndRange

Return type: void

Arguments: Solver::Closure closure

WhenEndRange

Return type: void

Arguments: Solver::Action action

WhenPerformedBound

Return type: virtual void

Arguments: Demon* const d

WhenPerformedBound

Return type: void

Arguments: Solver::Closure closure

WhenPerformedBound

Return type: void

Arguments: Solver::Action action

WhenStartBound

Return type: virtual void

Arguments: Demon* const d

WhenStartBound

Return type: void

Arguments: Solver::Closure closure

WhenStartBound

Return type: void

Arguments: Solver::Action action

WhenStartRange

Return type: virtual void

Arguments: Demon* const d

WhenStartRange

Return type: void

Arguments: Solver::Closure closure

WhenStartRange

Return type: void

Arguments: Solver::Action action