diversionRouting {WRSS} | R Documentation |
Given a sort of demand(s), diversionRouting
function enable us to simulate the performance and effect of a diversion dam under a givn recharge time series, inflow
, on the drainage network.
diversionRouting(demand=NA, priority = NA,
capacity, inflow, simulation)
demand |
A matrix: is column-wise matrix of demands, at which the rows presents demands for each time step and columns are for different individual demand sites (MCM). |
priority |
A vector: is a vector of priorities associated to |
capacity |
The maximum capacity of diversion dam (CMS). |
inflow |
A vector : a vector of water flowing into the diversion (MCM) |
simulation |
A list: |
the diversionRouting
function returns a list of features given as below:
release
: a matrix of release(s) equivalant to each demand
(MCM)
diverted
: a vector of diverted volumes (MCM), release(s) are included
overflow
: a vector of overflow passing through the diversion (MCM)
Rezgar Arabzadeh
demand <-matrix(rnorm(480,10,3),120)
priority <-sample(1:3,4,replace=TRUE)
capacity <-12
inflow <-rlnorm(120,log(50),log(4))
simulation <-list(start='2000-01-01',end='2009-12-29',interval='month')
res<-diversionRouting(demand=demand,
priority=priority,
capacity=capacity,
inflow=inflow,
simulation=simulation)
plot(ecdf(res$diverted$diverted),xlab='cms',ylab='exceedance probability')