Skip to content

iscc.treatment.Treatment

Treatment(adaptive=False, start=0, duration=None, dosage_decay=0.5, rounds=4, rate_multiplier=2.0, toxicity=0.1, effectiveness=0.9, kill_rate=1.5, max_tumor_size=100000, sites='both')

Bases: object

Shared base for the therapies; defines the dosing schedule and per-cell effect.

The therapies (Chemotherapy, TargetedTherapy, Immunotherapy, Surgery) share the dosing / scheduling parameters below; each subclass adds its own targeting knobs and defines how a dose modifies a cell. Pass an instance to a tumour engine's grow(..., treatment=...).

Parameters:

Name Type Description Default
adaptive bool

If True, dose only while the tumour exceeds max_tumor_size (adaptive therapy); if False (default), dose continuously within the active window.

False
start int

First step at which the therapy is active (default 0).

0
duration int

Number of steps the therapy stays active (default None = until the run ends).

None
dosage_decay float

Between-round dose decay factor (default 0.5).

0.5
rounds int

Number of dosing rounds (default 4).

4
rate_multiplier float

Factor applied to a fully-sensitive cell's affected rate under full dose (default 2.0); the exponent depends on the cell's treatment_resistance.

2.0
toxicity float

Per-step probability of off-target action on a non-cancer cell (default 0.1).

0.1
effectiveness float

Per-step probability the therapy acts on a targeted cell (default 0.9).

0.9
kill_rate float

Death hazard imposed on a fully-sensitive cell under full dose in the genotype engine (default 1.5); set above the max_birth_rate cap so even high-fitness (driver-amplified) sensitive clones still regress while resistant clones escape.

1.5
max_tumor_size int

Size threshold that gates dosing when adaptive=True (default 100000).

100000
sites (both, primary, met)

Compartment(s) the therapy acts on (default "both" = systemic): "primary" (neoadjuvant / local) or "met" (adjuvant after primary resection).

"both"

Methods:

Name Description
discrete_event

One-shot state edits that are NOT rate modifiers (e.g. surgical resection). The base

discrete_event

discrete_event(tumor, step)

One-shot state edits that are NOT rate modifiers (e.g. surgical resection). The base treatment does nothing; Surgery overrides this. The engine calls it once per step, so chemo-only / no-surgery runs stay byte-identical (no state change, no rng draw).