Stay organized with collections
Save and categorize content based on your preferences.
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["The `IntervalVar` class in C++ provides methods to interact with interval constraints. Key actions include retrieving properties like the start, end, and size expressions via `StartExpr`, `EndExpr`, and `SizeExpr`. You can also get the interval's index with `index`, name with `Name`, and a debug string via `DebugString`. `WithName` sets the interval's name, and `PresenceBoolVar` to get a BoolVar. `IntervalVar` can be default constructed, but is not meant to be passed to functions.\n"]]