nrel.hive.dispatcher.instruction_generator.instruction_generator

Module Contents

Classes

InstructionGenerator

A module that produces a set of vehicle instructions based on the state of the simulation

Attributes

InstructionGeneratorId

nrel.hive.dispatcher.instruction_generator.instruction_generator.InstructionGeneratorId
class nrel.hive.dispatcher.instruction_generator.instruction_generator.InstructionGenerator[source]

Bases: abc.ABC

A module that produces a set of vehicle instructions based on the state of the simulation

property name: str

Defacto ID for any instruction generator is the class name

abstract generate_instructions(simulation_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, environment: nrel.hive.runner.environment.Environment) Tuple[InstructionGenerator, Tuple[nrel.hive.dispatcher.instruction.instruction.Instruction, Ellipsis]][source]

generates vehicle instructions which can perform vehicle state transitions based on some objective

Parameters:
  • simulation_state – the current simulation state

  • environment – the simulation environment

Returns:

the updated InstructionGenerator along with generated instructions