summaryrefslogtreecommitdiff
path: root/CakeSolutions.R
diff options
context:
space:
mode:
Diffstat (limited to 'CakeSolutions.R')
-rwxr-xr-x[-rw-r--r--]CakeSolutions.R12
1 files changed, 10 insertions, 2 deletions
diff --git a/CakeSolutions.R b/CakeSolutions.R
index c9e5b88..ecbfa59 100644..100755
--- a/CakeSolutions.R
+++ b/CakeSolutions.R
@@ -1,6 +1,7 @@
# $Id$
# Some of the CAKE R modules are based on mkin,
-# Developed by Tessella Ltd for Syngenta: Copyright (C) 2011-2020 Syngenta
+# Modifications developed by Hybrid Intelligence (formerly Tessella), part of
+# Capgemini Engineering, for Syngenta, Copyright (C) 2011-2022 Syngenta
# Tessella Project Reference: 6245, 7247, 8361, 7414, 10091
# The CAKE R modules are free software: you can redistribute it and/or modify
@@ -38,5 +39,12 @@ HS.solution <- function (t, parent.0, k1, k2, 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))
+ if (N == 1) {
+ parent = parent.0 * exp(-k * t)
+ }
+ else {
+ parent = (parent.0 ^ (1 - N) - (1 - N) * k * t) ^ (1 / (1 - N))
+ }
+
+ return(parent)
} \ No newline at end of file

Contact - Imprint