forked from Project-OSRM/osrm-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests for signal penalty. renamed 'given the nodes' to 'given the nod…
…e map' and introduced new 'given the nodes' to set node tags
- Loading branch information
Showing
14 changed files
with
162 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
@routing @penalty | ||
Feature: Penalties | ||
|
||
Background: | ||
Given the speedprofile "bicycle" | ||
And the speedprofile settings | ||
| trafficSignalPenalty | 20 | | ||
|
||
Scenario: Passing a traffic signal should incur a delay | ||
Given the node map | ||
| a | b | c | | ||
| d | e | f | | ||
|
||
And the nodes | ||
| node | highway | | ||
| e | traffic_signals | | ||
|
||
And the ways | ||
| nodes | | ||
| abc | | ||
| def | | ||
|
||
When I route I should get | ||
| from | to | route | time | | ||
| a | c | abc | 38s | | ||
| d | f | def | 58s | | ||
|
||
Scenario: Passing multiple traffic signals should incur a accumulated delay | ||
Given the node map | ||
| a | b | c | d | e | | ||
|
||
And the nodes | ||
| node | highway | | ||
| b | traffic_signals | | ||
| c | traffic_signals | | ||
| d | traffic_signals | | ||
|
||
And the ways | ||
| nodes | | ||
| abcde | | ||
|
||
When I route I should get | ||
| from | to | route | time | | ||
| a | e | abcde | 136s | | ||
|
||
Scenario: Starting or ending at a traffic signal should not incur a delay | ||
Given the node map | ||
| a | b | c | | ||
|
||
And the nodes | ||
| node | highway | | ||
| b | traffic_signals | | ||
|
||
And the ways | ||
| nodes | | ||
| abc | | ||
|
||
When I route I should get | ||
| from | to | route | time | | ||
| a | b | abc | 19s | | ||
| b | a | abc | 19s | | ||
| b | c | abc | 19s | | ||
| c | b | abc | 19s | | ||
|
||
Scenario: Routing between signals on the same way should not incur a delay | ||
Given the node map | ||
| a | b | c | d | | ||
|
||
And the nodes | ||
| node | highway | | ||
| a | traffic_signals | | ||
| d | traffic_signals | | ||
|
||
And the ways | ||
| nodes | | ||
| abcd | | ||
|
||
When I route I should get | ||
| from | to | route | time | | ||
| b | c | abcd | 19s | | ||
| c | b | abcd | 19s | | ||
|
||
Scenario: Prefer faster route without traffic signals | ||
Given the node map | ||
| a | b | c | | ||
| | d | | | ||
|
||
And the nodes | ||
| node | highway | | ||
| b | traffic_signals | | ||
|
||
And the ways | ||
| nodes | | ||
| abc | | ||
| adc | | ||
|
||
When I route I should get | ||
| from | to | route | | ||
| a | c | adc | |
Oops, something went wrong.