Calculation of Traffic Statistics¶
This section describes in detail the procedures applied to calculate the different traffic statistical measures. The individual vehicle data that needs to be gathered in order to produce the traffic statistics is also described.
Data is collected at intervals in the simulation specified in the Scenario Editor. At the end of each interval, the statistics that are accumulated relate to vehicles that have left the object that is collecting the statistics in that interval (i.e. a road section, a node, a turn, a sub path, or the replication). Due to the changes in congestion as the simulation runs, and hence the changes in travel times, the statistics for objects with different passage times (i.e. a short turn, a long section, a subpath with many sections) will not be self consistent in any single interval. For example a vehicle whose trip time is measured on a sub path can have used a road section, which is now congested, in a previous interval when it was uncongested, and hence summing the travel times of the sections and turns in a subpath in one interval might not necessarily give the same travel time as experienced by the vehicles that completed the subpath in the same interval. For this reason, statistics are generated for multiple types of objects and the modeler must select which are the most appropriate to use for the planned analysis.
Moreover Aimsun Next computes the standard deviation to complete the statistical information about any variable which can include by their nature or definition. The Bessel's correction is applied in order to use the sample standard deviation definition:

In case of an interval mean value from Time Series, the standard deviation is calculated from all the individual vehicle data considered for the computed statistic.
Where:
 \(s\): Standard Deviation
 \(x_i\): serie ivalue
 \(x\): average of the serie values
 \(n\): count of the serie values
This formula is expressed with the Naïve formulation in order to optimise computation time:

In case of an interval harmonic mean value from Time Series, the standard deviation is calculated from all the individual vehicle data considered for the computed statistic. The formula to estimated the standard deviation of a harmonic mean variable is calculated from the sample moments:
Where:
 \(s\): Standard Deviation
 \(x_i\): serie ivalue
 \(n\): count of the serie values

In case of an aggregated value from an arithmetic or a harmonic mean defined by the vehicles average, the standard deviation is applied considering all Time Series values with same formula as above. In this case, an exception is found: The aggregated standard deviation value from the TS which are aggregated by sum from an average replication is not shown in the UI. But, it is stored in the database and it is calculated from the aggregated of the replications included in the average instead from the interval values from average Time Series.

In case of an average replication values is calculated from the values that are included in the replications from the average. The standard deviation formula applied depends on the type of variable:

Simple mean variables
Where:
 \(s\): Standard Deviation
 \(x_i\): serie ivalue
 \(x\): average of the serie values
 \(n\): count of the serie values

Weighted vehicle Mean or Harmonic variables
Where:
 \(s\): Standard Deviation
 \(s_i\): std deviation replication serie ivalue
 \(w_i\): vehicle counts replication serie ivalue
 \(x_i\): mean serie replication ivalue
 \(x_w\): mean weighted by vehicle of the replication values

