nrel.hive.reporting.reporter

Module Contents

Classes

Report

Typed version of namedtuple.

Reporter

A class that generates reports for the simulation.

class nrel.hive.reporting.reporter.Report[source]

Bases: NamedTuple

Typed version of namedtuple.

Usage in Python versions >= 3.6:

class Employee(NamedTuple):
    name: str
    id: int

This is equivalent to:

Employee = collections.namedtuple('Employee', ['name', 'id'])

The resulting class has an extra __annotations__ attribute, giving a dict that maps field names to types. (The field names are also in the _fields attribute, which is part of the namedtuple API.) Alternative equivalent keyword syntax is also accepted:

Employee = NamedTuple('Employee', name=str, id=int)

In Python versions <= 3.5 use:

Employee = NamedTuple('Employee', [('name', str), ('id', int)])
report_type: nrel.hive.reporting.report_type.ReportType
report: Dict[str, str]
as_json() Dict[str, str][source]
class nrel.hive.reporting.reporter.Reporter[source]

A class that generates reports for the simulation.

add_handler(handler: nrel.hive.reporting.handler.handler.Handler)[source]
flush(runner_payload: nrel.hive.runner.runner_payload.RunnerPayload)[source]

called at each sim step.

Parameters:

runner_payload – The runner payload.

Returns:

Does not return a value.

file_report(report: Report)[source]

files a single report to be handled later.

Parameters:

report

Returns:

get_summary_stats(rp: nrel.hive.runner.runner_payload.RunnerPayload) Dict | None[source]

if a summary StatsHandler exists, return the final report from the collection of statistics :return: the stats Dictionary, or, None

get_time_step_stats() Tuple[Any | None, Any | None][source]

if a TimeStepStatsHandler exists, return the time step stats and the fleet time step stats :return: the time step stats and the fleet time step stats collection if they exist

close(runner_payload: nrel.hive.runner.runner_payload.RunnerPayload)[source]

wrap up anything here. called at the end of the simulation

Returns: