Next Article in Journal
Biosimilar Medicines: From Development Process to Marketing Authorization by the EMA and the FDA
Previous Article in Journal
Research on the Support Technology for Deep Large-Section Refuge Chambers in Broken Surrounding Rock in a Roadway
Previous Article in Special Issue
Position-Based Formation Control Scheme for Crowds Using Short Range Distance (SRD)
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Agent-Based Pickup and Delivery with Time Windows and Electric Vehicles

Faculty of Automation, Computers and Electronics, University of Craiova, 200440 Craiova, Romania
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(17), 7528; https://doi.org/10.3390/app14177528
Submission received: 22 July 2024 / Revised: 14 August 2024 / Accepted: 23 August 2024 / Published: 26 August 2024
(This article belongs to the Special Issue Research Progress on the Application of Multi-agent Systems)

Abstract

:
The traditional methods of transporting goods and people in urban areas using vehicles powered by internal combustion engines are major contributors to pollution. As a result, an increasing number of logistics companies are transitioning to electric vehicles (EVs) for daily operations, replacing traditional engines. This shift opens research avenues regarding the integration of EVs into delivery workflows and how this can contribute to greener cities. This study tackles the EV routing problem, focusing on balancing battery constraints and optimizing routes. We formulated the problem as a pickup and delivery with time windows, incorporating electric energy consumption constraints, and utilized consensus mechanisms in an agent-based simulation context. Our evaluation used 15 scenarios, capturing variations in vehicle configurations, order generation rates, and battery and freight capacities. We compared two order allocation strategies: “Closest Allocation” and “Negotiation” consensus-based allocation. The results confirmed that the consensus-based strategy outperformed the “Closest Allocation” in metrics such as remaining orders, orders not handled in time, total distance traveled, total recharging cost, and total number of recharges. These findings have significant implications for urban planners, logistic companies, and policymakers, demonstrating that an agent-based simulation context for electric vehicles using consensus-based strategies can enhance delivery efficiency and promote sustainability.

1. Introduction

With the increasing complexity of demand for real-world transportation of goods and heightened environmental concerns, interest in improving transportation planning systems is now higher than ever. Given the vast and dynamic number of transportation requests in the real world, the proposed approach must provide feasible solutions. We introduce an agent-based approach that leverages a consensus mechanism as a decision-support tool to assist in human decision-making.
A vehicle routing problem (VRP) can be static if we consider route planning when the information is provided a priori. In other words, the static VRP deals with the planning of batches of orders, while the requests that occur while the plan is in progress have to wait and accumulate in a new batch until the system decides to solve a new route planning problem.
In the dynamic VRP, the requests are handled in the order in which they occur, with all available resources at that moment. Each new request is considered to define a new route planning problem to satisfy that order.
A recent report by the International Energy Agency revealed that 16% of global carbon emissions come from conventional road transport. However, the same study indicated that the number of electrical vehicles (EVs) surpassed 16.5 million in 2021 [1].
To achieve net zero emissions by 2050 [2], more logistics companies are transitioning to EVs for daily operations, replacing traditional internal combustion engines. In their research, the authors of [3] provide a study estimating the potential of powertrain electrification to reduce road freight CO2 emissions and fossil fuel consumption. This shift has led to novel research opportunities in the field of VRP. Researchers are now exploring variations of traditional VRP that factor in battery charging times and the availability of charging stations. For example, the authors of [4] provide a solution method to the vehicle routing problem with time windows for EVs using a hybrid heuristic based on neighborhood search and tabu search algorithms. A similar approach using variable neighborhood search algorithms, but this time for the EV problem with simultaneous pickup and delivery, was introduced in [5].
Various factors, such as geographical locations, regulations, economics, and technological limitations, influence the utilization of EVs for logistics and car ride-sharing. Reference [6] underscores the importance of digital technology in optimizing routes for waste collection by employing geographical information systems and a combination of heuristics derived from the constructive genetic algorithm and tabu search. To optimize the routes of EVs while considering their limited range and energy consumption, the pickup and delivery problem with time windows and electric vehicles (PDPTW-EV) has been developed as a variation of the pickup and delivery problem with time windows (PDPTW). As the popularity of EVs continues to increase, PDPTW-EV has become an essential tool for efficient route planning. This model ensures that vehicles have sufficient charge to reach their intended destinations while considering uncertainties in travel times [7,8,9,10].
The growing interest in sustainable transportation solutions through the integration of EVs into logistics, delivery networks, or ride-sharing underscores the need for advanced decision-support tools capable of handling the complexity and dynamics of modern transportation systems. According to our literature review, most works propose various solutions based on heuristic, constraint-based, or bio-inspired algorithms [11,12], we address the challenge of dynamic environments by leveraging consensus mechanisms in an agent-based simulation context. Therefore, this research aims to evaluate the potential of this novel approach to better address the evolving demands of transportation planning in dynamic environments by proposing a more appropriate, sustainable, and efficient approach. The findings of this research are primarily relevant for industries looking to transition to more sustainable practices, providing a model for optimizing EV fleets in real-world scenarios.
This paper is structured as follows. In Section 2, a comprehensive literature review covers existing research on agent-based modeling for vehicle routing problems and various consensus approaches used in agent-based systems. In Section 3, we detail the mathematical model of PDPTW-EV formulation as an extension of the classical PDPTW in which we introduce some constraints related to battery consumption. Section 4 describes the agent-based simulation mode (ABSM), including an in-depth explanation of the simulation environment and the consensus-based algorithm. The experimental setup and the obtained results are depicted in Section 5. Finally, this paper summarizes the key findings, implications, and possible future research directions in Section 6.

