Tutorial Travel Time

Main Page > Tutorials > Tutorial: Performance Measures

This tutorial uses the Two Intersection Arterial SwashSim file to verify the travel time performance measure calculations from both the link and detector data.

Run the Simulation

 * 1) Download the three SwashSim files from the Two Intersection Arterial link to a working location.
 * 2) Open SwashSim.
 * 3) File -> Open -> Browse for TwoIntXCoordination.ssim
 * 4) The output data folder can be modified by selecting file>Project Properties in SwashSim.  Here you can change the project name, location, and other information.  For the output data, click the “Change...” button to the right of the Output Data File option and browse to the desired folder located on your computer.  This selected folder is where the Excel outputted data files will be out after running a simulation.
 * 5) Select "Simulation."
 * 6) * Select a 5 minute (300 s) warm-up time and a 15 minute (900 s) run time.
 * 7) * Select link performance measure data, vehicle data time step, and detector vehicle actuation data for output options.
 * 8) * Select "Run Simulation."

Verify Link Data Calculations
From the LinkResults.csv output file, an average travel time for each link is displayed in column H (SwashSim build 2019.12.6.1). This is calculated as defined in Performance Measures using the link length and average vehicle speed.

The TSD file in the output folder will be used to verify this data.


 * 1) Once the TSD file is downloaded, open it in MS Excel.
 * 2) Delete all columns to the right of column J (Lane ID), to speed up processing time.
 * 3) Identify one link to use in the verification process.
 * 4) * In SwashSim, select "Load Simulation Data."
 * 5) * Select "Show Network Nodes" and choose a link.
 * 6) Filter out the data so that only the appropriate information from that link is visible.
 * 7) * Highlight Header row (row 1), select Data -> Filter to enable filter options in every column
 * 8) * Select filter icon next to "Link ID" and pick applicable link (e.g., 67)
 * 9) * Next, sort the data using the vehicle ID number. In the output file this will be called “Veh Index” in column B.
 * 10) ** Highlight "Veh Index" cell, select "A-Z smallest to largest" icon
 * 11) * To apply the time restraint, select the filter icon next to "SimTime"
 * 12) ** Select "greater than" and input the value of your warm-up time.
 * 13) Copy this filtered data to a new Excel workbook, again to speed up processing. Copy only visible cells.
 * 14) Next, determine which vehicle is the first vehicle to enter the link after the warm-up time has ended and the last vehicle to fully exit the link before the run time has finished by viewing the simulation in SwashSim. This is important so that vehicles in the specified warm-up time are not included in the analysis.
 * 15) * In SwashSim, set the simulation time to 300 s and hit play.
 * 16) * Find the first vehicle to enter the link after the warm up time.
 * 17) * Delete all vehicles in the new workbook prior to this vehicle.
 * 18) Run VBA code to manually calculate travel time.
 * 19) * Open VBA editor in Excel with new workbook selected.
 * 20) * Insert new "Module" of code.
 * 21) * Copy Link VBA code found at SwashSim Github and paste into module.
 * 22) * Press run button.
 * 23) Verify that the number of vehicles, from Excel worksheet output, is the same as the number of vehicles in column U of the LinkResults.csv file.
 * 24) Compare the output travel time value in cell Q1 to the corresponding link value in the LinkResults.csv file.

The Excel macro sorts through the data and finds the first time step and last time step each vehicle was present on the subject link. Then the time each vehicle was on the link is summed together and divided by the total number of vehicles. This then outputs the average travel time for the desired link as well as the total vehicles considered.

Verify Detector Data Calculations
To verify the individual vehicle travel times, the Excel files created from SwashSim were downloaded into the Detector Data Processor where the travel time was processed based on the vehicle ID. From there, the Detector Data Processor calculated the results based on upstream data and downstream data for all included lanes. These values will be compared to the Excel outputs.


 * 1) Process the travel times in the Detector Data Processor program.
 * 2) * Create a folder with only the Link Detector CSV files that were previously output.
 * 3) * Open the Detector Data Processor program.
 * 4) * Under "Start New Project" select “SwashSim Individual Detectors” and click load.
 * 5) * Click "Read Files" in the upper left corner and navigate to the detector actuation file folder. Click "Read Files". Once the files are read, close the window and press the 'Calculate' button in on the upper left corner. (In the event of a program exception, place only two detectors (e.g., Link 1011 and Link 1112) in the folder and try again.)
 * 6) * Close the window and select calculate on the upper left corner. Choose travel time and choose the desired upstream and downstream detectors. The program will output the travel time for each vehicle that entered the upstream detector and exited the downstream detector.
 * 7) Compare the Detector Data Processor times to the Link Detector CSV raw data. Using the upstream and downstream files, the vehicles that travelled across both detectors will be identified.  Then the actuation time on, which is found in column E, for the upstream detector will be subtracted from the downstream detector to give each vehicle’s travel time.
 * 8) * Copy the data from the applicable individual detector actuation files into one worksheet, with the same header row.
 * 9) * Select the "Vehicle ID" cell and sort the vehicles from smallest to largest.
 * 10) Run VBA code to manually calculate travel time.
 * 11) * Open VBA editor in Excel with new workbook selected.
 * 12) * Insert new "Module" of code.
 * 13) * Copy Detector VBA code found at SwashSim Github and paste into module.
 * 14) * Press run button.
 * 15) Compare the output travel time value in column P to the corresponding detector value in the Detector Data Processing program.

The VBA code calculates the difference in actuation time on from the downstream detectors minus actuation time on from the upstream detectors and is recorded in seconds. After verifying between the MS Excel calculations and the Detector Data Processor, it is concluded that the travel times were the same.