nrel.hive.state.driver_state.driver_instruction_ops

Module Contents

Functions

human_charge_at_home(...)

Attempts to charge at home using the lowest power charger

human_go_home(...)

Human drivers go home at the end of their shift.

human_look_for_requests(...)

Human driver relocates in search of greener request pastures.

idle_if_at_soc_limit(...)

Generates an IdleInstruction if the vehicle soc is above the limit set by

av_charge_base_instruction(...)

Autonomous vehicles will attempt to charge at the base until they reach full energy capacity

av_dispatch_base_instruction(...)

Autonomous vehicles will return to a base after 10 minutes of being idle;

Attributes

log

nrel.hive.state.driver_state.driver_instruction_ops.log[source]
nrel.hive.state.driver_state.driver_instruction_ops.human_charge_at_home(veh: nrel.hive.model.vehicle.vehicle.Vehicle, home_base: nrel.hive.model.base.Base, sim: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) nrel.hive.dispatcher.instruction.instructions.ChargeBaseInstruction | None[source]

Attempts to charge at home using the lowest power charger

Parameters:
  • veh

  • home_base

  • sim

  • env

Returns:

nrel.hive.state.driver_state.driver_instruction_ops.human_go_home(veh: nrel.hive.model.vehicle.vehicle.Vehicle, home_base: nrel.hive.model.base.Base, sim: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) nrel.hive.dispatcher.instruction.instruction.Instruction | None[source]

Human drivers go home at the end of their shift. For drivers can’t make it home without charging, or, drivers without home charging, they charge at the end of the shift to the config.dispatcher.human_driver_off_shift_charge_target

Parameters:
  • veh – the vehicle ending their shift

  • home_base – the vehicle’s home

  • sim – the current simulation state

  • env – the environment for this simulation

Returns:

the instruction for this driver

nrel.hive.state.driver_state.driver_instruction_ops.human_look_for_requests(veh: nrel.hive.model.vehicle.vehicle.Vehicle, sim: nrel.hive.state.simulation_state.simulation_state.SimulationState) nrel.hive.dispatcher.instruction.instructions.RepositionInstruction | None[source]

Human driver relocates in search of greener request pastures.

Parameters:
  • veh

  • sim

Returns:

nrel.hive.state.driver_state.driver_instruction_ops.idle_if_at_soc_limit(veh: nrel.hive.model.vehicle.vehicle.Vehicle, env: nrel.hive.runner.environment.Environment) nrel.hive.dispatcher.instruction.instructions.IdleInstruction | None[source]

Generates an IdleInstruction if the vehicle soc is above the limit set by env.config.dispatcher.ideal_fastcharge_soc_limit

Parameters:
  • veh

  • env

Returns:

nrel.hive.state.driver_state.driver_instruction_ops.av_charge_base_instruction(veh: nrel.hive.model.vehicle.vehicle.Vehicle, sim: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) nrel.hive.dispatcher.instruction.instructions.ChargeBaseInstruction | None[source]

Autonomous vehicles will attempt to charge at the base until they reach full energy capacity

Parameters:
  • veh

  • sim

  • env

Returns:

nrel.hive.state.driver_state.driver_instruction_ops.av_dispatch_base_instruction(veh: nrel.hive.model.vehicle.vehicle.Vehicle, sim: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment) nrel.hive.dispatcher.instruction.instructions.DispatchBaseInstruction | None[source]

Autonomous vehicles will return to a base after 10 minutes of being idle; They find the nearest base that they are a member of

Parameters:
  • veh

  • sim

  • env

Returns: