Allow several diversions on one node location
Background issue
Limitation for combination with "Diversion nodes"
Currently, Diversion nodes can only be located in nodes with GR model. And this limitation is due to the use of a single matrix Qobs
(or the new Qinf
cf. #120) for supplying data to Reservoir, Direct injection, and Diversion nodes. In such cases, because each of this node types needs a dedicated column in Qobs/Qinf
it's impossible, for instance, to add a Diversion on a Reservoir release.
Limitation for combining multiple abstractions at the same location
Because only one Diversion can be attached to a GR node, in case of multiple usages in the same node, the user needs to aggregate all abstractions for this location in order to provide the matrix Qobs/Qinf
of influence flows to CreateInputsModel
.
Proposal
Use specific ID for Diversion nodes
I propose to use a specific ID for Diversion nodes in order to be able to identify each Diversion. This ID would be a composition containing the node ID for specifying its location as follow: [abstraction name]@[node id]
So we would be able to have Diversion named irrigation@MyGaugingStation
or DrinkingWater@MyReservoir
.
These IDs would be then use as column name in Qobs/Qinf
in order to differentiate the water released by a reservoir and the water diverted immediately downstream the reservoir release.
Coping the restriction issue in case of multiple Diversions
CreateInputsModel
has a parameter Qmin
with a default value equals zero. Whatever the user plans to abstract with the Diversion, the abstraction will be limited in order that the flow Qmin
remains in the river downstream the Diversion.
Allowing multiple Diversions raises the issue on how dispatching restrictions when the total amount of abstractions exceed to maximum available water related to Qmin
.
Restriction rule possibilities are infinite and any implementation would consider complexe objects and algorithms that are not relevant here.
So I propose a simple standard solution which consist to apply a restriction of same proportion for each abstraction considering that Qmin
is unique for all Derivations in a given location.