From ec9e65053b214fa30e8b947ccbc47930eeaa01a4 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 16 Apr 2015 11:00:53 +0200 Subject: Check compiled mkinmod versions in examples and tests Tests all pass (Linux) --- man/mkinpredict.Rd | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'man/mkinpredict.Rd') diff --git a/man/mkinpredict.Rd b/man/mkinpredict.Rd index 7d8979e4..7450a7ce 100644 --- a/man/mkinpredict.Rd +++ b/man/mkinpredict.Rd @@ -10,7 +10,8 @@ } \usage{ mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = "deSolve", - method.ode = "lsoda", atol = 1e-08, rtol = 1e-10, map_output = TRUE, ...) + method.ode = "lsoda", use_compiled = "auto", atol = 1e-08, rtol = 1e-10, + map_output = TRUE, ...) } \arguments{ \item{mkinmod}{ @@ -41,6 +42,10 @@ \code{\link{ode}} in case the solution type is "deSolve". The default "lsoda" is performant, but sometimes fails to converge. } + \item{use_compiled}{ + If set to \code{FALSE}, no compiled version of the \code{\link{mkinmod}} + model is used, even if is present. + } \item{atol}{ Absolute error tolerance, passed to \code{\link{ode}}. Default is 1e-8, lower than in \code{\link{lsoda}}. @@ -70,6 +75,8 @@ solution_type = "analytical") mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, solution_type = "deSolve") + mkinpredict(SFO, c(k_degradinol_sink = 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, solution_type = "eigen") @@ -92,5 +99,20 @@ mkinpredict(SFO, c(k_degradinol_sink = 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")) + system.time( + print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), + c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), + solution_type = "eigen")[201,])) + system.time( + print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), + c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), + solution_type = "deSolve")[201,])) + system.time( + print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), + c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), + solution_type = "deSolve", use_compiled = FALSE)[201,])) } \keyword{ manip } -- cgit v1.2.1