TNC Vehicle#
Once the request is assigned, the TNC vehicle code handles the remainder of the request. Each vehicle stores a sorted list of tasks to be performed. A pickup and a dropoff operation is added to this list for every request assigned to the vehicle. Each task in the list involves the vehicle moving between its location to either the pickup point or the dropoff point. Depending on the task, the vehicle identifies the path from its current location to the next operation location. At the end of each trip, the total trip distance, travel time, and eVMT, are computed and recorded. After dropping off the passenger at their destination, the vehicle may receive a new set of tasks and repeat the same process. If there is no task to be performed, the vehicle stays in place (or idles) at the last task’s destination and awaits new trip assignment (this is in contrast to (Yan et al., 2019) which simulates a no idling policy which requires empty vehicles to relocate to nearby off-street parking lots). Without DRS, only one task is executed at a time to speed up the assignment process, which only uses available vehicles (i.e., those that are idle). When DRS is available, separate pickup and dropoff lists are maintained. Pickup is prioritized and dropoffs are carried out sequentially.
Charging Vehicles#
At the end of a trip, a function called decisions_at_end_of_trip() is called. The vehicle looks up the respective charging strategy to test two charging heuristics:
a minimum battery level: range is insufficient to meet the next trip request and the nearest charger
a minimum idle time: charge vehicles during off-peak periods when utilization is low.
Fig: Simplified SAEV Operations Diagram (Gurumurthy et al. 2021)
Gurumurthy et al. (2021) used a 20% minimum SOC (a middle value between 5% and 35% seen in the literature), and two minimum idling times (30 minutes and 60 minutes). The 30-minute idling assumption results in marginally better response times for the passenger, regardless of other operational and technical changes. This is likely because in times of low demand (and areas of low demand), SAEVs can proactively charge and be ready for periods of higher demand.
If the fleet operator permits idle-based charging, a counter (TNC_CHARGING_ON_IDLE_SUBITERATION) immediately starts to trigger a charging event at some discrete time step later (assuming the vehicle is still idle).
If the minimum battery level condition is true or once the idling counter exceeds the idling threshold the TNC vehicle will schedule a charging trip. The vehicle asks the operator to find the nearest EVCS. Once the station is found, the vehicle creates a movement plan for the vehicle and sets the vehicle status to TNC_Charging.
Once a vehicle arrives at the EVCS location the vehicle increases the counter for charging trips made. The vehicle then references the EVCS function add_to_charging_queue().
Once a vehicle stops charging and leaves the EVCS, the vehicle’s status is changed to TNC_Idle and the assigned_charging_station pointer is cleared.
Maintenance of Vehicles#
At the end of a trip, the function decisions_at_end_of_trip() will check whether the vehicle is scheduled to visit a maintenance station at the present hour. This determination is randomly made during vehicle generation. If the fleet model has SERVICE_FLAG = true and the hour in the simulated day aligns with the randomly assigned maintenance hour, then the vehicle schedules a maintenance trip (called service in the code). A similar pattern of finding the closest depot, recording maintenance trips, and changing vehicle status occurs.
Other Vehicle Functions#
There are many other functions that are useful for modelers (though this list is not exhaustive):
get current destination (get_current_dest)
get current position (get_current_position)
get final destination (get_final_destination)
is TNC available for rides based on seat availability, leave EVCS early check, not doing maintenance, & humand-driver is on shift checks(_isTNCavailable)
approximate range needed for passengers already in the vehicle (approx_range_needed)