Network Statistics ¶
Vehicle Data Gathering¶
The information gathered from an individual vehicle is:
\(TGEN_{i}\) = Generation time of the ith vehicle in the system (seconds).
\(TEN_{i}\) = Entrance time of the ith vehicle in the network (seconds).
\(TEX_{i}\) = Exit time of the ith vehicle from the network (seconds).
\(D_{i}\) = Total Distance travelled by the ith vehicle in the network (meters).
\(TDT_{i}\) = Total Delay Time accumulated in each section by the ith vehicle (seconds).
\(TST_{i}\) = Total Stop Time accumulated in each section by the ith vehicle (seconds).
\(TNS_{i}\) = Total Number of Stops accumulated in each section by the ith vehicle.
\(TFC_{i}\) = Total fuel consumed by the ith vehicle(liters).
\(TPE{i,j}\) = Total emission of the jth pollutant by the ith vehicle(Kg).
Taking this information, when a vehicle exits the network, the following variables are calculated:
\(TT_{i}\) = Average travel time per km of the ith vehicle (seconds).
\(DT_{i}\) = Average delay time per km of the ith vehicle (seconds).
\(S_{i}\) = Average speed of the ith vehicle (m/s).
\(HS_{i}\) = Inverse of Si (s/m), used for calculating the harmonic mean speed
\(ST_{i}\) = Average stop time per km of the ith vehicle (seconds).
\(NS_{i}\) = Average number of stops per km of the ith vehicle.
\(VQ_{i}\) = Time the ith vehicle has spent in a virtual queue (seconds).
Traffic Statistics¶
The previous Vehicle Variables are used for calculating the simulation statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds).
\(N_{sys}\) = Number of vehicles that exit the network during period I
\(F_{sys}\) = Mean Flow
In hybrid macromeso simulations, \(N_{sys meso}\) = Number of vehicles that exit the network during period I from the meso area \(N_{sys macro}\) = Number of vehicles that exit the network during period I from the macro area Then the Meso and Macro Flows are calculated using \(N_{sys meso}\) and \(N_{sys macro}\) respectively.
\(TT_{sys}\) = Average Travel Time per vehicle per km.
\(S_{sys}\) = Average Speed per vehicle (km/h)
\(HS_{sys}\) = Harmonic mean Speed per vehicle (km/h)
\(DT_{sys}\) = Average Delay Time per vehicle per km (seconds/km)
\(ST_{sys}\) = Average Stop Time per vehicle per km (seconds/km)
\(NS_{sys}\) = Average Number of Stops per vehicle per km
\(TotalTrav_{sys}\) = Total number of kilometers travelled by all the vehicles that have crossed the network (km)
\(TotalTravTime_{sys}\) = Total travel time experienced by all the vehicles that have crossed the network (seconds)
\(WTimeVQ_{sys}\) = Mean waiting time per vehicle in virtual queue (seconds)
\(FuelCon_{sys}\) = Total fuel consumed by all the vehicles that have crossed the network (liters)
\(PollEm_{sys,j}\) = Total pollution of the jth pollutant emitted by all the vehicles that have crossed the network (kg)
The lane density of the system is calculated as follows:
\(L\) = Total length of all lanes of all sections of the network (meters)
\(NVeh_t\) = Number of vehicles in the network at time t
\(i\) = Interval of statistics (seconds).
\(T = (0, t_1, ..., t_m, I)\) : instants when the number of vehicles in the network changes
\(NGEN_{sys}\) = Number of vehicles generated during period \(i\)
\(QVMean_{sys}\) = Mean waiting time per vehicle in virtual queue (seconds)
\(QVMax_{sys}\) = Maximum number of vehicles in virtual queue (vehs) in a simulation step in period \(i\).
Turn and Section Statistics¶
Vehicle Data Gathering¶
The information gathered from an individual vehicle at every section is:
\(TEN_{si}\) = Entrance time of the ith vehicle in the section (seconds).
\(TEX_{si}\) = Exit time of the ith vehicle from the section (seconds).
\(TST_{si}\) = Total Stop Time accumulated in a section by the ith vehicle (seconds).
\(TNS_{si}\) = Total Number of Stops accumulated in a section by the ith vehicle.
\(TFC_{si}\) = Total fuel consumed accumulated in a section by the ith vehicle (liters).
\(TPE_{si,j}\) = Total emission of the jth pollutant accumulated in a section by the ith vehicle (kg).
Taking this information, when a vehicle enters a new section the following variables are calculated:
\(TT_{i}\) = Average section travel time of the ith vehicle (seconds).
\(DT_{i}\) = Average section delay time of the ith vehicle (seconds).
where
 \(S_s\) = Speed limit of section s (m/s).
 \(S_t\) = Speed limit of turn t (m/s).
 θ\(_{i}\) = Speed limit acceptance of vehicle i
 \(SMax_{i}\) = Maximum desired Speed of vehicle i (m/s).
 \(L_{s}\) = Distance of section s (meters).
 \(L_{t}\) = Distance of turn t (meters).
\(S_{i}\) = Average section speed of the ith vehicle (m/s).
\(HS_{i}\) = Inverse of Si (s/m), used for calculating the harmonic mean speed.
\(ST_{i}\) = Stop time in the section of the ith vehicle (seconds).
\(NS_{i}\) = Number of stops of the ith vehicle.
Turn Traffic Statistics¶
The previous vehicle variables are used for calculating the turn statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds)
\(N_{tur}\) = Number of vehicles that exit a turn
\(F_{tur}\) = Mean Flow of a turn (veh/h)
\(TT_{tur}\) = Average Travel Time per vehicle of a turn (seconds)
\(S_{tur}\) = Average Speed per vehicle of a turn (km/h)
\(HS_{tur}\) = Harmonic mean Speed per vehicle of a turn (km/h)
\(DT_{tur}\) = Average Delay Time per vehicle of a turn (seconds)
\(ST_{tur}\) = Average Stop Time per vehicle of a turn (seconds)
\(NS_{tur}\) = Average Number of Stops per vehicle of a turn
\(TotalTrav_{tur}\) = Total distance travelled by all the vehicles in the turn (km)
\(TotalTravTime_{tur}\) = Total travel time experimented by all the vehicles in the turn (seconds)
\(FuelCon_{tur}\) = Total fuel consumed by all the vehicles in the turn (liters)
\(PollEm_{tur,j}\) = Total pollution of the jth pollutant emitted by all the vehicles inside the turn (kg)
To calculate the average and maximum queue length of a turn (veh):
\(QL_{l,t}\) = Queue Length in the lane l at time t (veh)
\(MaxQL_l\) = Maximum queue length in lane l (veh)
\(NBTurns_l\) = Total number of allowed turns movements of the lane l
\(I\) = Interval of statistics (seconds).
\(T_l = (0, t_{l,1}, ..., t_{l,m}, I)\) : instants when the queue length in lane l changes
\(NBLanes_{tur}\) = Number of lanes that belong to turn tur
\(MaxQL_l\) = Maximum Queue Length in the lane l (veh)
Section Traffic Statistics¶
The previous Vehicle Variables are used for calculating the section statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds).
\(N_{sec}\) = Number of vehicles that exit a section
\(F_{sec}\) = Mean Flow of a section (veh/h)
\(TT_{sec}\) = Average Travel Time per vehicle of a section (seconds)
\(S_{sec}\) = Average Speed per vehicle of a section (km/h)
\(HS_{sec}\) = Harmonic mean Speed per vehicle of a section (km/h)
\(DT_{sec}\) = Average Delay Time per vehicle of a section (seconds)
\(ST_{sec}\) = Average Stop Time per vehicle of a section (seconds)
\(NS_{sec}\) = Average Number of Stops per vehicle of a section
\(TotalTrav_{sec}\) = Total distance travelled by all the vehicles in the section (km)
\(TotalTravTime_{sec}\) = Total travel time experienced by all the vehicles in the section (seconds)
\(FuelCon_{sec}\) = Total fuel consumed by all the vehicles in the section (liters)
\(PollEm_{sec,j}\) = Total pollution of the jth pollutant emitted by all the vehicles inside the section (kg)
To calculate the density of a section:
\(L_l\) = Length of lane l (m)
\(NVeh_{l,t}\) = Number of vehicles in the lane l at time t
\(I\) = Interval of statistics (seconds).
\(T_l = (0, t_{l,1}, ..., t_{l,m}, I)\) : instants when the number of vehicles in lane l changes
To calculate the average and maximum queue length of a section (veh):
\(QL_{l,t}\) = Queue Length in the lane l at time t (veh)
\(MaxQL_l\) = Maximum queue length in lane l (veh)
\(I\) = Interval of statistics (seconds).
\(T_l = (0, t_{l,1}, ..., t_{l,m}, I)\) : instants when the queue length in lane l changes
\(NBLanes_{sec}\) = Number of lanes of section sec
\(MaxQL_l\) = Maximum Queue Length in the lane l (veh)
Node Traffic Statistics ¶
The previously calculated Average Delay Time for the turns in a node and for the incoming sections are used for calculating the average intersection delay per vehicle (LOS, seconds) according to the following formula:
Where:
\(F_{tur}\) = Mean Flow of a turn (veh/h)
\(DT_{tur}\) = Average Delay Time per vehicle of a turn (seconds)
\(F_{sec}\) = Mean Flow of a section (veh/h)
\(DT_{sec}\) = Average Delay Time per vehicle of a section (seconds)
Subpath Statistics¶
Data Gathering¶
The information gathered from an individual vehicle at every subpath is:
\(TEN_{i}\) = Entrance time of the ith vehicle in the subpath (seconds).
\(TEX_{i}\) = Exit time of the ith vehicle from the subpath (seconds).
\(D_{i}\) = Total Distance travelled by the ith vehicle in the subpath (meters).
\(TDT_{i}\) = Total Delay Time accumulated in each section of the subpath by the ith vehicle (seconds).
\(TST_{i}\) = Total Stop Time accumulated in each section of the subpath by the ith vehicle (seconds).
\(TNS_{i}\) = Total Number of Stops accumulated in each section of the subpath by the ith vehicle.
\(TFC_{i}\) = Total fuel consumed accumulated in each section of the subpath by the ith vehicle (liters).
\(TPE_{i,j}\) = Total emission of the jth pollutant accumulated in each section of the subpath by the ith vehicle.
Taking this information, when a vehicle exits the subpath the following variables are calculated:
\(TT_{i}\) = Average travel time for the ith vehicle (seconds).
\(DT_{i}\) = Average delay time of the ith vehicle (seconds).
\(S_{i}\) = Average speed of the ith vehicle (m/s).
\(HS_{i}\) = Inverse of Si (s/m), used for calculating the harmonic mean speed
\(ST_{i}\) = Average stop time of the ith vehicle (seconds).
\(NS_{i}\) = Average number of stops of the ith vehicle.
Subpath Summaries¶
The previous Vehicle Variables are used for calculating the Subpath statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds).
\(N_{str}\) = Number of vehicles that have crossed the subpath str.
\(TT_{str}\) = Average Travel Time per vehicle (seconds)
\(S_{str}\) = Average Speed per vehicle (km/h)
\(HS_{str}\) = Harmonic mean Speed per vehicle (km/h)
\(DT_{str}\) = Average Delay Time per vehicle (seconds)
\(ST_{str}\) = Average Stop Time per vehicle (seconds)
\(NS_{str}\) = Average Number of Stops per vehicle
\(TotalTrav_{str}\) = Total distance travelled (km)
\(TotalTravTime_{str}\) = Total travel time experienced(seconds)
\(FuelCon_{str}\) = Total fuel consumed (liters)
\(PollEm_{str,j}\) = Total pollution of the jth pollutant emitted by all the vehicles in the subpath (kg)
OD and Centroid Statistics¶
Vehicle Data Gathering¶
The information gathered from an individual vehicle is as follows:
\(TEN_{i}\) = Entrance time of the ith vehicle in the network (seconds).
\(TEX_{i}\) = Exit time of the ith vehicle from the network (seconds).
\(D_{i}\) = Total Distance travelled by the ith vehicle in the network (meters).
\(TDT_{i}\) = Total Delay Time accumulated in each section by the ith vehicle (seconds).
\(TST_{i}\) = Total Stop Time accumulated in each section by the ith vehicle (seconds).
\(TNS_{i}\) = Total Number of Stops accumulated in each section by the ith vehicle.
\(TFC_{i}\) = Total fuel consumed accumulated in each section by the ith vehicle (liters).
\(TPE_{i,j}\) = Total emission of the jth pollutant accumulated in each section by the ith vehicle (kg)
Taking this information, when a vehicle exits the system the following variables are calculated:
\(TT_{i}\) = Average travel time for the ith vehicle (seconds).
\(DT_{i}\) = Average delay time of the ith vehicle (seconds).
\(S_{i}\) = Average speed of the ith vehicle (m/s).
\(HS_{i}\) = Inverse of Si (s/m), used for calculating the harmonic mean speed
\(ST_{i}\) = Average stop time of the ith vehicle (seconds).
\(NS_{i}\) = Average number of stops of the ith vehicle.
OD Pair Statistics¶
The previous Vehicle Variables are used for calculating the OD pair statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds).
\(N_{(orig,dest)}\) = Number of vehicles that have reached its destination dest from its origin orig.
\(TT_{(orig,dest)}\) = Average Travel Time per vehicle (seconds)
\(S_{(orig,dest)}\) = Average Speed per vehicle (km/h)
\(HS_{(orig,dest)}\) = Harmonic mean Speed per vehicle (km/h)
\(DT_{(orig,dest)}\) = Average Delay Time per vehicle (seconds)
\(ST_{(orig,dest)}\) = Average Stop Time per vehicle (seconds)
\(NS_{(orig,dest)}\) = Average Number of Stops per vehicle
\(TotalTrav_{(orig,dest)}\) = Total distance travelled (km)
\(TotalTravTime_{(orig,dest)}\) = Total travel time experienced (seconds)
\(FuelCon_{(orig,dest)}\) = Total fuel consumed (liters)
\(PollEm_{(orig,dest),j}\) = Total pollution emitted of the jth pollutant (kg)
Origin Centroid Statistics¶
The previous Vehicle Variables are used for calculating the origin centroid statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds).
\(N_{orig}\) = Number of vehicles that have reached its destination from its origin orig.
\(TT_{orig}\) = Average Travel Time per vehicle (seconds)
\(S_{orig}\) = Average Speed per vehicle (km/h)
\(HS_{orig}\) = Harmonic mean Speed per vehicle (km/h)
\(DT_{orig}\) = Average Delay Time per vehicle (seconds)
\(ST_{orig}\) = Average Stop Time per vehicle (seconds)
\(NS_{orig}\) = Average Number of Stops per vehicle
\(TotalTrav_{orig}\) = Total distance travelled (km)
\(TotalTravTime_{orig}\) = Total travel time experienced (seconds)
\(FuelCon_{orig}\) = Total fuel consumed (liters)
\(PollEm_{orig,j}\) = Total pollution emitted of the jth pollutant (kg)
Destination Centroid Statistics¶
The previous Vehicle Variables are used for calculating the destination centroid statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds).
\(N_{dest}\) = Number of vehicles that have reached their destination dest from their origin.
\(TT_{dest}\) = Average Travel Time per vehicle (seconds)
\(S_{dest}\) = Average Speed per vehicle (km/h)
\(HS_{dest}\) = Harmonic mean Speed per vehicle (km/h)
\(DT_{dest}\) = Average Delay Time per vehicle (seconds)
\(ST_{dest}\) = Average Stop Time per vehicle (seconds)
\(NS_{dest}\) = Average Number of Stops per vehicle
\(TotalTrav_{dest}\) = Total distance travelled (Km)
\(TotalTravTime_{dest}\) = Total travel time experienced (seconds)
\(FuelCon_{dest}\) = Total fuel consumed (liters)
\(PollEm_{dest,j}\) = Total pollution emitted for the jth pollutant (kg)
Transit Statistics¶
Vehicle Data Gathering¶
The information gathered from an individual transit vehicle is as follows:
\(TEN_{i}\) = Entrance time of the ith vehicle into the network (seconds).
\(TEX_{i}\) = Exit time of the ith vehicle from the network (seconds).
\(D_{i}\) = Total Distance travelled by the ith vehicle in the network (meters).
\(TDT_{i}\) = Total Delay Time accumulated in each section by the ith vehicle (seconds).
\(TST_{i}\) = Total Stop Time accumulated in each section by the ith vehicle (seconds).
\(TNS_{i}\) = Total Number of Stops accumulated in each section by the ith vehicle.
\(TFC_{i}\) = Total fuel consumed accumulated in each section by the ith vehicle (liters).
\(TPE_{i,j}\) = Total emission of pollutant jth accumulated in each section by the ith vehicle (kg)
Taking this information, when a transit vehicle exits the system the following variables are calculated:
\(TT_{i}\) = Average travel time for the ith vehicle (seconds).
\(DT_{i}\) = Average delay time of the ith vehicle (seconds).
\(S_{i}\) = Average speed of the ith vehicle (m/s).
\(HS_{i}\) = Inverse of \(S_{i}\) (s/m), used for calculating the harmonic mean speed
\(ST_{i}\) = Average stop time of the ith vehicle (seconds).
\(NS_{i}\) = Average number of stops of the ith vehicle.
Transit Line Statistics¶
The previous Vehicle Variables are used for calculating the transit line statistics output. The following traffic statistics are calculated for every statistics interval and for the whole simulation period:
\(I\) = Interval of statistics (seconds).
\(N_l\) = Number of vehicles that have completed the lthtransit line.
\(TT_l\) = Average Travel Time per vehicle (seconds)
\(S_l\) = Average Speed per vehicle (km/h)
\(HS_l\) = Harmonic mean Speed per vehicle (km/h)
\(DT_l\) = Average Delay Time per vehicle (seconds)
\(ST_l\) = Average Stop Time per vehicle (seconds)
\(NS_l\) = Average Number of Stops per vehicle
\(TotalTrav_l\) = Total distance travelled (km)
\(TotalTravTime_l\) = Total travel time experienced (seconds)
\(FuelCon_l\) = Total fuel consumed (liters)
\(PollEm_{l,j}\) = Total pollution emitted for the jth pollutant (kg)
Detector Data Gathering¶
This section describes in detail the procedures applied to produce the different traffic detection measures, as well as the individual vehicle data that is gathered.
Each Detector has two types of measures gathered, these are set at the Scenario / Outputs to Generate folder:
 Detection Interval: Detection is aggregated during a time period.
 Detection Cycle: Detection done each cycle of detection.
