Tutorial Queue Length

What is the Queue Length
As the name suggests, the Queue Length is the average number of vehicles waiting in one direction of a lane.

Queue Length

$$Avg. Queue Length = \frac{Total Delay}{Simulation Duration}$$

where,

How do we get Queue Length in swashsim
Step1: Determine the simulation object. The object of Saturation Flow Rate simulation is an intersection. Step2: Select the intersection to be simulated. You can build the intersection you chose by yourself in swashsim or download the built products of some intersections that have been uploaded from Dr. Scott Washburn's github. (If you download the intersection from github swash17, go to step4) Step3: Model build up
 * 1) Turn on Swashsim.
 * 2) Verify the nodes that should be added into the network, input them into the “ link data” and also input the X and Y position based on landform data and the road in reality.

Step4: Simulation
 * 1) Determine the percentage of vehicles turns for every direction, for example, percentage for turning right as 25%, percentage for going through is 50%, in our model this proportion is random.
 * 2) Set free flow speed (FFS), link length and curve type.
 * 3) Name the links by the node code from upstream and down-stream and fill the name in correct blank.
 * 4) Click the add lane button and build up lanes, by clicking map view button, we could have a view of the lanes we built.
 * Edit lanes by clicking right button or clicking table view in tool bar. Then set detectors on the lanes, in this project, there are 3 detectors in each straight lane on a street with 2 or more lanes in case there are vehicle lane changes. One detector is set at middle point on single lane streets.


 * The object of the project is to calculate queue length, so I set all detectors at the nearest position from stop bar. Due to the fact that the normal length of detectors is 6ft, it’s necessary to determine percentage of detector position based on length of lane in order to make sure the position is neither over the boundary of adjacent lanes nor too far from stop bar.

Step5: After simulation, system will generate LinkResults.csv output file. The total delay in columns X, Y, and Z, for Left Turn, Through, and Right Turn, respectively. Simulation duration is the value entered in simulation control panel for run. Because turning vehicles’ low driving speed, turning lanes would cause extra delay which makes inaccurate data, therefore we only consider the through lane delay. Calculated by the formulation above.
 * The final step is to make a simulation. The warm up time is used to generate stable flow in the network and it is not contained in simulation duration. Then we set simulation duration at a number which is fewer than 3600s (1hr).