diff options
author | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2010-05-11 23:03:37 +0000 |
---|---|---|
committer | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2010-05-11 23:03:37 +0000 |
commit | 30cbb4092f6d2d3beff5800603374a0d009ad770 (patch) | |
tree | ef75421d92823b5b7add1b2d5da9c7499dfd59e5 /inst/unitTests/runit.mkinmod.R |
Initial upload of the upcoming multicompartment version of kinfit.
Some functionality is still missing (chi2), some may never be implemented
(FOMC model), but in general it is much more powerful than kinfit, owing
to the powerful FME package.
git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@8 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'inst/unitTests/runit.mkinmod.R')
-rw-r--r-- | inst/unitTests/runit.mkinmod.R | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/inst/unitTests/runit.mkinmod.R b/inst/unitTests/runit.mkinmod.R new file mode 100644 index 00000000..b6ca6b8d --- /dev/null +++ b/inst/unitTests/runit.mkinmod.R @@ -0,0 +1,53 @@ +test.mkinmod.SFO <- function()
+{
+ SFO.diffs <- c(
+ parent = "d_parent = - k_parent_sink * parent"
+ )
+ SFO.parms <- c("k_parent_sink")
+ SFO.map <- list(parent = "parent")
+ SFO <- list(diffs = SFO.diffs, parms = SFO.parms, map = SFO.map)
+ class(SFO) <- "mkinmod"
+ SFO.mkinmod <- mkinmod(spec = list(
+ parent = list(type = "SFO", to = NA, sink=TRUE))
+ )
+ checkIdentical(SFO, SFO.mkinmod)
+}
+
+test.mkinmod.SFORB <- function()
+{
+ SFORB.diffs <- c(
+ parent_free = paste(
+ "d_parent_free = - k_parent_free_sink * parent_free",
+ "- k_parent_free_bound * parent_free",
+ "+ k_parent_bound_free * parent_bound"),
+ parent_bound = paste(
+ "d_parent_bound =",
+ "+ k_parent_free_bound * parent_free",
+ "- k_parent_bound_free * parent_bound")
+ )
+ SFORB.parms <- c("k_parent_free_sink", "k_parent_free_bound", "k_parent_bound_free")
+ SFORB.map <- list(parent = c("parent_free", "parent_bound"))
+ SFORB <- list(diffs = SFORB.diffs, parms = SFORB.parms, map = SFORB.map)
+ class(SFORB) <- "mkinmod"
+ SFORB.mkinmod <- mkinmod(spec = list(
+ parent = list(type = "SFORB", to = NA, sink=TRUE))
+ )
+ checkIdentical(SFORB, SFORB.mkinmod)
+}
+
+test.mkinmod.SFO_SFO <- function()
+{
+ SFO_SFO.diffs <- c(
+ parent = "d_parent = - k_parent_sink * parent - k_parent_m1 * parent",
+ m1 = "d_m1 = - k_m1_sink * m1 + k_parent_m1 * parent"
+ )
+ SFO_SFO.parms <- c("k_parent_sink", "k_m1_sink", "k_parent_m1")
+ SFO_SFO.map <- list(parent = "parent", m1 = "m1")
+ SFO_SFO <- list(diffs = SFO_SFO.diffs, parms = SFO_SFO.parms, map = SFO_SFO.map)
+ class(SFO_SFO) <- "mkinmod"
+ SFO_SFO.mkinmod <- mkinmod(spec = list(
+ parent = list(type = "SFO", to = "m1", sink=TRUE),
+ m1 = list(type = "SFO", to = NA, sink=TRUE))
+ )
+ checkIdentical(SFO_SFO, SFO_SFO.mkinmod)
+}
|