Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phantom node weights not being joined when collapsing match legs #4948

Closed
danpat opened this issue Mar 10, 2018 · 1 comment
Closed

Phantom node weights not being joined when collapsing match legs #4948

danpat opened this issue Mar 10, 2018 · 1 comment
Milestone

Comments

@danpat
Copy link
Member

danpat commented Mar 10, 2018

It looks like when we're collapsing match legs together (triggered by use of the waypoints=0;N parameter), we're discarding properly adding the forward/reverse_weight part of the PhantomNodes that are not waypoints.

    @match @testbot
    Scenario: Regression test - duration aggregation for phantom nodes
        Given the profile "testbot"
        Given a grid size of 10 meters
        Given the node map
          """
          a--1-b2-c-3--d
          """
        And the ways
          | nodes |
          | ab    |
          | bc    |
          | cd    |
        Given the query options
          | geometries | geojson |
          | overview    | full |
          | steps       | true |
          | waypoints   | 0;2 |
          | annotations | duration |
          | generate_hints | false |
        When I match I should get
          | trace  | geometry                                   | a:duration | duration |
          #| 13     | 1.000135,1,1.000225,1,1.00036,1,1.00045,1 | 1:1.5:1    |          |
          | 123   | 1.000135,1,1.000225,1,1.00036,1,1.00045,1  | 1:1.5:1    | 3.5      |

The reported result for this test is currently:

     | trace | geometry                                  |     a:duration |     duration |
     | 123   | 1.000135,1,1.000225,1,1.00036,1,1.00045,1 | (-) 1:1.5:1    | (-) 3.5      |
     | 123   | 1.000135,1,1.000225,1,1.00036,1,1.00045,1 | (+) 1:1:1      | (+) 3        |

Note that the middle duration annotation is off by 0.5 - this is the amount of the forward_weight of the target_phantom of the first leg. The total leg duration (3) is also incorrect, as it is also missing the lost phantom weight value.

@danpat
Copy link
Member Author

danpat commented Mar 13, 2018

Fixed by #4949

@danpat danpat closed this as completed Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant