  In this study, we propose a novel heuristic two-step algorithm for shared
ridehailing in which users can share their rides with only one more user. The
algorithm, which is centrally formulated, starts with matching users and
creating a set of passenger pairs in step 1 and is followed by solving an
assignment problem to assign passenger pairs to the vehicles. To solve the
problem of high computational time in dynamic ride-matching problems, we
propose a distributed system that is based on vehicle to infrastructure (V2I)
and infrastructure to infrastructure (I2I) communication. To evaluate the
distributed system's performance, we compare it with the proposed centralized
ridehailing algorithm. Both centralized and distributed systems are implemented
in a micro-traffic simulator to assess their performance and their impact on
traffic congestion. Downtown Toronto road network was chosen as the study area.
Based on our obtained results, the service rate of the distributed system was
91.59% which is close to 95.80% in the centralized system. However, the
distributed system yielded much lower computational time compared to
centralized. Furthermore, the scalability of the distributed system was shown
by testing it on a small network and comparing with the entire network.