2. Derivation of Hypotheses and Related Works

2.1. Agent-Based Models for Vehicle Routing Problems

Agent-based approaches over VRPs and their variations have become popular solutions for complex optimization problems, particularly in dynamic environments with uncertainty and many distributed actors. Continuous information exchange and the need to reach a consensus over the negotiation of local solutions are essential to solving these problems and obtaining feasible global solutions.
The authors of [13] presented an agent-based approach for optimization problems using a decomposition model. Their results included estimates of the potential performance gain using a distributed implementation.
In an ABSM for VRP, multiple autonomous agents represent the vehicles that interact and coordinate to solve the routing problem collaboratively. Each agent is aware of its current location, its assigned customers, and its constraints. Agents can usually exchange this information to solve the route optimization problem.
Two approaches are distinguished by the authors in [14]: centralized and decentralized. The first refers to the centralized approach in which a central entity (“controller”, “coordinator”) makes a decision based on the information obtained from all other agents. Usually, a coordinator agent has a global overview of the system by gathering information and constraints from every agent to determine the best solution. Since this approach is a single decision-making entity, the decisions tend to be consistent with the global objective. The drawbacks of the centralized approach are the higher computational complexity, where the agents need to process the information from all other agents to make a decision, and the system may also be less adaptive to changes in dynamic contexts. The second approach is decentralization, where agents make decisions based on their local information or locally available data, such as from their neighbors or local environments. In this approach, the agents usually interact in a peer-to-peer fashion. The computation is distributed across agents, which may reduce the computational complexity and allow parallel processing. The authors proposed the usage of the contract net protocol (CNP) in a decentralized approach to order handling.
The idea of using agent-based approaches to solve dynamic optimization problems has been researched for a long time in the literature. For example, an agent-based approach to solving optimization problems using the Dantzig–Wolfe column generation scheme is proposed in [13]. In [15], the authors used CNP as a negotiation mechanism between vehicle agents to minimize the number of used vehicles.
Agent-based approaches to freight transportation problems were identified in many studies. For example, in [16], the authors proposed a knowledge-based freight broker based on agents and constraint programming, showing relevant results. The authors in [17] considered a multi-agent approach in combination with a heuristic local search to solve vehicle routing problems with time windows (VRPTW). Their evaluations were conducted on Solomon benchmark instances, which showed results comparable to those in the literature.

2.2. Consensus Mechanisms

A consensus mechanism is a process that involves a group of individuals or entities coming to a joint decision or agreement through iterative interactions. The goal of the consensus mechanism is to reach a solution that satisfies all parties involved, even if it is not the ideal solution.
The most commonly used consensus mechanisms in the literature include voting [18], averaging, and negotiation. Each approach is defined by various algorithms and techniques, each with strengths and weaknesses. In the voting consensus mechanism, the individuals vote on a proposal and select the one with the highest number of votes. The averaging method allows individuals to update their proposals based on the other proposals received from other individuals. Through negotiation techniques, individuals search for an agreement representing the shared solution.
The literature provides various consensus mechanisms applied in agent-based systems to improve decision-making support in domains such as production planning, control, or supply chain management. Ref. [19] provided a comprehensive study of existing methods and theories for achieving consensus in multi-agent systems (MASs). In [20], the authors described a consensus mechanism that allowed agents to coordinate the decision-making process, focusing on locally available information. In Ref. [21], the authors described the usage of the nearest neighbor rule in coordinating groups of mobile autonomous agents.

