The solution endpoint returns the solution of the solve job. It contains the score, the trips and the violations.
NameTypeDescription
idstringId of the solve job
statusStringStatus of the Response (QUEUED, SOLVING, SOLVED or ERROR)
score[Score]Score tells you how good a solution is.
trips[Trip]Actual solution: trips per workingtime/day and per resource
totalWaitTimeInSecondsintegerWait time for all resources
totalTravelTimeInSecondsintegerTravel time for all resources
totalTravelDistanceInMetersintegerTravel distance for all resources
totalServiceTimeInSecondsintegerService time for all resources
unserved[string]When options.partialPlanning is set, then this might result in a list of jobs that are unserved and not in the planning.
unservedReasonsobjectMap of job names to reasons why they could not be served
violations[Violation]A constraint that is broken in the current solution with a certain value (penalty) and a certain level (hard, soft, medium).
workloadFairnessnumberHow fair a certain workload is divided over the resources (0-1, where 1 is perfectly fair).
occupancynumberHow full this schedule is in terms of work time (incl travel) over capacity. Eg 0.80 for 80%
messages[string]Events and warnings generated during the solver execution
suggestions[Suggestion]List of suggested assignments returned by suggest api call
Example:
solution
{
  "id": "0000-00000-00000-0000",
  "score": {
    "hard": 0,
    "soft": -6924,
    "feasible": true
  },
  "trips": [
    {
      "visits": [
        {
          "arrival": "2023-01-13T08:44:54",
          "job": "JOB-6",
          "location": "50.89633806889935;4.45161298168845"
        },
        {
          "arrival": "2023-01-13T10:21:25",
          "job": "JOB-5",
          "location": "50.94837893617721;4.001604640663746"
        },
        {
          "arrival": "2023-01-13T11:55:17",
          "job": "JOB-10",
          "location": "50.78868282668716;4.167956383823208"
        }
      ],
      "resource": "R-1",
      "date": "2023-01-13",
      "departureTime": "2023-01-13T08:00:00",
      "waitTime": 0,
      "travelTime": 6917,
      "workTime": 17717,
      "serviceTime": 10800
    }
  ],
  "totalTravelTimeInSeconds": 6917,
  "totalServiceTimeInSeconds": 10800,
  "workloadFairness": 0.5,
  "unserved": [
    "JOB-1",
    "JOB-2",
    "JOB-3",
    "JOB-4",
    "JOB-7",
    "JOB-8",
    "JOB-9"
  ],
  "status": "SOLVED",
  "occupancy": 0.65,
  "messages": ["Solution found in 2.5 seconds"],
  "unservedReasons": {
    "JOB-1": ["DATE_TIME_WINDOW_CONFLICT"],
    "JOB-2": ["NO_MATCHING_TAGS"]
  }
}

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