Enable Explanation
Add the explanation option to your request:Solution Response
The solver assignsshift-1 to Alice since she has the required bar skill:
Unserved Reasons
When explanation is enabled, unassigned shifts also get their blocking hard constraints reported directly on the solve response viaunservedReasons:
unservedReasons is only populated when options.explanation.enabled is true.Explanation Response
Request the explanation from/v2/fill/jobs/{id}/explanation:
Individual constraint violations contributing to the score
Human-readable description of the violated constraint
Related shift id, e.g. the second shift of a minimum-rest conflict
Aggregated constraints that could not be fully satisfied
Alternative Assignments
When explanation is enabled, the solver evaluates all possible employee-shift combinations:The alternatives show that assigning Bob would violate a hard constraint (skill mismatch), explaining why Alice was chosen.
Explanation Options
Enable post-processing to generate alternatives for each assignment
Exclude alternatives that violate hard constraints from the response
Compute alternatives only for shifts left unassigned, skipping already-filled shifts to reduce response size and solve time on large problems