Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class ReservoirConstraint
Note: This documentation is automatically generated.
Method |
AddEvent | Return type: void Arguments: LinearExpr time, int64_t level_change |
AddOptionalEvent | Return type: void Arguments: LinearExpr time, int64_t level_change,
BoolVar is_active |
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."],[[["\u003cp\u003eThe \u003ccode\u003eReservoirConstraint\u003c/code\u003e class in C++ facilitates modeling and solving reservoir management problems using constraint programming.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods like \u003ccode\u003eAddEvent\u003c/code\u003e and \u003ccode\u003eAddOptionalEvent\u003c/code\u003e to define changes in the reservoir's level over time.\u003c/p\u003e\n"],["\u003cp\u003eThese methods utilize \u003ccode\u003eLinearExpr\u003c/code\u003e for representing time and \u003ccode\u003eBoolVar\u003c/code\u003e for optional event activation.\u003c/p\u003e\n"]]],["The `ReservoirConstraint` class in C++ allows defining constraints on a reservoir's level over time. The key actions are: `AddEvent`, which adds an event at a specific time with a corresponding level change, and `AddOptionalEvent`, which does the same but allows the event to be conditionally active based on a `BoolVar`. These methods take a `LinearExpr` for time and an `int64_t` for the level change as their arguments.\n"],null,["# ReservoirConstraint\n\nC++ Reference: class ReservoirConstraint\n========================================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| [`AddEvent`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model.h#L637) | Return type: `void ` Arguments: `LinearExpr time, int64_t level_change` \u003cbr /\u003e |\n| [`AddOptionalEvent`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model.h#L645) | Return type: `void ` Arguments: `LinearExpr time, int64_t level_change, BoolVar is_active` \u003cbr /\u003e |"]]