Reference 〉Function

Data.addReporter( str key, func(Model) func, int smooth = None )

Registers a column in the data to be collected each period.


  • key str, required

    A unique name to refer to the column.

  • func func(Model), required

    A reporter function (such as one generated by data.modelReporter() or data.agentReporter()) that takes one argument, the model object, and returns a value to be entered in that period's row of the column.

  • smooth int, optional

    Replaces the series with a decaying average for the purposes of graphing. Higher values smooth the data more strongly. The original data is recorded in a new column with the same name but postfixed with -unsmooth.

    Default value: None

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.