Commit 0fb9d7dc authored by David's avatar David
Browse files

docs: changes in RunModel.Supervisor example

- Simplify date selection

Refs #100
Showing with 12 additions and 12 deletions
+12 -12
...@@ -95,9 +95,9 @@ funDamLogic <- factoryDamLogic( ...@@ -95,9 +95,9 @@ funDamLogic <- factoryDamLogic(
CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic)
# GRiwrmRunOptions object simulation of the hydrological year 2002-2003 # GRiwrmRunOptions object simulation of the hydrological year 2002-2003
IndPeriod_Run <- seq.int( IndPeriod_Run <- which(
which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15", tz = "UTC")), DatesR >= as.POSIXct("2002-10-15", tz = "UTC") &
length.out = 365 DatesR <= as.POSIXct("2003-10-15", tz = "UTC")
) )
IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1)
RO_severn <- CreateRunOptions( RO_severn <- CreateRunOptions(
......
...@@ -140,9 +140,9 @@ funDamLogic <- factoryDamLogic( ...@@ -140,9 +140,9 @@ funDamLogic <- factoryDamLogic(
CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic)
# GRiwrmRunOptions object simulation of the hydrological year 2002-2003 # GRiwrmRunOptions object simulation of the hydrological year 2002-2003
IndPeriod_Run <- seq.int( IndPeriod_Run <- which(
which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15", tz = "UTC")), DatesR >= as.POSIXct("2002-10-15", tz = "UTC") &
length.out = 365 DatesR <= as.POSIXct("2003-10-15", tz = "UTC")
) )
IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1)
RO_severn <- CreateRunOptions( RO_severn <- CreateRunOptions(
......
...@@ -122,9 +122,9 @@ funDamLogic <- factoryDamLogic( ...@@ -122,9 +122,9 @@ funDamLogic <- factoryDamLogic(
CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic)
# GRiwrmRunOptions object simulation of the hydrological year 2002-2003 # GRiwrmRunOptions object simulation of the hydrological year 2002-2003
IndPeriod_Run <- seq.int( IndPeriod_Run <- which(
which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15", tz = "UTC")), DatesR >= as.POSIXct("2002-10-15", tz = "UTC") &
length.out = 365 DatesR <= as.POSIXct("2003-10-15", tz = "UTC")
) )
IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1)
RO_severn <- CreateRunOptions( RO_severn <- CreateRunOptions(
......
...@@ -119,9 +119,9 @@ funDamLogic <- factoryDamLogic( ...@@ -119,9 +119,9 @@ funDamLogic <- factoryDamLogic(
CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic)
# GRiwrmRunOptions object simulation of the hydrological year 2002-2003 # GRiwrmRunOptions object simulation of the hydrological year 2002-2003
IndPeriod_Run <- seq.int( IndPeriod_Run <- which(
which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15", tz = "UTC")), DatesR >= as.POSIXct("2002-10-15", tz = "UTC") &
length.out = 365 DatesR <= as.POSIXct("2003-10-15", tz = "UTC")
) )
IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1)
RO_severn <- CreateRunOptions( RO_severn <- CreateRunOptions(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment