Routing/Travel Time Analysis/Analyzer

From OpenStreetMap Wiki
Jump to navigation Jump to search

About

The Analyzer extracts travel times form matched GPX files, analyzes them and creates travel time models.

Usage

 Usage: analyzer [OPTIONS]+
 Options:
       --db=VALUE             path to the travel times database
       --add                  adds specified tracks to the DB
       --track=VALUE          path to the matched GPS track to process or to the directory to process
       --map=VALUE            path to the routable map
   -a, --analyze              
   -o, --output=VALUE         path to the output directory
   -h, -?, --help    

To extract travel times from the matched GPX tracks use

 analyzer --db=PATH_TO_TRAVELTIMES_DB --add --track=PATH_TO_MATCHED_GPS_TRACK(S)

To analyze travel times use

 analyzer --db=PATH_TO_TRAVELTIMES_DB --map=PATH_TO_ROUTABLE_MAP --output=OUTPUT_PATH --analyze

Config file

Several constants, that affect algorithm behaviour, are defined in the "Analyzer.exe.config" file.

 ModelResolution                    [minutes]

Time resolution of the model;


 MinimalModelDelayDifference        [%]

Minimal difference between adjacent traffic delays. If the difference is lower, the delays are considered the same.


 MinimalClusterSize                 [-]

Minimal number of travel times in the cluster during traffic delay estimation.


 ClusterSizePercentage              [%]

Percentage of travel times in the cluster during traffic delay estimation. Actual number of travel times, that form a cluster, is MAX(MinimalClusterSize, ClusterSizePercentage * TravelTimesCount)


 ClusterAnalysisStopPercentage      [%]

Cluster analysis runs more times with several settings - from the specialized ones to more generic. If number of travel times in clusters reaches the ClusterAnalysisStopPercentage the analysis stops and more generic settings aren't used.


 MaximalAllowedStopLength           [minutes]

Maximal allowed stop length. If any stop in travel time exceeded this value, travel time isn't used in analysis.


 FreeflowMinimalCount               [-]

Minimal number of travel times used to estimate free-flow time. If segment hasn't enough travel times, model isn't created.


 FreeflowPercentage                 [%]

Percentage of travel times to estimate free-flow time. Actual number of travel times used is MAX(FreeflowMinimalCount, FreeflowPercentage * TravelTimesCount)

Output

Output of the Analyzer is set of models, that describes travel times on road segments.

TTA Analyzer Model.png

Samples

Sample output file

 <?xml version="1.0" encoding="utf-8"?>
   <models-db>
     <model node-from="322596181" node-to="322596171" way="29322860" freeflow="60.1" avg-delay="9.3" signals-delay="20.0" signals-prob="0.50">
     <traffic-delay from="04:30:00" to="05:30:00" day="Any" delay="8.8" />
     <traffic-delay from="05:30:00" to="08:45:00" day="Monday, Tuesday, Wednesday, Friday, Weekend" delay="8.8" />
     <traffic-delay from="05:30:00" to="08:45:00" day="Thursday" delay="18.2" />
     <traffic-delay from="08:45:00" to="11:45:00" day="Any" delay="6" />
     <traffic-delay from="13:45:00" to="21:15:00" day="Any" delay="10.2" />
   </model>
 </models-db>

Results on simulated data

Results on real data

Details

Analyzer in extract travel times mode

TTA Analyzer-DB.png

Analyzer in analyze mode

TTA Analyzer.png