Turn restrictions revisitied

Hello folks,

I am pretty shure everyone is tired of this, but even after reading quite some posts about routing, turn restrictions and the “ferry” workaround I still have the question: Why is the option optimized=false not set in the standard “no option” routing?

Particulalry I have a small example route example route, in which the turn is absolutely wrong as you can see in the image below:

Is there a technical reason or what would be the side effects if this flag is set to false? It must be a conscious decision not to do it.

Regards,
Kai

Hi,

in general, the optimised parameter basically tells the routing engine not to use any of the pre-processed optimisation algorithms, which are what allow the generation of routes very quickly. When you set it to be false, the system drops down to a more flexible, but much slower algorithm, which in turn means that there are much more restrictions as to the distance of routes that can be generated.

Turn restrictions are currently only taken into account when the more flexible (but slower) algorithm is used, which happens to be the case when you do things like avoid ferries.

So in summary, the reason for having optimisation set to true by default is that it reduces server load, allows faster and longer route generation, and in most cases it produces correct results.

Anyone who knows more about the details (@andrzej @HendrikLeuschner ) feel free to correct what I have said.