Permalink
Browse files

Add project files and update README

  • Loading branch information...
tenindra committed Dec 31, 2015
1 parent c9b1187 commit 5c24992e293ff29eb9f9b8038af890831ae002b3
Showing with 47,262 additions and 45 deletions.
  1. +92 −0 CMakeLists.txt
  2. +661 −0 LICENSE.txt
  3. +40 −45 README.md
  4. +47 −0 command/Command.h
  5. +113 −0 command/DynamicGraphCommand.cpp
  6. +33 −0 command/DynamicGraphCommand.h
  7. +3,036 −0 command/ExperimentsCommand.cpp
  8. +96 −0 command/ExperimentsCommand.h
  9. +491 −0 command/GenerateSampleSetCommand.cpp
  10. +44 −0 command/GenerateSampleSetCommand.h
  11. +150 −0 command/GraphCommand.cpp
  12. +33 −0 command/GraphCommand.h
  13. +683 −0 command/KnnQueryCommand.cpp
  14. +53 −0 command/KnnQueryCommand.h
  15. +396 −0 command/ObjectIndexCommand.cpp
  16. +45 −0 command/ObjectIndexCommand.h
  17. +549 −0 command/RoadNetworkIndexCommand.cpp
  18. +49 −0 command/RoadNetworkIndexCommand.h
  19. +1,265 −0 command/TransformInputCommand.cpp
  20. +94 −0 command/TransformInputCommand.h
  21. +133 −0 common.h
  22. +59 −0 external/EliminationWeight.h
  23. +87 −0 external/config.h
  24. +450 −0 external/datastr/graph/SearchGraph.h
  25. +1,587 −0 external/datastr/graph/UpdateableGraph.h
  26. +1,015 −0 external/datastr/graph/edge.h
  27. +243 −0 external/datastr/graph/graph.h
  28. +561 −0 external/datastr/graph/path.h
  29. +543 −0 external/datastr/graph/pqNode.h
  30. +1,056 −0 external/datastr/pqueue/binaryHeap.h
  31. +381 −0 external/datastr/searchSpaces.h
  32. +142 −0 external/io/CoordinateLoader.cpp
  33. +37 −0 external/io/CoordinateLoader.h
  34. +413 −0 external/io/createGraph.h
  35. +226 −0 external/io/output.h
  36. +195 −0 external/io/serialize.h
  37. +1,018 −0 external/many/manytomany.h
  38. +3,590 −0 external/processing/ConstructCH.h
  39. +2,195 −0 external/processing/DijkstraCH.h
  40. +3,033 −0 external/processing/TransitNode.h
  41. +125 −0 external/stats/utils.h
  42. +41 −0 external/types.h
  43. +71 −0 external/uintEdgeWeight.h
  44. +122 −0 main.cpp
  45. +257 −0 processing/ALT.cpp
  46. +76 −0 processing/ALT.h
  47. +155 −0 processing/AStarSearch.cpp
  48. +46 −0 processing/AStarSearch.h
  49. +638 −0 processing/DijkstraSearch.cpp
  50. +76 −0 processing/DijkstraSearch.h
  51. +547 −0 processing/DynamicGraph.cpp
  52. +151 −0 processing/DynamicGraph.h
  53. +717 −0 processing/Graph.cpp
  54. +138 −0 processing/Graph.h
  55. +1,956 −0 processing/Gtree.cpp
  56. +306 −0 processing/Gtree.h
  57. +501 −0 processing/IER.cpp
  58. +61 −0 processing/IER.h
  59. +187 −0 processing/INE.cpp
  60. +39 −0 processing/INE.h
  61. +317 −0 processing/Junction.cpp
  62. +77 −0 processing/Junction.h
  63. +2,930 −0 processing/MortonList.cpp
  64. +252 −0 processing/MortonList.h
  65. +72 −0 processing/Path.cpp
  66. +48 −0 processing/Path.h
  67. +912 −0 processing/Quadtree.cpp
  68. +303 −0 processing/Quadtree.h
  69. +1,271 −0 processing/ROAD.cpp
  70. +285 −0 processing/ROAD.h
  71. +478 −0 processing/SetGenerator.cpp
  72. +59 −0 processing/SetGenerator.h
  73. +652 −0 processing/ShortestPathWrapper.cpp
  74. +53 −0 processing/ShortestPathWrapper.h
  75. +573 −0 processing/SimpleQuadtree.cpp
  76. +157 −0 processing/SimpleQuadtree.h
  77. +646 −0 processing/StaticRtree.cpp
  78. +188 −0 processing/StaticRtree.h
  79. +399 −0 processing/pruned_highway_labeling.cpp
  80. +191 −0 processing/pruned_highway_labeling.h
  81. +210 −0 queue/BinaryMaxHeap.cpp
  82. +65 −0 queue/BinaryMaxHeap.h
  83. +247 −0 queue/BinaryMaxHeapWithDK.cpp
  84. +75 −0 queue/BinaryMaxHeapWithDK.h
  85. +171 −0 queue/BinaryMinHeap.cpp
  86. +60 −0 queue/BinaryMinHeap.h
  87. +197 −0 queue/BinaryMinHeapWithDK.cpp
  88. +61 −0 queue/BinaryMinHeapWithDK.h
  89. +42 −0 queue/MinPriorityQueue.h
  90. +45 −0 queue/MinPriorityQueueWithDK.h
  91. +316 −0 queue/radix_heap.h
  92. +26 −0 scripts/buildBinaryGraphs
  93. +25 −0 scripts/buildObjectIndexes
  94. +23 −0 scripts/buildRoadNetworkIndexes
  95. +144 −0 scripts/createClusteredObjectsExperimentsFigures
  96. +100 −0 scripts/createDefaultKnnExperimentFigures
  97. +166 −0 scripts/createIndexExperimentsFigures
  98. +100 −0 scripts/createMinMaxDistObjectsExperimentsFigures
  99. +182 −0 scripts/createPaperFigures
  100. +111 −0 scripts/createRealWorldPOIExperimentsFigures
  101. +122 −0 scripts/createSingleKnnExperimentFigures
  102. +58 −0 scripts/createTravelTimeFigures
  103. +12 −0 scripts/excludeStatsRows
  104. +90 −0 scripts/executeKnnQueries
  105. +16 −0 scripts/extractColumnAndAppend
  106. +14 −0 scripts/filterStatsRows
  107. +154 −0 scripts/generateBarFigure
  108. +180 −0 scripts/generateFigure
  109. +33 −0 scripts/generatePairQuerySets
  110. +30 −0 scripts/generateQuerySets
  111. +44 −0 scripts/generateSpecialFigureGtreeVsRoadStats
  112. +167 −0 scripts/generateSpecialFigureRWPOIs
  113. +171 −0 scripts/globalVariables
  114. +25 −0 scripts/resetExperimentalSetup
  115. +132 −0 scripts/runClusteredObjectsExperiments
  116. +83 −0 scripts/runDefaultKnnExperiments
  117. +92 −0 scripts/runMinMaxDistObjectsExperiments
  118. +266 −0 scripts/runPaperExperiments
  119. +71 −0 scripts/runRealWorldPOIExperiments
  120. +101 −0 scripts/runSingleKnnExperiment
  121. +78 −0 scripts/runTravelTimeExperiments
  122. +16 −0 scripts/splitStatsRows
  123. +78 −0 scripts/transformInputData
  124. +51 −0 tuple/IndexTuple.cpp
  125. +40 −0 tuple/IndexTuple.h
  126. +80 −0 tuple/KnnQueryTuple.cpp
  127. +50 −0 tuple/KnnQueryTuple.h
  128. +63 −0 tuple/ObjectIndexTuple.cpp
  129. +46 −0 tuple/ObjectIndexTuple.h
  130. +86 −0 tuple/Tuple.cpp
  131. +45 −0 tuple/Tuple.h
  132. +212 −0 utility/METISWrapper.cpp
  133. +56 −0 utility/METISWrapper.h
  134. +78 −0 utility/Statistics.cpp
  135. +44 −0 utility/Statistics.h
  136. +74 −0 utility/StopWatch.cpp
  137. +49 −0 utility/StopWatch.h
  138. +202 −0 utility/geometry.cpp
  139. +45 −0 utility/geometry.h
  140. +127 −0 utility/serialization.cpp
  141. +37 −0 utility/serialization.h
  142. +406 −0 utility/utility.cpp
  143. +65 −0 utility/utility.h
