Fix routing tests
This commit is contained in:
parent
8f64565a3d
commit
065668b72d
3 changed files with 6 additions and 5 deletions
|
@ -554,8 +554,9 @@ public class BinaryRoutePlanner {
|
||||||
RouteSegment from = !reverseWaySearch ? getParentDiffId(segment) : getParentDiffId(opposite);
|
RouteSegment from = !reverseWaySearch ? getParentDiffId(segment) : getParentDiffId(opposite);
|
||||||
if (checkViaRestrictions(from, to)) {
|
if (checkViaRestrictions(from, to)) {
|
||||||
FinalRouteSegment frs = new FinalRouteSegment(road, segmentPoint);
|
FinalRouteSegment frs = new FinalRouteSegment(road, segmentPoint);
|
||||||
|
// obstacles already count on backward calculation (so don't include obstaclesTime)
|
||||||
float distStartObstacles = segment.distanceFromStart
|
float distStartObstacles = segment.distanceFromStart
|
||||||
+ calculateTimeWithObstacles(ctx, road, segmentDist, obstaclesTime);
|
+ calculateTimeWithObstacles(ctx, road, segmentDist, 0);
|
||||||
frs.setParentRoute(segment);
|
frs.setParentRoute(segment);
|
||||||
frs.setParentSegmentEnd(segmentPoint);
|
frs.setParentSegmentEnd(segmentPoint);
|
||||||
frs.reverseWaySearch = reverseWaySearch;
|
frs.reverseWaySearch = reverseWaySearch;
|
||||||
|
@ -781,7 +782,7 @@ public class BinaryRoutePlanner {
|
||||||
segment, segmentPoint);
|
segment, segmentPoint);
|
||||||
distFromStart += obstaclesTime;
|
distFromStart += obstaclesTime;
|
||||||
if (TEST_SPECIFIC && next.road.getId() >> 6 == TEST_ID) {
|
if (TEST_SPECIFIC && next.road.getId() >> 6 == TEST_ID) {
|
||||||
printRoad(" !? distFromStart=" + +distFromStart + " from " + segment.getRoad().getId() +
|
printRoad(" !? distFromStart=" +distFromStart + " from " + segment.getRoad().getId() +
|
||||||
" dir=" + segment.getDirectionAssigned() +
|
" dir=" + segment.getDirectionAssigned() +
|
||||||
" distToEnd=" + distanceToEnd +
|
" distToEnd=" + distanceToEnd +
|
||||||
" segmentPoint=" + segmentPoint + " -- ", next, true);
|
" segmentPoint=" + segmentPoint + " -- ", next, true);
|
||||||
|
@ -793,7 +794,7 @@ public class BinaryRoutePlanner {
|
||||||
next.distanceFromStart = distFromStart;
|
next.distanceFromStart = distFromStart;
|
||||||
next.distanceToEnd = distanceToEnd;
|
next.distanceToEnd = distanceToEnd;
|
||||||
if (TRACE_ROUTING) {
|
if (TRACE_ROUTING) {
|
||||||
printRoad(" >>", next, null);
|
printRoad(" "+segmentPoint+">>" , next, null);
|
||||||
}
|
}
|
||||||
// put additional information to recover whole route after
|
// put additional information to recover whole route after
|
||||||
next.setParentRoute(segment);
|
next.setParentRoute(segment);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{
|
{
|
||||||
"testName": "5.Route depends on the distance to a junction, if routing engine takes the longer way https://github.com/osmandapp/Osmand/issues/1200",
|
"testName": "5.Route depends on the distance to a junction, if routing engine takes the longer way https://github.com/osmandapp/Osmand/issues/1200",
|
||||||
"description": "Подтверждается только неверный маршрут. От дистанции не зависит, но зависит от planRoadDirection. При -1 маршрут верный, при 0 - нет",
|
"description": "Подтверждается только неверный маршрут. От дистанции не зависит, но зависит от planRoadDirection. При -1 маршрут верный, при 0 - нет",
|
||||||
"ignore" : "true",
|
"ignore" : "false",
|
||||||
"params": {
|
"params": {
|
||||||
"vehicle": "car",
|
"vehicle": "car",
|
||||||
"short_way": "true",
|
"short_way": "true",
|
||||||
|
|
Loading…
Reference in a new issue