Density formula (Traffic Distance Overlay)

From Tygron Support wiki
Revision as of 14:39, 15 February 2022 by Rudolf@tygron.nl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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:

NUM_BUSES BUSES_ACTIVE

NUM_CARS CARS_ACTIVE

NUM_TRUCKS TRUCKS_ACTIVE

NUM_VANS VANS_ACTIVE

Total traffic

The total amount of traffic is calculated as follows:

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