Miarmy Crowd Simulation Documentation (English)
Traffic System
What is Traffic System?
Miarmy Traffic system tools provide the tool can automatically setup many complex logic and perception stuffs in the crossroad. With traffic tools, we can build many crossroads and link them together by roads and form an interesting system.
Traffic system, crossroads & roads
Features of Traffic crossroad
In this version, our traffic system can only control the cars. We made a crossroad node to provide enough information to control the car characters.
A crossroad node
Sockets Type
You can choose either 3 or 4 sockets for each crossroad. With the socket type attribute T-Cross or X-Cross.
Socket type attributes
Left T-Cross and right X-Cross
Socket Angles
Each socket can be set for different angle for many non-standard crossroads. By each socket independent attribute.
Socket attributes
The right side crossroad has 2 non-0 angles
Entry and Exit
The ports with color are the entries whereas the blank with a white short-line is the exit
The colorful is 3 entries into the crossroad, where as the
Traffic Lights:
The port with green color is stand for this port is green light and let car to pass. Whereas the port with red color cannot let car to pass
Different light have different pass
That traffic light can be controlled by the attributes:
Traffic light control attributes
- Light Change Frame: each a span of time, the light change
- Light Change Offset: offset the start time counter
Road width
The entry and exit can set different width for fitting the different road and scene setup. It controlled by the road width attribute:
Road width attributes
Left wider and right more narrow
Left or Right Convention
For different county, people have different traffic convention, so we make the crossroad left right switchable. It controlled by the attribute,
Right Free
The left entry and right entry of the crossroad
Car Stop & Walk Area
The different area can make the different
- The area between red and blue circle: car will stop in this area if meet red light and also inside this area
- The area between yellow and red circle: people will walk in this area for cross the road (not available in this version)
The 2 important areas
Traffic Quadrants & Lights
Each crossroad has 4 quadrants. And each opposite two quadrants are a pair, each pair are perform the same red/green light change.
4 quadrants in crossroad
Crossroad Under the hood
When simulation, we're storing many paths and areas information into the crossroad memory.
If one agent contains the "traffic" fuzzy logic channels, we will firstly test the agent inside or outside the crossroad range. If inside, we'll give the agent some proper information of the crossroad, like the path, entry id, etc. The information will be stored into agent's brain.
And the traffic channels will return the correct values based on the crossroad information in agent brain.
Once the agent outside the crossroad, the information of crossroad in agent brain will be cleared, then, these traffic channels will be disabled automatically and no any return (false).
Next session we'll talk about the traffic channels.
Traffic Channels and Usages
Priority
Future of Traffic System
In the future, we'll expanding the traffic system to people control and flyover control
Basefount Technology