nrel.hive.dispatcher.instruction.instruction_ops
Module Contents
Functions
|
checks that the incoming trip plan covers the previous plan |
|
checks that the incoming trip plan has a logical pickup and dropoff ordering and that |
|
confirm that each request in the trip plan allows pooling |
Attributes
- nrel.hive.dispatcher.instruction.instruction_ops.trip_plan_covers_previous(previous_state: nrel.hive.state.vehicle_state.servicing_pooling_trip.ServicingPoolingTrip, new_trip_plan: Tuple[Tuple[nrel.hive.model.vehicle.vehicle.RequestId, nrel.hive.model.vehicle.trip_phase.TripPhase], Ellipsis]) bool[source]
checks that the incoming trip plan covers the previous plan
- Parameters:
previous_state – previous pooling trip state
new_trip_plan – the proposed trip plan
- Returns:
True, if the plan is valid
- nrel.hive.dispatcher.instruction.instruction_ops.trip_plan_ordering_is_valid(new_trip_plan: Tuple[Tuple[nrel.hive.model.vehicle.vehicle.RequestId, nrel.hive.model.vehicle.trip_phase.TripPhase], Ellipsis], previous_state: nrel.hive.state.vehicle_state.servicing_pooling_trip.ServicingPoolingTrip) bool[source]
checks that the incoming trip plan has a logical pickup and dropoff ordering and that no passengers are left on the vehicle after all steps in the trip plan.
- Parameters:
previous_state – previous pooling trip state
new_trip_plan – the proposed trip plan
- Returns:
True, if the plan is valid
- nrel.hive.dispatcher.instruction.instruction_ops.trip_plan_all_requests_allow_pooling(sim: nrel.hive.state.simulation_state.simulation_state.SimulationState, trip_plan: Tuple[Tuple[nrel.hive.model.vehicle.vehicle.RequestId, nrel.hive.model.vehicle.trip_phase.TripPhase], Ellipsis]) str | None[source]
confirm that each request in the trip plan allows pooling
- Parameters:
sim – the sim state
trip_plan – the proposed trip plan from dispatch
- Returns:
None if all requests do allow pooling, otherwise, a specific error