A minimalist traffic simulation. The topology of the road network can be defined via a .csv in the following form :
.,.,.,x,.,.,.,.,.,x,.,.
.,.,.,^,.,.,.,.,.,^,.,.
.,.,.,^,.,.,.,.,.,^,.,.
.,.,.,^,.,.,.,.,.,^,.,.
s,>,>,+,>,>,>,>,>,+,>,x
.,.,.,^,.,.,.,.,.,.,.,.
.,.,.,^,.,.,.,.,.,.,.,.
.,.,.,^,.,.,.,.,.,.,.,.
.,.,.,^,.,.,.,.,.,.,.,.
.,.,.,^,.,.,.,.,.,.,.,.
.,.,.,s,.,.,.,.,.,.,.,.
.,.,.,.,.,.,.,.,.,.,.,.
.,.,.,.,.,.,.,.,.,.,.,.
These command line maps are populated via vehicles represented as chars like so:
0 1 2 3 4 5 6 7 8 9 10 11
0 . . . x . . . . . x . .
1 . . . R . . . . . ^ . .
2 . . . ^ . . . . . ^ . .
3 . . . Y . . . . . ^ . .
4 s ! > f > > H > > + > x
5 . . . p . . . . . . . .
6 . . . V . . . . . . . .
7 . . . ^ . . . . . . . .
8 . . . ^ . . . . . . . .
9 . . . ^ . . . . . . . .
10 . . . s . . . . . . . .
11 . . . . . . . . . . . .
12 . . . . . . . . . . . .
Great Fun!