summaryrefslogtreecommitdiff
path: root/navit/route.c
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-09-29 16:47:41 +0300
committermvglasow <michael -at- vonglasow.com>2018-09-29 17:26:45 +0300
commit3c94452c687094b54add1e415fd17ee161d796bf (patch)
tree6944c9cbe013a21b77b138a8881e2b4d01ecc6ad /navit/route.c
parentb6c71a9ff9042e45d8acaa0ea08db6e0177bcf77 (diff)
downloadnavit-3c94452c687094b54add1e415fd17ee161d796bf.tar.gz
Fix:route:Fix endpoint candidate handling in LPA*
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/route.c')
-rw-r--r--navit/route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/navit/route.c b/navit/route.c
index 1100ac31b..8cb63a30c 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -1410,6 +1410,7 @@ static void route_graph_init(struct route_graph *this, struct route_info *dst, s
if (val != INT_MAX) {
val = val*(100-dst->percent)/100;
s->end->seg = s;
+ s->end->dst_seg = s;
s->end->rhs = val;
s->end->dst_val = val;
s->end->el = fh_insertkey(this->heap, MIN(s->end->rhs, s->end->value), s->end);
@@ -1418,6 +1419,7 @@ static void route_graph_init(struct route_graph *this, struct route_info *dst, s
if (val != INT_MAX) {
val = val*dst->percent/100;
s->start->seg = s;
+ s->start->dst_seg = s;
s->start->rhs = val;
s->start->dst_val = val;
s->start->el = fh_insertkey(this->heap, MIN(s->start->rhs, s->start->value), s->start);
@@ -1457,6 +1459,7 @@ static void route_graph_reset(struct route_graph *this) {
curr->dst_val = INT_MAX;
curr->rhs = INT_MAX;
curr->seg=NULL;
+ curr->dst_seg = NULL;
curr->el=NULL;
curr=curr->hash_next;
}
@@ -2111,7 +2114,7 @@ static void route_graph_point_update(struct vehicleprofile *profile, struct rout
int new, val;
p->rhs = p->dst_val;
- p->seg = NULL;
+ p->seg = p->dst_seg;
for (s = p->start; s; s = s->start_next) { /* Iterate over all the segments leading away from our point */
val = route_value_seg(profile, s->end, s, 1);