VRP Response
Solution
The solution endpoint returns the solution of the solve job. It contains the score, the trips and the violations.
Name | Type | Description |
---|---|---|
status | String | Status of the Response (QUEUED , SOLVING , SOLVED or ERROR ) |
score | [Score] | Score tells you how good a solution is. |
unresolved | any | Constraints that are violated |
trips | [Trip] | Actual solution: trips per workingtime/day and per resource |
totalWaitTimeInSeconds | integer(int64) | Wait time for all resources |
totalTravelTimeInSeconds | integer(int64) | Travel time for all resources |
totalTravelDistanceInMeters | integer(int64) | Travel distance for all resources |
totalServiceTimeInSeconds | integer(int64) | Service 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. |
violations | [Violation] | A constraint that is broken in the current solution with a certain value (penalty) and a certain level (hard, soft, medium).] |
workloadFairness | number(double) | How fair a certain workload is divided over the resources. |
Example:
{
"score": {
"hardScore": 0,
"mediumScore": -25200,
"softScore": -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"
}
Score
Name | Type | Description |
---|---|---|
hardScore | integer(int64) | The score of the constraints that are hard. This should be 0 in order to be feasible. |
mediumScore | integer(int64) | The score of the constraints that are medium. |
softScore | integer(int64) | The score of the constraints that are soft. |
feasible | boolean | Feasibility of the solution is determined by the fact if there are violated hard constraints or not. |
Trip
Name | Type | Description |
---|---|---|
visits | Visit | Visits of the trip. |
resource | string | Resource name |
date | string | Date of the trip |
departureTime | string | Departure time of the trip |
waitTime | integer(int64) | Wait time of the trip |
travelTime | integer(int64) | Travel time of the trip |
workTime | integer(int64) | Work time of the trip |
serviceTime | integer(int64) | Service time of the trip |
Visit
Name | Type | Description |
---|---|---|
arrival | string | Arrival time of a job |
job | string | Job name |
location | string | Location of the visit |
Score
Explanation
The explanation endpoint returns the score and the constraints that are violated in the current solution.
It can give the insights into why a solve was like it is.
Name | Type | Description |
---|---|---|
score | Score | Score |
conflicts | Conflict | Conflicts |
unresolved | Unresolved | Unresolved constraints |
Example:
{
"score": {
"hardScore": 0,
"mediumScore": -25200,
"softScore": -6924,
"feasible": true
},
"unresolved": [
{
"constraint": "JOB_DAY_INDEX",
"score": "-7soft"
},
{
"constraint": "TRAVEL_TIME",
"score": "-6917soft"
},
{
"constraint": "UNUSED_RESOURCES",
"score": "-25200medium"
}
]
}
Unresolved
Name | Type | Description |
---|---|---|
constraint | string | Routing constraint name |
score | string | score of this constraint |
Conflict
Name | Type | Description |
---|---|---|
constraint | RoutingConstraint | Routing constraint name |
score | string | score of this constraint |
job | string | job name in this conflict |
resource | string | resource name in this conflict |
tag | string | tag name in this conflict |
Constraint
Name | Description | Impact |
---|---|---|
UNUSED_RESOURCES | There are resources that are not used. | medium |
JOB_DAY_INDEX | The job is not planned on the day it should be planned. | soft |
TRAVEL_TIME | The travel time is too long. | soft |
JOB_TIME_WINDOW | The job is not planned in the time window. | soft |
JOB_SKILLS | The job is not planned on a resource that has the required skills. | soft |
PRIORITY | A priority job that should be in the planning | soft |
Updated 6 months ago