bml-cpp-cli is a tiny implementation of Biham-Middleton-Levine traffic model written in C++ and running in the terminal. It was made solely for fun and decorative purposes.
Currently, it only works on Linux.
Clone the repository and run the provided bml-cli binary. It was compiled using g++ 15.2.0.
Running the program is as simple as executing the provided binary. There are, however, several command line arguments to adjust the result:
--vertical-coloror-vc: set the color of the character to be used for south-bound vehicles;--horizontal-coloror-hc: set the color of the character to be used for east-bound vehicles;--vertical-symbolor-vs: set the character to be used for south-bound vehicles (will only take the first character from the provided string);--horizontal-symbolor-hs: set the character to be used for east-bound vehicles (will only take the first character from the provided string);--step-timeor-st: the duration of a single simulation step in milliseconds (default 100).--densityor-d: the density of the vehicles on the lattice (default 0.5).
For example, running ./bml-cli -vc cyan -vs O -hc yellow -vs X -st 50 -d 0.4 will result in a cyan-yellow grid of vehicles
with double the default speed and slightly lowered density.
Currently, the color options allow for input of only the basic 8 colors.