Reference 〉 Class

Reporter()

Stores data on reporters. Do not instantiate directly; use data.addReporter() instead. The properties of this object correspond to the arguments of that function.

Methods

Click a method name for more detailed documentation.

  • clear( )

    Empties the reporter's collected data. This function is called automatically during model.setup(); it should not be called from user code.

  • collect( model )

    Runs the reporter function and its children, and appends the results to the data. This function is called automatically during the model step function; it should not be called by user code.

Object Properties

  • name str

    The name of the reporter, used as its column name in the data.

  • func func

    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.

  • data list

    The data collected by the reporter across the model's current run.

  • children dict{str: tuple(func, list)}

    A dict of sub-reporters and the data contained for them. For example if the reporter is smoothed, the unsmooth column would be subsidiary. Percentile marks and standard deviations are also stored as subsidiary reporters.

  • smooth bool|num

    Whether the main reporter should be smoothed via a decaying average, and if so, how strongly.

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.

History