The Planning Process of Transport Tasks for Autonomous Vans—Case Study

: Transport is an area that is developing at a tremendous pace. This development applies not only to electric and hybrid cars appearing more and more often on the road but also to those of an autonomous or semi ‐ autonomous nature. This applies to both passenger cars and vans. In many different publications, you can find a description of a number of benefits of using automated guided vehicles (AGV) for logistics and technical tasks, e.g., in the workplace. An important aspect is the use of knowledge management and machine learning, i.e., artificial intelligence (AI), to design these types of processes. An important issue in the construction of autonomous vehicles is the IT connec ‐ tion of sensors receiving signals from the environment. These signals are data for deep learning algorithms. The data after IT processing enable the decision ‐ making by AI systems, while the used machine learning algorithms and neural networks are also needed for video image analysis in order to identify and classify registered objects. The purpose of this article is to present and verify a math ‐ ematical model used to respond to vehicles’ demand for a transport service under set conditions. The optimal conditions of the system to perform the transport task were simulated, and the effi ‐ ciency of this system and benefits of this choice were determined.

For example, References [75,76] studied the scale of heavy metal pollution in areas along expressways and highways in Poland.Skrucany and Gnap [77] present the study on impact of the road and rail cargo transport on air pollution in the Slovak Republic.Transport also contributes to a huge number of tragic road traffic accidents.Many national [78][79][80][81] and foreign [82][83][84] publications have been devoted to the issues of road traffic safety.
In order to improve road safety, reduce the negative effects of transport on the natural environment, and improve the flow of traffic, attempts were made to change the transport system.The answer to these challenges is the creation of a new system based on communication between vehicles, infrastructure, and the environment, which aims to introduce fully autonomous vehicles into use.The experiences related to vehicles used in the AGV production processes, which are oriented in a closed space, respond to the demand, and provide a specific transport service in an autonomous manner, are helpful here.
This article presents the ideas of AV and the use of artificial intelligence in the management of this type of vehicle.The paper presents a mathematical model used to respond to vehicles' demand for a transport service under set conditions.The optimal conditions of the system to perform the transport task were simulated, and the efficiency of this system was determined.

