nrel.hive.runner
Submodules
Package Contents
Classes
Environment of this Hive Simulation. |
|
The local simulation runner. |
|
Holds the simulation state, dispatcher and reports for the simulation run. |
- class nrel.hive.runner.Environment[source]
Bases:
NamedTupleEnvironment of this Hive Simulation.
- config: nrel.hive.config.HiveConfig
- mechatronics: immutables.Map[nrel.hive.util.typealiases.MechatronicsId, nrel.hive.model.vehicle.mechatronics.mechatronics_interface.MechatronicsInterface]
- chargers: immutables.Map[nrel.hive.util.typealiases.ChargerId, nrel.hive.model.energy.charger.charger.Charger]
- schedules: immutables.Map[nrel.hive.util.typealiases.ScheduleId, nrel.hive.model.vehicle.schedules.schedule.ScheduleFunction]
- fleet_ids: FrozenSet[nrel.hive.util.typealiases.MembershipId | None]
- reporter: nrel.hive.reporting.reporter.Reporter
- set_reporter(reporter: nrel.hive.reporting.reporter.Reporter) Environment[source]
allows the reporter to be updated after the environment is built.
- Parameters:
reporter – the reporter to be used
- Returns:
the updated environment
- class nrel.hive.runner.LocalSimulationRunner[source]
Bases:
NamedTupleThe local simulation runner.
- classmethod run(runner_payload: nrel.hive.runner.runner_payload.RunnerPayload) nrel.hive.runner.runner_payload.RunnerPayload[source]
steps through time, running a simulation, and producing a simulation result
- Parameters:
runner_payload – the initial state of the simulation
- Returns:
the final simulation state and dispatcher state
- classmethod step(runner_payload: nrel.hive.runner.runner_payload.RunnerPayload) nrel.hive.runner.runner_payload.RunnerPayload | None[source]
takes exactly one step forward, or, if the simulation has reached the end time, does nothing
- Parameters:
runner_payload – the current state of the simulation
- Returns:
the next simulation state after one simtime step, or, None if we have reached the end_time
- class nrel.hive.runner.RunnerPayload[source]
Bases:
NamedTupleHolds the simulation state, dispatcher and reports for the simulation run.
- Parameters:
s (
SimulationState) – the simulation statee (
Environment) – the environmental assets for this simulationu (
Update) – the updates we need to apply during each sim step