Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce turn penalties for short_way=yes, add test 73 (detour traffic_signals with short_way) for Issue #21424 #1163

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion routing/routing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@
<!-- Parameter to smoother the track itself (could be 0 if it's not recorded track) -->
<attribute name="smoothenPointsNoRoute" value = "5"/>

<!-- Turn penalties for short_way=yes -->
<attribute name="shortWaySharpTurn" value = "10"/>
<attribute name="shortWaySlightTurn" value = "5"/>
<attribute name="shortWayRoundAboutTurn" value = "5"/>

<!-- NEW ROUTING API -->
<!-- <parameter id="prefer_motorway" name="Prefer motorways" description="Prefer motorways" type="boolean"/> -->
<!-- <parameter id="no_new_routing" name="Do not use v1.9 routing" description="Do not use v1.9 routing" type="boolean"/> -->
Expand Down Expand Up @@ -1127,7 +1132,7 @@
<select value="0" t="barrier" v="lift_gate"/>
<select value="0" t="barrier" v="swing_gate"/>
<select value="5" t="highway" v="traffic_signals"/>
<select value="0" t="highway" v="give_way"/>
<select value="0" t="highway" v="give_way"/>
</if>
<select value="5" t="barrier" v="cattle_grid"/>
<select value="300" t="barrier" v="border_control"/>
Expand Down Expand Up @@ -1156,6 +1161,10 @@
<routingProfile name="bicycle" baseProfile="bicycle" restrictionsAware="true" minSpeed="5" defaultSpeed="10" maxSpeed="33" sharpTurn="6" slightTurn="6" followSpeedLimitations="false" onewayAware="true" heuristicCoefficient="1.4">
<attribute name="penaltyForReverseDirection" value="60" /> <!-- bike: ~ 1 minute to turn back -->

<!-- Turn penalties for short_way=yes -->
<attribute name="shortWaySharpTurn" value = "0"/>
<attribute name="shortWaySlightTurn" value = "0"/>

<!-- <attribute name="relaxNodesIfStartDistSmallCoeff" value="2.5"/> -->
<!-- New ROUTING API -->

Expand Down Expand Up @@ -2931,6 +2940,10 @@
<parameter id="avoid_unpaved" name="Avoid unpaved roads" description="Avoid unpaved roads" type="boolean"/>
<parameter id="allow_private" name="Allow private access" description="Allow access to private areas" type="boolean"/>

<!-- Turn penalties for short_way=yes -->
<attribute name="shortWaySharpTurn" value = "0"/>
<attribute name="shortWaySlightTurn" value = "0"/>

<way attribute="access">
<select value="-1" t="osmand_change" v="delete"/>
<select value="-1" t="highway" v="proposed"/>
Expand Down
Binary file added test-resources/routing/Routing_test_73.obf
Binary file not shown.
Loading