C++ Reference: class IntervalVar

Note: This documentation is automatically generated.

Method
DebugString

Return type: std::string

Returns a debug string.

EndExpr

Return type: LinearExpr

Returns the end linear expression. Note that this rebuilds the expression each time this method is called.

index

Return type: int

Returns the index of the interval constraint in the model.

IntervalVar

A default constructed IntervalVar can be used to mean not defined yet. However, it shouldn't be passed to any of the functions in this file. Doing so will crash in debug mode and will result in an invalid model in opt mode.

Name

Return type: std::string

Returns the name of the interval (or the empty string if not set).

PresenceBoolVar

Return type: BoolVar

SizeExpr

Return type: LinearExpr

Returns the size linear expression. Note that this rebuilds the expression each time this method is called.

StartExpr

Return type: LinearExpr

Returns the start linear expression. Note that this rebuilds the expression each time this method is called.

WithName

Return type: IntervalVar

Arguments: const std::string& name

Sets the name of the variable.