vaccinated
laser.cholera.metapop.vaccinated
¶
Vaccinated compartment — single-dose and two-dose protected populations.
Owns:
model.people.V1— one-dose vaccinated population.model.people.V2— two-dose vaccinated population.model.patches.dose_one_doses/dose_two_doses— per-tick dose counts (recorded on the day delivered for direct alignment withnu_1_jt/nu_2_jt).
Per-tick flow:
- Carry
V1/V2forward, then subtract non-disease deaths (d_jt). - Wane
V1 -> Sat rateomega_1andV2 -> Sat rateomega_2. - Deliver second doses (
nu_2_jt[tick]) by moving the effective fraction (phi_2) fromV1 -> V2. Done before first doses so an individual cannot moveS -> V1 -> V2within a single tick. - Deliver first doses (
nu_1_jt[tick]) drawn proportionally from the eligible source compartments (default:S,E,Isym,Iasym,R; overridable viaparams.nu_jt_sources); the effective fraction (phi_1) lands inV1, with the remainder staying in the source compartment (i.e. the dose failed to take).
Vaccinated
¶
Vaccinated compartment: tracks V1(t) / V2(t) and the per-tick dose flows.
Attributes:
| Name | Type | Description |
|---|---|---|
model |
The parent |
|
sources |
Names of |
Source code in src/laser/cholera/metapop/vaccinated.py
41 42 43 44 45 46 47 48 49 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 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
sources
instance-attribute
¶
__init__
¶
Allocate V1 / V2 and the dose-bookkeeping vectors; seed from V*_j_initial.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Model
|
The |
required |
Raises:
| Type | Description |
|---|---|
AttributeError
|
When |
ValueError
|
When |
Source code in src/laser/cholera/metapop/vaccinated.py
check
¶
Validate dose-related parameters and the source compartments.
Asserts that model.people.S and model.people.E exist and
that params provides phi_1, phi_2, omega_1, omega_2,
nu_1_jt, nu_2_jt, and d_jt.
Raises:
| Type | Description |
|---|---|
AttributeError
|
When |
ValueError
|
When any of |
Source code in src/laser/cholera/metapop/vaccinated.py
__call__
¶
Advance V1 / V2 one tick: deaths, waning, then dose deliveries.
Doses scheduled for this tick are clamped against the available
donor population (warning logged at DEBUG if the schedule
exceeds capacity). Only the phi_*-effective fraction transits
to the vaccinated compartment; ineffective doses leave the
recipient in their original compartment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Model
|
The parent |
required |
tick
|
int
|
Current simulation tick. |
required |
Source code in src/laser/cholera/metapop/vaccinated.py
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 | |
plot
¶
Yield two Matplotlib figures: V1(t) and V2(t) for the ten largest patches.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fig
|
Figure | None
|
Optional existing Matplotlib |
None
|
Yields:
| Type | Description |
|---|---|
str
|
Two labels in order: |
str
|
|