Hi everyone,
I am trying to make a reaction network object in Pluto notebook, in which I have to model the effect of caffeine intake on alertness in humans. I’m trying to keep it simple, and this is what I have for now:
"alertness = @reaction_network begin
@species C(t) = 0 R(t) = 0.3 r is alertness, C is caffeine conc
@parameters a g d v Ks
# Caffeïne effect on alertness
#hill(C, v, Ks, 4), ∅ --> R(t)
# Caffeïne effect on alertness (Hill-functie scaled between 0 en 1)
R_max = 1.0 # Max value for alertness
hill(C, v, Ks, 4) / (1 + (Ks / C)^4) * R_max, ∅ --> R # Extra alertness due to caffeine
# Verwijdering van cafeïne
g, C --> ∅ # natural degradation of caffeine in body
d*(C > 0), R --> ∅ # natural degradation of alertness (alertness caused by caffeine)
end"
extra information: I want the alertness to be undefined between 0 and 1, with 1 the max alertness. This is why I changed the Hill function a little bit. Furthermore, I want humans to have a natural alertness of e.g. 0.3. So this is the minimum value for alertness at all times.
I get an error saying:
Could anyone help me?
After defining this object I would make use of a discrete event, like:
“condition = [10] => [alertness.C = 300]”
which means at t = 10, the person takes in an amount of 300 mg/L caffeïne by drinking coffee for example. Then I would convert it by using reaction system, make an ODEproblem and solve it. Key for this project is seeing the Hill-like effect of caffeïne on alertness.
Furthermore I also have to do some optimalisation/exploration:
“Can you design caffeine dosing strategies
that significantly improve alertness while minimizing caffeine consumption? Can you
tailor these strategies to different sleep-loss conditions and individual needs?”
I was thinking of comparing people with sleeploss to people without sleeploss and making 2 catalyst objects and compare them eventually. I don’t know yet how I can improve the alertness while minimizing caffeine consumption.
I am pretty now to Julia & pluto notebook so please keep this in mind. Nothing too crazy has to be in this code. I’d appreciate it if I could get some help.