simcast_hydro: Simulate water supply reservoir operations informed by...

Description Usage Arguments Value Examples

View source: R/mpc_hydro.R

Description

For simulating a water supply reservoir operated with rolling horizon, adaptive control (Model Predictive Control).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
simcast_hydro(
  Q,
  forecast,
  start_yr,
  capacity,
  capacity_live = capacity,
  surface_area,
  max_depth,
  evap,
  installed_cap,
  head,
  qmax,
  efficiency = 0.9,
  S_disc = 1000,
  R_disc = 10,
  Q_disc = c(0, 0.2375, 0.475, 0.7125, 0.95, 1),
  S_initial = 1,
  plot = TRUE
)

Arguments

Q

time series object. Observed reservoir inflow totals. Recommended units: Mm^3 (Million cubic meters).

forecast

matrix: N * H, where N is the number of forecast-issue periods and H is the forecast horizon (i.e., number of periods) .

start_yr

the start year of the forecast. If the 'Q' and 'forecast' parameters have the same start year then leave blank.

capacity

numerical. The reservoir storage capacity. Recommended units: Mm^3 (Million cubic meters).

capacity_live

numerical. The volume of usable water in the reservoir ("live capacity" or "active storage"). capacity_live <= capacity. Default capacity_live = capacity. Must be in Mm^3.

surface_area

numerical. The reservoir water surface area at maximum capacity. Recommended units: km^2 (square kilometers).

max_depth

numerical. The maximum water depth of the reservoir at maximum capacity. If omitted, the depth-storage-area relationship will be estimated from surface area and capacity only. Recommended units: meters.

evap

time series object of equal length to Q, vector of length frequency(Q), or numerical constant. Evaporation from losses from reservoir surface. Varies with level if depth and surface_area parameters are specified. Recommended units: meters, or kg/m2 * 10 ^ -3.

installed_cap

numerical. The hydropower plant electric capacity (MW).

head

numerical. The maximum hydraulic head of the hydropower plant (m). Can be omitted if qmax is supplied.

qmax

numerical. The maximum flow into the hydropower plant. Can be omitted and estimated if head is supplied. Must be in volumetric units of Mm^3.

efficiency

numerical. The hydropower plant efficiency. Default is 0.9, but, unless user specifies an efficiency, it will be automatically re-estimated if head and qmax are supplied.

S_disc

integer. Storage discretization–the number of equally-sized storage states. Default = 1000.

R_disc

integer. Release discretization. Default = 10 divisions.

Q_disc

vector. Inflow discretization bounding quantiles. Defaults to five inflow classes bounded by quantile vector c(0.0, 0.2375, 0.4750, 0.7125, 0.95, 1.0).

S_initial

numeric. The initial storage as a ratio of capacity (0 <= S_initial <= 1). The default value is 1.

plot

logical. If TRUE (the default) the storage behavior diagram and release time series are plotted.

Value

Returns a list of reservoir variables as time series for the forecast period. Also returns penalty cost during operating period and cost savings relative to operations without forecasts.

Examples

1
2
3
4
5
6
Q <- resX$Q_Mm3
forecastQ <- bootcast(Q, start_yr = 1980, H = 2, plot = FALSE)
layout(1:4)
simQ <- simcast_hydro(Q, forecast = forecastQ, start_yr=1980,
resX$cap_Mm3, surface_area = resX$A_km2, installed_cap = resX$Inst_cap_MW,
head = resX$y_m, S_disc = 200)

swd-turner/reservoir documentation built on June 9, 2021, 12:27 a.m.