Artificial Intelligence in Vehicles
Artificial intelligence (AI) in transport is associated with autonomous vehicles.Such a vehicle, equipped with sensors, radars, lidars, or cameras and GPS locators, is able to move independently in the vicinity of traditional cars or AV.The most recent example of such a vehicle is the T-POD from Einride.Communication with the vehicle is based on communication in the 5G infrastructure, and the Nvidia Drive platform was used to control the surrounding environment.AI uses data from route planning systems, traffic information, cameras, radar, and three-dimensional lidars (Light Detection and Ranging).Intelligent software solutions help solve the disadvantages of traditional radar signal processing in distinguishing between moving and stationary objects.As a result, the vehicle can more quickly and accurately determine and evaluate the behavior of objects on the roads [85].An interesting solution is proposed by Pugi et al. [86] in terms of implementing fuzzy logic for vehicle control a vehicle in reduced traction conditions of an electric vehicle.
The mentioned AI is a field that combines computer science and stable data sets, and its feature is the ability to solve problems.AI also includes the sub-domains of Machine Learning and Deep Learning [87,88].They include algorithms whose task is to create expert systems that forecast or classify on the basis of input data.Deep learning automates much of the feature extraction process, eliminating the need for human intervention.Machine learning can import raw unstructured data (e.g., text, images) and automatically define a hierarchy of characteristics that distinguish data categories from one another [89].
Due to the use of sensors for collecting various data, dedicated modules are used for each type of sensor.This approach allows for parallel data processing and thus faster decision making.Each unit receiving the signal from the sensor can use a different AI algorithm and then transfer its results to higher-order circuits or a central processing computer [90].AI technology works by interacting with sensors and uses their readings in real time.AV therefore operate in a real-time system, and their electronic systems must generate deterministic results in the time domain.The necessary AI processing power and the amount of memory needed to perform calculations make it difficult to implement in a CPU equipped with CPUs with limitations in the amount of memory and speed.Distributed systems require a large amount of data sent from sensors.Sensors that are hierarchically linked or designed in a fail-safe system in an oversized system, the so-called IT redundancy, may cause delays in data transmission, which in turn interferes with decisionmaking by AI systems [90].
An important issue in the construction of AV is the IT connection of sensors receiving signals from the environment.These signals are data for deep learning algorithms.After IT processing, they enable decision-making by AI systems.Machine learning algorithms and neural networks are also used for video image analysis to identify and classify recorded objects.Thanks to greater predictability of road hazards, the use of AI systems can contribute to the improvement of road traffic safety by reducing the number of accidents and reducing the number of fatalities.The use of AV will therefore allow us to get closer to the "vision 0", where there are no victims of road traffic accidents.There have been many publications on the subject of "vision 0" of road traffic accidents, among which it is worth mentioning the following studies [78,83,84].
The main tasks of AI built into an AV are route planning, interaction with the sensor system, and interpretation of sensor data.Route planning is important in order to optimize the trajectory of a vehicle and to create patterns of behavior in certain road situations.This is to reduce delays and avoid traffic jams [91].Planning is a dynamic task that must take into account stochastic information about, for example, resignation from servicing the point that reported such a necessity or servicing the point by another vehicle and the need to assign a new task for a given vehicle.
After planning the path, the vehicle is able to navigate on road conditions, detecting objects: pedestrians, bicycles, and traffic lights.Object detection algorithms in AI enable human-like behavior.The difficulty level of the task increases as road and weather conditions change.The reason for many accidents with tested vehicles was that the simulation environment differs from the real conditions, and the AI software may react unpredictably when it obtains incomplete or erroneous data [92].Another task of AI is prediction, i.e., the use of monitoring and modeling to determine the state of traffic conditions, possible traffic disturbances, and vehicle or infrastructure failure, i.e., an attempt to predict future problems, not problems that already exist.Algorithms can use on-board and external data to make decisions about future events.The machine learning algorithms used for this task are classification algorithms like logistic regression, support vector machines, and random forest algorithm [93].
AI algorithms implemented in AV and tested in city traffic are often opposed by constructors who point out AI as a dead end of technological development.AI algorithms based on a neural network perform tasks without understanding the process they control [91].
A compromise solution is the use of hybrid solutions that combine AI with traditional control algorithms.As indicated in [94], the advantage of using a hybrid solution is the possibility of a quick analysis of the causes of accidents or collisions involving an AV.Information is obtained as to why the decision was made and the alternative was rejected.This is due to the fact that the behavior of the vehicle in response to a certain signal should be described not with one algorithm but with several complementary ones.Such action counteracts, for example, misinterpretation of the situation when, for example, there is an unreadable sign on the road, or an incorrect analysis of the video signal was performed.

Route Planning and Control Algorithms
In order for a vehicle equipped with AI to move safely in real road conditions, the AI must be equipped with behavior patterns.These schemas are a derivative of the learning process and the acquisition of knowledge necessary to make decisions.The above process begins with testing the vehicle on routes in an isolated environment where under supervision it is possible to carry out tests by introducing changes to the route layout or disturbances on the route (closed route, change of the point reporting the need for service).
The Vehicle Routing Problem is combinatorial and is classified as an NP-complete problem.Finding the optimal solution becomes more complicated with the increase of the area on which the points reporting the need for service are located and the increase in the number of these points.The search for a solution is carried out by dividing the task into problems of a lower order.This activity covers two topics:  The division of the set of all points reporting the need for service or destinations into regions, each of which will be assigned to one vehicle.


