itinero / routing2

The next version of the Itinero route planner.
Apache License 2.0
7 stars 1 forks source link

forward_priority is zero on a motorway #30

Open pietervdvn opened 2 years ago

pietervdvn commented 2 years ago

When the lua-profile returns '120' as 'forward_priority', it becomes zero in the debug output.

I did put in a 'debug'-statement for a testcase.

When the profile is called with

highway = motorway
oneway = both
_direction = against
access = yes
speed = 120

the resulting object is:

forward_speed = 120
backward_speed = 120
forward = 0.008333333333333333
backward = 0.008333333333333333
canstop = true

Other tags and their results in this document

However, the route mysteriously fails. When trying a very synthetic testcase, it won't take the motorway but will make the detour for car.fast:

image (The motorway is the straight line, the detour are residentials)

When dumping the routerdb to geojson, the following data is obtained. testcase-motorway.osmcar.fast.geojson.txt

Note that _forward:factor is 0 for the motorway, but not for the residential area

pietervdvn commented 2 years ago

Testfiles can be found in the routing profiles repo

pietervdvn commented 2 years ago

Note that this test works if the profile is patched to have 'forward:factor' 10 times larger

pietervdvn commented 2 years ago

If this bug is resolved, the warning in AspectedRouting/ProfileTestSuite.cs (priority is not within range) should be removed