nrel.hive.dispatcher.instruction.instructions
Module Contents
Classes
Attributes
- class nrel.hive.dispatcher.instruction.instructions.IdleInstruction[source]
Bases:
nrel.hive.dispatcher.instruction.instruction.Instruction- vehicle_id: nrel.hive.util.typealiases.VehicleId
- 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.instructions.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.instructions.DispatchPoolingTripInstruction[source]
Bases:
nrel.hive.dispatcher.instruction.instruction.Instruction- vehicle_id: nrel.hive.util.typealiases.VehicleId
- trip_plan: Tuple[Tuple[nrel.hive.util.typealiases.RequestId, nrel.hive.model.vehicle.trip_phase.TripPhase], Ellipsis]
- 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.instructions.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.instructions.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.instructions.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.instructions.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.instructions.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.instructions.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
- class nrel.hive.dispatcher.instruction.instructions.OutOfServiceInstruction[source]
Bases:
nrel.hive.dispatcher.instruction.instruction.Instruction- vehicle_id: nrel.hive.util.typealiases.VehicleId
- 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