Percent time spent in a given metering mode

Main Page > Tutorials > Tutorial: Performance Measures > Tutorial Ramp Metering Measures

Calculating Percent Time in Metering Modes

The steps to calculate percent time in each metering mode are as follows:


 * 1) Open RampMeteringSummaryData.csv and verify the data is valid.
 * 2) Save the file as a macro-enabled workbook (.xlsm).
 * 3) Copy the macro code in Ramp Metering Pct Mode Macro.txt and paste it into the VBA editor within RampMeteringSummaryData.xlsm. This editor can be opened by clicking on the Visual Basic pane under the Developer Tab in Excel. (Make sure this tab is available by enabling it in Excel's Options window.)
 * 4) Click the Run button in the VBA editor. The macro will ask for the controller IDs before calculating the percent time in each metering mode.
 * Note: If the RampMeteringSummaryData file is from a loop interchange, use the macro code instead from Ramp Metering Pct Mode Macro. (xClos).txt.

Macro Process

After receiving the controller IDs, the macro will find the average percent time spent in each metering mode for every scenario.

The averages are calculated by summing the percent time in each mode and counting the number of replications. When the macro reaches a row with a new scenario number, the average percent times for the previous scenario are written below the ramp metering summary data and the variables are reset to begin summing percent times and counting replications for the new scenario.

These averages are separated by ramp direction and ultimately written below the original data in the workbook. For loop interchanges, the process is similar but the averages are separated by both ramp direction and ramp type (Four outputs per scenario: SB direct, SB loop, NB direct, and NB loop).