How to detect

source codes are stored in VS2012-project\"Detect Algorithm C++"

executable binary file compiled by VS2012 in 64-bit windows 8 is stored at executable.

[usage] RoadNetworkFile config_1 config_2 ... config_k

Example

Run run.bat, to see what happened. config.txt is provided as our default setting on Nov 25, 2012.

#blackholes, #volcanos, recall of historical patterns, Timing and edge access counts will be printed on screen.

RoadNetworkFile

There are two road network files:

- data\Road_Network_2012\Road_Network_2012.txt: this is used for drawing.
- data\Road_Network_2012\Road_Network_2012_without_PolyLines.txt: this is used for detection.

Road_Network_2012.txt

- #points
- pointId latitude longitude
- ... ...
- #roadSegments
- startPointId endPointId length(meter) useless direction(1:s->t, 2:t->s, 3:s-t) useless useless #lanes speedLimit(km/s) level(0 is best)
- ... ...

Road_Network_2012_without_PolyLines.txt

- #points
- pointId latitude longitude
- ... ...
- #roadSegments
- startPointId endPointId direction(1:s->t, 2:t->s, 3:s-t)
- ... ...
Road Matched Flow File

Flow info in Nov 2012 is mapped from raw trajectories, including completion.

- hour segmentID inflow startPointId startPointLatitude startPointLongitude endPointId endPointLatitude endPointLongitude
segmentID is corresponding to the order of RoadNetworkFile, 0-based Historical Patterns

Historical Patterns in Nov 4, 11 and 18, 2012 of different strides used in experiments of paper are stored in data\historical\

Configuration

Files/Paths (string values):

- inFlowFile/outFlowFile: the folder path of in/out flows datas.
- historicalFile: the folder path of historical patterns.
- outputPrefix: the path of blackhole and volcano's output. The output files' names will follow this style: [outputPrefix][day]_[startPeriod]-[endPeriod].[specific suffix].

Switches (0/1 values):

- useContinuous: use continuous detection or not, default 0.
- useInitialPruning/useDynamicUpperBound: use pruning or not, default 1.
- useInitEdgePickOrdering/useExpansionOrdering: use the expansion order or not, default 0.
- useIslandRemoval: a previous switch, please ignore

Constraints (double values):

- flowThreshold: > flowThreshold is blackhole, < -flowThreshold is volcano.
- length: the length of the square for area constraint.

Day & Time Frames (int values):

- day: the day for detection
- startPeriod/endPeriod: everyday is divided into 48 time frames.
- stride: treat how many time frames as a whole.

Advanced (0/1 values):

- noPrev: do not use the previous time frame's result for continuous detection, default 0
- noHis: do not use the historical time frame's result for continuous detection, default 0
- cross: use the blackhole/volcano patterns for volcano/blackhole detection, default 1
- dump: a previous option, please ignore it.