Optimization starting point

I would like the optimization service to select the best starting point based on jobs, but when I leave the start value blank / == None for vehicle(s), I receive the following error:

openrouteservice.exceptions.ApiError: 400 ({‘code’: 2, ‘error’: ‘No start or end specified for vehicle 1.’})

Going without vehicles also returns an error. From the API documentation, if I want the optimization process to select the starting point, I should leave the vehicle starting empty. FROM DOCUMENTATION:

Vehicle locations

  • if start is omitted, the resulting route will start at the first visited task, whose choice is determined by the optimization process

Hi @peterflier,

the documentation is a bit confusing here, but you have to either specify start or end for a vehicle (if one is set the other is optional …)

However, if you want all points to be optimized you could just take one point out of your job queue and specify it as the start and endpoint of the vehicle to do a roundtrip.

Not sure if there is a functionality to have a have any job as start or endpoint (which is probably not a common use-case). But for further in depth questions, better ask in the vroom git repo …

… which i just happened to check and found your problem. One guy has kind of a workaround, but normally that use-case is not solvable with vroom or our optimization endpoint

Best regards