aboutsummaryrefslogtreecommitdiff
path: root/R/create_deg_func.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-10 21:53:00 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-10 21:53:00 +0200
commitd113cd79b178fdc91aecb894707ed356129dfb75 (patch)
treedc28e049e94eb3ee9745f9cd86387de96a894c93 /R/create_deg_func.R
parentefab37957381919c21d874906ce870f4941c760a (diff)
Default to analytical for coupled models if available
This revealed that transforming rates is necessary for fitting the analytical solution of the SFO-SFO model to the FOCUS D dataset. Benchmarks show that fitting coupled models with deSolve got a bit slower through the latest changes
Diffstat (limited to 'R/create_deg_func.R')
-rw-r--r--R/create_deg_func.R3
1 files changed, 2 insertions, 1 deletions
diff --git a/R/create_deg_func.R b/R/create_deg_func.R
index 886c5e8b..6c0ae40b 100644
--- a/R/create_deg_func.R
+++ b/R/create_deg_func.R
@@ -51,7 +51,8 @@ create_deg_func <- function(spec, use_of_ff = c("min", "max")) {
n10 <- paste0("odeini['", parent, "']")
n20 <- paste0("odeini['", n2, "']")
- if (all(use_of_ff == "max", spec[[1]]$sink == TRUE, length(obs_vars) == 2, spec[[2]]$type == "SFO")) {
+ if (all(use_of_ff == "max", spec[[1]]$sink == TRUE, length(obs_vars) == 2,
+ spec[[1]]$type == "SFO", spec[[2]]$type == "SFO")) {
supported <- TRUE
k1 <- paste0("k_", n1)
k2 <- paste0("k_", n2)

Contact - Imprint