nrel.hive.state.entity_state.entity_state_ops

Module Contents

Functions

transition_previous_to_next(...)

exits the previous state and enters the next state

nrel.hive.state.entity_state.entity_state_ops.transition_previous_to_next(sim: nrel.hive.state.simulation_state.simulation_state.SimulationState, env: nrel.hive.runner.environment.Environment, prev_state: nrel.hive.state.vehicle_state.vehicle_state.VehicleState, next_state: nrel.hive.state.vehicle_state.vehicle_state.VehicleState) Tuple[Exception | None, nrel.hive.state.simulation_state.simulation_state.SimulationState | None][source]

exits the previous state and enters the next state

Parameters:
  • sim – the sim state

  • env – the sim environment

  • prev_state – the previous vehicle state

  • next_state – the next state

Returns:

error, or updated sim, or (None, None) if either exit or enter was invalid