3. PDPTW-EV Formulation

The PDPTW-EV can be stated as the problem of finding optimal routes by minimizing the distance and the number of vehicles used in a given set of customer locations using mixed-integer linear programming (MILP). The model can be depicted as follows:
  • Variables
  • k denotes the number of vehicles;
  • n denotes the number of pickup locations;
  • m denotes the number of delivery locations;
  • s denotes the number of charging stations.
  • q i denotes the goods to pick up or deliver at location i; positive value for pickup location and negative value for delivery locations; q 0 = q n + m + 1 = 0 ;
  • e i denotes the lower time limit to start a service at location i;
  • l i e i denotes the upper time limit to start a service at location i;
  • d i denotes the service duration at location i;
  • c i j k denotes the travel cost of vehicle k from location i to location j;
  • Q k denotes the capacity of vehicle k;
  • t i j k denotes the time that vehicle k spends traveling from location i to location j;
  • C k denotes the maximum battery capacity of vehicle k;
  • L i k denotes the remaining battery level of vehicle k at location i.
  • Sets
  • P denotes the set of pickup locations P = { 1 , , n } ;
  • D denotes the set of delivery locations D = { 1 , , m } ;
  • K denotes the set of vehicles K = { 1 , , k } ;
  • S denotes the set of charging stations S = { 1 , , s } .
  • Decision variables
  • x i j k is 1 if vehicle k travels from location i to location j, else it is 0;
  • Q i k is the current load of the vehicle at location i;
  • B i k - start of the service of vehicle k at location i;
  • L i j k is the remaining battery level of vehicle k after traveling from location i to location j.
Let G = ( V , E ) be an undirected graph with V = P D { 0 , n + m + 1 } S as the set of nodes and E = { ( i , j ) | i , j V } as the set of edges that denote the shortest paths between locations. The goal is to optimize vehicle fleet usage by minimizing the total travel cost to deliver all customer orders within their required time windows.
The MILP formulation of the problem is given by the following:
minimize k K i V j V c i j x i j k
subject to k K j V x i j k = 1 , i P D
j V x 0 j k = 1 , k K
i V x i , n + m + 1 k = 1 , k K
i V x i j k i V x j i k = 0 , j P D , k K
B j k x i j k ( B i k + d i ) , i , j V , k K
B i k B n + i k , i P , k K
Q j k x i j k ( Q i k + q i ) , i , j V , k K
max { 0 , q i } Q i k min { Q k , Q k + q i } , i P , k K
j V x i j k j V x n + i , j k = 0 , i P , k K
0 L i j k R k , i , j V , k K
L i j k = L i k t i j k R k , i , j V , k K
i V x i j k i V x j i k = 0 , j S , k K
where the objective function is Equation (1) and it minimizes total travel costs across all vehicles and locations. Equation (2) ensures that each pickup or delivery location is visited by a vehicle exactly once. Equation (3) states that each vehicle starts its route from the depot, while Equation (4) ensures that the route ends at the depot. Equation (5) guarantees that each location is either the start or the end of a route segment for each vehicle. The next two equations are related to time constraints. Equation (6) ensures that each vehicle’s service start at each location is correctly determined by considering the service duration and travel time, while Equation (7) ensures that the start of service at pickup locations is not after the start of service at the corresponding delivery locations. By Equation (8), we ensure that the load on each vehicle at each location is correctly updated based on pickup and delivery actions, and by Equation (9), we ensure that the load on each vehicle at each pickup location stays within the vehicle’s capacity. Next, Equation (10) ensures that the load on each vehicle at each delivery location is consistent with the load at the corresponding pickup location. The last three equations describe the electrical vehicle constraints as follows: Equation (11) ensures that the remaining battery level of each vehicle after traveling between locations is within its maximum range. Equation (12) calculates the remaining battery level of each vehicle after traveling between locations based on its initial level and travel distance. Finally, Equation (13) ensures that the flow of vehicles at charging stations is balanced, meaning that the number of vehicles entering and leaving each station is the same.
Figure 1 depicts the solution example of two vehicle paths. Vehicle 1’s path, colored in blue, starts from the depot (the red square) and reaches the pickup location represented by the diamond shape. Next, it reaches the delivery location and finally returns to the depot. The path of vehicle two, colored in green, depicts the path including a charging station hop (green triangle). It starts from the depot, reaches the pickup point, then reaches the delivery location. Given that the remaining battery will not guarantee it will reach the depot, it takes a stop to charge at the charging station, as represented by the green triangle.

