aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-11-12 16:59:48 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2014-11-12 16:59:48 +0100
commitc04d0bb0e795b67b6958150e8524c5265587f618 (patch)
tree4a10eb4a9b612745b4aa9ed1e4f1898a2d6d0ac1 /R/mkinfit.R
parent401570aa9e58c4a2f2e939f37f496453d97d3f33 (diff)
IORE working for parent and metabolites, introduce mkinsub
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R9
1 files changed, 7 insertions, 2 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index a6889b0b..7a465c2b 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -43,7 +43,7 @@ mkinfit <- function(mkinmod, observed,
{
# Check mkinmod and generate a model for the variable whith the highest value
# if a suitable string is given
- parent_models_available = c("SFO", "FOMC", "DFOP", "HS", "SFORB")
+ parent_models_available = c("SFO", "FOMC", "DFOP", "HS", "SFORB", "IORE")
if (class(mkinmod) != "mkinmod") {
presumed_parent_name = observed[which.max(observed$value), "name"]
if (mkinmod[[1]] %in% parent_models_available) {
@@ -60,7 +60,10 @@ mkinfit <- function(mkinmod, observed,
method.modFit = match.arg(method.modFit)
if (maxit.modFit != "auto") {
if (method.modFit == "Marq") control.modFit$maxiter = maxit.modFit
- if (method.modFit == "Port") control.modFit$iter.max = maxit.modFit
+ if (method.modFit == "Port") {
+ control.modFit$iter.max = maxit.modFit
+ control.modFit$eval.max = maxit.modFit
+ }
if (method.modFit %in% c("SANN", "Nelder-Mead", "BFGS", "CG", "L-BFGS-B")) {
control.modFit$maxit = maxit.modFit
}
@@ -308,6 +311,8 @@ mkinfit <- function(mkinmod, observed,
if (!transform_rates) {
index_k <- grep("^k_", names(lower))
lower[index_k] <- 0
+ index_k.iore <- grep("^k.iore_", names(lower))
+ lower[index_k.iore] <- 0
other_rate_parms <- intersect(c("alpha", "beta", "k1", "k2", "tb"), names(lower))
lower[other_rate_parms] <- 0
}

Contact - Imprint