diversionRouting: base function for diversion simulation

View source: R/diversionRouting.R

diversionRoutingR Documentation

base function for diversion simulation

Description

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.

Usage

  diversionRouting(demand=NA, priority = NA,
                   capacity, inflow, simulation)

Arguments

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 demand

capacity

The maximum capacity of diversion dam (CMS).

inflow

A vector : a vector of water flowing into the diversion (MCM)

simulation

A list: simulation is a list of three vectors: start, end, and interval. the start and end components must be in 'YYYY-MM-DD' format. the interval component can takes either of 'day','week', or 'month'.

Value

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)

Author(s)

Rezgar Arabzadeh

See Also

aquiferRouting

Examples

  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')

WRSS documentation built on May 30, 2022, 1:07 a.m.