Abstract
The on-demand transport (ODT) systems have developed worldwide as they have significant social, environmental, and economic benefits. Even with those benefits, it’s still important to gain popular acceptance. The acceptance key is the reactivity of the system in providing fast and reliable solutions whilst respecting vehicles’ and clients’ constraints. This paper presents a decentralized multi-agent approach to model and solve the ODT problem in a static road network. The agents interact with each other using the A* algorithm to find an optimal solution for each transport demand. The optimal solution is expressed by the fastest trajectory taken by the cheapest vehicles. We utilize factual data from a Lebanese city to do experiments evaluating the proposed approach.
Introduction
On-demand transport (ODT) is a passenger transport service characterized by flexible routing and scheduling of vehicles operating in shared-ride mode between departure and arrival places according to passengers’ needs. ODT systems have emerged recently in numerous cities globally due to their economic, environmental, and social benefits to individuals and communities [32,34]. For instance, they propose an inexpensive solution compared to taxis since they simultaneously serve multiple transport demands by the same vehicle. That leads to reduce road congestion, road accidents, and pollution (such as greenhouse gas emissions) [5]. In addition, they can serve places not covered by classic public transport.
ODT problem is among the most fundamental and extensively studied problems [9,20]. The challenge is to find a collection of trajectories to transport a set of geographically spread clients, each during a specified window of time. The biggest difficulty of the ODT problem is to provide fast and reliable solutions that take into account the constraints of clients and vehicles.
Multi-agent systems [37] are valuable and promising in modeling and solving distributed complex systems such as ODT systems [4,7,17,33]. The computing load and the search space are distributed on several autonomous agents operating in an environment and interacting with one another. Considering a multi-agent point of view, we can imagine new measures and ways to provide solutions that are not envisaged by centralized approaches. The fundamental challenge, however, lies in developing a decentralized agent-based approach to address the ODT problem.
We present an approach based on multi-agent systems and the A* algorithm to model and solve the ODT problem in a fixed-speed road network.
A client formulates a transport demand. The transport demand contains the number of passengers, the departure and arrival places, and the time windows related to these places. The agents interact with each other based on a decentralized A* algorithm to find the optimal solution. This solution is expressed by the fastest trajectory taken by the cheapest vehicles. It respects the constraints of the client (departure time, arrival time, etc.) and the vehicles (schedule time, empty spaces, etc.) and it optimizes the total travelled time and cost.
Motivated by the advantages of decentralization, our contributions are the following: First, we present a significant extension to the agent-based coordination strategy to extend the approach proposed in [14]. The extension is based on decentralizing the coordination between agents. Second, we implement a prototype to validate the efficacy of the offered approach. We evaluate the approach by instances created from actual data for a Lebanese city. The contribution is important for two reasons: (i) the exponential complexity of the problem is reduced to be polynomial and (ii) a novel coordination strategy based on A* algorithm is introduced and can be applied to several other similar problems.
This is how the paper is organized: related works are presented in Section 2. Section 3 explains the data structure of the ODT system component. The multi-agent approach of the ODT problem is described in Section 4. The agents’ interaction strategy is presented in Section 5. Section 6 outlines the Vehicle agent’s work. In Section 7, we manifest the results of the experiments. The paper is finally concluded in Section 8, which also discusses viewpoints for future work.
Related work
Many methods have been used to resolve the on-demand transport problem (so called, dial-a-ride problem: DARP in the literature). The reader can refer to [9] for an up to 2007 survey of the models and algorithms developed for the DARP and to [20] for a recent one that presents the research on the problem since 2007.
As DARP is NP-hard [19], the solution power of the exact methods is limited to small-size problems [2,3,25,30]. For instance, [15] uses branch-and-price-and-cut algorithms to solve the basic DARP. Instances up to 8 vehicles and 96 requests are solved in 898.8 seconds. Furthermore, the branch-and-cut method is used to solve the realistic DARP. The algorithm was able to solve an instance composed of 22 requests in 4 hours [27].
This limitation encourages the decomposition of the problem into simpler subproblems and/or the development of heuristics [23,36].
Therefore, meta-heuristic methods are also used to provide solutions for real-world size problems. For example, in [8] the authors use the genetic algorithm to solve the problem of demand responsive transport (DRT). It is a flexible approach that dynamically treats transport demands. It seeks to optimize the quality of service by minimizing the number of deviations and travel time, and respecting the time windows of each passenger. Furthermore, evolutionary algorithms are used to solve a multiple objective dial-a-ride problem [16]. The objective is to minimize the total distance travelled by vehicles to serve all requests, the drivers’ wages difference, and the total number of empty seats. The taboo search method has also been used to solve the heterogeneous vehicle routing problem [11,24]. In [26], the authors propose a model based on the simulated annealing algorithm to solve the DARP. This model considers time window constraints and aims to minimize the cost of operation represented by the total travelled distance. It also maximizes customer satisfaction by minimizing customer waiting time and travel time on board of the vehicle. The experiments results showed that 66% of taxis and 19% of travelled distance are reduced in the proposed model compared with the classic taxi. Moreover, the ant colony algorithm solves the problem of vehicle trips with stochastic dynamic travel time [13].
All the above-cited works are traditional approaches that consider centralized dispatcher architecture. However, to reduce the complexity of the problem and distribute the computing load and the search space, the multi-agent systems have been used to resolve the on-demand transport problem.
For instance, the authors in [22] propose a distributed multi-layer planning model based on multi-agent systems to solve the demand-responsive transportation (DRT) problem. The model is centralized, but the authors use the A-globe agent as a platform to provide a distributed environment.
The authors in [6] develop a method based on vehicle negotiation for the problem of ODT. Its goal in a changing environment is to address a lack of service in some areas and an over-concentration of vehicles in others.
To model the DRT, the authors in [1] propose a multi-paradigm approach. Combinatorial auctions are used as a centralized strategy and distributed hybrid multi-layer planning as a multi-agent approach. The first conducts a global search to find the best solution, while the last addresses actual issues to improve the reliability of the system.
In [38], the authors put forward a centralized multi-agent model to resolve the problem of ODT. A Client agent, an Interface agent and a Vehicle agent interact to encounter the solution. The environment is represented in a spatio-temporal manner in order to avoid broadcasting the transport demand to each Vehicle agent.
In [21], the authors use the multi-objective simulated annealing algorithm and propose a multi-agent system for the static dial-a-ride problem. The goal is to ensure the quality of the service while reducing travel time.
In [31], the authors use the agent-based platform NetLogo to compare three types of transport systems: bus, classic taxi and shared taxi. The compared criteria are service performance, cost, carbon emissions and total distance travelled.
The authors of [14] present an agent-based approach using A* algorithm to solve the problem of on-demand transport. However, this approach has two weak points: 1) the planning algorithm is centralized and 2) its effectiveness has not been proven.
All cited works that solve the problem by an agent-based system, have a central coordinator that makes decisions and finds solutions. [10] presents an approach following fully decentralized decision-making to solve the ODT problem. Two parallel multi-agent coordination processes are provided: The first one makes a decentralized decision based on the insertion-heuristic algorithm. The second coordination improves the quality of the solution achieved by the first coordination by using combinatorial auctions. To evaluate the approach, the authors use data for taxis operating in the city of Saint-Étienne and show that it outperforms a decentralized greedy approach.
In this paper, we extend the approach proposed in [14] and decentralize the multi-agent model to solve the ODT problem.
The work on a decentralized approach is motivated by the limitations of centralized approaches. Therefore, we are using the multi-agent system to extend the approach proposed in [14] and decentralize the planning algorithm and the search space. In addition, real experiments are made to test the new approach.
Data structure of ODT system components
The ODT system is composed of the following essential elements: the infrastructure, the transport demand, the vehicle, and the trajectory. In the following, we present the data structure of the four elements. Then, we define the problem of ODT and its objective.

