-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Make travel time and edge weights independent #77
Description
i think it will be imporant to be able to set 'attractiveness' on ways depending on certain tags.
this should be separate from the speed, since it's still important to have the correct speeds for each sections, so that a estimated travel time can be computed.
for example, we want to prioritize streets with bike tracks over streets without, even though the speed might be the same, or slightly lower. the same goes for green routes, which people often prefer over a big road, even though the speed might be similar or lower.
one way it could be done simply is by hardcoding the tag combinations in osrm, but allowing the weight to be set in the speedprofile. something like:
if(accesTag=='bicycle' && cycleway=='track')
attractiveness = w.keyVals.Find("bike_track_attractiveness"); //value set in speedprofile, say 1.4
else if(accesTag=='bicycle' && cycleway=='lane')
attractiveness = w.keyVals.Find("bike_lane_attractiveness"); //value set in speedprofile, say 1.2
else if(accesTag=='bicycle' && route != nil)
attractiveness = w.keyVals.Find("bike_route_attractiveness"); //value set in speedprofile, say 1.5
//other cases goes here....
else
attractiveness = 1.0;