Compare commits

...

6 Commits

Author SHA1 Message Date
Patrick Niklaus a02a83f8bd Other flakey test 2017-03-02 15:24:38 +00:00
Patrick Niklaus 9b18f55d29 Update changelog 2017-03-02 15:00:49 +00:00
Patrick Niklaus a3434e7ae9 Mark test as flaky and track in own issue. 2017-03-02 14:59:10 +00:00
Patrick Niklaus 64b15028e4 Print 0 rate 2017-03-02 14:58:14 +00:00
karenzshea d8e466fdaa simplify test, add intersection turn test 2017-03-02 14:58:01 +00:00
karenzshea 43bbe8f2ae add restricted penalty on NoTurn turns 2017-03-02 14:57:49 +00:00
5 changed files with 66 additions and 9 deletions
+5
View File
@@ -1,3 +1,8 @@
# 5.6.1
- Changes from 5.6.0
- Bugfixes
- Fix #3754 restricted access roads not penalized if restriction begins non at an intersection
# 5.6.0
- Changes from 5.5
- Bugfixes
+3 -2
View File
@@ -202,8 +202,9 @@ Feature: Car - Restricted access
Then routability should be
| highway | hov:lanes:forward | hov:lanes:backward | hov:lanes | oneway | forw | backw | forw_rate | backw_rate |
| primary | designated | designated | | | x | x | 18 | 18 |
| primary | | designated | | | x | x | 18 | 18 |
| primary | designated | | | | x | x | 18 | 18 |
# This test is flaky because non-deterministic turn generation sometimes emits a NoTurn here that is marked as restricted. #3769
#| primary | | designated | | | x | x | 18 | 18 |
#| primary | designated | | | | x | x | 18 | 18 |
| primary | designated\|designated | designated\|designated | | | x | x | 18 | 18 |
| primary | designated\|no | designated\|no | | | x | x | 18 | 18 |
| primary | yes\|no | yes\|no | | | x | x | 18 | 18 |
+50
View File
@@ -81,3 +81,53 @@ Feature: Car - Destination only, no passing through
| e | a | de,cd,bc,ab,ab |
| b | d | bc,cd,cd |
| d | b | cd,bc,bc |
Scenario: Car - Routing around a way that becomes destination only
Given the node map
"""
b
\
|
e++d++++++c--i
| \
\ h--a
\ |
\___________g
"""
And the ways
| nodes | access | oneway |
| ah | | no |
| ihg | | no |
| eg | | no |
| icde | | no |
| cde | destination | no |
| eb | | no |
When I route I should get
| from | to | route | # |
| i | b | ihg,eg,eb,eb | # goes around access=destination, though restricted way starts at two node intersection |
| b | d | eb,cde,cde | # ends in restricted way correctly |
| b | i | eb,eg,ihg,ihg | # goes around restricted way correctly |
Scenario: Car - Routing around a way that becomes destination only
Given the node map
"""
a---c---b
+ \
+ |
d |
\___e
"""
And the ways
| nodes | access | oneway |
| acbe | | no |
| cd | destination | no |
| de | | no |
When I route I should get
| from | to | route |
| e | a | acbe,acbe |
| d | a | de,acbe,acbe |
| c | d | cd,cd |
+2 -1
View File
@@ -28,13 +28,14 @@ module.exports = function () {
directions.filter(d => headers.has(d + '_rate')).forEach((direction) => {
var rate = direction + '_rate';
var want = row[rate];
switch (true) {
case '' === want:
outputRow[rate] = result[direction].status ?
result[direction].status.toString() : '';
break;
case /^\d+$/.test(want):
if (result[direction].rate && !isNaN(result[direction].rate)) {
if (result[direction].rate !== undefined && !isNaN(result[direction].rate)) {
outputRow[rate] = result[direction].rate.toString();
} else {
outputRow[rate] = '';
+6 -6
View File
@@ -392,11 +392,11 @@ function turn_function (turn)
else
turn.weight = turn.duration
end
if properties.weight_name == 'routability' then
-- penalize turns from non-local access only segments onto local access only tags
if not turn.source_restricted and turn.target_restricted then
turn.weight = turn.weight + profile.restricted_penalty
end
end
end
if properties.weight_name == 'routability' then
-- penalize turns from non-local access only segments onto local access only tags
if not turn.source_restricted and turn.target_restricted then
turn.weight = turn.weight + profile.restricted_penalty
end
end
end