# Optimal Agent-Based Pickup and Delivery with Time Windows and Electric Vehicles
## 5 Experiments and Results
### 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 \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Scenario** & **Vehicles** & **Order Rate** & **Battery Cap.** & **Freight Cap.** \\ \hline
1 & 10 & 100 & 1000 & 200 \\
2 & 5 & 50 & 500 & 150 \\
3 & 15 & 200 & 1500 & 300 \\
4 & 20 & 50 & 300 & 100 \\
5 & 8 & 150 & 800 & 250 \\
6 & 12 & 120 & 1200 & 220 \\
7 & 6 & 80 & 600 & 180 \\
8 & 25 & 250 & 2000 & 400 \\
9 & 10 & 75 & 750 & 200 \\
10 & 18 & 180 & 1800 & 350 \\
11 & 7 & 70 & 700 & 170 \\
12 & 20 & 100 & 1000 & 220 \\
13 & 15 & 120 & 1300 & 300 \\
14 & 10 & 40 & 900 & 180 \\
15 & 22 & 220 & 1600 & 360 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Scenarios for evaluating vehicle allocation mechanisms. Figure 5: Total orders generated. 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. **T  
Figure 8: Total distance traveled. Figure 6: Remaining orders. Figure 7: Orders not handled in time. **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\".