
RunModel for hot restart after a previous simulation period
Source:R/RunModel.GRiwrmOutputsModel.R
RunModel.GRiwrmOutputsModel.RdThis function restarts a simulation using the state at the end of a previous
simulation (GRiwrmOutputsModel object x). It allows redefining the
boundary conditions Qinf, Qrelease, and Qmin for the new period.
Usage
# S3 method for class 'GRiwrmOutputsModel'
RunModel(
x,
InputsModel,
RunOptions,
IndPeriod_Run = which(InputsModel[[1]]$DatesR %in% DatesR),
DatesR = getNextTimeSteps(x),
Qinf = NULL,
Qrelease = NULL,
Qmin = NULL,
merge_outputs = TRUE,
...
)Arguments
- x
GRiwrmOutputsModelobject resulting from a previous run.- InputsModel
GRiwrmInputsModelobject (see CreateInputsModel.GRiwrm) orSupervisorobject (see CreateSupervisor).- RunOptions
List of run options created with CreateRunOptions.
- IndPeriod_Run
Integer vector indicating the indices of the time steps to run. Must start at the index immediately following the previous run.
- DatesR
(optional)
POSIXtvector of dates for the simulation period. See details.- Qinf
(optional)
matrixordata.frameofnumericobserved flows for nodes of type "Direct injection" and "Diversion" (m³ per time step). Column names correspond to node IDs. Negative flows are abstracted from the model and positive flows are injected to the model. See details.- Qrelease
(optional)
matrixordata.frameofnumericrelease flows by nodes using the modelRunModel_Reservoir(m³ per time step). See details.- Qmin
(optional)
matrixordata.frameofnumericminimum flows for downstream of a Diversion node (m³ per time step). Default is zero. Column names correspond to node IDs. See details.- merge_outputs
logicalMerge simulation outputs with the one provided in argumentx.- ...
Further arguments for compatibility with S3 methods.
Value
An object of class GRiwrmOutputsModel (see RunModel.GRiwrmInputsModel
for details).
Details
IndPeriod_Run or DatesR must be continuous periods starting the time step
after the last simulation time step of the GRiwrmOutputsModel object
provided through the argument x.
Qinf, Qmin, and Qrelease are used to overwrite the corresponding
arguments provided to CreateInputsModel.GRiwrm for the period to be
simulated. Therefore, the number of rows of these arguments must correspond
to IndPeriod_Run or DatesR lengths.
See also
CreateGRiwrm(), CreateInputsModel.GRiwrm(), CreateRunOptions()
Vignette "V07_Combine_tactical_operational_management" in package airGRiwrm