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

Clarifying attack/damage rates #223

Open
drbergman opened this issue Apr 12, 2024 · 1 comment
Open

Clarifying attack/damage rates #223

drbergman opened this issue Apr 12, 2024 · 1 comment

Comments

@drbergman
Copy link
Contributor

Motivating question

If cd8 attacks tumor with attack_rate("tumor") = 1.0 and the damage_rate for cd8 is 1.0, how much damage do we expect a tumor agent to accumulate per minute as it continuously as a neighboring cd8 cell?

Expected answer

If the attack rate is in attack/minute (against a given neighbor) and the damage rate is in damage/attack, the answer is obvious: we expect 1.0 damage/minute. This answer is sensible, predictable, and knowable from only the two numbers above.

What actually happens

The cd8 attacks in a mechanics_dt (default = 0.1 min) with probability probability = attack_rate("tumor") * mechanics_dt = 1.0 * 0.1 = 0.1 12. This has the desirable effect of initiating an "attack" once per minute, exactly as the attack rate suggests.

Then the unexpected happens. Upon successful attack by the cd8, the tumor agent accumulates damage_rate * mechanics_dt = 1.0 * 0.1 = 0.1 damage3. The net effect is that the tumor agent is expected to accumulate 0.1 damage per minute from this interaction.

Analyzing this more closely, we see the expected damage accumulation in a minute for the tumor agent is

$$ \begin{align*} \Delta\text{damage} & = \mathbb{E}[\text{num attacks}] \times \text{damage}/\text{attack} \\ & = \text{attack probability per dt} * \text{num steps} \times (\text{damage rate} * dt) \\ & = (\text{attack rate} * dt) * (1.0 \text{ min} / dt) \times (\text{damage rate} * dt) \\ & = \text{attack rate} * \text{damage rate} * dt \end{align*} $$

Notice that $dt$, the mechanics_dt, factors in to how much damage is accumulated by the tumor agent. In other words, knowing only the attack rate and damage rate is insufficient to predict the damage accumulation rate.

Proposed change

Redefine the damage_rate to be damage/attack rather than damage/minute. That is, the attack_rate will be the rate at which the attacking cell type, cd8 above, attacks a given neighbor (possibly modulated by immunogenicity1); and the damage_rate is the amount of damage dealt to the attacked cell type, tumor above, given that the attacker attacked.

Footnotes

  1. There is also an immunogenicity factor I'll ignore here. 2

  2. cf. https://github.com/MathCancer/PhysiCell/blob/3d7051f167b6b3551296a4b6d93db742dc532ee6/core/PhysiCell_standard_models.cpp#L1234

  3. cf. https://github.com/MathCancer/PhysiCell/blob/3d7051f167b6b3551296a4b6d93db742dc532ee6/core/PhysiCell_cell.cpp#L1407

drbergman added a commit to drbergman/PhysiCell that referenced this issue Apr 12, 2024
Define damage rate as damage/attack. See MathCancer#223.
@drbergman
Copy link
Contributor Author

See #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant