Tour Planning and Ride Matching for an Urban Social Carpooling Service

SocialCar is a research project aiming at integrating carpooling with existing transportation systems in urban and peri-urban environments. The system, that also takes benefit from social network interactions, is based on tour planning and ride matching algorithms to suggest the users the available alternatives for their trips. In this paper we overview some approaches to model general public transportation networks and carpooling services. A route planning algorithm, able to integrate different types of public transportation, bike rentals and carpooling services is finally presented.


Introduction
Commuting for short or long distances has become an everyday activity for most people worldwide.For some people the preferred mean of transportation is a car, in such case one can easily find the shortest path from source to destination using a navigation system.On the other hand, if one prefers to use public transportation, there are many websites and mobile applications that are used to find available connections.In some cases it is advantageous to use multiple means of transportation for a single trip, such as driving to a railway station and using public transportation to reach the desired destination.Still, most car transports are performed by a single driver, which is rather inefficient in terms of resource usage.Carpooling is another effective mean of transportation, which is usually defined as the cooperation of two or more persons regarding the use of a single vehicle to meet their mutual commuting needs.
Carpooling has many benefits, such as reducing the number of vehicles participating in the transportation system, and it also benefits the individuals participating in the carpool.These benefits include reduced fuel costs, reduced toll costs, and potentially reduced driving stress for the passengers in the vehicle, and possibly some benefits in the social aspect.
In some countries such as the United States and parts of Europe, carpooling is encouraged by the governments.However, research has shown that the attractiveness of carpooling has been decreasing [1] because of low fuel prices, and strong incomes [2].The psychological barrier of riding with strangers also plays a role [3].
SocialCar is a research project that seeks to assimilate carpooling into existing mobility systems by means of powerful planning algorithms and integration of big data from public transport, carpooling, and crowd sourcing.The project's mission is to design, develop, test, and roll out a service that simplifies the travel experience of citizens in urban and peri-urban areas.
The SocialCar service differs from existing carpooling services because it does not simply offer a peer to peer taxi and it is not a commercial service.However, SocialCar users -that is both passenger and driver, can also benefit from existing carpooling services (where available).These commercial services are interfaced with SocialCar so that the data on carpool offers and requests becomes available to the wider SocialCar user community.It is expected to be able to gather reliable real-time information on the traffic by the SocialCar community, and therefore being able to monitor and update the initially planned trip in real-time, and planning the trip based on the current state of traffic.

SocialCar network models
As transportation networks are becoming more complex and means of transportation are increasing, route planning is gaining more and more importance.The problem of route planning involving different means of transportation is called multi-modal route planning.The goal of the problem is very simple.Given a source and target in the road network, and a departure time, with the desired means of transportation, the route planner should return an optimal route with respect to travel time that shows us what roads and which forms of transportation to use.
SocialCar aims to solve a multi-modal route planning problem.In order to solve such a problem, different transport options need to be structured as a multi-layer temporal network, as described in [4].The multi-modal network model is strictly related to the algorithms that can be used to solve the planning problem, so its design and implementation depends on the specific algorithms to be applied to it.

The multi layer temporal networks
The algorithm needs an underlying network in order to create alternative route solutions for users willing to move from origin to destination selecting alternative transport means.The network must be made available as a graph, composed by nodes, which are connected by edges.The nodes represent the junctions in the network, from where links depart.A link connects two nodes.
The network is composed of layers.Each layer represents a different transport mode.Nodes that are present in multiple layers simultaneously represent intermodal connection points.There are also interlayer links which represents the travelling time (by foot) required to transit from a transport mode to another.The nodes where a modal change can take place have been defined as switch points in the work discussed in [5].
The layers associated with scheduled transport are defined as temporal networks [6].Each edge in the graph modeling the network represents a segment in a route, while the nodes are the stop/stations.

Figure 1.
Two different layers contain the graphs for car and bus routes.The dashed line represents an interlayer link, which allows a modal change across a selected route.

Modelling public transport as temporal networks
Modeling public transport network requires an additional level of complexity with respect to the road networks, as routes are possible only when a service is scheduled.
In order to represent the transport services offered on top of the transfer network, each node in the public transportation network is annotated with a list of departure times containing all the routes departing from that node.
The timetable information (bus number, arrival/departure time, and destination) is used to generate the temporal network representation.Each ride from a stop/station to the next one is represented with a directed edge with duration equal to the difference between the arrival time of the destination node and the departure time from the origin node.The resulting network is called a Time-Expanded Graph.The main advantage of the above representation is that standard algorithms for shortest path work with little to no modifications, as the resulting network is static.A drawback is the large size of the resulting network (even if sparse), which can lead to longer computation times with respect to the time-dependent case.
Time-dependant graphs are another approach to modeling public transit networks.This representation does not require proliferation of graph nodes in order to represent different departure times from a station.On the other hand, it uses information contained in the timetables to generate the arc weights "on the fly" [7].In a multilayer network, each transport mode is represented by a different layer, and each transport line can be also represented as a different layer.Solutions where the user can switch modes and lines have been defined as switch points in [5].Such a solution is described in Fig. 4.

