Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.42k stars 3.4k forks source link

Dataset Compatibility Checks fail when single road is removed #4641

Open MoKob opened 7 years ago

MoKob commented 7 years ago

The following cucumber test exits with Dataset is not compatible to CH (or MLD, when asking for MLD).

Node Version v4.0.0
@routing @guidance @collapsing
Feature: Collapse

  @routing @guidance @collapsing
  Scenario: Don't use destinations as names
    Given the profile "car"
    Given a grid size of 20 meters
    Given the node map
      """
      f - - - - e - - - - d

      a - - - - b - - - - c
      """
    And the ways
      | nodes | highway       | name | oneway |
      | abc   | residential   | road | yes    |
      | def   | motorway_link |      | yes    |
    When I route I should get
      | waypoints | route  | turns                        |
      | a,f       | road,, | depart,continue uturn,arrive |

Failures:

1) Scenario: Don't use destinations as names - features/guidance/collapse.feature:1080
   Step: When I route I should get - features/guidance/collapse.feature:1100
   Step Definition: features/step_definitions/routing.js:4
   Message:
     Error: osrm-routed killed by signal SIGABRT: /Users/mokob/git/project-osrm/osrm-backend/build/osrm-routed --shared-memory=1 -p 5000 -a CH
         at /Users/mokob/git/project-osrm/osrm-backend/features/lib/osrm_loader.js:123:23
         at ChildProcess.exithandler (child_process.js:210:5)
         at emitTwo (events.js:87:13)
         at ChildProcess.emit (events.js:172:7)
         at maybeClose (internal/child_process.js:817:16)
         at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

1 scenario (1 failed)
5 steps (1 failed, 4 passed)
0m00.681s

Adding a single road (be), the test runs (not showing the desired result yet, but it does run and contains the other two roads as well.

Node Version v4.0.0
@routing @guidance @collapsing
Feature: Collapse

  @routing @guidance @collapsing
  Scenario: Don't use destinations as names
    Given the profile "car"
    Given a grid size of 20 meters
    Given the node map
      """
      f - - - - e - - - - d
                |
                |
                |
                |
                |
      a - - - - b - - - - c
      """
    And the ways
      | nodes | highway       | name  | oneway |
      | abc   | residential   | road  | yes    |
      | def   | motorway_link |       | yes    |
      | be    | residential   | cross | no     |
    When I route I should get
      | waypoints | route  | turns                        |
      | a,f       | road,, | depart,continue uturn,arrive |

Failures:

1) Scenario: Don't use destinations as names - features/guidance/collapse.feature:1080
   Step: When I route I should get - features/guidance/collapse.feature:1098
   Step Definition: features/step_definitions/routing.js:4
   Message:
     Tables were not identical:
     | waypoints |     route  |     turns                        |
     | a,f       | (-) road,, | (-) depart,continue uturn,arrive |
     | a,f       | (+) road,cross,, | (+) depart,turn left,on ramp left,arrive |

1 scenario (1 failed)
5 steps (1 failed, 4 passed)
0m00.746s

The addition of the road should not affect whether we are able to parse/route on the other roads.

oxidase commented 7 years ago

@MoKob the test scenario has no possible turns because of oneway tags, this leads to [info] Processed 0 edges by osrm-extract. A simpler test scenario is

    Given the node map
      """
      a - - - - b
      """
    And the ways
      | nodes | highway       | name | oneway |
      | ab   | residential   | road | yes    |
    When I route I should get
      | waypoints | route  | turns                        |
      | a,b       | road,road | depart,arrive |
MoKob commented 7 years ago

This is still a valid graph and provides a single route, right? I could see this introducing some noise in connectivity or access tests, at least.