Density formula (Traffic Density Overlay): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 15: Line 15:
The total amount of traffic is calculated as follows:
The total amount of traffic is calculated as follows:


<math>total = buses + cars - trucks + vans</math>
<math>total = buses + cars + trucks + vans</math>


{{article end
{{article end

Latest revision as of 13:14, 15 July 2026

Traffic density for any given location is calculated in the following way:

Traffic per vehicle type

The amount of vehicles per vehicle type are calculated as follows:

buses= NUM_BUSES BUSES_ACTIVE

cars= NUM_CARS CARS_ACTIVE

trucks= NUM_TRUCKS TRUCKS_ACTIVE

vans= NUM_VANS VANS_ACTIVE

Total traffic

The total amount of traffic is calculated as follows:

total=buses+cars+trucks+vans

Notes

  • Because a boolean (such as BUSES_ACTIVE), is represented as a 1 or a 0, having a traffic type active makes the total amount of that traffic type equal to the defined traffic amount, while having that traffic type inactive multiples any possible value with 0, resulting in 0 vehicles being counted for that traffic type.
  • If the traffic amount is defined as a single value, that value is used for all defined hours. However, if the amount if an array of values, each of the 24 indexes of that array are assumed to correspond to the hour denoted by those indexes, and as such that specific value from the array is used.

See also