From 9a44f16846f177b691d5341762383d6fd126ffc9 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 15 Feb 2013 17:02:49 +0100 Subject: [PATCH 1/4] don't push against oneway flow on roundabout. fixes #591 --- features/bicycle/pushing.feature | 6 ++++++ profiles/bicycle.lua | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/features/bicycle/pushing.feature b/features/bicycle/pushing.feature index 8e2ca3052..1c6919706 100644 --- a/features/bicycle/pushing.feature +++ b/features/bicycle/pushing.feature @@ -79,3 +79,9 @@ Feature: Bike - Accessability of different way types | construction | | | | | construction | yes | | | | construction | | yes | | + + @roundabout + Scenario: Bike - Don't push bikes against oneway flow on roundabouts + Then routability should be + | junction | forw | backw | + | roundabout | x | | diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index c5c2f64fb..92f9ba812 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -263,12 +263,14 @@ function way_function (way, numberOfNodesInWay) -- pushing bikes if bicycle_speeds[highway] or pedestrian_speeds[highway] then if foot ~= 'no' then - if way.direction == Way.oneway then - way.backward_speed = walking_speed - elseif way.direction == Way.opposite then - way.backward_speed = walking_speed - way.speed = way.speed - end + if junction ~= "roundabout" then + if way.direction == Way.oneway then + way.backward_speed = walking_speed + elseif way.direction == Way.opposite then + way.backward_speed = walking_speed + way.speed = way.speed + end + end end if way.backward_speed == way.speed then -- TODO: no way yet to mark a way as pedestrian mode if forward/backward speeds are equal From 23254b4f24f33012403ee5e56e8e2d423c9e54ba Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Mon, 11 Feb 2013 11:02:21 +0100 Subject: [PATCH 2/4] update bike speeds --- profiles/bicycle.lua | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 92f9ba812..62a487e62 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -10,25 +10,25 @@ cycleway_tags = {["track"]=true,["lane"]=true,["opposite"]=true,["opposite_lane" service_tag_restricted = { ["parking_aisle"] = true } restriction_exception_tags = { "bicycle", "vehicle", "access" } -default_speed = 16 +default_speed = 15 -walking_speed = 4 +walking_speed = 6 bicycle_speeds = { - ["cycleway"] = 18, - ["primary"] = 17, - ["primary_link"] = 17, - ["secondary"] = 18, - ["secondary_link"] = 18, - ["tertiary"] = 18, - ["tertiary_link"] = 18, - ["residential"] = 18, - ["unclassified"] = 16, - ["living_street"] = 16, - ["road"] = 16, - ["service"] = 16, - ["track"] = 13, - ["path"] = 13 + ["cycleway"] = default_speed, + ["primary"] = default_speed, + ["primary_link"] = default_speed, + ["secondary"] = default_speed, + ["secondary_link"] = default_speed, + ["tertiary"] = default_speed, + ["tertiary_link"] = default_speed, + ["residential"] = default_speed, + ["unclassified"] = default_speed, + ["living_street"] = default_speed, + ["road"] = default_speed, + ["service"] = default_speed, + ["track"] = 12, + ["path"] = 12 --["footway"] = 12, --["pedestrian"] = 12, } @@ -69,7 +69,7 @@ obey_oneway = true obey_bollards = false use_restrictions = true ignore_areas = true -- future feature -traffic_signal_penalty = 2 +traffic_signal_penalty = 5 u_turn_penalty = 20 -- End of globals From 26e2f9ddd1c81804df9d6e8e67d14a8758bc7134 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Mon, 11 Feb 2013 11:03:24 +0100 Subject: [PATCH 3/4] add 'no' to barrier whitelist in bike profile --- profiles/bicycle.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 62a487e62..3a1544cf6 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -1,7 +1,7 @@ require("lib/access") -- Begin of globals -barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true} +barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true} access_tag_whitelist = { ["yes"] = true, ["permissive"] = true, ["designated"] = true } access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestery"] = true } access_tag_restricted = { ["destination"] = true, ["delivery"] = true } From 94fa0047dbb8213d5a958727e42b8cd298923650 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Tue, 19 Feb 2013 08:54:23 +0100 Subject: [PATCH 4/4] update bike tests --- features/bicycle/maxspeed.feature | 24 ++++++++++++------------ features/bicycle/pushing.feature | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/features/bicycle/maxspeed.feature b/features/bicycle/maxspeed.feature index b02fe4e33..9924f5596 100644 --- a/features/bicycle/maxspeed.feature +++ b/features/bicycle/maxspeed.feature @@ -7,35 +7,35 @@ Feature: Bike - Max speed restrictions Scenario: Bicycle - Respect maxspeeds when lower that way type speed Then routability should be | highway | maxspeed | bothw | - | residential | | 40s ~10% | + | residential | | 49s ~10% | | residential | 10 | 72s ~10% | Scenario: Bicycle - Ignore maxspeed when higher than way speed Then routability should be | highway | maxspeed | bothw | - | residential | | 40s ~10% | - | residential | 80 | 40s ~10% | + | residential | | 49s ~10% | + | residential | 80 | 49s ~10% | @todo Scenario: Bicycle - Maxspeed formats Then routability should be | highway | maxspeed | bothw | - | residential | | 40s ~10% | + | residential | | 49s ~10% | | residential | 5 | 144s ~10% | | residential | 5mph | 90s ~10% | | residential | 5 mph | 90s ~10% | | residential | 5MPH | 90s ~10% | | residential | 5 MPH | 90s ~10% | - | trunk | 5unknown | 40s ~10% | - | trunk | 5 unknown | 40s ~10% | + | trunk | 5unknown | 49s ~10% | + | trunk | 5 unknown | 49s ~10% | @todo Scenario: Bicycle - Maxspeed special tags Then routability should be | highway | maxspeed | bothw | - | residential | | 40s ~10% | - | residential | none | 40s ~10% | - | residential | signals | 40s ~10% | + | residential | | 49s ~10% | + | residential | none | 49s ~10% | + | residential | signals | 49s ~10% | Scenario: Bike - Do not use maxspeed when higher that way type speed Given the node map @@ -48,13 +48,13 @@ Feature: Bike - Max speed restrictions When I route I should get | from | to | route | time | - | a | b | ab | 20s ~5% | - | b | c | bc | 20s ~5% | + | a | b | ab | 24s ~5% | + | b | c | bc | 24s ~5% | Scenario: Bike - Forward/backward maxspeed Given the shortcuts | key | value | - | bike | 43s ~10% | + | bike | 49s ~10% | | run | 73s ~10% | | walk | 145s ~10% | | snail | 720s ~10% | diff --git a/features/bicycle/pushing.feature b/features/bicycle/pushing.feature index 1c6919706..169d340e3 100644 --- a/features/bicycle/pushing.feature +++ b/features/bicycle/pushing.feature @@ -5,8 +5,8 @@ Feature: Bike - Accessability of different way types Given the profile "bicycle" Given the shortcuts | key | value | - | bike | 40s ~20% | - | foot | 180s ~20% | + | bike | 49s ~20% | + | foot | 121s ~20% | Scenario: Bike - Pushing bikes on pedestrian-only ways Then routability should be