Deltares / Ribasim

Water resources modeling
https://ribasim.org/
MIT License
39 stars 5 forks source link

Allow `Pump` and `Outlet` nodes to be controlled by allocation #714

Open SouthEndMusic opened 10 months ago

SouthEndMusic commented 10 months ago

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 a Pump or Outlet 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

Validation

Reasons why I prefer this over the original idea

SouthEndMusic commented 10 months ago

Also make sure that there are no conflicts between 'normal' control and control coming from allocation. This is probably a validation issue.

gijsber commented 10 months ago

Let's try whether allocation can update the setpoints for control instead of setting the control actions itself.

visr commented 10 months ago

For a subnetwork with an inlet to the main network, we want to:

  1. sunetwork determine the desired inflow from the inlet, assuming max inlet capacity
  2. top-level allocation subnetwork has all subnetworks aggregated as users, and sets the flow to the inlets
  3. subnetwork allocates the flow over the inlet to the individual users

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.

SouthEndMusic commented 8 months ago

@visr this issue is not about connections between the main network and subnetworks, I propose moving that discussion to https://github.com/Deltares/Ribasim/issues/768.

SouthEndMusic commented 6 months ago

It came out of a discussion with @SnippenE @visr that a good way to approach this is to actually expand the capabilities of DiscreteControl, in the sense that conditions can be placed on allocation flows.

visr commented 4 months ago

For an downstream demand driven Outlet or Pump, we can support setting a special control state "allocation", which will set the flow_rate to the cumulative allocation flows over all priorities on the outcoming (or ingoing) edge.

We can add a validation rule that the control_state in DiscreteControl / logic is not allowed to be "allocation". If need be we could support that in the future.

visr commented 4 months ago

After discussing this together, I have the following proposal: