Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class GreaterThanAtLeastOneOfPropagator
Note: This documentation is automatically generated.
If we have:
- selectors[i] => (target_var >= vars[i] + offset[i])
- and we known that at least one selectors[i] must be true
then we can propagate the fact that if no selectors is chosen yet, the lower
bound of target_var is greater than the min of the still possible
alternatives.
This constraint take care of this case when no selectors[i] is chosen yet.
This constraint support duplicate selectors.
Method |
GreaterThanAtLeastOneOfPropagator | Arguments:
IntegerVariable target_var, const absl::Span<const IntegerVariable> vars,
const absl::Span<const IntegerValue> offsets,
const absl::Span<const Literal> selectors,
const absl::Span<const Literal> enforcements, Model* model |
Propagate | Return type: bool |
RegisterWith | Return type: void Arguments: GenericLiteralWatcher* watcher |
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 `GreaterThanAtLeastOneOfPropagator` class in C++ handles scenarios where at least one selector (selectors[i]) must be true, defined as `target_var \u003e= vars[i] + offset[i]`. When no selector is chosen, it propagates that `target_var`'s lower bound exceeds the minimum of remaining alternatives. It supports duplicate selectors. Key methods include `GreaterThanAtLeastOneOfPropagator` (constructor), `Propagate` (returns a boolean), and `RegisterWith` (registers a `GenericLiteralWatcher`). The constructor takes the target variable, variables, offsets, selectors, enforcements and the model as arguments.\n"],null,[]]