Implement (4.) - Calculation of difference between actual route and optimal route
Overview
With #2 (closed) and #3 (closed) implemented, we have sampled points matched to traffic structures and including their timestamps as well as optimal routes between these points at hand.
Now, differences between the optimal and actual connections - as driven by the courier - of two consecutive points have to be calculated. There are two major options that should be addressed within this feature:
-
Given two sampled points
p_1
andp_2
, sampled with sampling temporal_distanced
and their timestamps: Calculate the difference between the time of the optimal connecting router
, and the actual time needed. -
Given two sampled points
p_1
andp_2
, sampled with sampling temporal_distanced
and their timestamps: Usek \in \mathbb{N}
to derive a smallerd' = d/k
. Sample again (sub sampling) and calculate the optimal routes connecting pointsp'_{1}, \dots ,p'_{k+1}
, withp'_{1} = p_1
andp'_{k+1} = p_2
. Now there are three possibilities to further process these differences:
- a. Use the difference between the sum
\sum_{i=0}^{k}dist(r'_{i})
of distances of optimal routes withinr'
and the distance of the optimal router
. - b. Use the difference between the sum
\sum_{i=0}^{k}dur(r'_{i})
of durations of optimal routes withinr'
and the duration of the optimal router
. - c. Use a weighting schema two derive a risk from both, difference in duration and in distance. See #9.
- What if during sub sampling, we find no or only very few new points between the original two points?
- --> Add a min number of sampled points.
-
Taken into account in implementation.
- What if during sub sampling, we would sample away the original end point?
- --> Explicitly keep end point and ignore potential sampled points before end point.
-
Taken into account in implementation.