Density formula (Traffic Distance Overlay): Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
(Created page with "Traffic density for any given location is calculated in the following way: Total traffic is:")
 
No edit summary
 
Line 1: Line 1:
Traffic density for any given location is calculated in the following way:
Traffic density for any given location is calculated in the following way:


Total traffic is:
==Traffic per vehicle type==
The amount of vehicles per vehicle type are calculated as follows:
 
<math>buses = </math> [[num buses (Traffic Density Overlay)|NUM_BUSES]] <math>\cdot</math> [[buses active (Traffic Density Overlay)|BUSES_ACTIVE]]
 
<math>cars = </math> [[num cars (Traffic Density Overlay)|NUM_CARS]] <math>\cdot</math> [[cars active (Traffic Density Overlay)|CARS_ACTIVE]]
 
<math>trucks = </math> [[num trucks (Traffic Density Overlay)|NUM_TRUCKS]] <math>\cdot</math> [[trucks active (Traffic Density Overlay)|TRUCKS_ACTIVE]]
 
<math>vans = </math> [[num vans (Traffic Density Overlay)|NUM_VANS]] <math>\cdot</math> [[vans active (Traffic Density Overlay)|VANS_ACTIVE]]
 
==Total traffic==
The total amount of traffic is calculated as follows:
 
<math>total = buses + cars - trucks + vans</math>
 
{{article end
|notes=
* Because a boolean (such as [[buses active (Traffic Density Overlay)|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 (Traffic Density Overlay)|hours]]. However, if the amount if an [[Attribute array|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.
|seealso=
* [[Traffic Density Overlay]]
}}

Latest revision as of 14:39, 15 February 2022

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