summaryrefslogtreecommitdiff
path: root/navit/route.c
diff options
context:
space:
mode:
authormvglasow <michael@vonglasow.com>2021-02-28 13:27:09 +0100
committerGitHub <noreply@github.com>2021-02-28 13:27:09 +0100
commit2146fcd9c9ce1560b725e481dc8b808dd425b1d2 (patch)
tree5a7b652cf17ae15208205a626d4daa58aeeb6c43 /navit/route.c
parente90aa031b50b6d3031537b30fd9c559d43c516cf (diff)
downloadnavit-2146fcd9c9ce1560b725e481dc8b808dd425b1d2.tar.gz
Refactor:core:Documentation update (#1095)
Diffstat (limited to 'navit/route.c')
-rw-r--r--navit/route.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/navit/route.c b/navit/route.c
index 4c85e3fe9..b9fa9667f 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -2300,10 +2300,13 @@ static void route_graph_set_traffic_distortion(struct route_graph *this, struct
/**
* @brief Adds a traffic distortion item to the route graph
*
+ * If `update` is true, the end points of the traffic distortion will have their cost recalculated. Set this to true
+ * for a partial recalculation of an existing route, false when initially building the route graph.
+ *
* @param this The route graph to add to
* @param profile The vehicle profile to use for cost calculations
* @param item The item to add, must be of {@code type_traffic_distortion}
- * @param update Whether to update the point (true for LPA*, false for Dijkstra)
+ * @param update Whether to update the end points
*/
static void route_graph_add_traffic_distortion(struct route_graph *this, struct vehicleprofile *profile,
struct item *item, int update) {
@@ -2700,10 +2703,8 @@ static int route_graph_is_path_computed(struct route_graph *this_) {
* After recalculation, the route path is updated.
*
* The function uses a modified LPA* algorithm for recalculations. Most modifications were made for compatibility with
- * the algorithm used for the initial routing:
- * \li The `value` of a node represents the cost to reach the destination and thus decreases along the route
- * (eliminating the need for recalculations as the vehicle moves within the route graph)
- * \li The heuristic is always assumed to be zero (which would turn A* into Dijkstra, the basis of the main routing
+ * the old routing algorithm:
+ * \li The heuristic is always assumed to be zero (which would turn A* into Dijkstra, formerly the basis of the routing
* algorithm, and makes our keys one-dimensional)
* \li Currently, each pass evaluates all locally inconsistent points, leaving an empty heap at the end (though this
* may change in the future).