BaseStateTracker#

BaseStateTracker(model, verbose=False, params=None)[source]#

Component for tracking the number in each SEIR state for each time tick.

This class maintains a time series of state counts across nodes in the model. The states are dynamically generated as properties based on model.params.states (e.g., “S”, “E”, “I”, “R”). Each state can be accessed as a property that returns a numpy array containing the time series for that state.

The tracking can be done at different aggregation levels: - aggregation_level = -1: Sum over all patches (default, backward compatible) - aggregation_level >= 0: Group by geographic level and track separately

Parameters:
  • model – The simulation model containing nodes, states, and parameters.

  • verbose (bool) – Whether to print verbose output during simulation. Defaults to False.

  • params (BaseStateTrackerParams | None) – Component-specific parameters. If None, will use default parameters.