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.

NameTypeDescription
scoreScoreScore
conflictsConflictConflicts
unresolvedUnresolvedUnresolved constraints
alternativesAlternativeAlternative assignments when explanation is enabled (optional)

Example:

explanation
{
  "score": {
    "hard": 0,
    "soft": -6924,
    "feasible": true
  },
  "unresolved": [
    {
      "constraint": "JOB_DAY_INDEX",
      "score": "-7soft"
    },
    {
      "constraint": "TRAVEL_TIME",
      "score": "-6917soft"
    },
    {
      "constraint": "UNUSED_RESOURCES",
      "score": "-25200medium"
    }
  ]
}

Unresolved

NameTypeDescription
constraintstringRouting constraint name
scorestringscore of this constraint

Conflict

NameTypeDescription
constraintRoutingConstraintRouting constraint name
scorestringscore of this constraint
jobstringjob name in this conflict
resourcestringresource name in this conflict
tagstringtag name in this conflict

Constraint

The following constraints can appear in the explanation response:

NameDescriptionImpact
TRIP_CAPACITYVehicle capacity exceeded for a triphard
RESOURCE_CAPACITYResource capacity exceededhard
RESOURCE_CAPACITY2Secondary resource capacity exceededhard
TRAVEL_TIMETravel time optimizationsoft
TYPE_REQUIREMENTJob type requirements not met by resourcehard
TAG_SOFTSoft tag preference not satisfiedsoft
TAG_HARDHard tag requirement not satisfiedhard
TYPE_REQUIREMENT_SOFTSoft type requirement not satisfiedsoft
END_LOCATION_TRAVEL_TIMETravel time from last job to end locationsoft
TIME_WINDOW_CONFLICTJob scheduled outside its time windowhard
SHIFT_END_CONFLICTJob extends beyond resource shift end timehard
OVERTIME_END_CONFLICTJob extends beyond overtime limithard
RESOURCE_USAGEResource usage optimizationmedium
URGENCYUrgent job scheduling prioritysoft
PREFERRED_RESOURCE_CONFLICTJob not assigned to preferred resourcesoft
ALLOWED_RESOURCESJob assigned to non-allowed resourcehard
DISALLOWED_RESOURCESJob assigned to disallowed resourcehard
REGION_TIMERegional time constraint violationsoft
FAIR_WORKWork distribution fairness across resourcessoft
UNSERVED_JOBSJobs that could not be scheduledmedium
RESOURCE_ACTIVATIONResource activation costmedium
OPEN_DAYSResource scheduled on non-working dayhard
JOB_PRECEDENCEJob precedence order violatedhard
JOB_DAY_INDEXJob not scheduled on required daysoft
DATE_TIME_WINDOW_CONFLICTJob scheduled outside date/time windowhard
DATE_TIME_WINDOW_CONFLICT_SOFTSoft date/time window preference not metsoft
LINKED_JOB_CONFLICTLinked jobs constraint violationhard
PLANNED_RESOURCEJob not assigned to planned resourcesoft
PLANNED_ARRIVALJob arrival time differs from plannedsoft
PLANNED_DATEJob scheduled on different date than plannedsoft
WORKING_TIMETotal working time constraintsoft
HARD_JOBSHard job requirement not satisfiedhard
MAX_DRIVE_TIMEMaximum drive time per resource exceededhard
MAX_DRIVE_TIME_JOBMaximum drive time per job exceededhard
FAIR_TOTAL_WORKTotal work fairness across resourcessoft
RESOURCE_PERIOD_MAX_SERVICE_TIMEMaximum service time per period exceededhard
RESOURCE_PERIOD_MAX_DRIVE_TIMEMaximum drive time per period exceededhard
RESOURCE_PERIOD_MAX_WORK_TIMEMaximum work time per period exceededhard
RESOURCE_PERIOD_MIN_SERVICE_TIMEMinimum service time per period not metsoft
RESOURCE_PERIOD_MIN_DRIVE_TIMEMinimum drive time per period not metsoft
RESOURCE_PERIOD_MIN_WORK_TIMEMinimum work time per period not metsoft
MINIMISE_TRIP_USAGETrip usage minimizationsoft
DELIVERY_NOT_ON_SAME_VEHICLEPickup and delivery not on same vehiclehard
DELIVERY_BEFORE_PICKUPDelivery scheduled before pickuphard
SAME_TRIPJobs must be on same triphard
SEQUENCEJob sequence constrainthard
SAME_TIMEJobs must be at same timehard
NEIGHBORJobs must be neighbors in sequencehard
DIRECT_SEQUENCEJobs must be in direct sequencehard
SAME_RESOURCEJobs must be assigned to same resourcehard
WAIT_TIMEWait time optimizationsoft
DRIVE_TIMEDrive time optimizationsoft

Explains the conflicts of a certain routing solution and the unresolved constraints.