ols-router icon indicating copy to clipboard operation
ols-router copied to clipboard

Dempsey Rd waypoint needed to get same route in opposite direction

Open mraross opened this issue 4 years ago • 9 comments

Route involving directional weight restrictions?

121 28th St, West Vancouver, BC 1918 Russet Way, West Vancouver, BC

Up the hill image.png

Down the hill image.png

mraross avatar Mar 21 '20 08:03 mraross

You have no weights selected so it isn't related to that. However there appears to be a bug in the GDF logic or how the app passes the info.

  1. Start with a fresh reload of the app using rt=rri (our version currently defaults all GDF FFs to 1). Set up the reverse (downhill) route with GDF turned on (or off). It looks like your first picture but opposite direction -- output A.

  2. Copy in the dev tuning string to the configuration. Nothing happens. Now try turning the GDF off -- the route changes even though we'd expect it look like output A.

  3. Turn GDF on. Now the route looks like your 2nd picture.

  4. Try changing all FFs back to the original values of 1 and turn GDF off. We would expect to get output A, but once again we don't.

  5. Turn GDF on. We'd expect output A because there are no FFs distortions. The output is the same as your 2nd picture.

gleeming avatar Mar 21 '20 15:03 gleeming

I've tried to replicate your problem and am unable to. Some things to consider:

  • GDF only applies to truck mode
  • The tuning string includes turn costs and crossing costs, which are different on dlv and rri, so turning off gdf and setting FFs back to 1 doesn't completely undo the act of copying the dlv tuning string into the rri app.
  • The GDF, LDF, and truck multiplier all multiply the cost to turn onto the segment and the crossing cost at the exit of the segment as well as the cost of the segment itself

cmhodgson avatar Mar 21 '20 21:03 cmhodgson

Thanks for the tip Chris. Lowering the xingCost multiplier from 1.5 to 1.1 solves the problem:

image

I will now redo all the GDF tests in https://github.com/bcgov/ols-router/issues/236

mraross avatar Mar 21 '20 22:03 mraross

All GDF tests run successfully. GDF Test 4 actually improved since it no longer cuts off the corner.

GDF Test 4 Prefer No 3 Rd and Sea Island Connector over Russ Baker Way 49.16740,-123.15866 49.19219,-123.16072 from issue #229

image

mraross avatar Mar 21 '20 23:03 mraross

Good to hear the parameters have been tweaked and tests run successfully. I had added an LDF on Alderbridge Way to stop the corner cutting so I think that is the main effect in this case.

gleeming avatar Mar 22 '20 00:03 gleeming

That makes more sense.

mraross avatar Mar 22 '20 01:03 mraross

Another non-reversible origin/destination. This time with xingCostMultiplier=1.1

image

image

mraross avatar Mar 22 '20 19:03 mraross

Another case:

image

image

mraross avatar Mar 22 '20 19:03 mraross

For the Haywood to Palmerston case, simply mirroring the route would lead to 4 left turns and an extra 2+ mins of travel time over the non-truck route version the router returns.

The second case is more concerning. Add a Dempsey Rd waypoint (e.g. at 49.34780,-123.04851) on the St Mary's to Frederick Rd forward route to force roughly the same path as the reverse. Route is a full minute faster than the long detour in your first picture

gleeming avatar Mar 22 '20 23:03 gleeming