Nothing
#' Used for running microPop with multiple compartments
#' Takes the solution (state of system) from the previous compartment (out$solution)
#' and then finds the washout rate of each state variable using removalRateFunc
#' to find the inflow rate to the next downstream compartment
#' @param out output from microPopModel()
#' @return matrix of flow rates (conc/time) with named columns (the same as out$solution)
#' @export
makeInflowFromSoln =function (out){
soln = out$solution
washOutRate = out$parms$Smats$washOut
mat = soln * NA
mat[, 1] = soln[, "time"]
for (i in 2:ncol(soln)) {
xname = colnames(soln)[i]
x = getGroupName(xname, out$parms$microbeNames)
for (t in 1:nrow(soln)) {
mat[t, i] = soln[t,xname]*washOutRate[x]
}
}
return(mat)
}
#makeInflowFromSoln = function(out) {
# soln = out$solution
# all.names = colnames(soln)
# washOutRate = out$parms$Smats$washOut
# resNames = out$parms$resourceNames
# mat = soln * NA
# mat[, 1] = soln[, "time"]
# for (i in 2:length(soln[1, ])) {
# xname = all.names[i]
# x = getGroupName(xname, out$parms$microbeNames)
# for (t in 1:length(soln[, "time"])) {
# mat[t, i] = out$parms$removalRateFunc(x, soln[t, xname], soln[t, ], soln[t,
# "time"], washOutRate, out$parms)
# }
# }
# return(mat)
#}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.