-
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
Allow Pump
and Outlet
nodes to be controlled by allocation
#714
Comments
Also make sure that there are no conflicts between 'normal' control and control coming from allocation. This is probably a validation issue. |
Let's try whether allocation can update the setpoints for control instead of setting the control actions itself. |
For a subnetwork with an inlet to the main network, we want to:
Flow over an inlet (Outlet or Pump) can be set by either allocation or control, but not both. Initially this can be up to the user to avoid conflicts, though perhaps we can add validation for this later. |
control_state
= "allocation"
For an downstream demand driven Outlet or Pump, we can support setting a special control state We can add a validation rule that the |
control_state
= "allocation"Pump
and Outlet
nodes to be controlled by allocation
After discussing this together, I have the following proposal:
|
What
After a refinement session, we (@SouthEndMusic, @gijsber, @visr) came to the conclusion that it would be nice to have a special control state "allocation", which is not defined via the
static
tables but means that the flow of aPump
orOutlet
is set by allocation. However, when working out this issue so that @Jingru923 can collaborate on it, I came to some slightly different ideas on how to mark a node as being controlled by allocation, see below.How
static
tables ofPump
andOutlet
namedcontrolled_by
, with allowed values "nothing" (default), "allocation" and "PID". We could set PID controllable nodes to PID by default to avoid a breaking change.Pump
andOutlet
nodes to indicate if and how they are controlled: The allocation algorithm must know which nodes are allocation controlled so that theirflow_rate
can be set. These nodes already have a boolean flagis_pid_controlled
, so instead of adding a new flag, let's modify this one to an enumeratorControlType
with values of thecontrolled_by
options above.flow_rate
: after a run of the allocation algorithm, the flow through nodes that are allocation controlled must be computed and assigned. The assigned flow must be the sum over the priorities of the flow through the inflow edge of allocation controlled nodes. This sum can be computed during the allocation algorithm in pre-allocated memory, or be computed afterwards using the data in theflow_record
(@visr let me know whether you think the latter is a good idea).water_balance!
.Validation
Reasons why I prefer this over the original idea
DiscreteControl
getting involved;DiscreteControl
can change the control type during simulation (for PID control it must be checked whether it is available for the node, preferably during initialization). Note that this means thatDiscreteControl
overarches the other control types, which is also why it is not one of theControlType
options.The text was updated successfully, but these errors were encountered: