Tutorial Lane Occupancy

Main Page > Tutorials

Follower Density Follower Density is the density multiplied by the percent followers and is a more appropriate reflection of quality of driving conditions on two lane highways  Follower Density  is calculated from the Link_Lane_Detector output file to match the Average Headway given in Detector Aggregate output file

Take note of warm-up time and simulation time, as this will be needed later
 * Run simulation in SwashSim

To Run R Script
 * Set working directory to location of SwashSim output files
 * Input Link_Lane_Detector file that you would like to determine Follower Density for
 * Input Warm-Up time in seconds
 * Input Simulation time in seconds
 * R will output Follower Density that matches values in Detector Aggregate File

Calculations in R,
 * Filters out data in warm-up time
 * Count of vehicles in simulation is calculated
 * Count of vehicles in a following state is calculated (vehicles with a headway of 2.5 seconds or less)
 * The ratio of following vehicles to total vehicles within simulation is calculated
 * AverageSpeed is calculated by taking the mean of the given speeds
 * The simulation duration is then converted to an hourly measure and divided by average speed
 * Follower Density is then calculated by $$ \frac{Follower Count}{SimVehicleCount} \times SimVehicleCount \times \frac{(3600/SimulationDuration)}{AverageSpeed}$$

Lane Occupancy

Lane Occupancy is the ratio of sum of the lengths of the vehicles to the length of the road section in which those vehicles are present.

Link Density Link Density is calculated by $$ \frac {v} {S} $$.

where,


 * 'v' is Flow Rate in analysis direction in vehicle per mile per lane (veh/mi/ln)
 * 'S' is Average Speed in miles per hour(mi/hr)

Calculation and Analysis


 * Run Simulation in SwashSim for the freeway network.
 * Consider warm-up time and simulation time as suitable. (For this case 300 seconds and 900 seconds have been considered as warm up time and simulation time).
 * Link Density is calculated from the Link Results output file and Time Step Data (TSD) file.
 * For Flow rate, first filter the data in the TSD file by excluding vehicles that enters the link before warm up time.
 * Also filter out those vehicles that are still on the link after the simulation time ends.
 * After filtering, total number of vehicles in 'TSD' file is equal to total number of vehicles in 'Link Results' file (Column U).
 * Calculate Flow Rate in vehicles per hour per lane using total number of vehicle.
 * Calculate Link Density using Flow rate and average speed (Link Results File, column F).

Detector Occupancy

Detector Occupancy is the time for which a detector is occupied. Percent Occupancy it is the percent of the ratio of total time for which a detector is occupied (To) by a vehicle to total observation time (T).

Calculation and Analysis


 * Add Detectors at suitable distance to each lane of the link to be analyzed.
 * Run Simulation in SwashSim for the freeway network.
 * Link_Lane_Detector output file is used to calculate the To.
 * To is the summation of difference of actuation 'time off' and actuation 'time on' for all the vehicles after the warm up time.
 * T is the simulation Duration in seconds.
 * Percent Occupancy calculated is equal to the occupancy obtained in DetectorAggregateMeasures file (Column N).
 * Estimated Density is ratio of Detector Occupancy and Effective Length (in feet per mile).

Control Delay Control Delay is the portion of the total delay attributed to traffic signal operation for signalized intersections. Control Delay can be verified following the steps below:.

Run SwashSim Simulation 1. Run simulation in SwashSim for the signalized network. 2. Open TSD output data for each link. 3. Remove/Delete the vehicle ID entered the link before duration time. 4. Remove/Delete the vehicle ID which didn’t depart the link within simulation time. 5. Save filtered file as TSD_1_0_1_input.csv.
 * Filter Column A with less than warm up time.
 * Identify the vehicle ID in Column B.
 * Remove/Delete entries with these vehicle ID from database.
 * Filter column A with duration time + warm up time (the last time step of simulation).
 * Identify the vehicle ID in Column B.
 * Remove/Delete entries with these vehicle ID from database.

Verify with RStudio 1. Open RStudio and run total_delay.R. 2. Check the results in total delay.csv. Note: We verified only the through movement of the links. The Vehicle Desired Speed would be different for both left and right turning vehicles because of the different Link Free Flow Speed on downstream link than upstream link which affect the delay calculation for the vehicles turning left or right.
 * This script calculates total delay by following process:
 * Input TSD_1_0_1_input.csv file.
 * Link Travel Time = Link Exit Time - Link Entrance Time using time in column A.
 * Vehicle Desired Speed = LinkFreeFlowSpeed* × Vehicle Driver Type Desired Speed Multiplier*.
 * Vehicle Desired Travel Time = Link Length* / Vehicle Desired Speed.
 * Individual Vehicle Delay = Link Travel Time - Vehicle Desired Travel Time.
 * Total delay = Summation of individual vehicle delay.
 * Output total delay.csv.
 * *These values can be found in SwashSim model. Duration time & warm up time can be found on simulation panel in SwashSim model.
 * Total vehicle: Count the number of ID in column B.
 * Total delay: summation of delay in Column F.(Filter out the negative values)

Stop Rate Stop Rate is the average number of stops per vehicle. Stop Rate can be verified using the following steps below:

Run SwashSim Simulation 1. Run simulation in SwashSim for the signalized network. 2. Open TSD output data for each link. 3. Remove/Delete the vehicle ID entered the link before duration time. 4. Remove/Delete the vehicle ID which didn’t depart the link within simulation time. 5. Filter “Stoppedinqueue” in Column AU. 6. Delete duplicate vehicle ID in Column B. 7. Count the number of vehicle ID.
 * Filter Column A with less than warm up time.
 * Identify the vehicle ID in Column B.
 * Remove/Delete entries with these vehicle ID from database.
 * Filter Column A with duration time + warm up time (the last time step of simulation).
 * Identify the vehicle ID in Column B.
 * Remove/Delete entries with these vehicle ID from database.