Run identity & calendar¶
This group fixes the four scalars and labels that every other parameter is interpreted against: the PRNG seed (and therefore which stochastic realisation you get), the calendar window [date_start, date_stop] from which the derived attribute nticks is computed, and the ordered location_name list whose length defines npatches and whose order defines the element ordering of every per-patch vector in the rest of the configuration. Together they answer the questions "which run is this?", "how long does it run?", and "which patches are we talking about, and in what order?". Nothing else in the parameter set has meaning until these four are settled.
Quick reference¶
| Parameter | Shape | Dtype | Range | Off-value |
|---|---|---|---|---|
seed |
scalar | int (untyped) | unconstrained | n/a (not a toggle) |
date_start |
scalar | datetime.datetime |
date_stop >= date_start |
n/a (not a toggle) |
date_stop |
scalar | datetime.datetime |
date_stop >= date_start |
n/a (not a toggle) |
location_name |
list[str] of length npatches |
list of str | shape-only check (every per-location vector must match its length) | n/a (not a toggle) |
seed¶
- What it controls: Integer seed for the model's pseudo-random number generator; setting it pins all stochastic draws to a reproducible sequence.
- Shape:
scalar - Dtype:
int (untyped; passed through as-is) - Range: unconstrained (the validator does not check it;
Nonefalls back to the current microsecond at model construction) - Off-value:
n/a—seedis not a feature toggle. To intentionally request a non-reproducible run, passNoneand the model usesself.tinit.microsecondinstead. - Consumer code:
src/laser/cholera/metapop/model.py - Related parameters: none
- Notes:
params.pyexplicitly comments "No processing of 'params.seed'" — the field is not coerced to a numpy dtype and is not range-checked byvalidate_parameters. The sole consumer ismodel.pywhich callsseed_prng(parameters.seed if parameters.seed is not None else self.tinit.microsecond), soNoneis the supported way to opt out of reproducibility.
date_start¶
- What it controls: Calendar date of simulation tick 0; together with
date_stopit defines the run length (nticks = (date_stop - date_start).days + 1). - Shape:
scalar - Dtype:
datetime.datetime(parsed from a"%Y-%m-%d"string; passed through if already adatetime) - Range: must satisfy
date_stop >= date_start(asserted invalidate_parameters) - Off-value:
n/a—date_startis not a feature toggle; every run has a start date. - Consumer code:
src/laser/cholera/metapop/params.py,src/laser/cholera/metapop/analyzer.py,src/laser/cholera/calc_model_likelihood.py - Related parameters:
date_stop,epidemic_peaks - Notes: The derived attribute
params.nticksis computed from this pair at ingestion time, so mutatingdate_startafterdict_to_propertysetexruns would desynchronisenticks.analyzer.pyforwardsdate_start/date_stopintocalc_model_likelihoodfor the in-windowepidemic_peaksfilter.
date_stop¶
- What it controls: Calendar date of the final simulation tick; with
date_startit bounds the run window and setsnticks. - Shape:
scalar - Dtype:
datetime.datetime(parsed from a"%Y-%m-%d"string; passed through if already adatetime) - Range:
date_stop >= date_start(asserted byvalidate_parameterswith the message"date_stop ({params.date_stop}) must be >= date_start ({params.date_start})") - Off-value:
n/a—date_stopis not a feature toggle; every run has an end date. - Consumer code:
src/laser/cholera/metapop/params.py,src/laser/cholera/metapop/analyzer.py,src/laser/cholera/calc_model_likelihood.py - Related parameters:
date_start,epidemic_peaks - Notes: Setting
date_stop == date_startyieldsnticks == 1(a single-tick run), which is the smallest valid window. Likedate_start, this is read byanalyzer.pyand forwarded intocalc_model_likelihoodto dropepidemic_peaksrows whosepeak_datefalls outside[date_start, date_stop].
location_name¶
- What it controls: Ordered list of patch / admin-unit labels; its length defines
npatchesand its order defines every per-patch vector's element ordering. - Shape:
list[str]of lengthnpatches(a scalar input is promoted to a single-element list) - Dtype: list of
str(not coerced tondarray) - Range: shape-only check — every per-location vector must have
len(location_name)entries; ifepidemic_peaksis present, everyiso_codein it must appear inlocation_name(asserted indict_to_propertysetex) - Off-value:
n/a—location_nameis not a feature toggle; a run must name its patches. - Consumer code:
src/laser/cholera/metapop/params.py,src/laser/cholera/metapop/census.py,src/laser/cholera/metapop/derivedvalues.py,src/laser/cholera/metapop/environmental.py,src/laser/cholera/metapop/envtohuman.py,src/laser/cholera/metapop/exposed.py,src/laser/cholera/metapop/humantohuman.py,src/laser/cholera/metapop/infectious.py,src/laser/cholera/metapop/recovered.py,src/laser/cholera/metapop/susceptible.py,src/laser/cholera/metapop/vaccinated.py - Related parameters:
longitude,latitude,N_j_initial,epidemic_peaks - Notes:
params.pypromotes a scalar value to a single-element list (so a one-patch run can pass"COD"rather than["COD"]).dict_to_propertysetexalso rewritesepidemic_peaksby adding aloc_idxcolumn derived fromlocation_name's order, so changing the order after ingestion would silently mis-align peak locations. Almost every distribution module readslocation_nameonly for plot labels — it has no dynamical effect beyond settingnpatches.