  The mean occupancy rates of personal vehicle trips in the United States is
only 1.6 persons per vehicle mile. Urban traffic gridlock is a familiar scene.
Ridesharing has the potential to solve many environmental, congestion, and
energy problems. In this paper, we introduce the problem of large scale
real-time ridesharing with service guarantee on road networks. Servers and trip
requests are dynamically matched while waiting time and service time
constraints of trips are satisfied. We first propose two basic algorithms: a
branch-and-bound algorithm and an integer programing algorithm. However, these
algorithm structures do not adapt well to the dynamic nature of the ridesharing
problem. Thus, we then propose a kinetic tree algorithm capable of better
scheduling dynamic requests and adjusting routes on-the-fly. We perform
experiments on a large real taxi dataset from Shanghai. The results show that
the kinetic tree algorithm is faster than other algorithms in response time.
