Additional Speeds for reporting "Time Below"

Questions and discussions about operating Tru-Traffic

Moderator: bullock

Additional Speeds for reporting "Time Below"

Postby bullock » Wed Jan 21, 2015 8:09 pm

A Tru-Traffic user emailed a question that others may also have, so I'll post the gist of our correspondence here. The user asked

For the travel time and delay report, is it possible to add additional columns to report time spent below more than the two selected speeds in the preferences window? ... We typically provide time spent below 5 mph, below 15 mph, below 25 mph, below 35 mph, and above 35 miles per hour. I could create two reports, with one being time spent below 5 and 15, another with time spent below 25 and 35, and then add a column to subtract the time spent below 35 from the total time, to get the time spent above 35mph.

What I’m curious about is if there is a formula I can add to the report columns settings that will allow me to add additional speed bins so that all of the information can be within a single report.

The software accepts only 2 user-entered speeds for implicitly calculating time spent below, so if you need more speeds than that, you have only the two options that you already suggested: Generate the TT&D report twice, with different pairs of speeds, or add new columns for the extra speeds.

Thank you for informing me that you all typically require more than just the two speeds. I'll try to add that option to the next major version.

If you decide to add additional columns to report, then
  1. Choose the option to Accumulate this formula in a Separate Column,
  2. In specifying the formula, you'll need to choose the option to Calculate at Each GPS Point along the Link, and
  3. The formula (assuming a 25 mph threshold) will be
Code: Select all
if ((IS < 25*0.44704) & (FS < 25*0.44704), // 0.44704 m/s per mph
     DT, // if both the starting speed and ending speed of this interval are below the threshold, count the entire time
     if ((IS >= 25*0.44704) & (FS >= 25*0.44704),
          0, // otherwise, if both speeds are at or above the threshold, don't count any time
          DT*abs((25*0.44704 - min(IS,FS))/(FS-IS)))) // otherwise, estimate the fraction of time this interval spent below the threshold

You can copy and paste that entire text, as is, into the formula box.

You may want to first define an auxiliary "column" to hold the value 25*0.44704 but otherwise could remain hidden. Then modify this formula to reference that auxiliary column instead of all the explicit references to 25*0.44704. That way, you can change the speed threshold in just one place.
bullock
Site Admin
 
Posts: 218
Joined: Thu May 06, 2004 6:51 pm
Location: Pacific Grove, CA

Return to Program Operation

Who is online

Users browsing this forum: No registered users and 11 guests

cron