Determining the order of service within the area.
In the issue of determining service routes, there is a concept of the point/destination assignment problem.It is created when none of the vehicles has preliminary information about the target but has a built-in map on which all points within its range are marked.The vehicles share points / targets between themselves so that the journey time is minimal.
For the implementation of the above tasks, heuristic algorithms are also used, such as the Bellman-Ford and Dijkstra algorithms [95].For these algorithms to work, the vehicle must send its location continuously.Localization is carried out with the use of sensors, e.g., GPS, as well as simultaneous location and mapping techniques (SLAM).SLAM is applied when there is no GPS availability, i.e., in tunnels or in underground and closed spaces [96].
Heuristic models are also used in solving problems related to the formation of congestion [97], where vehicles heading to different points, choosing the shortest route, will move along the same sections of the road network.This will turn the shortest route into an overloaded route which can only be traveled at the minimum speed.The solution to this problem was presented in the article [98], where a multi-criteria simulation from which a set of independent route selection strategies can be obtained.The road network is presented in the form of a graph with nodes marking the beginning or the end of the route.A set of vehicles is assigned to the graph, as well as a set of pairs of start-destination nodes between which the vehicles travel.The solution begins with greedy vehicle allocation on the shortest route and uses a combinatorial search for alternative routes not only in terms of their length but also travel time.The described algorithm of route selection can be supplemented with deterministic models taking into account delays at intersections, describing those caused by cross traffic [99] or cascading multi-link congestion [100].
The use of classical algebraic methods in order to find the shortest route while minimizing the travel time may cause that in some cases the exponential equations that are the solution provide results in the form of unrealistic long travel times in the case of a large concentration of vehicles on road sections.We receive the so-called "trapping the simulated vehicle in perpetual traffic jam".A way to eliminate these errors is to model congestion with queuing when the traffic load exceeds a certain threshold, usually 2.5 times the link capacity [98].
The above-described algebraic methods based on combinatorics and heuristic methods are the most commonly used classic tools to solve the problem of route selection, the order of handling, and the method of initiating a transport task.On the other hand, evolutionary algorithms [101] are used for additional variables influencing the movement of the vehicle.These can be signal control [102,103] or changes in the transport network arrangement [104].

Modeling Example
The basic task of mapping the route, the results of which can be used as input data to AI algorithms, can be solved on the set of N points making up the transport system which is served by m vehicles [105].In such a situation, each point sends a request for service with the intensity λ.The intensity of servicing these points by vehicles is μ.Additional assumptions are made regarding the handling time.The sequences of time intervals between successive reporting of points to be processed are independent of each other.The service time is a random variable, and with m vehicles, each of them works independently of each other.
The theory of Mark's random systems is used to calculate the capacity of the transport system, the average length of the queue to be serviced, and the average number of notifications [105].It assumes that the transport system is single-channel, in which the request stream λ is described by the Poisson distribution, while the service time is subject to the exponential distribution.The service follows the firs-in-first-out (FIFO) rule, the idea of which is that the first free vehicle is sent to the point that first requested transport service.System states are saved, which are created by introducing successive iterations regarding the number of vehicles and the number of service requests.The initial states of the system are marked as: E0-all vehicles free, no tasks to be serviced, E1-one vehicle busy, one notification in the system, E2-two vehicles seized, two reports in the system.Between the states from E1 to E2, the system is routed through the request stream with the intensity (N−1)λ because in the E1 state, one service point has already sent the request, so N−1 points have the possibility of reporting.
Successive states of the system can be saved in the form: Em-m of vehicles occupied, m notification in the system, Ej-m of vehicles occupied, j-m reports in the queue for service, EN-m of vehicles occupied, N points waiting for service, N-m requests waiting for service.
Between the states E0 to EN, the system is guided by the request stream with the intensity Nλ [58].
The dynamics of the transport system can be described by the system of differential equations [106]: The correctness of the saved equations is determined by the normalizing condition:

𝑝 𝑡 1
In the steady state, the equations of dynamics of the transport system take the form: The probability of the system being in a steady state is calculated using the following formulas: In order to simplify further equations, the parameter ρ, is introduced, which is the result of the quotient of the intensity of reports λ by the points, and the intensity of servicing these points by the vehicles μ:

𝜌 𝜆 𝜇
The probability of po takes the form of the equation: Probability that r points reports a service necessity, were 1 ≤ r ≤ N: Average number of requests waiting in the queue: The average number of vehicles serving the points: The average number of notifications in the system:

