GET
/
v2
/
vrp
/
jobs
/
{id}
/
solution
Solution
curl --request GET \
  --url https://api.solvice.io/v2/vrp/jobs/{id}/solution \
  --header 'Authorization: <api-key>'
{
  "id": "0000-00000-00000-0000",
  "status": "SOLVED",
  "score": {
    "hard": 0,
    "soft": -12345,
    "feasible": true
  },
  "trips": [
    {
      "resource": "vehicle-1",
      "date": "2023-01-13T00:00:00Z",
      "departureTime": "2023-01-13T08:00:00Z",
      "visits": [
        {
          "job": "Job-1",
          "arrival": "2023-01-13T08:30:00Z",
          "serviceTime": 600,
          "travelTime": 1800,
          "distance": 15000,
          "location": {
            "latitude": 51.0543,
            "longitude": 3.7174
          },
          "waitTime": 0
        }
      ],
      "waitTime": 0,
      "travelTime": 3600,
      "distance": 30000,
      "workTime": 4200,
      "serviceTime": 600,
      "occupancy": 0.47
    }
  ],
  "totalWaitTimeInSeconds": 0,
  "totalTravelTimeInSeconds": 3600,
  "totalTravelDistanceInMeters": 30000,
  "totalServiceTimeInSeconds": 600,
  "occupancy": 0.47,
  "workloadFairness": 0.95,
  "unserved": [],
  "suggestions": [],
  "messages": [
    "Solution found in 2.5 seconds"
  ]
}

Authorizations

Authorization
string
header
required

Api Key based authentication (apikey)

Path Parameters

id
string
required

Response

Status

OnRoute response from solve

trips
object[]
required

Actual solution: trips per shift/day and per resource

id
string | null

Id of the solve job

Examples:

"0000-00000-00000-0000"

status
enum<string> | null

Status of the Response Status of the solve job.

Available options:
ERROR,
QUEUED,
SOLVING,
SOLVED
Examples:

"SOLVED"

score
object | null

Score tells you how good a solution is. The score of a solution shows how good this solution is w.r.t all the constraints. All solvers try to maximize the score.

unresolved
any

Constraints that are violated

totalWaitTimeInSeconds
integer | null

Wait time for all resources

Examples:

123

occupancy
number | null

How full this schedule is in terms of work time (incl travel) over capacity. Eg 80%

Examples:

0.8

totalTravelDistanceInMeters
integer | null

Travel distance for all resources in meters

Examples:

123

totalTravelTimeInSeconds
integer | null

Travel time for all resources

Examples:

123

totalServiceTimeInSeconds
integer | null

Service time for all resources

Examples:

123

unserved
string[] | null

Unserved jobs

Examples:

"[job-1]"

unservedReasons
object | null

Reasons why jobs could not be served, mapped by job name

Examples:
{
"job-1": [
"DATE_TIME_WINDOW_CONFLICT",
"TRIP_CAPACITY"
]
}
suggestions
object[] | null

List of suggested assignments returned by suggest api call

messages
string[] | null

Events and warnings generated during the solver execution

violations
object[] | null
workloadFairness
number | null