Analyzer#
- class Analyzer(name=None, label=None, **kwargs)[source]#
Bases:
ModuleBase class for Analyzers. Analyzers are used to provide more detailed information about a simulation than is available by default – for example, pulling states out of sim.people on a particular timestep before they get updated on the next step.
The key method of the analyzer is
step(), which is called with the sim on each timestep.To retrieve a particular analyzer from a sim, use sim.get_analyzer().
Attributes
nowShortcut to self.t.now()
statesReturn a flat list of all states
statesdictReturn a flat dictionary (objdict) of all states
tiGet the current module timestep
timevecShortcut to self.t.timevec
Methods