How to using road vehicle for multi profile

I want to create mutil profile (bus, motorcyle, truck), these base on roads vehicle.
How can i config this in config.yml
If i use: roads|transportation_mode=MOTORCYCLE, roads|transportation_mode=BUS
then it throw Exception: Duplicate vehicle: roads in roads|transportation_mode=BUS
I cant find any document show detail how to config graph.vehicles, whats is | in config
Appreciate any help

Can you try the name option like this:

graph.vehicles: roads|name=motorcycle|transportation_mode=MOTORCYCLE, roads|name=bus|transportation_mode=BUS

(this is a bit ugly but will change soonish)

and then use vehicle: motorcycle (or vehicle: bus) instead of vehicle: roads in the profile definition.

1 Like

thankiu so much,

I just try: graph.vehicles: roads|name=motorcycle|turn_costs=true|transportation_mode=MOTORCYCLE, roads|name=truck|turn_costs=true|transportation_mode=HGV, roads|name=bus|turn_costs=true|transportation_mode=BUS
but i get this exeption:

java.lang.IllegalArgumentException: Duplicate vehicle: roads in:  roads|name=truck|turn_costs=true|transportation_mode=HGV

Sorry then for my misleading information. I fear it is currently not possible and you can only use roads with the same turn restrictions (transportation_mode only influences turn restrictions currently). But as we are in process of refactoring this `vehicles´ information it will be fixed in a few months.

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