diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-11-09 10:08:37 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-11-09 10:09:40 +0100 |
commit | fd9ea462ba438c023e33902449429eae6d2dc28f (patch) | |
tree | ea2764357d1a1f61bfdc9c789be45f380f810bb3 /CakeSolutions.R | |
parent | ae64167d93bfae36158578f0a1c7771e6bab9350 (diff) |
Version 3.5, from a fresh installationv3.5
Diffstat (limited to 'CakeSolutions.R')
-rwxr-xr-x[-rw-r--r--] | CakeSolutions.R | 12 |
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 |