-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support conditions on linear combinations of variables for DiscreteControl
#1371
Conversation
I Had some problems with the table name |
DiscreteControl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR! 👍🏻 I wonder if we should change the input tables slightly (but it would be breaking).
Specifically, compoundvariable is now mostly a repeat of condition, with the change of only a single field (added weight, dropped greater_than). Furthermore, condition is changed that type can take "compound", while the node_id is ignored.
I wonder whether we should split condition into condition and variable, where variable can be compound if a id occurs multiple times. listen-*, variable and look ahead are then all dropped/moved.
Some clarifications for the latest commits:
|
Fixes #1346.
Upgrade instructions
This is a breaking change to the DiscreteControl tables, that makes it possible to listen to a weighted combination of multiple variables. Until so far we were only able to listen to one variable, like the water level in a particular Basin.
To listen to the average of four water levels, you can assign a weight of 0.25 to each. To listen to the difference of two water levels, you can assign a weight of 1 to one, and -1 to the other.
For a description of the new table schemas, see https://deltares.github.io/Ribasim/core/usage.html#sec-discrete-control. The combinations of variables are called compound variables, and are identified by a shared
compound_variable_id
.