InfluenzaFacilityHospitalization.with_context
adrio.cdc.InfluenzaFacilityHospitalization.with_context(=NAME_PLACEHOLDER,
name=None,
params=None,
scope=None,
time_frame=None,
ipm=None,
rng )
Constructs a clone of this instance which has access to the given context.
All elements of the context are optional, allowing users who wish to quickly evaluate a function in a one-off situation to provide only the partial context that is strictly necessary. (It’s very tedious to create fake context when it isn’t strictly needed.) For example, a function might be able to calculate a result knowing only the geo scope and time frame. If the function tries to use a part of the context that hasn’t been provided, an exception will be raised.
During normal function evaluation, such as when running a simulation, the full context is always provided and available.
Parameters
name: AbsoluteName = NAME_PLACEHOLDER
-
The name used for the value this function produces, according to the evaluation context. Defaults to a generic placeholder name.
params: Mapping[str, ParamValue] = None
-
Additional parameter values we may need to evaluate this function.
scope:
GeoScope
= None-
The geo scope.
time_frame: TimeFrame = None
-
The time frame.
ipm: BaseCompartmentModel = None
-
The IPM.
rng: np.random.Generator = None
-
A random number generator instance.