From a77a10ea6c607346778ba0700b3b66ac393101a2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 27 May 2020 06:06:08 +0200 Subject: Create up to date pkgdown docs in development mode --- docs/dev/reference/create_deg_func.html | 225 ++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 docs/dev/reference/create_deg_func.html (limited to 'docs/dev/reference/create_deg_func.html') diff --git a/docs/dev/reference/create_deg_func.html b/docs/dev/reference/create_deg_func.html new file mode 100644 index 00000000..59984b8c --- /dev/null +++ b/docs/dev/reference/create_deg_func.html @@ -0,0 +1,225 @@ + + + + + + + + +Create degradation functions for known analytical solutions — create_deg_func • mkin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
+

Create degradation functions for known analytical solutions

+
+ +
create_deg_func(spec, use_of_ff = c("min", "max"))
+ +

Arguments

+ + + + + + + + + + +
spec

List of model specifications as contained in mkinmod objects

use_of_ff

Minimum or maximum use of formation fractions

+ +

Value

+ +

Degradation function to be attached to mkinmod objects

+ +

Examples

+
+SFO_SFO <- mkinmod( + parent = mkinsub("SFO", "m1"), + m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
FOCUS_D <- subset(FOCUS_2006_D, value != 0) # to avoid warnings +fit_1 <- mkinfit(SFO_SFO, FOCUS_D, solution_type = "analytical", quiet = TRUE) +fit_2 <- mkinfit(SFO_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE) +# \dontrun{ +if (require(rbenchmark)) + benchmark( + analytical = mkinfit(SFO_SFO, FOCUS_D, solution_type = "analytical", quiet = TRUE), + deSolve = mkinfit(SFO_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE), + replications = 2)
#> Loading required package: rbenchmark
#> test replications elapsed relative user.self sys.self user.child +#> 1 analytical 2 0.422 1.000 0.421 0 0 +#> 2 deSolve 2 0.722 1.711 0.721 0 0 +#> sys.child +#> 1 0 +#> 2 0
DFOP_SFO <- mkinmod( + parent = mkinsub("DFOP", "m1"), + m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
benchmark( + analytical = mkinfit(DFOP_SFO, FOCUS_D, solution_type = "analytical", quiet = TRUE), + deSolve = mkinfit(DFOP_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE), + replications = 2)
#> test replications elapsed relative user.self sys.self user.child +#> 1 analytical 2 0.907 1.000 0.906 0 0 +#> 2 deSolve 2 1.659 1.829 1.658 0 0 +#> sys.child +#> 1 0 +#> 2 0
# } +
+
+ +
+ + + +
+ + + + + + + + -- cgit v1.2.1