uphillcostfactor value

363 views
Skip to first unread message

Jakob Mühldorfer

unread,
May 9, 2017, 9:57:20 PM5/9/17
to OSM Android bikerouting
Question about profile designing:
Is it possible to have uphillcostfactor and downhillcostfactor unspecified?
I want a profile that separates the "way condition" costs and the elevation costs specified by downhillcost/uphillcost
Thanks for help

Poutnik Fornntp

unread,
May 10, 2017, 12:15:58 AM5/10/17
to osm-android...@googlegroups.com

Sure, it is possible. By default, they are equal to costfactor. You can notice the standard profiles do not use them.

But they are not really the elevation cost.
They are rather slope dependent way quality costs.

--
You received this message because you are subscribed to the Google Groups "OSM Android bikerouting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osm-android-biker...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Poutnik Fornntp

unread,
May 10, 2017, 2:10:35 AM5/10/17
to osm-android...@googlegroups.com

E.g. Main roads may be wanted to have lowered cost downhill, as you can go really fast there. OTOH, they may be wanted to have increased cost uphill, as you are heavily breathing burnt fuel from passing cars, with slow or even erratic motion potentially dangerous due collisions.

Jakob Mühldorfer

unread,
May 10, 2017, 10:33:20 AM5/10/17
to OSM Android bikerouting
Thanks for the input
I know there are situations where it might make sense, but I am trying to create a really simple profile at the moment to see where it gets me

Poutnik

unread,
May 10, 2017, 11:04:35 AM5/10/17
to osm-android...@googlegroups.com
You are welcome.

Rather, they usually do make sense, as personal realtive road priorities
are rarely really the same for downhill, flat and uphill scenarios.

Just start with Trekking.brf of Fastbike.brf,
they are simple and without up/downhillcostfactors.
--
Poutnik ( The Pilgrim, Der Wanderer )

https://github.com/poutnikl/Brouter-profiles/wiki

Jakob Mühldorfer

unread,
May 16, 2017, 6:32:44 PM5/16/17
to OSM Android bikerouting
I have tested a super minimal "hello world" profile.
Why does it not assign an elevation cost in the data tab?

---context:global
assign   turnInstructionMode  = 0 #0=none
assign    pass1coefficient 1
assign    pass2coefficient -1

assign   considerTurnRestrictions  true

assign   uphillcostvalue        100
assign   uphillcutoffvalue      0.5
assign   downhillcutoffvalue    3.0
assign   downhillcostvalue      100
---context:way
#Needed for some unknown reason, usualy only used for voice hints
assign priorityclassifier = if highway= then 1 else 0
assign turncost 0
assign costfactor 1.0  
---context:node
assign initialcost 0

I would have expected it to assign a cost for going upwards or downwars a certain amount of elevation

Another question: Can i assign cost based on slope too, not absolute elevation difference 

Volker

unread,
May 16, 2017, 6:47:57 PM5/16/17
to OSM Android bikerouting
Am Mittwoch, 17. Mai 2017 00:32:44 UTC+2 schrieb Jakob Mühldorfer:
> Why does it not assign an elevation cost in the data tab?

There are no elevation cost in the profile.

Jakob Mühldorfer

unread,
May 16, 2017, 8:30:14 PM5/16/17
to OSM Android bikerouting
Sorry I do not quite understand, it is not mentioned anywhere here?
http://brouter.de/brouter/profile_developers_guide.txt
I thought it calculates elevationcost automatically from 
ElevationCost = WayPhysicalLength * up(down)hillcost * AverageslopeAfterCutoffSubtract/100

It has given WayPhysicalLength, uphillcost and slope from the profile+datafile

Volker

unread,
May 16, 2017, 8:40:19 PM5/16/17
to OSM Android bikerouting
You must use the correct variable​s to get the elevation cost. In your profile you have none.

Poutnik Fornntp

unread,
May 16, 2017, 11:29:50 PM5/16/17
to osm-android...@googlegroups.com

Tou have confused Brouter variables up/downhillcost/cutoff,  that Brouter uses for elevation cost calculations

with similarly names user variables up/downhillcost/cutoffvalue, that I use as  intermittent values for the final Brouter variables.

Brouter does not know nor use up/downhillcost/cutoffvalue variables.

Poutnik

unread,
May 17, 2017, 1:02:56 AM5/17/17
to osm-android...@googlegroups.com
Or, said by other way, delete the "value" suffixes.

Brouter uses
uphillcost, uphillcutoff, downhillcost, downhillcutoff

uphillcostvalue, uphillcutoffvalue, downhillcostvalue, downhillcutoffvalue
are just my profile variables along the evaluation path below,
without special meaning for BRouter itself.

assign hills x -->
uphillcostvalue, uphillcutoffvalue, downhillcostvalue, downhillcutoffvalue
----(other parameters)------>
uphillcost, uphillcutoff, downhillcost, downhillcutoff

Dne 17/05/2017 v 02:30 Jakob Mühldorfer napsal(a):
Sorry I do not quite understand, it is not mentioned anywhere here?
http://brouter.de/brouter/profile_developers_guide.txt
I thought it calculates elevationcost automatically from 
ElevationCost = WayPhysicalLength * up(down)hillcost * AverageslopeAfterCutoffSubtract/100

It has given WayPhysicalLength, uphillcost and slope from the profile+datafile


-- 
Poutnik ( The Wanderer )

My Brouter profiles 
https://github.com/poutnikl/Brouter-profiles/wiki

Jakob Mühldorfer

unread,
May 17, 2017, 10:01:14 AM5/17/17
to OSM Android bikerouting
Thank you..i had missed that the copied names still had "value" at the end
Now it works
Reply all
Reply to author
Forward
0 new messages