Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical - Pharmacokinetics and pharmacodynamics #38

Open
Kexanone opened this issue Apr 9, 2024 · 2 comments
Open

Medical - Pharmacokinetics and pharmacodynamics #38

Kexanone opened this issue Apr 9, 2024 · 2 comments
Labels
kind/feature Release Notes: **ADDED:** status/discussion
Milestone

Comments

@Kexanone
Copy link
Member

Kexanone commented Apr 9, 2024

Background

In the basic medical system, morphine and epinephrine just heal the pain respective resilience hit zones with a constant rate over a fixed time. During their effect duration, you cannot administer another dose.

Proposal

The idea is to make a new option to replace the behavior described above by a more realistic model, where the drug concentration and effect change over time. Moreover, drugs should no longer heal the hit zones. We introduce instead a drug-adjusted health getter that returns the sum of the hit zone's health and all drug effects. This will turn morphine into a pain suppressor and epinephrine into a resilience enhancer, rather than healer.

Pharmacokinetics

Proposed Model

Two consecutive first-order reactions:

$$\begin{flalign} &\ce{P ->[k_a] A ->[k_d] \otimes}& \end{flalign}$$

  • $\ce{P}$: Precursor state
  • $\ce{A}$: Active state
  • $k_a$: Activation rate constant
  • $k_d$: Deactivation rate constant (metabolism)

Corresponding Rate Law

$$\begin{flalign} & \begin{pmatrix}\frac{d\ce{[P]}}{dt} \\ \frac{d\ce{[A]}}{dt}\end{pmatrix} = \begin{pmatrix}-k_a & 0 \\ k_a & - k_d\end{pmatrix}\begin{pmatrix}\ce{[P]} \\ \ce{[A]}\end{pmatrix} & \end{flalign}$$

Solution

$$\begin{flalign} & \begin{pmatrix}\ce{[P]} \\ \ce{[A]}\end{pmatrix}(t) = \begin{pmatrix}e^{-k_a t} \\ \frac{k_a}{k_a-k_d}\Big(e^{-k_d t}-e^{-k_a t}\Big)\end{pmatrix}\ce{[P]}_0 & \end{flalign}$$

Pharmacodynamics

Hill equation:

$$\begin{flalign} & E(t) = \frac{E_{max}\cdot\ce{[A]}(t)}{\ce{[A]_{EC50}} + \ce{[A]}(t)} & \end{flalign}$$

  • $E$: Effect
  • $E_{max}$: Maximum effect
  • $\ce{[A]}_{EC50}$: Half-maximum effect concentration

Config Parameters

  • Administered substance concentration ($\ce{[P]}_0$)
  • Activation rate constant ($k_a$)
  • Deactivation rate constant ($k_d$)
  • Maximum effect ($E_{max}$)
  • Half-maximum effect concentration ($\ce{[A]_{EC50}}$)

Additional Notes

  • In principle the same model could be used with separate parameters for the Hill equation for simulating OD.
  • Guidelines for the medical system should contain recommended dosing intervals to keep a reasonable steady state.
  • Drug administration times will have to be logged to be able to dose them properly.

References

  1. Meibohm et al. Int. J. Impotence Res. 2007, 19, 253–264.
@Kexanone Kexanone added kind/feature Release Notes: **ADDED:** status/discussion labels Apr 9, 2024
@Kexanone Kexanone added this to the Backlog milestone Apr 9, 2024
@Kexanone Kexanone changed the title Pharmacokinetics and Pharmacodynamics Medical - Pharmacokinetics and pharmacodynamics Apr 9, 2024
@bluefieldcreator
Copy link

Pharmacokinetics seems like it would be a first in the industry in general, I dont think any other mod or game has or has aimed to simulate pharmaceutical substances before.

Looking torwards more updates on this!

@Kexanone
Copy link
Member Author

Kexanone commented May 15, 2024

Technically, ACE3 already does simulate drug effects as a function of time, but rather than a linear combination of exponentials it uses a parabola for the increase and then switches to a line for the decay and the drug effects have a linear response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:** status/discussion
Projects
None yet
Development

No branches or pull requests

2 participants