Skip to content

minorchange/traffic-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

traffic-simulation

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages