1D Vicsek model

1D variant of the Vicsek model. Initialize agents on lines with random $x$ coordinate and random direction $\vec{e^i} = (1,0)$ (right) or $\vec{e} = (-1,0)$ (left). Agent color represents their intrinsic speed $v^i$, which is fixed per agent at a value uniformly sampled between $v_\text{min}$ and $v_\text{min} + \Delta v$. Every step:

  1. Update directions:
  2. Update positions: