Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to mix vehicles with and without skills #586

Closed
louisnow opened this issue Oct 1, 2021 · 3 comments · Fixed by #587
Closed

Unable to mix vehicles with and without skills #586

louisnow opened this issue Oct 1, 2021 · 3 comments · Fixed by #587

Comments

@louisnow
Copy link

louisnow commented Oct 1, 2021

{
  "vehicles": [
    {
      "id": 0,
      "profile": "car",
      "start_index": 0,
      "capacity": [],
      "skills": [123],
      "time_window": [1621490400, 1621533600],
      "end_index": 5
    },
    {
      "id": 1,
      "profile": "car",
      "start_index": 1,
      "capacity": [],
      "skills": [],
      "time_window": [1621490400, 1621533600],
      "end_index": 6
    }
  ],
  "jobs": [
    {
      "id": 2,
      "location_index": 2,
      "service": 900,
      "skills": [123],
      "time_windows": [[1621490400, 1621532700]]
    },
    {
      "id": 3,
      "location_index": 3,
      "service": 900,
      "skills": [],
      "time_windows": [[1621490400, 1621532700]]
    },
    {
      "id": 4,
      "location_index": 4,
      "service": 900,
      "skills": [],
      "time_windows": [[1621490400, 1621532700]]
    }
  ],
  "shipments": [],
  "matrices": {
    "car": {
      "durations": [
        [0, 4977, 4621, 2221, 8121, 9400, 5620],
        [4991, 0, 2052, 4513, 6844, 7040, 2730],
        [4469, 1962, 0, 3623, 5828, 5990, 1845],
        [2219, 4560, 3844, 0, 6564, 7834, 4842],
        [8124, 6816, 5612, 6495, 0, 3043, 5405],
        [9376, 7027, 5181, 7746, 3014, 0, 5448],
        [5581, 2846, 1229, 4734, 5312, 5550, 0]
      ]
    }
  },
  "options": {
    "c": false
  }
}

Currently the API fails saying missing skills.

If we remove '123' from vehicle 0, the API does not error.
If I instead add a dummy skill '456' to vehicle 1, it again does not error either.

I want to be able to say jobs with no skills can be serviced by any vehicle with or without skills. So vehicle 1 or vehicle 0 can service jobs with no skills.

As a workaround I currently add a default skill to all vehicles and to those jobs that have no skills. This allows no skilled jobs to be serviced by any vehicle.

@jcoupey
Copy link
Collaborator

jcoupey commented Oct 4, 2021

Thanks for reporting, this was supposed to be enabled via #482 which introduced changes removing raising an error. But for some reason, the merge commit 1e32124 does not contain all changes. I guess there were conflicts and I messed things up.

I'll tag this as a regression though it's rather a feature-never-went-through problem and I'll cherry-pick the changes in a new branch.

@jcoupey jcoupey added this to the v1.11.0 milestone Oct 4, 2021
@jcoupey jcoupey changed the title Bug: Unable to mix vehicles with and without skills Unable to mix vehicles with and without skills Oct 4, 2021
@jcoupey
Copy link
Collaborator

jcoupey commented Oct 4, 2021

Fun fact: part of the changes were actually applied so empty skills are allowed for tasks, but not for vehicles...

@jcoupey
Copy link
Collaborator

jcoupey commented Oct 4, 2021

The change in the feature/multi-profile branch at 415f563 actually kept the empty array check which I removed again in #587.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants