Simulation of collective self-management by the movement of robotic vehicles using the method of molecular dynamics

. The paper presents the results of computer modeling of tra ﬃ c ﬂows in a virtual city. The city has a local road, highway and road junction. The article proposes a system for autonomous driving of robotic vehicles in this virtual city. This system is based on the application of interaction rules taken from molecular dynamics modeling with kinetic energy dissipation. The proposed model uses the concept of a cellular automaton. The tests were carried out us-ing computer simulations. The work has shown the e ﬃ ciency of the proposed approach. The recommended rules of interaction allow you to organize traf-ﬁc without tra ﬃ c jams and without tra ﬃ c lights in such a virtual city with the maximum possible tra ﬃ c congestion.


Introduction
There are two approaches to the study of traffic flows.Each vehicle is viewed in interaction with each other-this is a micro-level approach.Transport streams are an object of study-this is a macro-level approach [1,2].Individual histories of the movement of vehicles are investigated depending on their characteristics and the structure of transport routes in the first case.Their integral characteristics are investigated in the second case.M.J. Lighthill and G.B. Whitham created in 1955 the first mathematical model designed to study traffic flows [3].A hydrodynamic model was taken as a basis, which describes the dependence of the flow density on its intensity on a certain section of the road.The average speed of the traffic flow, its density and intensity were the main parameters of the model.The traffic flow is subject to phase transitions-sharp changes in speed and density, just like a liquid.This fact is shown within the framework of this model.The results made it possible to qualitatively describe the wave processes of the emergence and decay of plugs obtained in these works.However, specific recommendations are not given for managing traffic flows without congestion based on these models are not given in the discussed works.

Formulation of the problem
It is required to develop an autonomous system of self-government and find the rules of interaction for robotic vehicles.At the same time, traffic in the city should be organized without traffic jams, without traffic lights and without collisions, using these rules [4].
The system should: 1. Provide the maximum possible traffic of the transport system.2. The distance between two objects must not be less than a predetermined value.3. Ensure that there are no traffic jams.
The task includes the formulation of recommendations for road users in a real city to improve safety and traffic optimization.The concept of cellular automaton was used as a modeling environment at the microlevel when solving the problem [5].This approach has greatly simplified the computer simulation of traffic flows and made it possible to study a large number of implementations with different initial conditions [6][7][8].

Computer model
Research on the self-management system of robotic vehicles was carried out using computer simulation.The transport scheme of roads and junctions is set.Roads are arranged on two levels in the form of contiguous local ring roads, highways, and roundabouts.The quarters are located within the local ring road (figure 1).The traffic is one-way on all roads.There is a permanent parking place inside the quarters for each robotic vehicle.Vacant parking spaces are also available.All robotic vehicles have vision systems and can determine the coordinates of the nearest vehicles and road elements constantly.Traffic lights are not used.The constant movement of transport is organized so that the traffic flows do not cross.Each robotic vehicle has the ability to start moving at any time and to any vacant parking lot, stop there for the required time and return to the original parking lot.

Transport Network Topology
The solution to the problem is divided into two parts.The topology of the network of roads and junctions is developed in the first part as follows: • the arrangement of expressways is orthogonal and two-level; • traffic streams do not cross.Ring local roads exist next to each section of the highway.Travel speeds on these sections are lower than on highways.Roundabouts adjoin them.The speed of movement on them is even lower.This scheme of the organization of traffic flows is shown below in figure 1.

Figure 2. Two-level road junction scheme
Local roads-blue rings, roundabouts-green rings, long highways-red sections.The parking lots of the robotic vehicles are located between the blue roads.There are parking lots with even and odd numbers.Vehicles have an assigned parking space with odd numbers.Even numbered parking lots are shared property.Suppose a robotic vehicle chooses a destination.The optimal trajectory of movement is chosen from his own parking lot to any other, unoccupied parking lot with an even number.If this parking lot is occupied by another robot car, then the robotic vehicle selects the nearest unoccupied parking lot to it.The robotic vehicle can perform swaps in the following order: local road-roundabout-local road-highway-local road-roundabout-local road.It should be noted that the traffic order: roundabout-highway-roundabout is not provided.A diagram of a two-level movement with an indication of the direction of movement is shown in figure 2.