4. Agent-Based Simulation System

In this section, we present the details of the agent-based system for simulation. We first focus on the general agent-based simulation model and then we delve into the agent-based consensus allocation strategy.

4.1. Agent-Based Simulation Model

The representation of each vehicle as an agent within the simulation offers several advantages. Each agent operates autonomously yet communicates and collaborates with other agents to achieve their goals. The agent-based approach allows for flexibility and scalability in the simulation. As the number of vehicles and orders increases, the model can easily accommodate without significant loss in performance. Each agent in the simulation processes information and makes decisions independently, reducing the computational overhead as in centralized approaches. The agents’ autonomy and collaborative capabilities can lead to a more adaptive and resilient solution in optimizing plans for EVs in dynamic environments.
The ABSM described below is required to handle the dynamic PDPTW-EV. We consider a set of initial orders assigned to each vehicle using a simple assignment strategy. Then, new incoming orders are inserted into the vehicle’s initial route plan after establishing a consensus of each vehicle on how to deal with the order. In the context of solving the PDPTW-EV, we represent each vehicle, order, and charging station as agents in a grid environment. The agents and their interactions can be observed in Figure 2.
Table 1 depicts the properties defining the order agent, including time-based properties, location properties, and links to partner order agents within the pickup and delivery context.
The charging station agent is the agent that represents a charging station and it is characterized by the properties defined in Table 2. When a vehicle agent that requires recharging arrives at the charging station, it fully recharges at the defined recharging_rate.
Finally, Table 3 describes the properties of a vehicle agent. The vehicle agent represents an EV by properties such as speed, battery capacity, list of orders to be handled, transport capacity, and the plan.
Figure 3 describes the simulation process as an activity diagram. The simulation starts by generating the orders. The first step generates a pair of pickup and delivery orders. Following, the order is assigned to a vehicle agent based on the chosen simulation strategy and is added to its order list. Next, the vehicles handle delivering considering constraints depicted by Equations (2)–(10), ensuring enough battery charging or reaching the charging station for a complete recharge to fulfill their assigned list of orders as stated by Equations (11)–(13). After finishing all their orders, the vehicles are returned to the depot. The simulation can be configured to handle two types of order assignation: “Closest Allocation”, in which the order is allocated to the closest vehicle agent, and the “Negotiation” consensus mechanism, where the vehicle agents negotiate for handling the pickup and delivery orders pair.

4.2. Agent-Driven Consensus-Based Allocation

The consensus mechanism is built as a negotiation-based process as depicted in Figure 4. The negotiation occurs between all Vehicle Agents when a new pickup and delivery orders pair is generated. Next, the pickup and delivery orders are submitted to all the vehicle agents. Subsequently, each vehicle agent evaluates its cost based on the constraints defined by the model in Section 3 and generates a bid value as the total distance traveled by the vehicle (Equation (1)), considering the new orders. The best bid value is then used to allocate the pickup and delivery orders to a vehicle agent. The whole process is described by Algorithm 1.
Algorithm 1 Negotiation-based consensus mechanism for assessing new orders.
 1:  V List of vehicles
 2:  O List of newly generated orders
 3: for o in O do
 4:        c a n d i d a t e s
 5:       for v in V do
 6:            if v can feasibly handle o then
 7:                   c a n d i d a t e s c a n d i d a t e s { v }
 8:            end if
 9:       end for
10:       if  c a n d i d a t e s is not empty then
11:             s e l e c t e d _ v e h i c l e Negotiate( c a n d i d a t e s )
12:            Assign o to s e l e c t e d _ v e h i c l e
13:       else
14:            Reject o
15:       end if
16: end for
17: function Negotiate( c a n d i d a t e s )
18:        b e s t _ v e h i c l e Randomly select a candidate from c a n d i d a t e s
19:       for v in c a n d i d a t e s  do
20:            if v’s proposal is better than b e s t _ v e h i c l e ’s then
21:                   b e s t _ v e h i c l e v
22:            end if
23:       end for
24:       return  b e s t _ v e h i c l e
25: end function

5. Experiments and Results