Modelling carpooling services
SocialCar also represents car pooling services, which are a hybrid transport mode halfway between public transport lines (car poolers driving to work tend to stick to fixed schedules) and private transport (car poolers are not bound to a specific route, they can change the route dynamically depending on traffic conditions).
For the above reason, car pooling services can be represented as public transport services, while deviation will be represented using real-time feed.The real-time feed contains the essential information that is needed to describe alterations to planned routes, such as cancellations, delays, and updated routes.Notifying users about pick up points (stops) that have moved, as well as deviation in time from the expected schedule, is essential and very important for SocialCar.Another essential element is the availability of places on the car (residual capacity).Unlike public transportation, cars have very limited capacity, and as soon as all places are taken, the car is no longer available as a service; therefore the realtime feed must also be enriched with such information.
In order to represent this information, data of the car pooling service must be organized to the segments which connect pick-ups and drop-offs.
In Fig. 5 a typical situation is represented.The car starts the trip at home with the driver and one passenger.At the next stop, two passengers are picked up and then the car is fully occupied, meaning that there is no residual capacity to serve other passengers.This information is used by the route planning algorithm so that this particular car pooling service is not chosen in a potential solution by the algorithm.

Route planning and carpool matching
One of the main challenges of the project is to develop a fast and efficient method able to integrate route planning and carpool matching into a single algorithm.This can be achieved by specializing algorithms of the Dijkstra family [8].Dijkstra's algorithm computes a shortest path in graph from a given source to all other nodes, in route planning the graph is a road network.For road networks, there exist many algorithms to reduce the time of calculating a shortest path from one location to another.The work of Hart [9] allows the usage of optimality preserving heuristics to decrease the number of iterations necessary to compute the distance to a given selected target node.One of the heuristics used in such a context are discussed in [10], and [11].A substantial improvement in computing shortest paths on road networks has been provided in [12].In our implementation we used such techniques.A further improvement, not implemented yet, will be to deal with uncertainty in travel times, that can potentially have a strong impact on a multimodal journey.In order to do so, we will use a strategy similar to that described in [13] and [13].
A Global Carpooling Matching Service was designed by [15], where the sevice advises registered candidates how to combine their trips by carpooling.In their work they model the periodic trips as nodes in the graph, and the edges are labeld with the probability of scucess calculated by a learning mechanism.
In general, we can consider two alternative approaches to matching passengers to cars during the ride matching process: in the first approach, the car does not detour from its original path, and passengers need to travel to the closest possible stop.As described in Fig. 6, the car travels from origin to destination along a predetermined optimal route.The passengers can be picked up at intermediate stops which coincide with public transport stops in order to favor modal changes.
The second approach, shown in Fig. 7, changes the car's route in order to pick up passengers at their preferred location.This approach involves solving a routing problem, and it might be sub-optimal for the driver, as the expected travel duration can be considerably extended.In SocialCar we tend to privilege the first approach, as it strengthens the similarities between car pooling services and public transport and is more realistic for a driver, but at the same time small detours will be allowed.
In particular, the main work will be in the preparation of the graph representing the network on which the algorithm itself will be run: with appropriate combinations of the layers described in Section II, it is possible to use the same approach both for route planning and carpool matching, The final network of the algorithm is shown in Fig. 8 and consists of three layers.The first layer contains the road network, the second layer contains the public transit network, and the third layer contains the carpools.The Initially the starting point of the passenger is mapped to the closest vertex residing in the road network, the mapped vertex is the source vertex used by the shortest path algorithm.The algorithm is executed on the the three layer network to find a trip combining both public transit and carpooling.
Notice that the links between the middle and top layers are undirected connections, meaning that the passenger can travel both ways between the two modes of transportation.Therefore, it would be a possibility to use public transportation to reach a pick up point on the route of carpool A and use public transportation to reach another pick up point on the route of carpool B to reach the final destination of the passenger.Fig. 9 shows a screenshot of a possible solution of a trip plan using carpooling.The green and red markers show the start and finish point of two journeys of drivers registered to the car pooling service, willing to carry passengers and with a time schedule feasible with the needs of the passenger interested in using the services provided by the system.The bottom left yellow marker shows the starting point of the passenger, and the top right yellow marker shows the final destination of the passenger.The passenger starts his trip by travelling from the starting point to the nearest pickup point.The passenger is picked up at point A to reach point B and leaves the carpool.The passenger then proceeds by walking to point C and is picked up there by another car pool to be dropped off at point D. The trip of the passenger ends by walking from point D to the desired final destination.Notice that time and the related synchronization elements are omitted in the figure, together with capacity constraints.

Conclusion
In this paper, after having introduced the project SocialCar, we have shown that using a time-dependent representation of the road and transit network is suitable for the needs of SocialCar, being it designed for (peri-) urban areas.
For carpooling matching, two approaches have been considered, and the approach where passengers are picked up from a pre-determined route is currently adopted, as it strengthens the used of both public transportation and carpooling services, and also represents more realistically the behavior of a driver in a carpooling system.Future work will mainly concern the integration of uncertainty about travel times and public transportation timetables into our model.A further step will be about the use of tailored social network information to further improve the reliability of the planner.

Figure 2 .
Figure 2. A timetable converted into a time-expanded directed graph.Each edge has the departure and arrival time between the consecutive nodes.

Figure 3 .
Figure 3.A timetable is used to dynamically calculate weights (travel times) on the graph.

Figure 4 .
Figure 4.In Balerna the passenger can switch to the bus line.Balerna is therefore a switch nodeThe road network is therefore considered as another layer on top of the previous ones, but no time constraints are fixed on the graph edges.In SocialCar the public transportation network is modeled as a time-dependant graph.

Figure 5 .
Figure 5.A carpooling service with pick-ups and drop-offs.

Figure 6 .
Figure 6.The car poolers are picked up at pre-determined stop points, along the optimal path from origin to destination.

Figure 7 .
Figure 7.The car modifies the original route in order to pick up the passengers.

Figure 9 .
Figure 9.A screenshot of a possible tour planning and ride matching solution using SocialCar.
Figure 8.A network with three layers for different transport modes.The bottom layer is the road network, the middle layer is the public transit network, and the top layer is the carpool network.Additional layers could be introduced to model timedependency.