Heterogeneity-induced lane and band formation in self-driven particle systems

The collective motion of interacting self-driven particles describes many types of coordinated dynamics and self-organisation. Prominent examples are alignment or lane formation which can be observed alongside other ordered structures and nonuniform patterns. In this article, we investigate the effects of different types of heterogeneity in a two-species self-driven particle system. We show that heterogeneity can generically initiate segregation in the motion and identify two heterogeneity mechanisms. Longitudinal lanes parallel to the direction of motion emerge when the heterogeneity statically lies in the agent characteristics (quenched disorder). While transverse bands orthogonal to the motion direction arise from dynamic heterogeneity in the interactions (annealed disorder). In both cases, non-linear transitions occur as the heterogeneity increases, from disorder to ordered states with lane or band patterns. These generic features are observed for a first and a second order motion model and different characteristic parameters related to particle speed and size. Simulation results show that the collective dynamics occur in relatively short time intervals, persist stationary, and are partly robust against random perturbations.

www.nature.com/scientificreports/ collective motions from individual behaviors is fundamental to authorities for the control of crowd and traffic dynamics and the development of intelligent transportation strategies. In self-driven particle systems, collective dynamics can result from heterogeneity effects in the microscopic behaviour of the particles, upon other inertia or delay mechanisms. Pedestrian dynamics describe for instance lane formation for counter-flow or for pedestrians walking in the same direction but with different speeds 32,50 . Other examples are stripe, diagonal travelling band or chevron patterns for crossing flows 40,41 . In this article, we show by simulation that heterogeneity effects can generically initiate segregation and spontaneous formation of lane or band patterns in two-species flows of polarised agents. Two heterogeneity mechanisms are identified: static heterogeneity in the agent characteristics and dynamic heterogeneity in the interactions. Static heterogeneity refers to quenched disorder in solid state physics and the terminology of random walks, when dynamic heterogeneity relies on annealed disorder (see 51,52 and references therein). Interestingly, lanes spontaneously occur when the heterogeneity relies statically on the agent features (quenched disorder), while bands emerge if the heterogeneity operates dynamically in the interactions (annealed disorder). The lane and band patterns are stable and persist stationary, although no alignment interaction rules are defined (explicitly or implicitly). The features are generically observed with different microscopic motion models, namely the first order collisionfree speed model 53 and the inertial second order social force model 54 , and different types of parameters related to agent speed or agent size. Lane and band patterns are observed with different binary mixtures of interacting particles [55][56][57] , e.g. oppositely charged colloids subject to, respectively, DC and AC external electric fields 58,59 . In the presented models, the heterogeneity comes from internal interaction mechanisms. Potential applications are mixed urban traffic flow and the modelling of the interactions between different types of road users.

Models.
We consider in the following two types of agents evolving on a torus. We denote n = 1, . . . , N the agent's ID while k n = 1, 2 is the agent's type. The agent's motion is given by a dynamic model F p (X n ) that defines the agent speed as in the collision-free model 53 or the agent acceleration as in the social force model 54 according to local spatio-temporal variables X n (e.g. the position and speed differences with the neighbours) and a set of parameters p (namely, desired speed, desired time gap, repulsion rate, agent size, and so on). We assume two different settings p 1 and p 2 for the parameters. Two types of heterogeneity are then considered.
1. Heterogeneity in the agent characteristics-We attribute statically the two parameter settings p 1 and p 2 to the two types of agents: We aim here to model different types of agents (for instance pedestrians and bicycles) with specific characteristics in term of desired speed, agent size, etc. This kind of heterogeneity is usually called quenched disorder in solid state physics. It refers to static heterogeneity features remaining constant (i.e. quenched) over the time. 2. Heterogeneity in the interactions-We attribute dynamically the two parameter settings p 1 and p 2 according to the type of the closest agent in front. The parameter setting is p 1 if the agent in front is of the same type, while it is p 2 in case of interaction with an another agent type: with k (X n ) the type of the closest agent in front (see "Methods" for details). Such a mechanism may be realized in mixed urban traffic where cyclists or electric scooter drivers are adapting their behaviour, e.g. increasing the time gap or reducing his/her desired speed, when following a group of pedestrians. The heterogeneity features are here time-dependent. They are usually called annealed disorder in the literature of solid state physics 51,52 . In contrast to the model Eq. (1) for which the heterogeneity statically lies in agent characteristics, the model Eq. (2) induces a dynamic heterogeneity mechanism taking place in the interactions. See Fig. 1 for an illustrative example in one dimension. www.nature.com/scientificreports/ Analysis. We qualitatively observe by simulation that the static heterogeneity model M 1 Eq. (1) initiates the formation of lanes in the system, while the dynamic heterogeneity model M 2 Eq. (2) allows the formation of bands (see Fig. 2 below). To classify the state of the system, we measure the agent's mean speed and also order parameters for the lane and band formation. The order parameter has been introduced to detect lanes in a colloidal suspension 60 and used in pedestrian dynamics 61 . We denote in the following (x n , y n ) the positions of the agents n = 1, . . . , N . The order parameter for lane formation is Here L n is the number of agents with the same type in front of the agent n on a lane of width � > 0 , card(A) being the operator counting the elements of an ensemble A, while L n is the number of agents with different types. The order parameter L tends by construction to be close to one when the system describes lanes. Assuming a disordered state for which the agents are uniformly randomly distributed on a w × h rectangle with h > � > 0 the system's height and w > 0 the system's width, the number L n of agents with the same type is distributed according to the binomial model B (m, p) , with m = N k n and p = �/h . Here N k n is the total number of agents with type k n . The distribution of the number L n of agents with different types can be deduced similarly.
For band formation, the order parameter is The band order parameter includes a term w/h, w and h being the width and height of the system. The distribution of the order parameters for lanes and bands is by construction the same in cases of random positions of the agents. Indeed for disordered states, the number B n of agents on the sides with the same type has a binomial distribution B (m, p) with m = N k n and p = �w/(hw) = �/h as well. This makes the lane and band order parameters directly comparable. In particular,

