Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class SchedulingDemandHelper
Note: This documentation is automatically generated.
Helper class for cumulative constraint to wrap demands and expose concept
like energy.
In a cumulative constraint, an interval always has a size and a demand, but
it can also have a set of "selector" literals each associated with a fixed
size / fixed demands. This allows more precise energy estimation.
TODO(user): Cache energy min and reason for the non O(1) cases.
The "energy" is usually size * demand, but in some non-conventional usage
it might have a more complex formula. In all case, the energy is assumed
to be only consumed during the interval duration.
IMPORTANT: One must call CacheAllEnergyValues() for the values to be
updated. TODO(user): this is error prone, maybe we should revisit. But if
there is many alternatives, we don't want to rescan the list more than a
linear number of time per propagation.
TODO(user): Add more complex EnergyMinBefore(time) once we also support
expressing the interval as a set of alternatives.
When defined, the interval will consume this much demand during its whole
duration. Some propagator only relies on the "energy" and thus never uses
this.
Arguments: int t, IntegerValue window_start,
IntegerValue window_end
Returns the energy min in [start, end].
Note(user): These functions are not in O(1) if the decomposition is used,
so we have to be careful in not calling them too often.
[[["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 `SchedulingDemandHelper` class in C++ assists with cumulative constraints by wrapping demands and providing energy-related functionalities."],["It allows intervals to have selectors associated with fixed sizes and demands, enabling more accurate energy estimations."],["Energy, often calculated as size multiplied by demand, can have complex formulas and is assumed to be consumed during the interval's duration."],["The class provides methods to manage and access demand and energy information, including minimum, maximum, and caching capabilities."],["`CacheAllEnergyValues()` must be called for the energy values to be updated, and certain energy-related functions may not be O(1) in specific scenarios."]]],["The `SchedulingDemandHelper` class manages demands and energy concepts within cumulative constraints. It handles interval properties like `DemandMin`, `DemandMax`, `EnergyMin`, `EnergyMax`, and `EnergyMinInWindow`. Key actions include caching energy values (`CacheAllEnergyValues`), decreasing energy maximums (`DecreaseEnergyMax`), and providing reasons for minimum demand/energy (`AddDemandMinReason`, `AddEnergyMinReason`, `AddEnergyMinInWindowReason`). It also supports overriding energies with `OverrideDecomposedEnergies` and `OverrideLinearizedEnergies`. It uses demands, size, and selectors to estimate energy and its use during the duration of an interval.\n"]]