Special start/end groups error when all services are pre-assigned

Hi,

There seems to be an issue with the special “start” & “end” groups when there are multiple vehicles in the optimization request and all the services have allowed_vehicles set to a single driver (i.e. every service is pre-assigned).

When every service is pre-assigned and there are multiple drivers then the following error is returned:

{
  "message": "JSON input could be read, but there has been an error to create the problem e6f9b5ab-b9be-4039-bcc9-9ccfe6eab76c",
  "hints": [
    {
      "message": "Group [start] in group relation does not exist in jobs, i.e. it has never been specified.",
      "details": ""
    }
  ],
  "status": "finished"
}

If there is only a single vehicle or any service has its allowed_vehicles removed then the request succeeds. There doesn’t appear to be any workaround.

I’ve attached the simplest request I can find that reproduces the problem. All the services have been preassigned to a single driver, but the issue happens if there are some services assigned to the 2nd driver too.

request.txt (4.4 KB)

I was able to workaround it by adding a “dummy” service that isn’t assigned to anyone, e.g. just:

    {
      "id": "dummy_service"
    }

This allows it to get past the validation and continue with the request. Though I expect this ruins any performance optimizations that happen by running each vehicle in parallel.

Oh … I will check this asap. Thanks a lot!

One workaround could be to use the “in_same_route” relation instead of allowed_vehicles and assign the vehicle_id. (but maybe the same problematic check is done. have not tried it yet.)

This is fixed now! Thanks again for your report (including the buggy request and response).

Great, thank you for your help!

1 Like