Create a new Recorder attached to an environment.
The environment to record from
Configuration options
Detach the recorder from the environment (stop auto-recording).
Get a specific model metric's recorded values.
The metric name
Array of values, or undefined if metric doesn't exist
Get all recorded model-level data.
Object with time array and arrays for each metric
Get the most recently recorded values.
Object with time and latest value for each metric
Record data for the current tick. If called multiple times per tick, subsequent calls are ignored with a warning.
Reset the recorder, clearing all collected data.
Convert recorded data to CSV string.
Which data to export: 'model' (default) or 'agent'
CSV string
Convert recorded data to JSON object.
Which data to export: 'model' (default) or 'agent'
Data object
Records data from a simulation run. Can be used standalone for interactive exploration or internally by
Experimentfor batch runs.Example
Since
0.7.0