The experiments were conducted in a Mesa agent-based modeling framework in Python [22]. The ABSM was implemented to deal with the dynamic PDPTW-EV, where vehicle agents handle pickup and delivery orders in a grid-like environment to enhance the total distance traveled by vehicles.
Based on the proposed model, we evaluate two consensus mechanisms. One involves exchanging some of the remaining orders between vehicles when a new order is generated, and the other entails assigning the order to the vehicle plan that is the most suitable to handle. The objective is to minimize the total traveled distance.
In the experiments conducted, the charging stations were placed at the beginning of the simulation, and we did not employ any placement strategies. The charging stations can handle charging for any number of vehicles and have infinite charging capacity.
The experiments aim to compare two different allocation strategies, “Closest Allocation” and “Negotiation”, across 15 randomly generated scenarios. Algorithm 2 describes the scenario generation process. The orders are generated in a given distance range. The GenerateValidPosition procedure guarantees that the generated order position is in the grid and the given range. To ensure that the generated order times are in future steps of the simulation and not in the past, the CreateOrder procedure must define the range in terms of steps for the order’s time-related properties and link the order to the corresponding one.
The metrics used to evaluate the performance of these strategies include Total Orders Generated, Remaining Orders, Orders Not Handled In Time, Total Distance Traveled, Number of Charges, and Total Recharging Cost.
Algorithm 2 Order generation.
 1:  M i n _ D i s t a n c e Minimum distance
 2:  M a x _ D i s t a n c e Maximum distance
 3:  S Number of simulation steps
 4:  O List of newly generated orders
 5: for o in O do
 6:        P i c k u p _ P o s i t i o n GenerateValidPosition()
 7:        D e l i v e r y _ P o s i t i o n GenerateValidPosition([ P i c k u p _ P o s i t i o n ])
 8:        P i c k u p _ O r d e r CreateOrder(o, P i c k u p _ P o s i t i o n , t r u e )
 9:        D e l i v e r y _ O r d e r CreateOrder(o, D e l i v e r y _ P o s i t i o n , f a l s e )
10:       Place P i c k u p _ O r d e r on the grid
11:       Place D e l i v e r y _ O r d e r on the grid
12: end for
13: function GenerateValidPosition( E x i s t i n g P o s i t i o n s )
14:        P o s i t i o n Random position within the grid
15:       while any position in E x i s t i n g P o s i t i o n s is within M i n _ D i s t a n c e of P o s i t i o n  do
16:             P o s i t i o n Random position within the grid
17:       end while
18:       return  P o s i t i o n
19: end function
20: function CreateOrder(o, P o s i t i o n , I s P i c k u p )
21:        I D Increment current order ID
22:        D e m a n d Random demand within the given range for o
23:       Set the ready time within the next S steps for o
24:       Set the due date within S steps of the ready time for o
25:       Set the service time within a given range for o
26:       if  I s P i c k u p  then
27:             P a r t n e r I D ID + 1
28:       else
29:             P a r t n e r I D ID − 1
30:       end if
31:       return Order( I D , P o s i t i o n , D e m a n d , R e a d y T i m e , D u e D a t e , S e r v i c e T i m e , P a r t n e r I D , I s P i c k u p )
32: end function

5.1. Evaluation Scenarios

The simulation scenarios are depicted in Table 4.
The scenarios involve a variety of vehicle configurations, order generation rates, battery capacities, and freight capacities. We considered the same charging station placements for each scenario. The number of properties ranges from low to high.
Most configurations with a large number of vehicles typically exhibit high order generation rates, along with moderate to high battery and freight capacities. In contrast, scenarios with fewer vehicles usually feature lower order generation rates and battery capacities but maintain moderate freight capacities.

5.2. Results