View
@@ -0,0 +1,92 @@
cmake_minimum_required(VERSION 2.8)
project(nd_knn)
set(CMAKE_C_COMPILER "/usr/bin/gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/g++")
#set (CMAKE_CXX_FLAGS "-g -Wall -O1 -std=c++11")
set (CMAKE_CXX_FLAGS "-O3 -std=c++11")
file(GLOB MAIN_SRC
"common.h"
"main.cpp"
"command/*.h"
"command/*.cpp"
"tuple/*.h"
"tuple/*.cpp"
"utility/*.h"
"utility/*.cpp"
"queue/*.h"
"queue/*.cpp"
"processing/*.h"
"processing/*.cpp"
"external/*.h"
"external/*.cpp"
"external/command/*.h"
"external/command/*.cpp"
"external/datastr/*.h"
"external/datastr/*.cpp"
"external/datastr/graph/*.h"
"external/datastr/graph/*.cpp"
"external/datastr/pqueue/*.h"
"external/datastr/pqueue/*.cpp"
"external/io/*.h"
"external/io/*.cpp"
"external/processing/*.h"
"external/processing/*.cpp"
"external/stats/*.h"
"external/stats/*.cpp"
)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
add_executable(nd_knn ${MAIN_SRC})
target_link_libraries (nd_knn boost_serialization metis)
# Standard Optimisations
# By default all optimisations are already applied without pre-processor directives
set_target_properties(nd_knn PROPERTIES COMPILE_FLAGS "${DefaultDefinitions}")
# Additional Executables for Experiments
# Version of nd_knn that collects other query statistics (e.g. nodes visited in INE)
# Note: This is not to be used for query times due to collection overhead
add_executable(nd_knn_stats ${MAIN_SRC})
target_link_libraries (nd_knn_stats boost_serialization metis)
set_target_properties(nd_knn_stats PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DCOLLECT_STATISTICS")
# Versions with INE using DynamicGraph is progressively improved
add_executable(nd_knn_ine_queue_opt ${MAIN_SRC})
target_link_libraries (nd_knn_ine_queue_opt boost_serialization metis)
set_target_properties(nd_knn_ine_queue_opt PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DINE_QUEUE_OPTIMISED")
add_executable(nd_knn_ine_visited_opt ${MAIN_SRC})
target_link_libraries (nd_knn_ine_visited_opt boost_serialization metis)
set_target_properties(nd_knn_ine_visited_opt PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DINE_QUEUE_OPTIMISED -DINE_VISITED_OPTIMISED")
# Version with G-tree leaf optimisation applied
add_executable(nd_knn_gtree_leaf_unoptimised ${MAIN_SRC})
target_link_libraries (nd_knn_gtree_leaf_unoptimised boost_serialization metis)
set_target_properties(nd_knn_gtree_leaf_unoptimised PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DUNOPTIMISED_GTREE_LEAF_SEARCH")
# Version with G-tree distance matrix implemented using hash tables
add_executable(nd_knn_gtree_stl_hashtable_dist_matrix ${MAIN_SRC})
target_link_libraries (nd_knn_gtree_stl_hashtable_dist_matrix boost_serialization metis)
set_target_properties(nd_knn_gtree_stl_hashtable_dist_matrix PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DGTREE_STL_HASH_TABLE_DIST_MATRIX")
add_executable(nd_knn_gtree_google_densehash_dist_matrix ${MAIN_SRC})
target_link_libraries (nd_knn_gtree_google_densehash_dist_matrix boost_serialization metis)
set_target_properties(nd_knn_gtree_google_densehash_dist_matrix PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DGTREE_GOOGLE_DENSEHASH_DIST_MATRIX")
# Version with IER using unoptimsed shortest path methods (e.g. G-tree without materialization, SILC without skipping)
add_executable(nd_knn_ier_unoptimised ${MAIN_SRC})
target_link_libraries (nd_knn_ier_unoptimised boost_serialization metis)
set_target_properties(nd_knn_ier_unoptimised PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DUNOPTIMISED_IER")
# Version with optimised SILC kNN and DistBrws without using chain skipping optimisation
add_executable(nd_knn_no_chain_skip ${MAIN_SRC})
target_link_libraries (nd_knn_no_chain_skip boost_serialization metis)
set_target_properties(nd_knn_no_chain_skip PROPERTIES COMPILE_FLAGS "${DefaultDefinitions} -DNO_CHAIN_SKIPPING")
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,6 +1,6 @@
# Introduction
# Road Network kNN Experimental Evaluation
Road Network kNN Experimental Evaluation
This project consists of implementations of several kNN algorithms for road networks and the experimental framework to compare them. This has primarily been released to allow readers to reproduce results from a paper to appear at VLDB 2016 (details to be updated) and to use in future studies. If you use the code in a publication, and our work is relevant, please consider citing our paper. Please refer to the Requirements below and [FAQ](https://github.com/tenindra/RN-kNN-Exp/wiki/FAQ) if you have any issues. If you still have problems [contact us](http://users.monash.edu.au/~tenindra/).
# Requirements
@@ -10,38 +10,37 @@ Road Network kNN Experimental Evaluation
Before the executable can be compiled the following packages/libraries must be installed. Note that we were able to install METIS from the Ubuntu repositories if you are using that operating system.
- g++ v4.9 or higher
- Boost v1.57 or higher for serialization
- g++ version 4.9 or higher
- Boost version 1.57 or higher for serialization
- [METIS] (http://glaros.dtc.umn.edu/gkhome/metis/metis/download) version 5.1 or higher
- CMake v2.8 or higher
- CMake version 2.8 or higher
- gnuplot for figure generation
- Optional: [Google Sparsehash] (http://code.google.com/p/sparsehash/) for comparison of G-tree hashtables implementations
Note: We found Boost versions lower than 1.57 did not correctly support serialization of some STL data structures (such as std::unordered_map) thus they cannot be used here. This means you need to remove any existing Boost version, e.g. by uninstalling libboost-all-dev through your package manager.
Note: We found Boost versions lower than 1.57 did not correctly support serialization of some STL data structures (such as `std::unordered_map`) thus they cannot be used here. This means you need to remove any existing Boost version, e.g. by uninstalling `libboost-all-dev` through your package manager.
## System & Hardware
We recommend a 64-bit OS due to the size of indexes (and we have not tested on 32-bit). Furthermore at least 36GB RAM is required to reproduce experiments on all datasets. Results can be reproduced using a smaller amount of RAM by omitting some of the larger datasets (this will be discussed later).
We recommend a 64-bit OS due to the size of indexes (and we have not tested on 32-bit). Furthermore 32GB RAM is required to reproduce all experiments as they are in the paper. Results can be reproduced using a smaller amount of RAM by omitting some of the larger datasets (see below). Also ensure that there is 200GB of disk space freely available on the hard disk storing indexes (for both travel distance and travel time experiments).
# Files
The C++ source code can be found in the top-level "rn_knn" directory, and in the subdirectories command, external, processing, queue, tuple and utility. All bash scripts for various tasks such as setting up
the directories, running experiments, and generating figures are found in the scripts directory.
The C++ source code can be found in the top-level `RN-kNN-Exp` directory, and in the subdirectories `command`, `external`, `processing`, `queue`, `tuple` and `utility`. All bash scripts for various tasks such as setting up the directories, running experiments, and generating figures are found in the `scripts` subdirectory.
# Compilation
1. Change CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in CMakeLists.txt to point to the correct g++ version (i.e. 4.9 or higher). CMakeLists.txt can be found in the "knn" directory.
1. Change `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` in CMakeLists.txt to point to the correct `g++` version (i.e. 4.9 or higher). `CMakeLists.txt` can be found in the `RN-kNN-Exp` directory.
2. Create a directory called "build" in the top-level (i.e. knn/) directory
2. Create a directory called `build` in the top-level (e.g. RN-kNN-Exp/) directory
```
mkdir build
```
3. Change into this directory and Generate makefiles using CMake
3. Change into this directory and generate makefiles using `CMake`
```
cd build
@@ -57,48 +56,46 @@ the directories, running experiments, and generating figures are found in the sc
# Setup
1. Open the scripts/globalVariables file in your favourite editor
1. Open the `globalVariables` bash script in `scripts` directory in your favourite editor
2. Change the "output_path" variable to the full-path of an *existing* location where you wish to store all data (e.g. indexes, objects sets, figures, etc...)
2. Change the `output_path` variable to the full-path of an **existing** (i.e. create it first) location where you wish to store all data (e.g. indexes, objects sets, figures, etc...)
Note: This can be different to the path containing the code (recommended)
3. Change the "exe_path" to the full path of the build directory created above
3. Change the `exe_path` variable to the full path of the build directory created above (e.g. `/home/user/Downloads/rn_knn/build`)
4. Run `resetExperimentalSetup` in the scripts directory to create all necessary sub-directories
4. Run `resetExperimentalSetup` in the `scripts` directory to create all necessary sub-directories
```
cd scripts
bash resetExperimentalSetup
```
5. Download the DIMACS distance edge-weight graph files (with extension .gr.gz and prefixed by USA-road-*d*) and coordinate files (with extension .co.gz) for DE, VT, ME and NW from https://github.com/tenindra/rn_knn_exp_data to the output_path/data/dimacs directory
5. Download the DIMACS distance edge-weight graph files (with extension .gr.gz and prefixed by USA-road-*d*) and coordinate files (with extension .co.gz) for DE, VT, ME and NW from https://github.com/tenindra/RN-kNN-Exp-Data to the `output_path/data/dimacs` directory
6. Download the DIMACS distance edge-weight graph files and coordinate files for COL, CAL, E, W, CTR, USA from http://www.dis.uniroma1.it/challenge9/ to the output_path/data/dimacs directory
6. Download the DIMACS distance edge-weight graph files and coordinate files for COL, CAL, E, W, CTR, USA from http://www.dis.uniroma1.it/challenge9/ to the `output_path/data/dimacs` directory
Note: You *must* rename the "CAL" in DIMACS graph and coordinate filenames to CALNV.
7. Download the node (with extension .cnode) and edge (with extension .cedge) files for North America (NA) from http://www.cs.utah.edu/~lifeifei/SpatialDataset to the `output_path/data/tpq` directory
7. Download the node (with extension .cnode) and edge (with extension .cedge) files for North America (NA) from http://www.cs.utah.edu/~lifeifei/SpatialDataset to the output_path/data/tpq directory
Note: You *must* gzip these files so that `output_path/data/tpq` directory contains NA.cnode.gz and NA.cedge.gz
Note: You *must* gzip these files so that output_path/data/tpq directory contains NA.cnode.gz and NA.cedge.gz
8. Download the real_world_pois.tar.gz from https://github.com/tenindra/RN-kNN-Exp-Data to the `output_path` directory
8. Download the real_world_pois.tar.gz from https://github.com/tenindra/rn_knn_exp_data to the output_path/ directory
9. Unzip the real_world_pois.tar.gz archive (this should create a `output_path/real_world_pois` directory populated with subdirectories with POI sets for several road networks)
9. Unzip the real_world_pois.tar.gz archive (ensure this creates a directory at output_path/real_world_pois populated with subdirectories with POI sets for several road networks)
# Less Than 32GB RAM
# Less Than 16GB RAM
Experiments can still be run with less than 32GB RAM, but for fewer datasets. To do this go to the `globalVariables` file and modify the `road_networks` array. The road networks are in size order, so simply remove the road networks from the end. E.g. to run experiments up to the Eastern US dataset change it to `road_networks=("DE" "VT" "ME" "COL" "FLA" "CAL" "E")`.
Experiments can still be run with less than 16GB RAM, but for fewer datasets. To do this go to the globalVariables file and modify the road_networks array. The road networks are in size order, so simply remove the road networks from the end. E.g. to run experiments up to the Eastern US dataset change it to road_networks=("DE" "VT" "ME" "COL" "FLA" "CALNV" "E").
Note 1: All in-depth experiments on the US dataset will not be possible, of course. In this case it is best to comment out those experiments in the `runPaperExperiments` script.
Note 1: All experiments on the US dataset will not be possible, of course. In this case it is best to comment out those experiments in the runPaperExperiments script.
Note 2: SILC (index used by Distance Browsing) can only be built upto the default NW dataset. SILC on the NW requires at least 20GB of memory. Less than this will cause all default experiments to be missing Distance Browsing comparisons. In this case we suggest changing the default road network to COL (for which SILC only requires 8GB), by changing `default_network` and `default_parameters` to COL.
Note 2: SILC (index used by Distance Browsing) can only be built upto the default Colorado dataset. SILC on the Colorado requires at least 8GB of memory. Less than this will cause all default experiments to be missing Distance Browsing comparisons.
# Running Travel Distance Experiments
# Running Distance Experiments
The follow instructions can be followed to re-create all figures from the paper. Assuming your are already in the scripts directory (otherwise cd into scripts):
The follow instructions can be followed to re-create all figures from the paper. Assuming your are already in the `scripts` directory (otherwise cd into scripts):
1. Clean the DIMACS and TPQ datasets for errors and redundancy
@@ -112,7 +109,7 @@ The follow instructions can be followed to re-create all figures from the paper.
bash buildBinaryGraphs
```
3. Build all road network indexes (this may take a while - ~15 hours on our machine)
3. Build all road network indexes (this may take a while... ~15 hours on our machine)
```
bash buildRoadNetworkIndexes
@@ -144,37 +141,34 @@ The follow instructions can be followed to re-create all figures from the paper.
bash createPaperFigures
```
Note: All above commands may be batched, just enter each separated by semi-colon ";"
Note: All above commands may be batched in the shell terminal, just enter each separated by semi-colon ";"
# Running Travel Time Experiments
We also provided some additional experiments in the appendices on travel time graphs. These
can also be re-produced using the following procedure:
Travel times experiments must be reproduced indepedently, as they require different indexes. These can be re-produced using the following procedure:
1. Create a new directory to store data for travel time experiments (e.g. figures etc...)
1. Create a new directory to store data for travel time experiments (e.g. figures etc...) somewhere
2. Change the "output_path" variable in globalVariables the full-path of this new location
2. Change the `output_path` variable in globalVariables the full-path of this new location
3. Change the "edge_type" variable to "t"
3. Change the `edge_type` variable to `edge_type=t`
Note: The "edge_type" variable must be changed back to "d" to run travel distance experiments
Note: The `edge_type` variable must be changed back to be "d" to run travel distance experiments again
4. Run the `resetExperimentalSetup` to create all necessary sub-directories
```
bash resetExperimentalSetup
```
5. Download the DIMACS travel time edge-weight graph files (with extension .gr.gz and prefixed by USA-road-*t*) and coordinate files (with extension .co.gz) for DE, VT, ME and NW from https://github.com/tenindra/rn_knn_exp_data to the output_path/data/dimacs directory
6. Download the DIMACS travel time edge-weight graph files and coordinate files for COL, CAL, E, W, CTR, USA from http://www.dis.uniroma1.it/challenge9/ to the output_path/data/dimacs directory
5. Download the DIMACS travel time edge-weight graph files (with extension .gr.gz and prefixed by USA-road-*t*) and coordinate files (with extension .co.gz) for DE, VT, ME and NW from https://github.com/tenindra/RN-kNN-Exp-Data to the `output_path/data/dimacs` directory
Note: You *must* rename the "CAL" in DIMACS graph and coordinate filenames to CALNV.
6. Download the DIMACS travel time edge-weight graph files and coordinate files for COL, CAL, E, W, CTR, USA from http://www.dis.uniroma1.it/challenge9/ to the `output_path/data/dimacs` directory
7. Download the real_world_pois.tar.gz from https://github.com/tenindra/rn_knn_exp_data to the output_path/ directory
7. Download the real_world_pois.tar.gz from https://github.com/tenindra/RN-kNN-Exp-Data to the `output_path/ directory`
8. Unzip the real_world_pois.tar.gz archive (ensure this creates a directory at output_path/real_world_pois populated with subdirectories with POI sets for several road networks)
8. Unzip the real_world_pois.tar.gz archive (this should create a `output_path/real_world_pois` directory populated with subdirectories with POI sets for several road networks)
9. Clean the DIMACS datasets for errors and redundancy for travel time edge weights
@@ -188,7 +182,7 @@ can also be re-produced using the following procedure:
bash buildBinaryGraphs
```
11. As in steps 3-5 in "Running Experiments", execute:
11. As in steps 3-5 in "Running Travel Distance Experiments", execute:
```
bash buildRoadNetworkIndexes
@@ -216,3 +210,4 @@ Road Network kNN Experimental Evaluation is free software; you can redistribute
Road Network kNN Experimental Evaluation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with Road Network kNN Experimental Evaluation; see LICENSE.txt; if not, see <http://www.gnu.org/licenses/>.
View
@@ -0,0 +1,47 @@
/* Copyright (C) 2015 Tenindra Abeywickrama
*
* This file is part of Road Network kNN Experimental Evaluation.
*
* Road Network kNN Experimental Evaluation is free software; you can
* redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation;
* either version 3 of the License, or (at your option) any later version.
*
* Road Network kNN Experimental Evaluation is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with Road Network kNN Experimental Evaluation; see
* LICENSE.txt; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _COMMAND_H
#define _COMMAND_H
#include <string>
#include <unistd.h>
#include <getopt.h>
#include <iostream>
#include <fstream>
class Command {
public:
virtual void execute(int argc, char* argv[]) = 0;
virtual void showCommandUsage(std::string programName) = 0;
virtual ~Command() {};
protected:
void outputCommandStats(std::string statsFilePath, std::string tupleString) {
std::ofstream statsFS(statsFilePath, std::ios::out | std::ios::app);
if (statsFS.is_open()) {
statsFS << tupleString << std::endl;
} else {
std::cerr << "Cannot open stats file " << statsFilePath << std::endl;
}
}
};
#endif // _COMMAND_H
Oops, something went wrong.

0 comments on commit 5c24992

Please sign in to comment.