Name | Type | Description |
---|---|---|
score | Score | Score |
conflicts | Conflict | Conflicts |
unresolved | Unresolved | Unresolved constraints |
alternatives | Alternative | Alternative assignments when explanation is enabled (optional) |
explanation
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
The following constraints can appear in the explanation response:Name | Description | Impact |
---|---|---|
TRIP_CAPACITY | Vehicle capacity exceeded for a trip | hard |
RESOURCE_CAPACITY | Resource capacity exceeded | hard |
RESOURCE_CAPACITY2 | Secondary resource capacity exceeded | hard |
TRAVEL_TIME | Travel time optimization | soft |
TYPE_REQUIREMENT | Job type requirements not met by resource | hard |
TAG_SOFT | Soft tag preference not satisfied | soft |
TAG_HARD | Hard tag requirement not satisfied | hard |
TYPE_REQUIREMENT_SOFT | Soft type requirement not satisfied | soft |
END_LOCATION_TRAVEL_TIME | Travel time from last job to end location | soft |
TIME_WINDOW_CONFLICT | Job scheduled outside its time window | hard |
SHIFT_END_CONFLICT | Job extends beyond resource shift end time | hard |
OVERTIME_END_CONFLICT | Job extends beyond overtime limit | hard |
RESOURCE_USAGE | Resource usage optimization | medium |
URGENCY | Urgent job scheduling priority | soft |
PREFERRED_RESOURCE_CONFLICT | Job not assigned to preferred resource | soft |
ALLOWED_RESOURCES | Job assigned to non-allowed resource | hard |
DISALLOWED_RESOURCES | Job assigned to disallowed resource | hard |
REGION_TIME | Regional time constraint violation | soft |
FAIR_WORK | Work distribution fairness across resources | soft |
UNSERVED_JOBS | Jobs that could not be scheduled | medium |
RESOURCE_ACTIVATION | Resource activation cost | medium |
OPEN_DAYS | Resource scheduled on non-working day | hard |
JOB_PRECEDENCE | Job precedence order violated | hard |
JOB_DAY_INDEX | Job not scheduled on required day | soft |
DATE_TIME_WINDOW_CONFLICT | Job scheduled outside date/time window | hard |
DATE_TIME_WINDOW_CONFLICT_SOFT | Soft date/time window preference not met | soft |
LINKED_JOB_CONFLICT | Linked jobs constraint violation | hard |
PLANNED_RESOURCE | Job not assigned to planned resource | soft |
PLANNED_ARRIVAL | Job arrival time differs from planned | soft |
PLANNED_DATE | Job scheduled on different date than planned | soft |
WORKING_TIME | Total working time constraint | soft |
HARD_JOBS | Hard job requirement not satisfied | hard |
MAX_DRIVE_TIME | Maximum drive time per resource exceeded | hard |
MAX_DRIVE_TIME_JOB | Maximum drive time per job exceeded | hard |
FAIR_TOTAL_WORK | Total work fairness across resources | soft |
RESOURCE_PERIOD_MAX_SERVICE_TIME | Maximum service time per period exceeded | hard |
RESOURCE_PERIOD_MAX_DRIVE_TIME | Maximum drive time per period exceeded | hard |
RESOURCE_PERIOD_MAX_WORK_TIME | Maximum work time per period exceeded | hard |
RESOURCE_PERIOD_MIN_SERVICE_TIME | Minimum service time per period not met | soft |
RESOURCE_PERIOD_MIN_DRIVE_TIME | Minimum drive time per period not met | soft |
RESOURCE_PERIOD_MIN_WORK_TIME | Minimum work time per period not met | soft |
MINIMISE_TRIP_USAGE | Trip usage minimization | soft |
DELIVERY_NOT_ON_SAME_VEHICLE | Pickup and delivery not on same vehicle | hard |
DELIVERY_BEFORE_PICKUP | Delivery scheduled before pickup | hard |
SAME_TRIP | Jobs must be on same trip | hard |
SEQUENCE | Job sequence constraint | hard |
SAME_TIME | Jobs must be at same time | hard |
NEIGHBOR | Jobs must be neighbors in sequence | hard |
DIRECT_SEQUENCE | Jobs must be in direct sequence | hard |
SAME_RESOURCE | Jobs must be assigned to same resource | hard |
WAIT_TIME | Wait time optimization | soft |
DRIVE_TIME | Drive time optimization | soft |
Explains the conflicts of a certain routing solution and the unresolved constraints.
Score of the solution.
Conflicts in the solution
Examples:
{
"constraint": "TIME_WINDOW_CONFLICT",
"score": "-1000",
"job": "Job-1",
"resource": "vehicle-1"
}
Unresolved constraints in the solution
Examples:
{
"constraint": "TRAVEL_TIME",
"score": "-1500"
}
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.
Examples:
{
"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
}
}
]
}