updated README, added benchmark and plotting functions
This commit is contained in:
parent
cab977451c
commit
a9fd341b45
3 changed files with 134 additions and 7 deletions
23
README.md
23
README.md
|
|
@ -20,7 +20,7 @@ Reading the data from an OSM PDF file and converting it to a graph is done in
|
|||
`src/bin/generate_grid.rs`.
|
||||
|
||||
The implementation of the spherical point in polygon test is done in `src/polygon.rs`
|
||||
with the function `contains()`.
|
||||
with the function `Polygon::contains`.
|
||||
|
||||
There is one polygon in the graph, for which no valid outside polygon can be found.
|
||||
I did not have the time to investigate this further.
|
||||
|
|
@ -29,8 +29,7 @@ I did not have the time to investigate this further.
|
|||
|
||||
The code uses the osmpbfreader crate.
|
||||
Sadly this module uses ~10GB of memory to extract the data from the PBF file
|
||||
with all the coastlines. So far I did not have time to look into what happens
|
||||
there.
|
||||
with all the coastlines.
|
||||
|
||||
### Point in Polygon
|
||||
|
||||
|
|
@ -50,9 +49,9 @@ Import and Export from/to a file can be done with the `from_fmi_file` and `write
|
|||
|
||||
### Dijkstra Benchmarks
|
||||
|
||||
The dijkstras algorithm is implenented in `gridgraph.rs`.
|
||||
Dijkstras algorithm is implenented in `gridgraph.rs` with `GridGraph::shortest_path`.
|
||||
It uses a Heap to store the nodes.
|
||||
On details on how to run benchmarks see the benchmarks session at the end.
|
||||
For details on how to run benchmarks see the benchmarks section at the end.
|
||||
|
||||
## Task 6
|
||||
|
||||
|
|
@ -76,6 +75,9 @@ I implemented ALT, as described in [1].
|
|||
Additionally A\* is available with a simple, unoptimized haversine distance
|
||||
as the heuristic.
|
||||
|
||||
A\* is implemented in `src/astar.rs` and the heuristics for ALT are implemented
|
||||
in `src/alt.rs`.
|
||||
|
||||
### Landmarks for ALT
|
||||
|
||||
currently 3 different landmark generation methods are available
|
||||
|
|
@ -94,7 +96,7 @@ generates landmarks for 4, 8, 16, 32 and 64 landmarks, both greedy and random.
|
|||
# Running the benchmarks
|
||||
|
||||
First a set of queries is needed.
|
||||
This can be done with the `generate_benchmark_targets --graph <graph> > targets.json`.
|
||||
These can be generated with `generate_benchmark_targets --graph <graph> > targets.json`.
|
||||
This generates 1000 random, distinct source and destination pairs.
|
||||
The `--amount` parameter allows to adjust the number of pairs generated.
|
||||
|
||||
|
|
@ -110,4 +112,11 @@ are used to answer the query.
|
|||
The benchmark prints out how many nodes were popped from the heap for
|
||||
each run and the average time per route.
|
||||
|
||||
[1] Computing the Shortest Path: A* meets Graph Theory, A. Goldberg and C. Harrelson, Microsoft Research, Technical Report MSR-TR-2004-24, 2004
|
||||
`utils/run_benchmarks.py` is a wrapper script that runs the benchmarks for a
|
||||
big set of parameters.
|
||||
|
||||
`utils/plot_results.py` generates several plots of the results.
|
||||
|
||||
# References
|
||||
|
||||
[1](Computing the Shortest Path: A\* meets Graph Theory, A. Goldberg and C. Harrelson, Microsoft Research, Technical Report MSR-TR-2004-24, 2004)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue