nrel.hive.dispatcher.instruction

Submodules

Package Contents

Classes

DispatchBaseInstruction

DispatchStationInstruction

DispatchTripInstruction

ChargeStationInstruction

ChargeBaseInstruction

RepositionInstruction

ReserveBaseInstruction

class nrel.hive.dispatcher.instruction.DispatchBaseInstruction[source]

Bases: nrel.hive.dispatcher.instruction.instruction.Instruction

vehicle_id: nrel.hive.util.typealiases.VehicleId
base_id: nrel.hive.util.typealiases.BaseId
apply_instruction(sim_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) Tuple[Exception | None, nrel.hive.dispatcher.instruction.instruction_result.InstructionResult | None][source]

attempts to apply an instruction to a vehicle

Parameters:
  • sim_state – the state of the simulation

  • env – the simulation environment

Returns:

an exception, the resulting simulation state, or (None, None) if a bad instruction

class nrel.hive.dispatcher.instruction.DispatchStationInstruction[source]

Bases: nrel.hive.dispatcher.instruction.instruction.Instruction

vehicle_id: nrel.hive.util.typealiases.VehicleId
station_id: nrel.hive.util.typealiases.StationId
charger_id: nrel.hive.util.typealiases.ChargerId
apply_instruction(sim_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) Tuple[Exception | None, nrel.hive.dispatcher.instruction.instruction_result.InstructionResult | None][source]

attempts to apply an instruction to a vehicle

Parameters:
  • sim_state – the state of the simulation

  • env – the simulation environment

Returns:

an exception, the resulting simulation state, or (None, None) if a bad instruction

class nrel.hive.dispatcher.instruction.DispatchTripInstruction[source]

Bases: nrel.hive.dispatcher.instruction.instruction.Instruction

vehicle_id: nrel.hive.util.typealiases.VehicleId
request_id: nrel.hive.util.typealiases.RequestId
apply_instruction(sim_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) Tuple[Exception | None, nrel.hive.dispatcher.instruction.instruction_result.InstructionResult | None][source]

attempts to apply an instruction to a vehicle

Parameters:
  • sim_state – the state of the simulation

  • env – the simulation environment

Returns:

an exception, the resulting simulation state, or (None, None) if a bad instruction

class nrel.hive.dispatcher.instruction.ChargeStationInstruction[source]

Bases: nrel.hive.dispatcher.instruction.instruction.Instruction

vehicle_id: nrel.hive.util.typealiases.VehicleId
station_id: nrel.hive.util.typealiases.StationId
charger_id: nrel.hive.util.typealiases.ChargerId
apply_instruction(sim_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) Tuple[Exception | None, nrel.hive.dispatcher.instruction.instruction_result.InstructionResult | None][source]

attempts to apply an instruction to a vehicle

Parameters:
  • sim_state – the state of the simulation

  • env – the simulation environment

Returns:

an exception, the resulting simulation state, or (None, None) if a bad instruction

class nrel.hive.dispatcher.instruction.ChargeBaseInstruction[source]

Bases: nrel.hive.dispatcher.instruction.instruction.Instruction

vehicle_id: nrel.hive.util.typealiases.VehicleId
base_id: nrel.hive.util.typealiases.BaseId
charger_id: nrel.hive.util.typealiases.ChargerId
apply_instruction(sim_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) Tuple[Exception | None, nrel.hive.dispatcher.instruction.instruction_result.InstructionResult | None][source]

attempts to apply an instruction to a vehicle

Parameters:
  • sim_state – the state of the simulation

  • env – the simulation environment

Returns:

an exception, the resulting simulation state, or (None, None) if a bad instruction

class nrel.hive.dispatcher.instruction.RepositionInstruction[source]

Bases: nrel.hive.dispatcher.instruction.instruction.Instruction

vehicle_id: nrel.hive.util.typealiases.VehicleId
destination: nrel.hive.util.typealiases.LinkId
apply_instruction(sim_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) Tuple[Exception | None, nrel.hive.dispatcher.instruction.instruction_result.InstructionResult | None][source]

attempts to apply an instruction to a vehicle

Parameters:
  • sim_state – the state of the simulation

  • env – the simulation environment

Returns:

an exception, the resulting simulation state, or (None, None) if a bad instruction

class nrel.hive.dispatcher.instruction.ReserveBaseInstruction[source]

Bases: nrel.hive.dispatcher.instruction.instruction.Instruction

vehicle_id: nrel.hive.util.typealiases.VehicleId
base_id: nrel.hive.util.typealiases.BaseId
apply_instruction(sim_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) Tuple[Exception | None, nrel.hive.dispatcher.instruction.instruction_result.InstructionResult | None][source]

attempts to apply an instruction to a vehicle

Parameters:
  • sim_state – the state of the simulation

  • env – the simulation environment

Returns:

an exception, the resulting simulation state, or (None, None) if a bad instruction