bcgov / ols-router

BC Advanced Route Planner
https://bcgov.github.io/ols-router/
Apache License 2.0
23 stars 11 forks source link

QA of Global Distortion field #236

Closed mraross closed 1 year ago

mraross commented 4 years ago

Review previously identified and fixed odd cases and make sure they stay fixed in the presence of global distortion field.

Used location services in action app at Refractions: https://office.refractions.net/~chodgson/gc/ols-demo/?rt=rri

Here is the tuning string used in testing:

globalDistortionField=alleyway:1.2,alleyway.truck:1.1,arterial_major:1.01,arterial_major.truck:1.01,arterial_minor:1.01,arterial_minor.truck:1.01,collector_major:1.01,collector_major.truck:1.01,collector_minor:1.01,collector_minor.truck:1.01,driveway:1.2,driveway.truck:1.1,ferry:1,ferry.truck:1,freeway:1,freeway.truck:1,highway_major:1,highway_major.truck:1,highway_minor:1,highway_minor.truck:1,lane:1.01,lane.truck:1.01,local:1.1,local.truck:1.05,ramp:1,ramp.truck:1,recreation:1.2,recreation.truck:1.1,resource:1.2,resource.truck:1.1,restricted:1.2,restricted.truck:1.1,service:1.2,service.truck:1.1,strata:1.2,strata.truck:1.1,yield_lane:1.01,yield_lane.truck:1.01,&xingCost=3.0,10.0,7.0,1.1&turnCost=3.0,1.0,10.0,5.0

To perform testing:

  1. Start up Location Services in Action at:

    https://office.refractions.net/~chodgson/gc/ols-demo/?rt=rri

2 Open the Route tab and you will see this:

image

  1. Turn on Global and Local Distortion Fields, crossing cost, turn cost, Truck Mode, Follow Truck Route, and enter a route multiplier of 9. The Route tab should now look like this:

image

  1. Click on the hyperlinked text Global Distortion Field to pop up the Configuration Panel.

  2. Copy the tuning string above into the clipboard.

  3. Paste the clipboard contents into the Tuning String field of the Configuration Panel and press Enter. The configuration panel should now look like this:

image

You are now ready to test.

mraross commented 4 years ago

GDF test 1 5411 Kingsway, Burnaby, BC 649 Columbia St, New Westminster, BC from issue https://github.com/bcgov/ols-router/issues/233

image

mraross commented 4 years ago

GDF Test 2 770 Rosser Ave, Burnaby 6319 Lochdale St, Burnaby from issue https://github.com/bcgov/ols-router/issues/233

image

mraross commented 4 years ago

GDF Test 3 Prefer Front St over Royal Ave 49.20054,-122.92152 49.21915,-122.89310 from issue https://github.com/bcgov/ols-router/issues/229

image

mraross commented 4 years ago

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 https://github.com/bcgov/ols-router/issues/229

image

mraross commented 4 years ago

GDF Test 5 Discourage Travel on Gatensbury Rd 49.27457,-122.85033 49.26345,-122.84722 from issue https://github.com/bcgov/ols-router/issues/229

image

mraross commented 4 years ago

GDF Test 6 Discourage Travel on Thermal Drive 49.27654,-122.85161 49.26345,-122.84722 from issue https://github.com/bcgov/ols-router/issues/229

image

mraross commented 4 years ago

GDF Test 7 Allow travel to Coquitlam Lake 49.29557,-122.80107 49.35408,-122.77468 from issue https://github.com/bcgov/ols-router/issues/229

image

mraross commented 4 years ago

GDF Test 8 Allow travel to Horseshoe Bay Ferry 49.36750,-123.27626 49.37568,-123.27214 from issue https://github.com/bcgov/ols-router/issues/229

image

mraross commented 4 years ago

GDF Test 9 Allow travel to Tsawwassen Ferry 49.03647,-123.08217 49.00579,-123.13322 from issue https://github.com/bcgov/ols-router/issues/229

image

Since June 2020 data

image

mraross commented 4 years ago

GDF Test 10 Prefer Haney Bypass over Lougheed Highway 23213 Lougheed Hwy, Maple Ridge, BC 22004 Selkirk Ave, Maple Ridge, BC from issue https://github.com/bcgov/ols-router/issues/229

image

mraross commented 4 years ago

GDF Test 11 East to west through New Westminster taking Front St instead of Royal Ave 49.23766,-122.70301 49.15640,-123.03366

from issue https://github.com/bcgov/ols-router/issues/210

image

gleeming commented 4 years ago

