output.Output
simulator.basic.output.Output(self,
rume,
initial,
visit_compartments,
visit_events,
home_compartments,
home_events,='visit',
data_mode )
The output of a simulation run, including compartment data for all locations and all IPM compartments and event data for all locations and all IPM events.
Attributes
rume:
RUMEType_co
-
The Rume used in the simulation that generated this output.
initial: NDArray[
SimDType
]-
Initial compartments by location and compartment. Array of shape (N,C) where N is the number of locations, and C is the number of compartments
compartments: NDArray[
SimDType
]-
Compartment data by timestep, location, and compartment. Array of shape (S,N,C) where S is the number of ticks in the simulation, N is the number of locations, and C is the number of compartments.
events: NDArray[
SimDType
]-
Event data by timestep, location, and event. Array of shape (S,N,E) where S is the number of ticks in the simulation, N is the number of locations, and E is the number of events.
data_mode: Literal['visit', 'home']
-
Controls which data is returned by the
compartments
andevents
properties. Although you can access both data sets, it’s helpful to have a default for things like our plotting and mapping tools. Defaults to “visit”.See
data_by_visit
anddata_by_home
to obtain an Output object that uses a different data mode. data_by_visit: Output
-
Returns an Output object that contains the same set of data, but uses ‘visit’ as the default data mode.
data_by_home: Output
-
Returns an Output object that contains the same set of data, but uses ‘home’ as the default data mode.
visit_compartments: NDArray[
SimDType
]-
Compartment data collected in the node where individuals are visiting. See
compartments
for more information. visit_events: NDArray[
SimDType
]-
Event data collected in the node where individuals are visiting. See
events
for more information. home_compartments: NDArray[
SimDType
]-
Compartment data collected in the node where individuals reside. See
compartments
for more information. home_events: NDArray[
SimDType
]-
Event data collected in the node where individuals reside. See
events
for more information. dataframe: pd.DataFrame
-
Returns the output data in DataFrame form, using the current data mode.
events_per_day: NDArray[
SimDType
]-
Returns this output’s
incidence
from a per-tick value to a per-day value. Returns a shape (T,N,E) array, where T is the number of simulation days. ticks_in_days: NDArray[np.float64]
-
Create a series with as many values as there are simulation ticks, but in the scale of fractional days. That is: the cumulative sum of the simulation’s tau step lengths across the simulation duration. Returns a shape (S,) array, where S is the number of simulation ticks.