Each detector stores the following variables:
 Veh (cycle): Set of Vehicles that have entered during last Cycle.
 VehOver (cycle): Set of Vehicles that have passed over the detector during last Cycle.
 NbVeh (cycle): Number of Vehicles that have entered during last Cycle.
 NbVehOver (cycle): Number of Vehicles that have passed over the detector during last Cycle.
 Speed (v, cycle): Speed of Vehicle v during last Cycle.
 EntranceTime (v, cycle): Time of Vehicle v that has entered during last Cycle.
Cycle Detection Measures¶
 Count: number of vehicles that have passed through the detector during the last cycle (vehicles).
 Speed: mean speed of the vehicles when are over the detector during the last cycle (km/h or mph).
 Presence: 1 if any vehicle is over the detector during the last cycle, 0 otherwise.
 Occupancy: percentage of cycle time that the detector has detected presence during last cycle (%).
 Density: average spatial occupancy that the detector has detected during last cycle (veh/km).
Interval Detection Measures¶
 Count: number of vehicles that have passed through the detector during the interval (vehicles).
 Speed: mean speed of the vehicles when crossing the detector during the interval (km/h or mph). The speed of a vehicle is gathered when it crosses the detector for the first time (that is, for the first Cycle when the vehicle enters the detector).
 Presence: 1 if any vehicle is over the detector during the last interval, 0 otherwise.
 Occupancy: percentage of cycle time that the detector has detected presence during the interval (%).
 Density: average spatial occupancy that the detector has detected during the interval (veh/km).
 Headway: mean headway of the vehicles when crossing the detector during the interval (seconds) where (v1) is the previous vehicle to v.
Comparison with Real Data¶
Detector output can be compared with data in a Real Data Set. The quantified values used in the comparison are:
 GEH: A measure used to quantify differences in hourly flows.
 Thiel's U: A measure of goodness of fit which can further broken down to measure the goodness of fit for the mean, for the variance, and for the correlation between modelled and observed flows.
Customization of Statistics Output¶
The ‘Output' tab of the Scenario editor can be used to define the type of statistics produced as simulation output and whether or not they are stored in files. This must be carried out before running a simulation experiment because the report parameters cannot be modified once a simulation experiment has started.
Explanation of Statistics Outputs¶
Number of Stops¶
A stop for a vehicle happens whenever its speed decreases below the queue entry speed and while it remains below the queue exit speed parameter. Once the vehicle speed goes above the queue exit speed parameter the vehicle is no longer considered in a queue nor stopped. A new stop will be added to the number of stops statistics when the vehicle speed goes below queue entry speed again.
Stop Time¶
The stop time for a vehicle takes into account all the time the vehicle speed was below the vehicle's queue entry speed and until it goes above the queue exit speed parameter.
Queue definition¶
You can find the definition of the queue in the Mesoscopic Queue Length and in the Microscopic Queue Length sections.