nrel.hive.reporting.handler.stateful_handler

Module Contents

Classes

StatefulHandler

prints the state of entities in the simulation to the state.log output file based on global logging settings

class nrel.hive.reporting.handler.stateful_handler.StatefulHandler(global_config: nrel.hive.config.global_config.GlobalConfig, scenario_output_directory: pathlib.Path)[source]

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

prints the state of entities in the simulation to the state.log output file based on global logging settings

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

reports the driver, vehicle and station state at the current time for all entities, written to state.log.

Parameters:
  • reports – ignored

  • runner_payload – provides the current simulation state

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

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

Returns:

static driver_asdict(vehicle: nrel.hive.model.vehicle.vehicle.Vehicle) dict[source]
static vehicle_asdict(vehicle: nrel.hive.model.vehicle.vehicle.Vehicle) dict[source]
static station_asdict(station: nrel.hive.model.station.station.Station) dict[source]
_report_entities(entities, asdict, sim_time, report_type)[source]