[Bug] Optimization unassigning stops incorrectly

Hi,

We are experiencing an issue with this route optimization request. There are 2 groups (next & high) and a bunch of ungrouped services that we’d expect to be added to the end of the route due to this relation:

  "relations": [
    {
      "groups": [
        "start",
        "next",
        "high"
      ],
      "type": "in_direct_sequence"
    }
  ],

However all of the next services are unassigned with the following reason:

could not be assigned due to group relation constraint

But it is not clear why that would be happening as the optimization should be able to find a route to all of the services and there are no time window constraints. For some unknown reason if you remove this specific ungrouped service which is the furthest away then it is able to include the other next services.

    {
      "address": {
        "curbside": "any",
        "lat": 49.0301166,
        "location_id": "CK5DS3KtmKqk6z9q7rMq",
        "lon": -117.5032567,
        "name": "Seven Mile Dam, Fruitvale, Kootenay Boundary",
        "street_hint": "Seven Mile Dam"
      },
      "allowed_vehicles": [],
      "duration": 180,
      "id": "CK5DS3KtmKqk6z9q7rMq",
      "name": "Seven Mile Dam, Fruitvale, Kootenay Boundary",
      "priority": 1,
       "size": [
        1
      ],
      "time_windows": []
    },

I’ve attached the request to reproduce the issue, and here is an example job ID: 7096c006-20eb-4461-97fd-530f59d680dd.

request.txt (30.6 KB)

Ok. This should not happen. I will analyze and fix it.

This should finally be fixed now. In the process, we have made the solution method for problems with in_sequence relation and a single vehicle significantly faster. This means, for example, that simple lookups for a new service in an already planned/fixed tour can be done much more quickly.

1 Like