v23

latestOpenAPI 3.1.0raw.githubusercontent.com2026-01-181345107.3 KB
Info

Explanation

Contains the explanation, once solved.

get/v2/vrp/jobs/{id}/explanation

Path parameters

idstring required

Response

Status

alternativesobject nullable

When options.explanation.enabled is set to true, this field will contain the alternatives for the solution.The key is the job name and the value is the list of assignments. Each assignment contains the resource, the date, and the score. In this way, you can check the impact of the alternative on the score.

Example response

{
  "score": {
    "hard": -2000,
    "soft": -15000,
    "feasible": false
  },
  "conflicts": [
    {
      "constraint": "TIME_WINDOW_CONFLICT",
      "score": "-1000",
      "job": "Job-1",
      "resource": "vehicle-1"
    },
    {
      "constraint": "TAG_HARD",
      "score": "-1000",
      "job": "Job-2",
      "resource": "vehicle-1",
      "tag": "electrical"
    }
  ],
  "unresolved": [
    {
      "constraint": "TRAVEL_TIME",
      "score": "-15000"
    }
  ],
  "alternatives": {
    "Job-1": [
      {
        "job": "Job-1",
        "resource": "vehicle-2",
        "suggestedArrival": "2023-01-13T09:30:00Z",
        "latestArrival": "2023-01-13T10:00:00Z",
        "executedAfter": "Job-0",
        "score": {
          "hard": 0,
          "soft": -1500,
          "feasible": true
        }
      }
    ]
  }
}