The simulation results based on the proposed scenarios are depicted in this subsection.
Total orders generated: This represents the total number of orders generated in each scenario.
In Figure 5, we can see that the number of generated orders is the same for each scenario. The blue bars represent the “Closest Allocation” strategy, while the orange bars depict the “Negotiation” strategy. The x-axis represents the scenarios labeled “Scenario 1” to “Scenario 15” and the y-axis represents the number of orders.
Remaining orders: This metric depicts the number of orders not completed by the end of the simulation. As can be observed in Figure 6, the results show that “Closest Allocation” generally has higher remaining orders compared to “Negotiation”, indicating that “Negotiation” might be more efficient in completing orders.
The results in Figure 6, where the x-axis represents the scenarios labeled “Scenario 1” to “Scenario 15” and the y-axis represents the number of orders, shows that the “Closest Allocation” generally has more remaining orders compared to “Negotiation”, indicating that the last is more efficient in completing orders. For example, in Scenario 4, “Closest Allocation” has 20 remaining orders, while “Negotiation” has significantly fewer. The pattern is consistent across most scenarios.
Orders not handled in time: This represents the number of orders not completed within the specified time windows. Figure 7 depicts the results for each scenario where the x-axis represents the scenarios and the y-axis represents the number of orders not handled in time. Blue bars correspond to “Closes Allocation” and the orange bars to “Negotiation”. We can observe that, in several scenarios, the “Closest Allocation” strategy has more orders not handled in time than the “Negotiation” approach, suggesting that the latter leads to better performance in handling orders within their time windows.
Total distance traveled: This metric shows the total distance traveled by all vehicles. As depicted in Figure 8, where the x-axis represents the scenarios labeled “Scenario 1” to “Scenario 15” and the y-axis represents the distance traveled, in some scenarios, the results show longer distances for the “Closest Allocation”, while in others, they show longer distances for “Negotiation”. Although this metric may show that the vehicles traveled a longer distance, it needs to be looked at along with the above-mentioned metrics for order handling.
Number of charges: This indicates how often vehicles need to recharge. As depicted in Figure 9, “Closest Allocation” often requires more charges compared to “Negotiation”, suggesting that “Negotiation” may be more efficient in managing vehicle battery levels. The x-axis represents the scenarios labeled “Scenario 1” to “Scenario 15”, and the y-axis represents the number of charging station visits.
Total recharging cost: This represents the total cost incurred for recharging the vehicles. In most scenarios, as depicted in Figure 10, “Negotiation” has a lower recharging cost than “Closest Allocation”. The x-axis represents the scenarios labeled “Scenario 1” to “Scenario 15” and the y-axis represents the recharging cost.
The results of the depicted ABSM suggest that the “Negotiation” approach may be more efficient in handling orders within time windows and managing recharging efficiency. While a “Closest Allocation” strategy may lead to higher operational costs and less efficient order completion.

6. Conclusions and Future Work

This paper presents an ABSM for dealing with the dynamic PDPTW-EV using a consensus-based technique to achieve near-optimal solutions. The ABSM was built by extending the classical PDPTW formulation by introducing eclectic vehicle constraints related to battery consumption and recharging. By introducing those constraints, we tailored the model to reflect the challenges posed by EVs.
The initial results demonstrate that the “Negotiation” consensus-based strategies consistently outperformed the “Closest Allocation” strategy across all evaluated metrics, highlighting the effectiveness of collaborative decision-making in dynamic routing environments. These research findings have significant implications for industries relying on EV fleets, such as logistics and transportation, where efficient route planning directly impacts operational costs.
The insights gained in this study could be valuable for EV operations. By adopting the “Negotiation” strategy, an efficient and sustainable logistic operation can be achieved, leading to reduced energy consumption and lower operation costs while improving customer satisfaction.
In future work, we plan to extend our research by employing other negotiation mechanisms that could further enhance the performance of the agent-based simulation in industrial applications. The agent model can be integrated with real-world industrial systems, facilitating the reuse and adaption of our findings in various domains such as ride-sharing, delivery systems, and automated logistics networks.

Author Contributions

I.M. designed and implemented the system, performed the experiments, analyzed the results and wrote the original draft. C.B. supervised the project and reviewed and edited the final manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The code for the experiments and data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PDPTWpickup and delivery problem with time windows
PDPTW-EVpickup and delivery problem with time windows and electrical vehicles
VRPvehicle routing problem
VRPTWvehicle routing problem with time windows
EVelectrical vehicle
ABSMagent-based simulation model
MILPmixed-integer linear programming
CNPcontract net protocol
MASMulti-Agent System

