Description Usage Arguments Details Value Examples
This function searches for acceptable model solutions within the uncertainty parameters and long-term storage balances using Latin hypercubes.
1 2 3 4 5 6 7 8 | getSolutions(data, p, n, tol = 0.01, interc = c(0, 0.05), et_mult = c(1,
1.1), flow_mult = c(1, 1.1), open_wat = c(0.01, 0.1), run_mult = c(1,
5), run_css = c(0.1, 1), bf_mult = c(0.5, 1.5), nonrev = c(0.05, 0.2),
ind_evap = c(0.01, 0.02), wast_gen = c(0.75, 0.9), pot_atm = c(0.1,
0.15), npot_infilt = c(0.25, 0.75), slud_evap = c(0, 0),
leak_css = c(0.05, 0.25), dgw = c(0.5, 0.5), dgw_rep = c(0, 1),
global_bal = c(-500, 500), sw_bal = c(-500, 500), css_bal = c(-500,
500), sgw_bal = c(-500, 500), dgw_bal = c(-500, 500))
|
data |
xts or zoo object. See CityWaterBalance function for details. |
p |
list of initial parameter values. See CityWaterBalance function or the inputs below for descriptions. |
n |
integer number of initial parameter sets to search |
tol |
tolerance acceptable difference mean flow solutions |
interc |
vector of min and max fraction of pet lost to interception |
et_mult |
vector of min and max multiplier for et |
flow_mult |
vector of min and max multiplier for outflow |
open_wat |
vector of min and max fraction of area that is open water |
run_mult |
vector of min and max multiplier for runoff |
run_css |
vector of min and max fraction of runoff diverted to sewers |
bf_mult |
vector of min and max multiplier for baseflow |
nonrev |
vector of min and max fraction of potable water supply lost to leaks |
ind_evap |
vector of min and max fraction of industrial use that evaporates |
wast_gen |
vector of min and max fraction of potable use that returns to sewers |
pot_atm |
vector of min and max fraction of potable use that evaporates |
npot_infilt |
vector of min and max fraction of nonpotable use that infiltrates |
slud_evap |
vector of min and max fraction of wastewater that evaporates from sludge |
leak_css |
vector of min and max fraction of wastewater effluent from gw infiltration |
dgw |
vector of min and max fraction of groundwater from deep, confined aquifers |
dgw_rep |
vector of min and max multiplier for deep groundwater pumping replacement |
global_bal |
vector of min and max acceptable global water balance values, cumulative over model run |
sw_bal |
vector of min and max acceptable surface water balance values, cumulative over model run |
css_bal |
vector of min and max acceptable sewer system water balance values, cumulative over model run |
sgw_bal |
vector of min and max acceptable shallow groundwater balance values, cumulative over model run |
dgw_bal |
vector of min and max acceptable deep groundwater balance values, cumulative over model run |
The function creates n parameter sets using a Latin hypercube. It runs 'CityWaterBalance()' with each set, accepting solutions that meet user-defined criteria for storage balances. It then computes the mean of flow solutions, and doubles n until the difference between the means of old and new solutions is less than tol for all flows. Defaults for parameter value ranges are set to reasonable values, but they should be reconsidered for each application. Defaults for storage balances are set high to allow for solution discovery, however, acceptable values must be determined on a case-by-case basis.
out numeric solutions
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
data <- cwb_data
data$cso <- 0
p <- list("interc" = 0,"et_mult" = 1,"flow_mult" = 1, "open_wat" = 0.02,
"run_mult" = 3.378, "run_css" = 0.35, "bf_mult" = 1,
"nonrev" = 0.08, "ind_evap" = 0.012, "wast_gen" = 0.85,
"pot_atm" = 0.13, "npot_infilt" = 0.5, "slud_evap" = 0,
"leak_css" = 0.05, "dgw" = 0.5, "dgw_rep" = 0.5)
out <- getSolutions(data, p, 10, 0.1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.