At the Tsawwassen ferry terminal, the truck routes in ITN match exactly with what is in Translink's Feb 2018 data (and CVRP app). It is odd that there isn't a southbound lane designated as a truck route for whichever section trucks get directed to wait in line at the terminal. It's yet another data anomaly that someone could look into and report to GeoBC if changes are required.

mraross commented 4 years ago

@al-tabb Given Graeme's analysis, do you want to designate a southbound lane in the ferry terminal as a truck route?

mraross commented 4 years ago

Latest tuning string:

globalDistortionField=alleyway:2,alleyway.truck:2,arterial_major:1.1,arterial_major.truck:1.1,arterial_minor:1.1,arterial_minor.truck:1.1,collector_major:1.1,collector_major.truck:1.1,collector_minor:1.1,collector_minor.truck:1.1,driveway:2,driveway.truck:2,ferry:1,ferry.truck:1,freeway:1.0,freeway.truck:1.0,highway_major:1.0,highway_major.truck:1.0,highway_minor:1.0,highway_minor.truck:1.0,lane:1.05,lane.truck:1.05,local:1.2,local.truck:1.2,ramp:1,ramp.truck:1,recreation:2,recreation.truck:1.2,resource:2,resource.truck:1.2,restricted:2,restricted.truck:1.2,service:2,service.truck:1.2,strata:2,strata.truck:1.2,yield_lane:1.1,yield_lane.truck:1.1,&xingCost=3,10,7,1.5&turnCost=3.0,1.0,10,5

mraross commented 4 years ago

Latest tuning string:

globalDistortionField=alleyway:2,alleyway.truck:1.2,arterial_major:1.1,arterial_major.truck:1.1,arterial_minor:1.1,arterial_minor.truck:1.1,collector_major:1.1,collector_major.truck:1.1,collector_minor:1.1,collector_minor.truck:1.1,driveway:2,driveway.truck:1.2,ferry:1,ferry.truck:1,freeway:1.0,freeway.truck:1.0,highway_major:1.0,highway_major.truck:1.0,highway_minor:1.0,highway_minor.truck:1.0,lane:1.05,lane.truck:1.05,local:1.2,local.truck:1.2,ramp:1,ramp.truck:1,recreation:2,recreation.truck:1.2,resource:2,resource.truck:1.2,restricted:2,restricted.truck:1.2,service:2,service.truck:1.2,strata:2,strata.truck:1.2,yield_lane:1.1,yield_lane.truck:1.1,&xingCost=3,10,7,1.5&turnCost=3.0,1.0,10,5

gleeming commented 4 years ago

The GDF tuning on major corridors such as arterial and collector has a very substantial and sometimes unwanted effect. Factors of 1.1 for trucks on these road classes (10% impact) are just too high. Perhaps 1.01 would be more suitable for initial testing. Here's one of the most extreme examples with the latest tune string. friction_factor

mraross commented 4 years ago

I have reduced all 1.1 factors to 1.01. 1.2 and 2.0 factors unchanged. Route through Langley looks better.

image

Here's the tuning string:

globalDistortionField=alleyway:2,alleyway.truck:1.2,arterial_major:1.01,arterial_major.truck:1.01,arterial_minor:1.01,arterial_minor.truck:1.01,collector_major:1.01,collector_major.truck:1.01,collector_minor:1.01,collector_minor.truck:1.01,driveway:2,driveway.truck:1.2,ferry:1,ferry.truck:1,freeway:1.0,freeway.truck:1.0,highway_major:1.0,highway_major.truck:1.0,highway_minor:1.0,highway_minor.truck:1.0,lane:1.01,lane.truck:1.01,local:1.2,local.truck:1.2,ramp:1,ramp.truck:1,recreation:2,recreation.truck:1.2,resource:2,resource.truck:1.2,restricted:2,restricted.truck:1.2,service:2,service.truck:1.2,strata:2,strata.truck:1.2,yield_lane:1.01,yield_lane.truck:1.01,&xingCost=3,10,7,1.5&turnCost=3.0,1.0,10,5

mraross commented 4 years ago

The GDF Test X cases need only be run when the route planner code changes, not when data changes

GDF Test X1 Set GDF so that trucks on designated routes avoid highways 49.19603,-122.78295 49.22959,-122.82301 friction: truck freeway, highway_major, highway_minor = 10 image

mraross commented 4 years ago

GDF Test X2 Set GDF so that trucks on designated routes prefer highways 49.19602,-122.78295 49.22959,-122.82301

image

mraross commented 4 years ago

GDF Test X3 Set GDF so that trucks prefer local roads to main roads 49.19299,-122.89058 49.17081,-122.87290

image

mraross commented 4 years ago

GDF Test X4 Set GDF so that trucks prefer main roads to local roads 49.19299,-122.89058 48.17081,-122.87290

