Dengue (2-Strain)¶
A two-strain dengue model with seasonal transmission, temporary cross-protective immunity, and antibody-dependent enhancement of secondary infections.
Dengue2StrainModel(config)
¶
Bases: Model
Two-strain dengue model with seasonal forcing, temporary cross-immunity, and antibody-dependent enhancement (ADE) of secondary infections.
Migrated from the legacy hardcoded VECTOR_BORNE_2STRAIN model to the
schema-driven framework. The compartment structure and the epidemiological
parameters are now declared in :meth:define_parameters (so they appear in
the artifact, validation config, and are configurable via the Disease
block), while the ODE dynamics in :meth:equation are preserved exactly
from the original model.
The force of infection has a non-standard multi-term form (a constant
cross-immunity "leak" scaled by population and an ADE enhancement of
secondary infectiousness), so the flows are applied manually rather than
through schema transmission edges — the same approach used by the
dengue_jax_model and hantavirus_jax_model models.
Compartments (per region):
Sfully susceptible to both strainsI1/I2primary infection with strain 1 / strain 2R1/R2recovered from a primary infection (cross-protected)S1/S2cross-immunity has waned; susceptible to the other strainI12/I21secondary infection (strain 2 after 1 / strain 1 after 2)Rrecovered from a secondary infection (immune to both)
Derive the ODE rate constants from the configured disease parameters.
Durations are inverted into per-day rates here rather than in
equation so uncertainty runs, which rebuild the model from an
overridden config, re-derive every constant. Demography is balanced
(births equal deaths at 1/(life expectancy x 365) per day), and the
seasonal forcing constants omega and phi are fixed rather than
configurable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict
|
Validated simulation config, passed through to the
base |
required |
Source code in compartment/models/dengue_2strain_jax_model/model.py
define_parameters(schema)
classmethod
¶
Declare the two-strain compartments, parameters, and zone fields.
No transmission edges are declared, because the multi-term force of
infection is applied manually in equation; the cumulative _total
trackers are therefore declared explicitly to preserve the legacy output
columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
ParameterSchemaBuilder
|
The schema builder to populate with model info, compartments, disease parameters, and the seroprevalence admin-zone field. |
required |
Source code in compartment/models/dengue_2strain_jax_model/model.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
get_initial_population(admin_zones, compartment_list, **kwargs)
classmethod
¶
Seed S / I1 / I2 / S1 / S2 per admin zone.
infected_population and seroprevalence are percentages, each
split evenly across the two strains (hence the division by 200):
infections seed I1/I2 and prior exposure seeds the post-primary
susceptibles S1/S2. All other compartments, including the
cumulative _total trackers, start at zero.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
admin_zones
|
list[dict]
|
Admin-zone dicts with |
required |
compartment_list
|
list[str]
|
Ordered compartment names, used for column indexing. |
required |
**kwargs
|
Any
|
Additional keyword arguments (unused). |
{}
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Initial populations of shape
|
Source code in compartment/models/dengue_2strain_jax_model/model.py
prepare_initial_state()
¶
Return the base-class population matrix unchanged.
Returns:
| Type | Description |
|---|---|
ndarray
|
Initial state of shape |
Source code in compartment/models/dengue_2strain_jax_model/model.py
equation(y, t, p)
¶
Compute derivatives for the two-strain ODE system.
The transmission rate is seasonally forced, secondary infections are
scaled by the ADE factor epsilon, and a constant rho * N leak
represents background importation. Flows are applied manually because
this force of infection has no single-rate transmission-edge form.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y
|
ndarray
|
Current compartment values of shape
|
required |
t
|
float
|
Days elapsed since the simulation start date. |
required |
p
|
tuple
|
Packed transmission parameters; empty here, since the
rate constants are derived in |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Stacked per-compartment derivatives. |