From 13263f69c93ff70762690041e28706463a68f961 Mon Sep 17 00:00:00 2001 From: yolas01 <yolas01@mi.fu-berlin.de> Date: Thu, 6 Apr 2023 10:36:14 +0000 Subject: [PATCH] Update README.md --- README.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 6e28cf4..b533dfb 100644 --- a/README.md +++ b/README.md @@ -10,33 +10,23 @@ In order to create classes from the protos (in case the definition changed) one protoc --proto_path=debug-tool/proto/schema --python_out=./debug-tool/proto debug-tool/proto/schema/roadnetwork.proto ``` -## Initialise environment +## Endpoints -One needs [python3](https://www.python.org/downloads/) and [anaconda](https://www.anaconda.com/products/distribution) before initialising the environment. +<ins>/route</ins> gets as input a routing request consisting of start and end node, forbidden weather conditions and the period of time the search should take place. It returns a list of coordinates of the found path, as well as the duration, distance, the day of the route and an error code. -In order to initialise the environment, use from the `debug-tool` folder : +<ins>/addressmatching</ins> converts a given address to its coordinates. It returns the coordinate pair and an error code. For the address matching we are using Nominatim API to get the OSM data. -```sh -conda env create -f environment.yml -``` +#### Description of steps to find the shortest path -The environment is called `swp_debug_tool` by default. You can activate it via the standard command `conda activate swp_debug_tool`. +- Nodes and Edges of our road network are added to a directed Graph -When adding dependencies, execute : +- if the street/edge is no oneway street the opposite edge is added as well -```sh -conda env export --from-history | grep -v "^prefix: " > environment.yml -``` +- the weight of the edges correspond to the duration of passing the edge -The `--from-history` parameter prevents adding the build ID to the dependency, as that is usually OS-specific. Also, it only -adds the dependencies explicitly installed by the user. Their dependencies are then resolved automatically. If you somehow -still have build IDs (i.e. your dependencies have the form `<name>=<version>=<build gibberish`) -, you can use the following regex find-replace in the YAML file, in order to remove the builds manually: -* find: `(- [^=]+=[^=-]+)=[^\n=-]+` -* replace: `$1` +- AStar algorithm is applied to resulting graph by using AStarShortestPath by JGraphT -This works on JetBrains IDEs at least. +- algorithm is adapted to our requirements by checking for turn restrictions and forbidden weather conditions for the edges of the path and by searching in a given period of time -so that the dependencies are reflected in the state of the project. +- heuristic: haversine distance between current and target node -The proto sample should be in the directory `debug-tool/proto/sample` and the tool would take it automatically. \ No newline at end of file -- GitLab