I start by using the config-example.yml file provided, so I only have a car profile, and I get a certain result when matching a given gpx file, which seems good to me.
I then just do the same with a custom config.yml, which is an exact copy of config-example.yml, except I add a new bike profile, in its most simple form, I then have in my profiles:
profiles:
- name: car
vehicle: car
weighting: fastest
- name: bike
vehicle: bike
weighting: fastest
I also add this profile to profiles_ch:
profiles_ch:
- profile: car
# - profile: car_with_turn_costs
- profile: bike
And then when I try to match the same gpx with the same profile (car), the output is different: it now avoids what was nearly a U-turn.
I don’t understand why adding a new profile changes the output of the other profile. Am i missing something?
When you add the bike profile some roads might be included that would not be included if you only used the car profile (those that cars are not allowed to drive on anyway). I think this can change the result in certain cases. Can you be more specific how the output changed? And maybe share your request so we can reproduce this?
I suppose it’s because profile with enabled turn costs has more priority (in case if under the hood both profiles has the same vehicle) and overrides flag encoder settings. but it’s only my suggestion.
No, I don’t think so. @alexfortoul said only a bike profile was added: bike+car gave different results than just car. And even if we had two car profiles, one with and one without turn costs, that would not really change anything. It’s true that in this case the (and there is only one) car flag encoder will include turn costs, but the profile without turn costs will/should still behave as if the other profile wasn’t there.
I am sorry for the (more than) very late reply - I had to focus on unrelated work, but now I’m back and I tried both the versions tagged 5.1 and 6.0 and I can confirm the problem still exists, if that helps in any way.