Custom Model uses not allowed turn

here’s my configuration:
graph.flag_encoders: car|turn_costs=true

  - name: car
    vehicle: car
  turn_costs: true
  weighting: fastest
  - name: car100
    vehicle: car
  turn_costs: true
  weighting: custom
  custom_model_file: car100.yml

this is the configuration of car100.yml

max_speed: {
  road_class: {
    motorway: 100,
  trunk: 100,
  primary: 90,
  secondary: 90,
  tertiary: 90
distance_influence: 7

using profile car following correct route is generated:

using profile car100 following route is generated:
this route is not correct, as the sharp left turn is nott allowed

What do i have to change in my configuration, that profile car100 generates a correct route?

The indentation in your profile definition looks a bit off? turn_costs etc. should be on the same level as name and vehicle. But I don’t know why car is working and car100 is not. Can you try changing the weighting for car100 to fastest (make it identical to the car profile)? Does it work then? What does your request look like?

yes you’re right, i posted a wrong indentation.
In my configuration-file it’s correct.
configuration car100

if i set the weighting of the profile “car100” to “fastest”,
isn’t this profile then indentical to profile “car”?
I thought using “custom_model_file” is only possible when using “custom” for weighting.
Anyway, i tried it.
Now a correct route is generated.
But now my model-file is not used any more.

This is my request:

Yes this was my point I was just wondering if something else does not work. But if you get the right route when you set it to ‘fastest’ this really means that the turn restrictions are violated when you set it to ‘custom’.

Can you try changing your custom model file? What happens when it is empty?


if the model-file is empty, i get an exception:

Ok yes your model file is already quite small so probably this is not the problem. Can you paste your entire config.yml file here?

here it is
austria.yml.txt (10.4 KB)

i just added another extension, that i can upload it.

Hm, this looks fine. Maybe you changed to turn_costs: true after you ran the import? Can you delete/rename the graph-cache folder and run the import again?

This seems to be a bug. ->

1 Like

I fixed this here:


I never thought, to find a bug during my first tests.

As i did not setup my ide for graphhopper yet:
When will this bug-fix released and can be downloaded at

I just released GH 2.2 including the fix. You can find the release here:

1 Like

Works perfect!

Thank you very much!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.