# ASEP simulation

The asymmetric simple exclusion process is a stochastic transport model discrete in space and continuous in time, originating from the field of statistical mechanics. Informally, it describes the movement of particles on a lattice, where each site can be occupied by at most one particle.

Let us consider a one dimensional lattice of length $$L$$, with each site occupied by at most one particle. Furthermore, we consider the extremities of the lattice to be in contact with reservoirs, in the way that particles may enter or leave the system at these sites at specified rates. On the inside of the lattice, each particle waits an exponential time of parameter $$p + q$$ and then decides to try either a left (with probability $$\frac{q}{p+q}$$) or right (with probability $$\frac{p}{p+q}$$) jump. If the chosen site is already occupied, the jump doesn't happen.

At the boundaries, the dynamics is slightly different. At the left site, a particle waits an exponential time of parameter $$\gamma + p$$, and then tries to jump either to the left (with probability $$\frac{\gamma}{\gamma + p}$$) or to the right (with probability $$\frac{p}{\gamma + p}$$). If the site is empty, then a new particle appears after an exponential time of parameter $$\alpha$$, unless the site is occupied at that time. The dynamics are analogous at the right boundary with rates $$\delta$$ and $$\beta$$.

Formally, the ASEP is a continuous-time Markov chain $$(\eta_t)_t$$ on the state space $$S = \{0,1\}^L$$ (binary vectors of length $$L$$).

In the case $$q = \delta = \gamma = 0$$ we say that the process is totally asymmetric, or TASEP (for totally asymmetric simple exclusion process). In this case the particles may only move towards the right.

## The average current in the TASEP

In what follows we will discuss the totally asymmetric case, though most can be generalized for the TASEP.

When studying the dynamics of the system, whether it is the more general ASEP or simply a TASEP, we may ask ourselves what is the average stationary current $$J$$ of the system and how it changes when playing with the parameters of the system. That is, depending on the values of $$\alpha$$, $$\beta$$ and possibly $$L$$, how does the flow of particles change?

One very convenient way to explore the average of $$J$$ as $$t \to \infty$$ is by using a computer. For a set $$L$$ and for a certain set of parameters $$\alpha$$ and $$\beta$$, we shall simulate a large number $$N$$ of trajectories of the TASEP for a finite $$T$$ that is "large". For each trajectory, we measure the number of particles $$Q_{T}$$ that have passed between two adjacent sites until time $$T$$, which we then divide by $$T$$:

\$J_{T} = }

If for the $$i$$th trajectory we denote by $$J^i_{T}$$ the result obtained by this method, we can estimate the true average of $$J_t$$, $$\mathbb{E}J_t$$, by its empirical counterpart:

$\bar{J}_{T} = \frac{1}{N} \sum_{i = 1}^N J^i_{T}$

For sufficently large $$T$$, this should give us an estimation of the value of $$J_t$$ as $$t \to \infty$$.

We can visualize the values of $$\bar{J}_{T}$$ for different $$\alpha$$ and $$\beta$$ in $$\left[0,1\right]$$ as follows (here $$L = 75$$): This diagram exhibits phase transitions and the three phases are described by:

• $$\alpha < 1/2$$ and $$\alpha < \beta$$ : the particles enter the system on the left with a small rate and the system remains at a low density; the current is essentially restricted by the effect of the left reservoir. The average stationary current is given by $$J = \alpha(1-\alpha)$$

• $$\beta < 1/2$$ and $$\beta < \alpha$$ : the particles exit the system on the right at a small rate and the current is limited by the right reservoir. The average stationary current is given by $$J = \beta(1-\beta)$$

• $$\alpha > 1/2$$ and $$\beta > 1/2$$ : the particles enter or leave the system easily and the current is limited by the jamming effect in the bulk of the system. The average stationary current is $$J = 1/4$$.

In all three cases the current remains under the maximal current $$1/4$$ and this value is reached only in the third case.

You can explore the three phases by generating typical trajectories with the following interface. Note that:

• The "left" and "right" reservoirs are at the bottom and the top of the first graph respectively.

• Each continuous line corresponds to the trajectory of a unique particle. In particular, we can see that the lines never cross each other (i.e. each site is occupied by at most one particle at a time).

• The lower graph represents the left and right counters $$Q_t$$ and not the average current $$J_t$$.

For computational reasons, the time of the simulation is limited to a maximum of 1000 and the length of the lattice to a maximum of 50. Both must be positive integers.

It is not unusual, in the case of the TASEP, to witness rapid successions of horizontal lines in the first graph, especially in the phase $$\beta < 1/2$$ and $$\beta < \alpha$$. This is a sign of congestion : each particle spends a relatively long time still, and blocks all the particles to its left (below on the graph). Once the particle finally moves, the particles to its left may also move forward.

Comparing the two graphs, we can see that each jump on the lower graph for the left counter corresponds to a particle entering (if the jump is up) or to a particle leaving (if the jump is down) the system, which can be seen on the upper graph as horizontal lines at the bottom. The right counter mimics this behaviour but the direction of the jumps is inversed (up for leaving, down for entering). In the case of the TASEP, this means both graphs are increasing.

Notice also that there is a slight delay between the left and right counters, which is due to the time it takes for the particles to go through the system.