Description Usage Arguments Details Value Author(s) See Also
Defines a simple Monod model, which is used in the exercises for the Eawag Summer School in Environmental Systems Analysis. The "external" version model.monod.external
calls an external program (model_monod.exe
) to calculate the model results, while the "internal" version model.monod
implements the model directly in R.
1 |
par |
named vector of parameters |
L |
observation layout |
The Monod model calculates the growth rate as a function of substrate concentration:
r = r_max*C / (K + C)
Parameters are:
r_max | maximum growth rate |
K | half-saturation concentration |
The observation layout L
contains the concentrations C at which the growth rate is to be evaluated. L
should be a data frame with two columns. The first column contains the names of the variables to be evaluated, and the second column contains the time points (or other evaluation steps) for the model. See function checkLayout
in package bayesBias
for more details. For example, for the Monod model:
var | C |
r | 0.1 |
r | 0.2 |
r | 0.3 |
... | ... |
The "external" version of the model model.monod.external
implements the same equation as the "internal" version model.monod
. The external version writes parameter values and inputs to files, then calls an external program (in this case model_monod.exe
) that reads the parameter and input files, calculates the results, and writes the results to a text file. The external model then reads the results from the text file, and returns the values.
The external model model.monod.external
can be used as a template to implement calls to other external simulation programs.
Returns a named vector of model output (growth rates). Names consist of the variable name and evaluation point (concentration), separated by an underscore (for example r_0.1
).
Peter Reichert <peter.reichert@eawag.ch>, Lukas M. Weber
model.monod
, model.growth
, and function checkLayout
in package bayesBias
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.