Hi there. I’m facing an issue regarding service priorities. When I establish a higher priority on a specific service, It doesn’t get placed before another with a lower priority. I’m testing really simple routes with only 2 stops and it’s not working.
As far as I understand, service with id = 1 should be placed in first place (higher priority), but the response always returns id = 0 in first place no matter it has a lower priority.
In general, the solution I’m looking for is getting the best route with the defined objectives, but with the restriction of forcing all higher priority services to be done before any of the lower priority services.
The priority is to with the allocation of eligible services into the schedule rather than the order of the services. See docs here: Documentation - GraphHopper Directions API
Priority: Specifies the priority. Can be 1 = high priority to 10 = low priority. Often there are more services/shipments than the available vehicle fleet can handle. Then you can set priorities to differentiate high priority tasks from those that could be left unassigned. i.e. the lower the priority the earlier these tasks are omitted in the solution.
The solution is trying to provide you the best route for all your services and all your services in the problem fit. If you want some services to be visited first I believe you will need to use timeWindows (see: Documentation - GraphHopper Directions API) and a high priority.