Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class IntervalsRepository
Note: This documentation is automatically generated.
This class maintains a set of intervals which correspond to three integer
variables (start, end and size). It automatically registers with the
PrecedencesPropagator the relation between the bounds of each interval and
provides many helper functions to add precedences relation between intervals.
Functions to add a new interval to the repository.
If add_linear_relation is true, then we also link start, size and end.
- If size == kNoIntegerVariable, then the size is fixed to fixed_size.
- If is_present != kNoLiteralIndex, then this is an optional interval.
The 3 integer variables associated to a interval.
Fixed size intervals will have a kNoIntegerVariable as size.
Note: For an optional interval, the start/end variables are propagated
asssuming the interval is present. Because of that, these variables can
cross each other or have an empty domain. If any of this happen, then the
PresenceLiteral() of this interval will be propagated to false.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["The `IntervalsRepository` class in C++ manages a collection of intervals, each defined by a start, end, and size."],["It integrates with the PrecedencesPropagator to establish relationships between interval bounds."],["Provides helper functions for creating intervals, accessing their properties (start, end, size), and managing their presence (optional or required)."],["Offers methods to retrieve all intervals or a specific interval's components, along with utilities like `GetOrCreateHelper` for scheduling constraints."],["Intervals can be fixed-size or have variable sizes, and they can be optional, meaning their presence is controlled by a literal."]]],["The `IntervalsRepository` class manages intervals defined by start, end, and size integer variables. It provides functions to `CreateInterval`, retrieve all intervals via `AllIntervals`, and obtain counts with `NumIntervals`. The class also offers methods to access interval properties like `Start`, `End`, `Size`, `MinSize`, and `MaxSize`. It determines if an interval is `IsPresent` or `IsOptional` and returns a corresponding `PresenceLiteral`. Additionally it can return a `SchedulingConstraintHelper` for a set of variables.\n"]]