Interaction Rules
The second part of the assignment contains the organization of conflict-free movement.A system of rules for the interaction of moving robotic vehicles-intelligent agents-has been developed.Calculations of molecular dynamics are the basis.For each robotic vehicle, one-way traffic along the local road line and the roundabout is considered.In these calculations, the ring roads conditionally unfolds into a sequence of interconnected line segments.It is considered that only adjacent robotic vehicles affect the robotic vehicle.The quasi-cellular automaton implements the computer model of the city.A quasi-cellular automaton has two types of objects placed in cells.
The first type of objects is static-road elements and their types.The second type of objects-dynamic-imitates moving robotic vehicles.Each cell has a two-level link system.We will conventionally call local roads and ring intersections rings.Links of the first level provide an indication of the direction of movement between cells of one ring, and links of the second level provide transitions between rings.
The molecular dynamics method is the basis for the construction of a decentralized system of self-control of robotic vehicles.It is known that atoms are always located at distances not exceeding a certain value r min , during chaotic motion in various states of aggregation, as well as in cascades of atom-atom collisions [9].Each robotic vehicle is conditionally represented by a macromolecule.The mass of this macromolecule is equal to the mass of the robotic vehicle, and the position of this macromolecule is related to the position of its center of mass.Force acts on a macromolecule, defined as the vector sum of all forces.
These forces act from the side of the nearest neighboring macromolecules and obstacles.The force is determined from the Lennard-Jones potential of the pairwise interaction known in molecular dynamics, acting on one macromolecule from the other [10].The movement control of robotic vehicles does not allow the vehicles to collide with each other, built on the basis of such calculations.A special computational program was compiled and debugged to test the possibility of using the molecular dynamics method [9,11,12].Computer simulation of the main modes of movement was carried out.Verification of the fulfillment of the law of conservation of energy in the system of macromolecules controlled the accuracy of the calculations.
The equations of motion have the form according to Newtonian mechanics: Here t is the time, m is the mass of the macromolecule, f i is the total force acting on the macromolecule with the number i from the side of other macromolecules of the system, F(r i, j ) is the force acting on the macromolecule with the number i from the side of the macromolecule with the number j.
The relationship between the force and energy of pair interaction is described by the equation F(r i, j ) = −∇ i u(r i, j ).The equations are written as follows for the projections of the velocities along each coordinate axis: Here ∆t is the time step.
The forces acting in the system are described by Newton's II law: The system of equations is obtained for the projections of the force acting on the macromolecule: The equations are obtained after transformations for calculating the projections of the speeds of movement of robotic vehicles: The Lennard-Jones potential was chosen to calculate the interactions in the work describing the Van der Waals interaction of neutral atoms.The Lennard--Jones potential has the form where σ is the value of the interatomic distance at which U(σ) = 0, ε is the depth of the potential well located at a distance σ 6 √ 2. In this expression, the term r −6 dominates at large distances and corresponds to dispersive dipole-dipole attraction.The term r −12 simulates a strong repulsion between a pair of atoms due to exchange interaction if they are very close to each other.The graph of this potential is shown in figure 3. The absolute value of the force is the first derivative of the potential energy of the pair interaction, taken with a minus sign: The so-called cutoff radius of the potential R ab is introduced to speed up the calculations.In this case, the weak effect of distant macromolecules is not taken into account.Forces are calculated only within a sphere of this radius, acting on a given macromolecule.The issue of choosing the size of the time step ∆t is important when carrying out calculations using schemes for the numerical integration of the equations of motion.As is known, a significant loss of calculation accuracy is observed when the value of ∆t exceeds a certain threshold value, and the values of forces, coordinates, and velocities tend to infinity after some time.
Typically, researchers choose ∆t by fit using molecular dynamics techniques.They increase the selected small time step value gradually.The procedure is carried out until a significant loss of accuracy occurs when repeatedly solving the same problem.Then the penultimate value ∆t is chosen as the integration step.The change in the value of the integration step over time ∆t can reach several orders of magnitude at the initial and final stages.The use of the traditional ∆t selection scheme was an obstacle to computer simulation of the studied physical processes.An adaptive scheme for calculating ∆t was proposed, which makes it possible to completely exclude the procedure of multiple empirical selection of this value.This allowed research [9,11,12].The calculation scheme for ∆t is constructed as follows.The minimum distance r min is among all mutual distances between macromolecules.The potential of pair interaction is approximately replaced by a parabolic potential in the vicinity of this value.The second derivative of the potential energy of the pair interaction is equal to the constant of this parabolic potential  We calculate the forces, coordinates and velocities of macromolecules only in a small vicinity of the potential acting on it.Therefore, we can take a rather small part of the vibrations of the macromolecule as the value of the time integration step.Experience shows that it is necessary to select this part in the range from 0.02 to 0.1 of the oscillation period.Then the divergence is not observed in the numerical scheme of calculations and there is no loss of the accuracy of calculations.The value of the time integration step is calculated in this work by the formula [9,11] Coefficient C is selected experimentally and introduced into the equations of motion.The coefficient is less than one and simulates the introduction of viscous forces into the system.These forces eliminate periodic oscillations of macro macromolecules near the positions of the potential minimum.In this case, all values of velocity projections are determined by integrating the motion of macroparticles.Projection values are multiplied by this factor.This leads to the dissipation of kinetic energy in the system.The values of the translational speed allowed for a given ring are subtracted from the velocities of all macromolecules.The interaction potential of a macromolecule is calculated as the sum of the interaction potentials of neighboring macromolecules.This potential can be zero.The road condition in this case is called unstressed.The interaction rules are formulated for the organization of accident-free movement of vehicles controlled by molecular dynamics calculations: 1.The robotic vehicle starts moving in accordance with the travel plan it has It can enter the road if a relaxed state is present at the moment.Suppose that a robotic vehicle has a need to rebuild to another road.He can enter it if the distance does not exceed the value 0.5R ab to the nearest robotic vehicle.
The obtained interaction rules allow organizing traffic without traffic jams, without traffic lights and without collisions of vehicles in the proposed city model.A large number of experiments have been carried out with different initial conditions.Traffic jams were not observed when the traffic intensity reached 58% of the theoretically possible in the case of robotic vehicles and 44% in the case of drivers driving cars while observing the rules of interaction.The molecular dynamics model has been proposed and tested in difficult traffic situations.The proposed model has shown its effectiveness.The methodical value of the work lies in this.

Figure 1 .
Figure 1.Transport scheme of the city

.
It is known that the period of harmonic oscillations of a macromolecule of mass m in such a field is 2π m C .MATEC Web of Conferences 362, 01022 (2022) https://doi.org/10.1051/matecconf/202236201022CMMASS 2021

Figure 4 .
Figure 4. Transition of a tuple of robotic vehicles from a stressed state to a non-stressed state