Simulation results
We carry out simulations of two-species flows on a 9 × 5 m rectangular with top-down and right-left periodic boundary conditions (torus). We simulate the evolution of N = 45 agents (density of 1 agent/ m 2 ) from random initial conditions using the first order collision-free (CF) pedestrian model 53 and the inertial social force (SF) model 54 in the Supplementary Materials. The desired directions of motion of all agents are polarised to the right. The heterogeneity in the two settings p 1 and p 2 is introduced by varying model parameters related to the speed (i.e. desired speed or time gap parameters) or to the size of the agents. We quantify the heterogeneity level in the two-species system using the index δ s when we vary parameters related to agent speed, and the index δ l when we vary parameters related to agent size. The definitions of the microscopic motion model and details on the setting of the model's parameters and heterogeneity indexes are provided in "Methods".
Preliminary experiment. We first present single simulation histories of the two-species system with the two heterogeneity models Eqs. (1) and (2). We simulate the evolution of the agents using the collision-free model 53 for given heterogeneity indexes δ s on the parameters related to the agent speed, namely the desired speed and the time gap parameters (see "Methods" for details on the setting of the model parameters). Successive snapshots of the system are presented in Fig. 2. The evolution of the system with the static heterogeneity model Eq. (1) is shown in the left panels while the evolution with the dynamic heterogeneity model Eq. (2) is displayed in the right panels. The bottom panels provide the evolution of the order parameters for lane and band formation. We observe fast formation of two lanes by agent type within the first heterogeneity model, while two bands emerge with the second model. The parameter settings are statically attributed to the agent type for the model defined by Eq. (1). Thus, the segregation also involves the parameter setting. In contrast, the parameter setting depends on the type of the agent in front for the model defined by Eq. (2). This results in four bands according to the parameter settings. Note that further simulations with larger systems may describe more lanes and bands with different sizes.
The order parameters converge after a transient phase to stationary performances with lanes or bands where they are polarised to one or zero. The duration of the transient states is approximately 40 seconds of simulation. Note that the duration of the transient states varies from a simulation to another but the system systematically converges to a stationary state with lanes or bands. Furthermore, lane and band formation in larger systems require longer simulation times, especially for the band formation (see the blue dotted curves in Fig. 2, bottom panel, for a 15 × 9 m system three times larger with 135 pedestrians). Similar performances are observed when using the social force model instead of the collision-free model (see Fig. S1 in the Supplementary Materials).
Here, the heterogeneity of the two parameter settings p 1 and p 2 and corresponding index δ s are relatively high. Reducing the heterogeneity index can result in a longer transient phase or even no formation of lanes and bands. We may expect that lanes and bands progressively emerge as the heterogeneity index increases. This is however not the case. As described in the next section, we observe in stationary states an abrupt phase transition from disorder states to order states with lanes or bands as the heterogeneity index increases.
Stationary performances. The preliminary experiment shows that lanes tend to emerge in the dynamics when the heterogeneity relies on agent characteristics (quenched disorder model M 1 Eq. (1)) while bands www.nature.com/scientificreports/  2)). The results presented in Fig. 2 are obtained for given values of the heterogeneity index δ s between the two parameter settings p 1 and p 2 . The index is sufficiently high to rapidly observe the formation of lanes or bands. In this section, we analyse the performances by progressively increasing the heterogeneity indexes δ s and δ l . We repeated one thousand Monte-Carlo simulations from independent random initial configurations for the two heterogeneity models M 1 Eq. (1) and M 2 Eq. (2) by varying the heterogeneity indexes δ s and δ l over twenty levels. The differences between the two parameter settings p 1 and p 2 are zero at the lower heterogeneity level, while they are important at the higher level. We  Fig. 3, right panels). An abrupt phase transition occurs as the heterogeneity index δ s increases from a disordered state for which the order parameters are close to 0.2 (dotted line in Fig. 3, top panels) to an ordered dynamics with lanes or bands for which the order parameters are polarised on zero or one. A critical heterogeneity index can be identified. The lane patterns allow the speed of the agents with faster characteristics to be higher than the speed of agents with slower features (Fig. 3, bottom left panel). This makes the agent speed on average close to the mean speed of a homogeneous flow (dotted line). In contrast, the band patterns in the model M 2 Eq. (2) correspond to gridlocks for which the speed of all the agents have slower features (Fig. 3, bottom right panel). Similar performances occur by varying parameters relying on agent size (see Fig. 4 Fig. 4, right panels. In contrast to heterogeneous models relying on agent speed, varying the agent size induces bi-dimensional steric effects making the average speed in the presence of lanes less than the mean speed of a homogeneous flow (see Fig. 4, bottom left panel). On contrast, the mean speed can be higher than the homogeneous one in the presence of bands (see Fig. 4, bottom right panel). Indeed, varying the agent size acts in two dimensions, reducing or increasing the available space in case of presence of lanes or bands. Similar performances occur when using the social force model instead of the collision-free model (compare Fig. 4 and Fig. S3 in the Supplementary Materials).

Transient states and perturbed systems. The simulations above describe stationary situations. Yet, it
is interesting to observe the transient states of the system and the time required for the emergence of lanes or bands. In Fig. 5, we run simulations for different simulation times ranging from t 0 = 0 to t 0 = 3000 s before starting the measurements. The initial conditions are random. The lanes and bands spontaneously emerge during the first minute of simulation when the heterogeneity index δ s is sufficiently high. Similar phase transition to lane and band patterns occur for t 0 = 600 , t 0 = 1200 and t 0 = 3000 s suggesting that the dynamics can be considered stationary as soon as t ≥ 600 s. The simulation times required to obtain stationary performances fluctuate from one simulation to another. They also depend on the size of the system and the density level. Generally speaking, larger or more dense systems require on average longer simulation times to reach a stationary state than smaller or least dense systems.
So far, the modelling approach is deterministic. Analysing whether the collective motion is robust against random noising may reveal unexpected behaviours. In Fig. 6, we present the order parameter for stochastic systems for which the agent speeds are subject to independent Brownian noises. Simulations are carried out for a noise amplitude σ = 0.1 , 0.2 and 0.5 m/s. The noise monotonically perturbs the lane formation in the static heterogeneity model M 1 Eq. (1) (Fig. 6, left panel). No phase transition occurs for σ = 0.5 m/s. This phenomenon is well known in the literature as the freezing-by-heating effect 63 . The concept is borrowed from the plant growth stimulation process. On the contrary, introducing a low noise in the dynamics allows improving the   www.nature.com/scientificreports/ when the lane formation does not (freezing-by-heating effect). Further simulation results show similar behaviours when the noise is introduced in the agent polarity (i.e. the desired direction) instead of the speed. Regardless of the modelling order of the motion models (speed-based or acceleration-based models) and related parameters, relying the heterogeneity on agent characteristics or on the interactions initiates generic segregation and the formation of lanes and bands in the dynamics. Such results corroborate the universality of the lane formation observed in pedestrian counter-flows, oppositely charged colloids, upon other binary mixtures of interacting particles 32,[56][57][58] . They open new explanation perspectives for the formation of bands. Further theoretical investigations remain necessary to rigorously characterise the phase transitions. A possibility is to analyse mean-field instability phenomena of discrete lattice representations of the model 41 . The presence of walls and obstacles and the role of the geometry of given facilities may also be of interest. Preliminary simulation results show segregation effects of slower or bigger agents in case of bottleneck within the static heterogeneity model. These are expelled at the edges of the system and are obstructed by the presence of walls. These simulation results require more attention, notably for elderly people, people with motor disabilities, or in the current context of social distanciation.

Methods
The two agent motion models used in the simulations are the collision-free (CF) model 53  Collision-free model. In the collision-free model, the dynamics of an agent n with position x n is given by the first order differential equation composed of the scalar speed model here V j ≥ 0 is the desired speed, T j > 0 denotes the desired time gap, and ℓ j ≥ 0 the agent size, the index j = 1, 2 representing the two parameter setting p 1 and p 2 , and the direction model with e 0 = 0 the desired direction (polarity), U(x) = A exp (ℓ j − x)/B with parameters A = 5 and B = 0.1 m a repulsive potential with the neighbors, and C > 0 a normalisation constant. A bi-dimensional white noise ξ n (i.e. the time derivatives of two independent Wiener processes) with amplitude σ > 0 is used for the stochastic model in "Transient states and perturbed systems". The function s(X n ) = �x n − x m 0 (X n ) � in the scalar speed model determines the minimal distance in front, being the closest agent in front of the agent n. Note that in the definition of the dynamic heterogeneity type Eq. (2), the type of the closest agent in front is k (X n ) = k m 0 (X n ) . The simulations are carried out using an explicit Euler numerical scheme in deterministic cases, and using an Euler-Maruyama scheme for the simulations including the stochastic noise. The time step is δt = 0.01 s in both cases.
Setting of the parameters. The default values for the parameters p = (ℓ, V , T) of the CF model are based on the setting proposed in the literature 53 Note that = 0.6 m in the order parameters corresponds approximately to two times the size of a pedestrian. Starting from the default values, we vary using heterogeneity indexes the parameter settings p 1 = (ℓ 1 , V 1 , T 1 ) and p 2 = (ℓ 2 , V 2 , T 2 ).
x n = F cf p j (X n ) = V (X n , p j ) e(X n , p j ) + σ ξ n , (6) V (X n , p j ) = max 0, min V j , s(X n ) − ℓ j /T j ,