References

  1. IEA. Global EV Outlook 2024; IEA: Paris, France, 2024; Licence: CC BY 4.0; Available online: https://www.iea.org/reports/global-ev-outlook-2024 (accessed on 22 July 2024).
  2. IEA. Global Energy and Climate Model; IEA: Paris, France, 2023; Licence: CC BY 4.0; Available online: https://www.iea.org/reports/global-energy-and-climate-model (accessed on 22 July 2024).
  3. González Palencia, J.C.; Nguyen, V.T.; Araki, M.; Shiga, S. The Role of Powertrain Electrification in Achieving Deep Decarbonization in Road Freight Transport. Energies 2020, 13, 2459. [Google Scholar] [CrossRef]
  4. Schneider, M.; Stenger, A.; Goeke, D. The electric vehicle-routing problem with time windows and recharging stations. Transp. Sci. 2014, 48, 500–520. [Google Scholar] [CrossRef]
  5. Yilmaz, Y.; Kalayci, C.B. Variable Neighborhood Search Algorithms to Solve the Electric Vehicle Routing Problem with Simultaneous Pickup and Delivery. Mathematics 2022, 10, 3108. [Google Scholar] [CrossRef]
  6. Ferrão, C.C.; Moraes, J.A.R.; Fava, L.P.; Furtado, J.C.; Machado, E.; Rodrigues, A.; Sellitto, M.A. Optimizing routes of municipal waste collection: An application algorithm. Manag. Environ. Qual. Int. J. 2024, 35, 965–985. [Google Scholar] [CrossRef]
  7. Zuo, X.; Xiao, Y.; Zhu, C.; You, M. A linear MIP model for the electric vehicle routing problem with time windows considering linear charging. In Proceedings of the 2018 IEEE Annual Reliability and Maintainability Symposium (RAMS), Reno, NV, USA, 22–25 January 2018; pp. 1–5. [Google Scholar]
  8. Grandinetti, L.; Guerriero, F.; Pezzella, F.; Pisacane, O. A pick-up and delivery problem with time windows by electric vehicles. Int. J. Product. Qual. Manag. 2016, 18, 403–423. [Google Scholar] [CrossRef]
  9. Afroditi, A.; Boile, M.; Theofanis, S.; Sdoukopoulos, E.; Margaritis, D. Electric vehicle routing problem with industry constraints: Trends and insights for future research. Transp. Res. Procedia 2014, 3, 452–459. [Google Scholar] [CrossRef]
  10. Conrad, R.G.; Figliozzi, M.A. The recharging vehicle routing problem. In Proceedings of the 2011 Industrial Engineering Research Conference, Singapore, 6–9 December 2011; Volume 8. [Google Scholar]
  11. Mocková, D.; Rybicková, A. Application of genetic algorithms to vehicle routing problem. Neural Netw. World 2014, 24, 57. [Google Scholar] [CrossRef]
  12. Konstantakopoulos, G.D.; Gayialis, S.P.; Kechagias, E.P. Vehicle routing problem and related algorithms for logistics distribution: A literature review and classification. Oper. Res. 2022, 22, 2033–2062. [Google Scholar] [CrossRef]
  13. Holmgren, J.; Persson, J.A.; Davidsson, P. Agent based decomposition of optimization problems. In Proceedings of the First International Workshop on Optimization in Multi-Agent Systems, Estoril, Portugal, 12 May 2008. [Google Scholar]
  14. Barbucha, D. A multi-agent approach to the dynamic vehicle routing problem with time windows. In Proceedings of the International Conference on Computational Collective Intelligence, Berlin/Heidelberg, Germany, 11–13 September 2013; Springer: Berlin/Heidelberg, Germany, 2013; pp. 467–476. [Google Scholar]
  15. Vokrínek, J.; Komenda, A.; Pˇechoucek, M. Agents towards vehicle routing problems. In Proceedings of the AAMAS, Toronto, ON, Canada, 9–14 May 2010; pp. 773–780. [Google Scholar]
  16. Bădică, C.; Leon, F.; Bădică, A. Freight transportation broker agent based on constraint logic programming. Evol. Syst. 2020, 11, 363–382. [Google Scholar] [CrossRef]
  17. Leong, H.W.; Liu, M. A multi-agent algorithm for vehicle routing problem with time window. In Proceedings of the 2006 ACM Symposium on Applied Computing, Dijon France, 23–27 April 2006; pp. 106–111. [Google Scholar]
  18. Liu, X.; Zhang, K.; Liu, X.; Zhang, K. Consensus of Multi-Agent Systems. Impuls. Syst. Hybrid Time Domains 2019, 33, 97–139. [Google Scholar] [CrossRef]
  19. Li, Y.; Tan, C. A survey of the consensus for multi-agent systems. Syst. Sci. Control Eng. 2019, 7, 468–482. [Google Scholar] [CrossRef]
  20. Kara, M.; Laouid, A.; Hammoudeh, M.; Karampidis, K.; Papadourakis, G.; Bounceur, A. A secure multi-agent-based decision model using a consensus mechanism for intelligent manufacturing tasks. Eng. Proc. 2023, 56, 234. [Google Scholar] [CrossRef]
  21. Jadbabaie, A.; Lin, J.; Morse, A.S. Coordination of groups of mobile autonomous agents using nearest neighbor rules. IEEE Trans. Autom. Control 2003, 48, 988–1001. [Google Scholar] [CrossRef]
  22. Kazil, J.; Masad, D.; Crooks, A. Utilizing Python for Agent-Based Modeling: The Mesa Framework. In Social, Cultural, and Behavioral Modeling; Thomson, R., Bisgin, H., Dancy, C., Hyder, A., Hussain, M., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 308–317. [Google Scholar]
