nrel.hive.reporting.handler.time_step_stats_handler

Module Contents

Classes

TimeStepStatsHandler

A reporting.Handler handles simulation reports in varying ways.

Attributes

log

nrel.hive.reporting.handler.time_step_stats_handler.log[source]
class nrel.hive.reporting.handler.time_step_stats_handler.TimeStepStatsHandler(config: nrel.hive.config.HiveConfig, scenario_output_directory: pathlib.Path, fleet_ids: FrozenSet[nrel.hive.util.typealiases.MembershipId | None], file_name: str | None = 'time_step_stats')[source]

Bases: nrel.hive.reporting.handler.handler.Handler

A reporting.Handler handles simulation reports in varying ways.

get_time_step_stats() list[source]

return a DataFrame of the time step level statistics.

Returns:

the time step stats DataFrame

get_fleet_time_step_stats() immutables.Map[nrel.hive.util.typealiases.MembershipId, collections.abc.Sequence][source]

return an immutable map of time step stat data by membership id.

Returns:

the immutable map containing time step stats data by membership id

handle(reports: List[nrel.hive.reporting.reporter.Report], runner_payload: nrel.hive.runner.runner_payload.RunnerPayload)[source]

called at each log step. aggregates various statistics to the time bin level

Parameters:

reports – reports for gathering statistics

:param runner_payload :return:

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

saves all time step stat data as csv files to the scenario output directory.

Returns: