State of the art travel demand models for urban areas typically distinguish four or five main modes: walking, cycling, public transport and car. The mode car can be further split into car-driver and car-passenger. As the importance of ridesharing may increase in the coming years, ridesharing should be addressed as an additional sub or main mode in travel demand modeling. This requires an algorithm for matching the trips of suppliers (typically car drivers) and demanders (travelers of non-car modes).
Therefore a matching algorithm is necessary, which can be integrated in existing travel demand models. The algorithm works likewise with integer demand, which is typical for agent-based microscopic models, and with non-integer demand occurring in travel demand matrices of a macroscopic model. The algorithm compares two path sets of suppliers and demanders. The representation of a path in the road network is reduced from a sequence of links to a sequence of zones. The zones act as a buffer along the path, where demanders can be picked up.
Here you can find the tool including an example for testing purposes (PTV VISUM 16): Application
To minimize the number of vehicles required for on-demand services (carsharing or ridesharing), empty vehicles need to be reallocated to places with current demand. This requires a vehicle scheduling (or vehicle blocking) process simulating the dispatching of shared vehicle fleets. The vehicle scheduling algorithm determines the number of required vehicles and the origins, destinations and times of empty vehicle trips. It uses time-dependent demand matrices (=service trips) as input and determines time-dependent empty trip matrices and the number of required vehicles as a result.
The algorithm can be applied to integer and non-integer demand matrices and is therefore particularly suitable for macroscopic travel demand models.
Here you can find the algorithm, including an example implementation for scheduling electric scooters on the University Campus Stuttgart-Vaihingen.