CreateSupervisor [Breaking change]: Only allow to apply a command on DirectInjection and Diversion nodes
The issue #95 (closed) introduces "Diversion" nodes which are declared in the GRiwrm object by duplicating the line of the node containing the diversion.
Current version of RunModel.Supervisor
allows to modify the flow (modelled or input) on any node in the network and the nodes are declared by their id. On nodes containing a "Diversion", 3 flows are available: the "natural" flow before the diversion, the diverted flow, and the flow remaining in the river after the diversion. In this situation, which flow is supposed to be modified?
Allowing to apply a modification of the flow on any node including the one with flows simulated by hydrological models doesn't make a real sense since regulation and control is supposed to be applied on human infrastructure which are represented by "DirectInjection" and "Diversion" nodes. Moreover, this way of view is consistant with the content of the Qobs
variable in CreateIntputsModel
: the flow directly injected in the model for the "DirectInjection" nodes and the diverted flow for the "Diversion" nodes.
On that basis, I propose to limit the application of Supervision commands "U" only on these 2 types of nodes which give us the advantage that we can continue to use the id of the node to defined where is the flow modified by the command because there can't have any confusion on which flow is modified (injected flow or diverted flow depending on the node type).