Skip to content

Commit

Permalink
Merge pull request #76 from edger-asiimwe/kgut-parameter-refactor
Browse files Browse the repository at this point in the history
Refactored kgut parameters alpha and beta
  • Loading branch information
jxx123 authored Mar 16, 2024
2 parents 80abe07 + b07a5d7 commit 61919d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simglucose/patient/t1dpatient.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def model(t, x, action, params, last_Qsto, last_foodtaken):
dxdt[0] = -params.kmax * x[0] + d

if Dbar > 0:
aa = 5 / 2 / (1 - params.b) / Dbar
cc = 5 / 2 / params.d / Dbar
aa = 5 / (2 * Dbar * (1 - params.b))
cc = 5 / (2 * Dbar * params.d)
kgut = params.kmin + (params.kmax - params.kmin) / 2 * (
np.tanh(aa * (qsto - params.b * Dbar)) -
np.tanh(cc * (qsto - params.d * Dbar)) + 2)
Expand Down

0 comments on commit 61919d7

Please sign in to comment.