Figure 1. Graphical representation of a solution for a problem instance with two pickup and two delivery points, five charging stations, and two vehicles.
Figure 1. Graphical representation of a solution for a problem instance with two pickup and two delivery points, five charging stations, and two vehicles.
Applsci 14 07528 g001
Figure 2. Agent interactions in an agent-based simulation.
Figure 2. Agent interactions in an agent-based simulation.
Applsci 14 07528 g002
Figure 3. Agent-based simulation: activity diagram of vehicles handling orders in the simulation environment.
Figure 3. Agent-based simulation: activity diagram of vehicles handling orders in the simulation environment.
Applsci 14 07528 g003
Figure 4. ABSM: negotiation mechanism.
Figure 4. ABSM: negotiation mechanism.
Applsci 14 07528 g004
Figure 5. Total orders generated.
Figure 5. Total orders generated.
Applsci 14 07528 g005
Figure 6. Remaining orders.
Figure 6. Remaining orders.
Applsci 14 07528 g006
Figure 7. Orders not handled in time.
Figure 7. Orders not handled in time.
Applsci 14 07528 g007
Figure 8. Total distance traveled.
Figure 8. Total distance traveled.
Applsci 14 07528 g008
Figure 9. Number of charges.
Figure 9. Number of charges.
Applsci 14 07528 g009
Figure 10. Total recharging cost.
Figure 10. Total recharging cost.
Applsci 14 07528 g010
Table 1. Description of the order agent.
Table 1. Description of the order agent.
Order:
unique_idA unique identifier for the order.
posPosition of the order.
demandThe demand associated with the order.
ready_timeThe time when the order is ready.
due_timeThe due date for the order.
service_timeThe time taken to service the order.
partner_idIdentifier for the partner associated with the order.
pickupIndicates whether the order is a pickup or a delivery.
Table 2. Description of the charging station agent.
Table 2. Description of the charging station agent.
Charging Station
unique_idA unique identifier for the order.
posPosition of the order in the grid.
recharging_rateThe recharging rate at the charging station recharges a vehicle.
Table 3. Description of the vehicle agent.
Table 3. Description of the vehicle agent.
Vehicle
unique_idA unique identifier for the vehicle.
speedThe vehicle’s speed (cells per step).
capacityThe freight capacity of the vehicle.
battery_capacityThe maximum charge level of the battery.
battery_consumption_rateThe battery consumption rate per simulation step.
ordersThe list of orders for the vehicle.
chargeThe vehicle’s current battery charge level.
recharge_rateThe vehicle’s charge rate per simulation step.
posThe position of the vehicle.
pathThe path taken by the vehicle.
planThe plan of the vehicle.
loadThe current load of the vehicle.
timeThe current time of the vehicle.
current_orderThe order currently served by the vehicle.
current_order_indexThe index of the current order to be handled in the order list.
needs_charging_thresholdThis is used to determine when a vehicle needs recharge
needs_chargingIndicates if the vehicle needs to charge its battery based on the n e e d s _ c h a r g i n g _ t h r e s h o l d × b a t t e r y _ c a p a c i t y .
total_ordersThe total number of orders for the vehicle.
distance_travelledThe total distance traveled by the vehicle.
number_of_chargesThe total number of times the vehicle has been charged.
Table 4. Scenarios for evaluating vehicle allocation mechanisms.
Table 4. Scenarios for evaluating vehicle allocation mechanisms.
ScenarioVehiclesOrder RateBattery Cap.Freight Cap.
1101001000200
2550500150
3152001500300
42050300100
58150800250
6121201200220
7680600180
8252502000400
91075750200
10181801800350
11770700170
12201001000220
13151201300300
141040900180
15222201600360
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Murarețu, I.; Bădică, C. Optimal Agent-Based Pickup and Delivery with Time Windows and Electric Vehicles. Appl. Sci. 2024, 14, 7528. https://doi.org/10.3390/app14177528

AMA Style

Murarețu I, Bădică C. Optimal Agent-Based Pickup and Delivery with Time Windows and Electric Vehicles. Applied Sciences. 2024; 14(17):7528. https://doi.org/10.3390/app14177528

Chicago/Turabian Style

Murarețu, Ionuț, and Costin Bădică. 2024. "Optimal Agent-Based Pickup and Delivery with Time Windows and Electric Vehicles" Applied Sciences 14, no. 17: 7528. https://doi.org/10.3390/app14177528

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop