summaryrefslogtreecommitdiff
path: root/CakeSolutions.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2017-10-18 11:28:39 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2017-10-18 11:28:39 +0200
commit5b3daf393831acc4099e1bde3fe4527993529d74 (patch)
treea742cb6df0498fced89a7020467b99ad98fda468 /CakeSolutions.R
parent3d6b4b4b8293a4a4ab6f06805e1380600373796c (diff)
Version 3.2v3.2
Diffstat (limited to 'CakeSolutions.R')
-rwxr-xr-xCakeSolutions.R42
1 files changed, 42 insertions, 0 deletions
diff --git a/CakeSolutions.R b/CakeSolutions.R
new file mode 100755
index 0000000..b78ab84
--- /dev/null
+++ b/CakeSolutions.R
@@ -0,0 +1,42 @@
+# $Id$
+# Some of the CAKE R modules are based on mkin,
+# Developed by Tessella Ltd for Syngenta: Copyright (C) 2011-2016 Syngenta
+# Tessella Project Reference: 6245, 7247, 8361, 7414
+
+# The CAKE R modules are free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Produces solutions to the SFO equation given times t and parameters M_0 and k.
+SFO.solution <- function(t, parent.0, k) {
+ parent = parent.0 * exp(-k * t)
+}
+
+# Produces solutions to the DFOP equation given times t and parameters M_0, k1, k2 and g.
+DFOP.solution <- function(t, parent.0, k1, k2, g) {
+ parent = g * parent.0 * exp(-k1 * t) + (1 - g) * parent.0 * exp(-k2 * t)
+}
+
+# Produces solutions to the FOMC equation given times t and parameters M_0, alpha and beta.
+FOMC.solution <- function(t, parent.0, alpha, beta) {
+ parent = parent.0/(t/beta + 1)^alpha
+}
+
+# Produces solutions to the HS equation given times t and parameters M_0, k1, k2 and tb.
+HS.solution <- function (t, parent.0, k1, k2, tb) {
+ parent = ifelse(t <= tb, parent.0 * exp(-k1 * t), parent.0 * exp(-k1 * tb) * exp(-k2 * (t - tb)))
+}
+
+# Produces solutions to the IORE equation given times t and parameters M_0, k and N.
+IORE.solution <- function(t, parent.0, k, N) {
+ parent = (parent.0^(1 - N) - (1 - N) * k * t)^(1/(1-N))
+} \ No newline at end of file

Contact - Imprint