From 714741a885a10a38cead0ae96bc9f8102e0ab2ff Mon Sep 17 00:00:00 2001 From: Daniel Seiller Date: Tue, 6 Aug 2019 03:24:17 +0200 Subject: [PATCH] docs: Update documentation to include basic description --- docs/src/ed-lrr.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/src/ed-lrr.md b/docs/src/ed-lrr.md index be4e17d..64566fa 100644 --- a/docs/src/ed-lrr.md +++ b/docs/src/ed-lrr.md @@ -21,7 +21,7 @@ titlepage: true toc-own-page: false --- -# How it works +# Implementation ## `stars.csv` format @@ -39,20 +39,50 @@ toc-own-page: false ## `stars.idx` format +`bincode` serialized data: + +- **[u64]**: List of byte offset for records (entry 0=first recod, entry 1= second record, etc) + ## Routing Algorithms ### Breadth-First Search (BFS) +Standard Breadth-First Search, always finds the shortest route + ### A*-Search -### Greedy Search +Modified A-Star search with tunable "greediness". Candidates weighted by $\text{number of jumps from start system} + (\text{estimated number of jumps to target system} * \text{greediness})$ + +A greediness of 0 is equivalent to BFS and a greediness of $\infty$ is equivalent to Greedy-Search + +### Greedy-Search + +Priority Queue weighted by minimum distance to target, prefers systems with high multiplier (Neutron Stars and White Dwarfs) ## Optimizations +### Ellipse elimination + +Only consider systems within an ellipsoid with source and destination as the foci, the width of the ellipsoid is adjustable + ## Routing Graphs +### File format + +`bincode` serialized data: + +- *bool* **primary**: flag to indicate that graph only includes primary stars +- *f32* **range**: jump range for routing graph +- *[u8]* **file_hash**: sha3 hash of `stars.csv` from which graph was generated +- *String* **path**: path to `stars.csv` from which graph was generated +- *FnvHashMap* **graph**: Hashmap mapping systems to the systems from which they can be rached, traversed from destination system backwards to source to reconstruct route + # Usage + + ## Preprocessing Data ## Plotting a Route