𝑛 𝑖𝑝 𝑗𝑝
The average time the notifications remain in the system:

𝑡 𝑛 𝜆 𝑁 𝑛
The average time the notifications were in the queue: The results of the simulation of sending vehicles to service points are presented below (Figures 1 and 2).They were carried out for N = 100 points requiring service and for m = 30 vehicles.Taking into account the state 0, 101 states were included in the analysis.The simulation time was set at t = 2000 time units.In this case, the unit of time is the second.The time interval was selected in such a way that it is often used by other researchers in simulations.For example, in the work of Yang et al. [107], the autonomous vehicle was tested on a selected road section in about 30 min, and the obtained data were then used for simulation.In Figure 1, successive moments of time are marked on the OX axis.The status, i.e., the number of notifications at the current moment, is marked on the OY axis.The horizontal line intersecting the OY axis in the value 30 means the number of vehicles m servicing the system; therefore, if the state is currently above this line, the vehicles cannot keep up with the order handling.Such a situation occurs in the case of λ3 = 0.007, where the system becomes inefficient.
In Figure 2, on the OX axis, successive moments of time are marked, and on the OY axis, the state in which the system is at a given moment.The horizontal line crossing the OY axis in the value 30 represents the number of vehicles m serving the system.As before, if the state is currently above this line, the vehicles cannot keep up with the handling of orders.This situation occurs very quickly for μ1 after about 200 s.
Figure 3 shows the probability distribution of individual states in the steady state.Individual states are marked on the OX axis (from 0 to 101), and on the OY axis, the probability of staying in these states in a steady state.The number of points to be served is N = 100, and m = 30 vehicles.The analysis of sending vehicles to service points was supplemented with the economic aspect of the issue, i.e., vehicle maintenance costs, profits from servicing the point, and costs related to not servicing the point [108,109].Such analyzes for the actual conditions of a transport company from the courier industry are presented [110][111][112][113].Further profit simulations are shown in Figures 4-9.The economic aspect (profit marked as α) is the difference between the revenue from servicing points and the cost of maintaining vehicles and the cost of not handling applications.Profit at each single moment is calculated according to the following assumptions.γ-profit resulting from a completely unhandled report (200 was assumed); max(0, p(t)-m)-the number of unhandled reports at the moment (if m ≥ p(t), then all reports are handled; if m < p(t), then there are unsupported reports in the system p(t)-m tickets).
It was assumed that the revenue from servicing the point is equal to 500 monetary units.Due to the fact that in the mathematical model it is difficult to unequivocally determine at which point the point was actually served, each of them was multiplied by μ (probability of serving the point).The number of points served is the lower of the following numbers: the number of available cars (when there are not enough vehicles to service) and the state (when there are not enough notifications).
Another assumption is the cost of an unhandled call, assumed as 200 monetary units.In this case, each point was multiplied by λ (the probability of the report occurrence).The number of unhandled reports is the difference between the stock and the number of vehicles (if positive).Moreover, the cost of maintaining vehicles is also included, which is equal to the value of 1 monetary unit multiplied by the number of vehicles at any time.
The simulations in the graphs presented in Figures 4 and 5 were carried out for the number of vehicles m = (1; 30).
Figures 6 and 7 show the profit simulation for the number of vehicles m = (1; 100) and answer what number of vehicles is optimal from the profit point of view, depending on the parameters λ and μ.
The averaged profit value according to the rules for calculating the economic aspect was averaged for all 2000 simulation time moments.The calculation methodology was identical to that presented in Figures 4 and 5, and the difference was that the number of vehicles was increased by m = 100.
The difference between profit (Figures 4 and 5) and average profit (Figures 6 and 7) can be explained in a descriptive way.The process of sending cars to service points is dynamic, i.e., the profit changes over time.In order to calculate the efficiency of service for a given number of vehicles, a certain value was calculated for a simulation lasting t = 2000 time moments.This value determines what profit is given by the given number of kept vehicles, i.e., the profit for 2000 times has practically been averaged.
The graphs in Figures 8 and 9 show regression curves giving information on what part of the number of points served should be the number of vehicles in order to maximize the profit depending on the number of points served in steady state.In Figure 8, the simulation concerns different values of λ/μ, while in Figure 9, it concerns different values of the profit α resulting from servicing the point and the loss resulting from not servicing it.
The regression was calculated from the equation: Table 1 shows the parameters for the regression evaluation.The calculations were carried out according to the methodology presented below: profit from handling one order and loss from not handling one order are equal to 5000 monetary units; the cost of maintaining one vehicle in one turn is 200 monetary units; the intensity of service is  1.2.
For N = 500 service points, the regression value is as follows: The simulation of profits showed that for 500 service points, the optimal number of cars sent to service points is greater than assumed in the test and should amount to 106 vehicles.In the adopted economic model, it was assumed that the profit on servicing one order is the same as the loss on not handling one order.

Conclusions
Contemporary solutions in vehicles are focused on supporting classic systems (traditional human-controlled vehicles) with additional functions supporting drivers and implementing fully autonomous systems (from the 4th level of autonomy).This fact applies not only to the road communication infrastructure but also to those automation solutions that are currently being introduced inside enterprises, e.g., internal warehouses.Contemporary humans are strongly connected to this process and their role is assigned to process management.Certainly, in the near future, the implementation of AV will bring major changes in mobility and accessibility, travel patterns, transport safety, and energy efficiency and, consequently, emissions, employment, data availability, and management in business models.
In this study, simulations of sending m = 30 vehicles to N = 100 points served by these vehicles were carried out.Usually, the system was efficient, i.e., in two states, it was always possible to execute orders, while in one state the system quickly became inefficient (in the first case, it took place after approx.80 s, in the second at 200 s).
Then, economic profit tests were carried out for such planned tasks, which affect the financial condition of the company due to the execution of orders.In this case, simulations were carried out for two assumptions about an increased number of service points for 30 and 100 vehicles.Research for 500 service points showed that the optimal number of cars sent to service points should be 106, so it is greater than the assumed number by 6 vehicles.Similarly, shortages of vehicles occurred in the test, assuming m = 30 vehicles.
The main contribution of this work is to simulate a model that can potentially help in solving transport tasks, especially in a situation where in the coming years it is expected that cars, both passenger cars and vans, will be supported by autonomic systems.This can be helpful both in the implementation of similar practical tasks and in the creation of more advanced mathematical models by scientists.The general conclusion is that the transport system is very heterogeneous, and it is difficult to fit an ideal model because orders are executed very quickly and some require much longer processing time.

Figure 4 .
Figure 4. Simulation of gains α for the values λ1 = 0.0008, λ2 = 0.002, and λ3 = 0.007 and μ = 0.009.The horizontal line crossing the OY axis in the value (−30) determines the fixed cost of maintaining the vehicles.

Figure 5 .
Figure 5. Simulation of gains α for the values μ1 = 0.004, μ2 = 0.009, and μ3 = 0.02 and λ = 0.The horizontal line crossing the OY axis in the value (−30) determines the fixed cost of maintaining the vehicles.
•   •  • min ,   λ •  • max 0,    where α(t) is the profit at time t; δ-unit cost of maintaining the vehicle at a single moment (we assumed the value 1); m-number of vehicles; μ-notification service intensity (such part of the entire notification is processed in a single step by a single vehicle); β-profit resulting from a fully handled request (500 was assumed); p(t)-system status, number of notifications in the system; min(m, p(t))-the number of notifications handled at the moment (if p(t) ≥ m, then only m notifications are handled because we have only m vehicles; if p(t) < m, all notifications are supported); λ-intensity of the appearance of a new notification (such a part of the cost of not handling the notification is incurred in a single step); The optimal number of vehicles sent to service points is the following:  •  500 0.21144 105.72 106 vehicles.

Table 1 .
The regression evaluation.