Infrastructure example.
Three examples of transport demand are provided below:
name: represents the vehicle’s name,
capacity: represents the number of passengers’ seats,
cost: refers to the cost of using the vehicle per kilometer,
garage: is the location where the vehicle is parked each day,
planning table: represents the vehicle occupation per day. This table helps to know at every moment the vehicle’s location (it can be a road or a place) and the number of passengers on board. A line in the table is described by
t represents the time,
Vehicle
(
From the planning Table 1, we can deduce that
Suppose
A trajectory
The example of ODT system is described by the infrastructure defined in Fig. 1 and three vehicles
Trajectories
The objective of the ODT system is to find the optimal trajectory satisfying the client’s demand. The optimal trajectory is the fastest trajectory taken by the cheapest vehicles. To this end, we study two optimization criteria: time and cost. Let
Thus, a trajectory is a solution for a demand D, if it satisfies D and if it is optimal.
Multi-agent modeling of the ODT problem
The multi-agent systems distribute processing, calculation, and decision-making across numerous agents, with consideration of the distributed nature of the problem. This helps to solve the complexity of transport problems caused by the exponential growth of the search area because of the huge number of vehicles, demands, etc. This also leads to providing a satisfactory solution at an acceptable time for clients’ demands. In the following, we present the ODT problem as a decentralized multi-agent problem.
General architecture
The architecture of the decentralized multi-agent system is depicted in Fig. 2. The dialogue space is shown in the center of the figure. The agents’ interactions take place on their own information (i.e. the planning tables of the vehicles), the system’s infrastructure, the vehicles and the trajectories to be adopted in order to serve the transport demands.

Multi-agent architecture for on-demand transport problem.
The multi-agent architecture distinguishes between four agents:
The following sections explain how agents collaborate and work together to solve the ODT problem.
Interaction between agents to treat a transport demand
This section provides the main idea of the interaction. The different agents interact with each other referring to a decentralized A* algorithm to find the optimal trajectory for a transport demand.
Let
Finding the fastest path on a weighted graph is solved by a number of classical graph search algorithms. This paper does not cover the study of these algorithms. Readers who are interested can refer to well-known examples: Dijkstra’s algorithm [12] and A* [18].

Demand life cycle.

Decentralized A*.
The details of how the Road and the Vehicle agents coordinate to find the optimal trajectory for a transport demand are explained below.
The fastest path found by the Pathfinder agent is composed of a set of roads to cross. These roads are associated with Road agents that coordinate with the Vehicle agents to find the optimal trajectory. In other words, they coordinate to find vehicles with minimum cost that can transport passengers on the roads of the fastest path. In [14], the coordination process is based on the classic A* algorithm, where there is a central agent that controls the coordination process between the Vehicle agents. In our approach, the coordination process is based on a decentralized A* algorithm, and it comprises two stages: the initialization and the planning stage. The initialization stage aims to compute an admissible heuristic for the planning stage (i.e., a decentralized A* heuristic). The planning stage seeks to find the optimal trajectory. These two stages are explained in the next two subsections.
Initialization stage
The purpose of the initialization stage is to calculate an admissible heuristic for the decentralized A* algorithm. To be admissible, the heuristic must represent the lowest cost of achieving the objective from any node on the graph.2
Note that the minimum number of vehicle changing required by the client is not considered in the heuristic calculation.
Afterward,
Let
In the planning stage, Road agents coordinate with the Vehicle agents to determine the optimal trajectory. The coordination strategy is based on the decentralized A* algorithm. This algorithm is modeled by a tree distributed across the Road agents. Every Road agent is in charge of developing one level of the tree. For the algorithm’s correct functionality, a token shared between Road agents exists. The role of the token is to define the next Road agent who will explore the distributed tree. In other words, the token is used to define the Road agent
The Road agents update the token in the manner described below.
After defining the vector F representing the token,
Later,
Suppose an agent
After receiving the road’s execution cost,
Note that exiting a car
Note that the decentralized A* tree is distributed among agents. Each of them calculates and memorizes one level of the tree, reducing calculation time.
The Vehicle agent is requested by the Road agent to verify its availability to transport passengers during the initialization and planning stages. In the following, we detail the role of the Vehicle agent during the two stages.
Initialisation stage
During the
Consider that the Vehicle agent receives the road

Calculating road execution cost during initialisation stage
During the
where
Condition (1) ensures that the demand initiates at or before the earliest time to quit, condition (2) affirms the execution of the demand without ignoring the time interval of the next one, condition (3) assures the ending at or before the latest time to arrive to the goal, and condition (4) guarantees the providing of the service by considering the interval of time of the next demand.
Experiments
The current section presents experiments that prove the effectiveness of our approach. The following subsections are composed of the experiments platform, experiments settings, and experiments results.
Experiments platform
Multi-agent simulation toolkit MASON (Multi-Agent Simulation Of Networks) [28] and Monte Carlo method [35] are utilized to build a testing platform and prove the validity of the approach.
Mason can support many agents and has several advanced features such as fast, easily extendable, portable, highly modular, flexible, written in Java, etc. Further features are presented in [29].
Four types of agents are generated to be associated with the clients, roads, vehicles and pathfinders. Each agent is defined in MASON as a class that inherits sim.engine.SimState. The time is shown by a schedule: an instance of the class sim.engine.Schedule. Mason schedules each agent to be stepped on at various time in the future and to perform some actions. The four agents have two principal methods (send and receive) to send and receive messages during the coordination strategy.
The monte Carlo method [35], invented in 1947 by Nicholas Metropolis, is a numerical method that generates a random number value using probabilistic techniques. It is used to generate the departing and arriving places of the demand as well as their departing and arriving times.
Experiments settings
Tripoli is a Lebanese city. It is located in the north. Its area is 2.0248 km2. It has 20.7% of the population of Lebanon which is close to 850,000 people. Tripoli has a municipality, a port, 144 schools, 10 higher education institutions, 11 hospitals, etc. The road network of Tripoli is used as infrastructure in the experiments. 315 roads and 117 locations are utilized. Every road is connected to a road Agent. It has two variables: a distance and a speed limit ranging from 40 to 100 km/h. These parameters come from the municipality of Tripoli. In addition, we choose a famous transport company in Tripoli called Connexion. It has 45 drivers and 30 vehicles dedicated to transport clients to Tripoli’s neighborhoods. The meeting with the general manager provides information on the Tripolitan population such as the number of demands per day, departing and arriving places, and the most popular departure times.
We describe how the transport demands of the passengers are created in the following paragraphs.
First of all, the departure and arrival places are created by applying the Monte Carlo technique to Tripoli places. The regularly demanded places (according to the data that the general Manager presented), have a higher chance (75%) of being selected.
Passengers’ number is randomly selected using the uniform distribution on a set composed of four integers ranging from 1 and 4.
Based on the general manager’s information, the departure time for most demands varies between the following intervals: [07:00, 09:00] and [14:00, 16:00]. The technique of Monte Carlo is used on a collection of hours ranging from 07:00 to 22:00 to generate the departure time of each demand. Peak hours (7:00 to 09:00 and 14:00 to 16:00) have a higher probability (75%) of being selected than other hours. As result, 500 demands are created and saved in an XML file.
Concerning vehicles, each one has a garage place where it is parked every day and a cost per kilometer. All vehicles operate all day long, thus having the same work schedule. However, drivers have different work schedules.
Experiments results
The experiments are carried out under the following conditions: an Intel core i3 processor, 6 GB of RAM, and the Windows 7 operating system. Three types of experimentation are executed. The first experiment assesses the feasibility of our approach by comparing it to another recent decentralized approach proposed in [10]. The two remaining experiments reveal that our approach results in an acceptable execution time even though the number of demands and vehicles increases.
In the first experiment, we compare our decentralized A*-based approach to a decentralized auction-based one presented in [10]. The latter is compared to a classical centralized approach using a mixed-integer linear program (MILP) solver and supplying adequate quality results. In this experiment, we measure the number of served demands by fixing the number of vehicles to 20 and varying the total number of demands between 0 and 160. Figure 5 illustrates the difference in the number of satisfied demands between the two compared approaches. Our approach provides solutions retaining values of served demands remarkably close to those of the compared approach.

Nb. of served demands by two decentralized approaches.
In the second experiment, we measure how many demands the system treats and the execution time by fixing the number of demands and varying the number of vehicles. 5 cases are differentiated: the first one contains 40 demands, the second is formed of 80 demands, including the 40 previous demands, the third is composed of 120 demands, including the 80 previous demands, the fourth involves 160 demands and the last covers 200 demands including all 160 demands. There are now 500 created demands. In each case, the demands are randomly executed seven times. Then, the system compares the achieved results to those of selective demands processing. In this processing, the system prioritizes every demand beginning with the demand that has the fewest roads (in its path), and so on.
Table 3 shows the results of processing demands. For each treatment of demands, we represent the results in three lines. The first line represents the number of vehicles. The second is the average number of served demands executed in random order and the average processing time. The third line is the number of served demands executed with priority and the processing time. For example, (33 D, 2.5 sec) signifies that 10 vehicles in a random order serve 33 of 40 demands in 2.5 seconds.
Treatment of demands
The graphs in Fig. 6 and Fig. 7 represent the results in Table 3. The two graphs in Fig. 6 illustrate the number of served demands according to the number of vehicles. The first denotes the randomly executed demands, and the second represents the selective execution.
The two graphs in Fig. 7 define the execution time of demands according to the number of vehicles. The first depicts the processing of demands randomly. The second shows their treatment selectively. These results reveal that increasing the vehicles’ number, boosts both the execution time and the demands that are served. Furthermore, applying an intelligent prioritization method in the treatment of demands augments the demands that are served and decreases the duration of execution and the vehicles that are used.

Number of served demands.

Demands execution time.
In the third experiment, we study the number of served demands and the processing time by fixing the vehicles’ number and varying the demands’ number. We determine four cases: the first case includes 10 vehicles, the second contains 15, the third has 20, and the fourth includes 25 vehicles. For each case, the demands are treated by priority. As mentioned before, the system prioritizes every demand beginning with the demands having the fewest roads (in its path). Figure 8 and Fig. 9 depict the result of the third experiment. Figure 8 illustrates the variation in the number of served demands, and Fig. 9 shows the variation in the processing time of given demands.

Percentage of served demands.

Processing time.
The obtained results manifest:
one vehicle treats a transport demand in 0.9 seconds.
our decentralized approach provides remarkably close results to those obtained by another decentralized one. The quality of service symbolized by the number of demands served by our approach is adjacent to the one of the decentralized approach presented in [10].
the increasing number of demands raises the number of demands that are served as well as the processing time.
the increasing number of vehicles is accompanied by the rise in the number of served demands and the processing time.
even though the increase in the number of demands and vehicles, our decentralized algorithm still serves the demands during an acceptable execution time.
the introduction of an intelligent priority strategy in the execution of demands increases the demands served for more than 66% of cases and reduces the execution time and the number of vehicles used for more than 53% of cases.
our decentralized approach could process and give promising results in an acceptable execution time regardless of the size of the problem.
In the end, we conclude two things: 1) If the processing of demands is done with a certain priority, optimal solutions can emerge; 2) The time of execution and the number of demands that are served depend on several factors: the number of roads in the path of each demand, the order of demands processing, the start time of each demand, the number of available vehicles and the total number of demands to serve.
Conclusion and future work
This paper presented a multi-agent approach based on A* algorithm for on-demand transport problem on a road network characterized by time-independent travel speeds. This approach is implemented and evaluated using real-world data from a Lebanese country called Tripoli. To assess the feasibility of the proposed approach, we showed that it offered adjacent results as a decentralized auction-based approach.
Our approach assumes a fixed travel speed. This assumption shows the limitations of real-life conditions: time-dependent travel speed, unpredictable events such as accidents, festivals, etc. In real life, the travel speed is not constant. It varies and depends on the traffic situation. If the time-dependent travel speed is not considered, the time window of clients and vehicles won’t be respected, and the quality of service will decline.
This work should be expanded to solve a real ODT problem by incorporating real-time data about traffic and road network conditions. Likewise, we have to consider how the ODT system remains operational and optimal in real-time, following a change in an ODT component like accidents, work on roads, etc. The transport demand should be expanded to include more requirements such as transporting a group from one location to several locations and vice versa. For instance, transporting a family from their house to particular locations such as university, work, market, school, etc. The ODT system’s global optimality should be studied continuously. In other words, when the system receives a demand, it will answer with an optimized trajectory response and be able to update the previous trajectories and get a system-level optimization. Furthermore, the multi-agent coordination strategy must be extended to increase the simultaneous work of agents.
