diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-07 22:13:33 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-07 22:14:19 +0200 |
commit | 92bd33824bde6b6b21bfc7e30953092a74d3cce5 (patch) | |
tree | bb2e08ef15d8a4f4f7b04cf4f5312ec861ec1d1c /R/mkinpredict.R | |
parent | 67c8163487e776e9a378c9dfcd39c74f6e6bc507 (diff) |
Another overhaul of analytical solutions
Still in preparation for analytical solutions of coupled models
Diffstat (limited to 'R/mkinpredict.R')
-rw-r--r-- | R/mkinpredict.R | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/R/mkinpredict.R b/R/mkinpredict.R index 0f8e83bb..df51dbe3 100644 --- a/R/mkinpredict.R +++ b/R/mkinpredict.R @@ -43,36 +43,36 @@ #' #' SFO <- mkinmod(degradinol = mkinsub("SFO")) #' # Compare solution types -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' solution_type = "analytical") -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' solution_type = "deSolve") -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' solution_type = "deSolve", use_compiled = FALSE) -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' solution_type = "eigen") #' #' # Compare integration methods to analytical solution -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' solution_type = "analytical")[21,] -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' method = "lsoda")[21,] -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' method = "ode45")[21,] -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, #' method = "rk4")[21,] #' # rk4 is not as precise here #' #' # The number of output times used to make a lot of difference until the #' # default for atol was adjusted -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), #' seq(0, 20, by = 0.1))[201,] -#' mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), +#' mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), #' seq(0, 20, by = 0.01))[2001,] #' #' # Check compiled model versions - they are faster than the eigenvalue based solutions! #' SFO_SFO = mkinmod(parent = list(type = "SFO", to = "m1"), -#' m1 = list(type = "SFO")) +#' m1 = list(type = "SFO"), use_of_ff = "min") #' if(require(rbenchmark)) { #' benchmark( #' eigen = mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), |