You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am new to Itinero and route planners, and in my project I try to get the route planner to prefer the current road number. So I want to add a “penalty” to turning off the current road number. We have already used the road classifications in the lua file to get the route planner to prefer some types of roads, however I am unable to see if it is possible in the lua profile to calculate the factor based on current road number and increase the cost of turning off the road.
I have investigated creating a CustomWeightHandler for this? But I am unsure if this is the right approach or even possible.
We have genereated our own routerdb file with road number and road category as some of the edge attributes
Any pointers would be helpful! Thanks!
The text was updated successfully, but these errors were encountered:
See turnPenalty in the source code and example is @ #307 I think
//Indicate no turns are preferred
const float?[] NoPreferredTurns = null;
//Try to calculate a route without any u turns
var route = Router.TryCalculate(profile, routerPoints, float.MaxValue, NoPreferredTurns, cancellationToken);
Hi, I am new to Itinero and route planners, and in my project I try to get the route planner to prefer the current road number. So I want to add a “penalty” to turning off the current road number. We have already used the road classifications in the lua file to get the route planner to prefer some types of roads, however I am unable to see if it is possible in the lua profile to calculate the factor based on current road number and increase the cost of turning off the road.
I have investigated creating a CustomWeightHandler for this? But I am unsure if this is the right approach or even possible.
We have genereated our own routerdb file with road number and road category as some of the edge attributes
Any pointers would be helpful! Thanks!
The text was updated successfully, but these errors were encountered: