Schemas
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.
Example:
explanation
Unresolved
Conflict
Alternative
Thealternatives field is a map keyed by job name; each value is a list of assignments (Alternative) showing where else that job could go and what it would cost.
Constraint
The following constraints can appear in the explanation response:Explains the conflicts of a certain routing solution and the unresolved constraints.
Score of the solution.
Conflicts in the solution
- object[]
- object
Example:
Unresolved constraints in the solution
- object[]
- object
Example:
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.
Example: