RunModel of GRiwrm networks: add a data.frame of simulated flows in OutputsModel
GRiwrmOutputsModel produced by either
RunModel.Supervisor produce a list of
airGR::OutputsModel where only GR or GRSD outputs are available.
It would be consistant to get a data.frame with dates and one column by node of the complete GRiwrm network in these outputs including flows that don't depend on a model like injected flows (see vignette V03) or flows influenced by a controller.
There are two possibilities for storing such a data.frame in the
- add a specific items between other items of the list which are
airGR::OutputsModelobjects. This item should be named with a reserved name (E.g.: "__Qsim__") in order to not match with an existing node name.
- add an attribute "Qsim" to the
attr(x, "Qsim") <- data.frame(...).
Second solution has my preference because grouping
airGR::OutputsModel object and a data.frame in the same list forces to handle exception in any process that loop over the list items of
GRiwrmOutputsModel. Retrieving the data.frame is then done with the simple instruction:
attr(x, "Qsim") with