image

mraross commented 4 years ago

Default route planner config values as of 2020-03-20

defaultEnableOptions: gdf,ldf,tr,xc,tc

defaultGlobalDistortionField: alleyway:2,alleyway.truck:1.2,arterial_major:1.01,arterial_major.truck:1,arterial_minor:1.01,arterial_minor.truck:1,collector_major:1.01,collector_major.truck:1.01,collector_minor:1.01,collector_minor.truck:1.01,driveway:2,driveway.truck:1.2,ferry:1,ferry.truck:1,freeway:1.0,freeway.truck:1,highway_major:1.0,highway_major.truck:1,highway_minor:1.0,highway_minor.truck:1,lane:1.01,lane.truck:1.01,local:1.2,local.truck:1.2,ramp:1,ramp.truck:1,recreation:2,recreation.truck:1.2,resource:2,resource.truck:1.2,restricted:2,restricted.truck:1.2,service:2,service.truck:1.2,strata:2,strata.truck:1.2,yield_lane:1.01,yield_lane.truck:1.01

defaultXingCost: 3,10,7,1.5

defaultTurnCost: 3.0,1.0,10,5

defaultTruckRouteMultiplier: 9

mraross commented 4 years ago

GDF Test 12 Surrey, BC 6348 264 St, Township of Langley, BC

image

mraross commented 4 years ago

GDF Test 13 Starting from a strata road 925 Main St, West Vancouver 1564 Argyle Ave, West Vancouver

image

mraross commented 4 years ago

GDF Test 14 (TL Benchmark 4) 1001 Nicola St, Vancouver, BC 8111 144 St, Surrey, BC

image

mraross commented 4 years ago

GDF Test Case 15 (Benchmark 7) 49.158822935,-123.190291343 49.0126695795,-123.0811147073

image

mraross commented 4 years ago

Reran all GDF data tests successfully with the following tuning string:

globalDistortionField=alleyway:1.2,alleyway.truck:1.1,arterial_major:1.01,arterial_major.truck:1,arterial_minor:1.01,arterial_minor.truck:1,collector_major:1.01,collector_major.truck:1.01,collector_minor:1.01,collector_minor.truck:1.01,driveway:1.2,driveway.truck:1.1,ferry:1,ferry.truck:1,freeway:1,freeway.truck:1,highway_major:1,highway_major.truck:1,highway_minor:1,highway_minor.truck:1,lane:1.01,lane.truck:1.01,local:1.1,local.truck:1.05,ramp:1,ramp.truck:1,recreation:1.2,recreation.truck:1.1,resource:1.2,resource.truck:1.1,restricted:1.2,restricted.truck:1.1,service:1.2,service.truck:1.1,strata:1.2,strata.truck:1.1,yield_lane:1.01,yield_lane.truck:1.01,&xingCost=3.0,10.0,7.0,1.5&turnCost=3.0,1.0,10.0,5.0

mraross commented 4 years ago

Reran all GDF data tests successfully with the following tuning string:

globalDistortionField=alleyway:1.2,alleyway.truck:1.1,arterial_major:1.01,arterial_major.truck:1.01,arterial_minor:1.01,arterial_minor.truck:1.01,collector_major:1.01,collector_major.truck:1.01,collector_minor:1.01,collector_minor.truck:1.01,driveway:1.2,driveway.truck:1.1,ferry:1,ferry.truck:1,freeway:1,freeway.truck:1,highway_major:1,highway_major.truck:1,highway_minor:1,highway_minor.truck:1,lane:1.01,lane.truck:1.01,local:1.1,local.truck:1.05,ramp:1,ramp.truck:1,recreation:1.2,recreation.truck:1.1,resource:1.2,resource.truck:1.1,restricted:1.2,restricted.truck:1.1,service:1.2,service.truck:1.1,strata:1.2,strata.truck:1.1,yield_lane:1.01,yield_lane.truck:1.01,&xingCost=3.0,10.0,7.0,1.5&turnCost=3.0,1.0,10.0,5.0

mraross commented 4 years ago

@gk-tl Reran gdf test cases 4-6 above after Graeme updated local distortion fields as per your previous review. Please review.

gk-tl commented 4 years ago

Looks good. Thank you.

mraross commented 4 years ago

Be sure to watch the delightful distortion field demo at:

https://github.com/bcgov/ols-router/issues/249

mraross commented 4 years ago

Repeated all test cases successfully for v2.1.2

BK01 commented 4 years ago

All GDF tests listed above are being integrated into the DataBC router test list.

mraross commented 4 years ago

Verified in production

mraross commented 4 years ago

Verified in delivery with May 2020 data.

alixcote commented 1 year ago

Re-closing.