Probes#
- The base class for all probes. - Probes are callbacks called at the begin, at the end, and during each simulation step of an - ExperimentalRun.- Concrete classes should overwrite - prepare(),- update(), and/or- finalize()as the base class does nothing.- Called at end of a simulation run - Parameters:
- run – The run 
 
 - Called at the begin of a simulation run. - Parameters:
- run – The run 
 
 - Called at each simulation step - Parameters:
- run – The run 
 
 
- Base class for probes that records numerical data on a single dataset, possibly to be saved in HDF5. - Subclasses are expected to overwrite - Probe.update(),- get_shape()and to redefine- Type.- Gets the item shape that the record should use, see - Dataset.item_shape.- Subclasses should overwrite it to configure their records. - Parameters:
- world – The world being simulated 
- Returns:
- The shape 
 
 - Type:
 - The data. 
 
- Base class for probes that record a group of datasets, possibly to be saved in HDF5. Records are keyed by strings. - Sub-classes are expected to override - Probe.update(),- get_shapes()and to redefine- Type.- Gets the recorded data, possibly after instanting a dataset if none is yet associated to the key. - Parameters:
- key – The key 
- Returns:
- The data. 
 
 - Gets the item shapes that the records should use, see - Dataset.item_shape.- Subclasses should overwrite it to configure their records. - Parameters:
- world – The world being simulated 
- use_agent_uid_as_key – Whether to use the agent uid a key. If not set, it will use the the agent index instead. 
 
- Returns:
- The shapes