Class Reporter
Defined in File reporter.h
Inheritance Relationships
Base Type
public std::enable_shared_from_this< Reporter >
Class Documentation
-
class Reporter : public std::enable_shared_from_this<Reporter>
A
Reporter
is a module that works withReporterAgent
andReporterModel
to collect information about the state of the model for later analysis.Public Functions
-
Reporter()
Constructor.
-
std::shared_ptr<Reporter> clear()
Empty the report.
Clear all entries from the report; new collection operations begin with a blank slate.
- Returns
a reference copy of the
Reporter
Collect the current state of the model.
This will collect the current state of each agent associated with the population returned by the
Model
’sget_population()
.- Parameters
model – reference copy of the model
- Returns
a copy of the current report
Collect the current state of the model.
This will collect the current state of each agent associated with the
Population
.- Parameters
model – reference copy of the model
pop – Population to collect on
- Returns
a copy of the current report
Collect the current state of the model.
This will collect the current state of each agent given
- Parameters
model – reference copy of the model
agent_list – a vector agents to report on
- Returns
a copy of the current report
Collect the report.
This will return the aggregate report of all the data collected by this
Reporter
.- Parameters
model – reference copy of the model
- Returns
a copy of the current report
Protected Attributes
-
std::unique_ptr<std::vector<nlohmann::json>> _report_data = nullptr
A vector of the the report collected so far.
-
Reporter()