Integrating with the Feasibility Check
Responses from the feasibility check are based on a unified interface of properties that are common to various types of infeasibilities.
This approach involves grouping all properties that might indicate a warning or flaw in the schedule under a single "Violation" object in the response.
For all of the feasibility checks, we will specify in the documentation which values are used.
The current exhaustive list of all properties available is listed below.
Property | Type | Description |
---|---|---|
Day | integer | Represents a specific day in the roster, when scheduling with a recurring schedule type. (If scheduling 30 days, this value ranges from 0 → 29) |
Date | date | Denotes a specific date in the roster, when scheduling with the calendar schedule type. |
DemandSegment | object | Contains the StartTime, EndTime, and MinDemand for a demand segment. This specifies a specific demand segment in the roster, usually a reference to uncovered demand. |
Shift | string | Represents a shift with specific properties such as Name, WeekendNumber, RequiredEmployees, EmployeeNumber, RequiredMinutes, AchievableMinutes, StartTime, EndTime, MnAssignment, TaskId, WorkType, NumberOfEmployees, MissingMinutes, TotalMinutes. Each of these properties provides further specifics about the violation. |
WeekendNumber | integer | Represents the weekend number in Demand-weekend-covered-by-employees-check - it is very specific to this check, and may be refactored in the near-future. |
RequiredEmployees | integer | Represents the number of employees - often for what is required to cover a demand segment. |
EmployeeNumber | string | Refers to specific employees. |
RequiredMinutes | integer | Represents the number of minutes required in the violation. |
AchievableMinutes | integer | Represents the number of minutes that are reachable in the violation. |
StartTime | string | Represents the start time of the violation. |
EndTime | string | Represents the end time of the violation. |
Assignment | string | Refers to a specific assignment |
WorkType | string | Refers to the type of work. |
NumberOfEmployees | integer | Represents the number of employees in the violation. |
MissingMinutes | integer | Represents the number of minutes missing in the violation. |
TotalMinutes | integer | Represents the total number of minutes in the violation. |
MissingEmployeesDueToWeekendDistribution | integer | Represents the number of missing employees due to weekend distribution. (subject to be changed soon, and replaced with missingEmployees) |
Perhaps more to come as we expand the checks... |
This structure allows for the addition of new checks in the future without altering the response format. Thus, integrators can easily adapt to changes. Descriptions for each check are provided to aid in understanding new checks without the need for immediate integration.
This ensures backward compatibility without requiring changes to the integrator's code or versioning.
This is also why we add a description to all of our checks, which, in the case you haven't gotten around to translating yet (if the check is new), can be used to understand the issue. This way, you don't necessairly have to discard new checks that you haven't integrated yet - you can just receive them as all the properties are known to you.
This allows the service to be backwards compatible without any changes to the integrator's code, and without versioning.
In the future, there will be changes to the violation objects, and you, as a integrator, will have to expand the fields of your parsing, however, this will be communicated in due time.
Breakdown Warning & Infeasibility
Warnings and infeasibilities share the same structure but differ in their type.
It's recommended to review the feasibility checks to identify any that are considered infeasibilities, such as the Cyclic-connected-shifts-Check
, which prevents the solver from scheduling a shift.
Properties
- Title (type: string): The name or identifier for the specific warning or infeasibility, for example
Demand-weekend-covered-by-employees-check
. - Category (type: string):
Warning
orInfeasibility
- Description (type: string): A detailed description about the check.
- Violations (type: array): An array of Violation objects detailing specific instances of the issue (shown above).
Which type of checks are warnings, and which are infeasibilities, are defined in the title of the response schema as enums.
Infeasibility Response Schema
title required | string Enum: "Cyclic-connected-shifts-Check" "Prioritization-hard-constraint-locked-shift-check" |
category required | string This category is always set to INFEASIBILITY |
description required | string |
required | Array of objects (violation) |
{- "title": "Cyclic-connected-shifts-Check",
- "category": "string",
- "description": "string",
- "violations": [
- {
- "day": 0,
- "date": "2019-08-24",
- "demandSegment": {
- "startTime": 0,
- "endTime": 0,
- "minDemand": 0,
- "timestamp": "string"
}, - "shift": {
- "name": "string"
}, - "weekendNumber": 0,
- "requiredEmployees": 0,
- "missingEmployees": 0,
- "missingEmployeesDueToWeekendDistribution": 0,
- "employeeNumber": "string",
- "requiredMinutes": 0,
- "achievableMinutes": 0,
- "startTime": "string",
- "endTime": "string",
- "personnelGroup": "string",
- "assignment": "string",
- "taskId": "string",
- "competencies": [
- "string"
], - "workType": "string",
- "numberOfEmployees": 0,
- "missingMinutes": 0,
- "totalMinutes": 0,
- "constraintId": "string",
- "lockedShiftName": "string",
- "employeeId": "string",
- "violatedProperties": [
- "MIN"
]
}
]
}
Warning response schema
title required | string Enum: "Employee-availability-check" "Demand-weekend-covered-by-employees-check" "Employee-minutes-weekly-check" "Employee-minutes-entire-roster-check" "Demand-covered-by-shift-templates-check" "Shift-is-covered-by-demand-check" "Employee-assigned-to-shift-covers-demand-check" "Shift-Templates-are-demand-relevant-check" "Shift-utilization-minimum-occurrence-check" "Locked-shift-task-requirements-check" |
category required | string This category is always set to WARNING |
description required | string |
required | Array of objects (violation) |
{- "title": "Employee-availability-check",
- "category": "string",
- "description": "string",
- "violations": [
- {
- "day": 0,
- "date": "2019-08-24",
- "demandSegment": {
- "startTime": 0,
- "endTime": 0,
- "minDemand": 0,
- "timestamp": "string"
}, - "shift": {
- "name": "string"
}, - "weekendNumber": 0,
- "requiredEmployees": 0,
- "missingEmployees": 0,
- "missingEmployeesDueToWeekendDistribution": 0,
- "employeeNumber": "string",
- "requiredMinutes": 0,
- "achievableMinutes": 0,
- "startTime": "string",
- "endTime": "string",
- "personnelGroup": "string",
- "assignment": "string",
- "taskId": "string",
- "competencies": [
- "string"
], - "workType": "string",
- "numberOfEmployees": 0,
- "missingMinutes": 0,
- "totalMinutes": 0,
- "constraintId": "string",
- "lockedShiftName": "string",
- "employeeId": "string",
- "violatedProperties": [
- "MIN"
]
}
]
}
Sample Response Explanation
Now you should be ready to start diving into the feasibility check examples. All of our checks are documented and contain a sample payload/response. Enjoy the journey!
📄️ Integrating with the Feasibility Check
Guidelines on managing responses from the feasibility check.
📄️ Blocked employee feasibility check (Employee-availability-check)
The blocked employee feasibility check
📄️ Weekend demand coverage check (demand-weekend-covered-by-employees)
The weekend demand coverage check
📄️ Weekly employee minutes (Employee-minutes-weekly-check)
Checks if the roster is feasible with respect to the required employee minutes in a week.
📄️ Full roster employee minutes (Employee-minutes-entire-roster-check)
Checks if the roster is feasible with respect to the required employee minutes in the entire roster.
📄️ Shift template demand cover (Demand-covered-by-shift-templates-check)
Identifies the minimal intervals of demand that cannot be covered due to missing shift templates.
📄️ Shift Demand Coverage Check (Shift-is-covered-by-demand-check)
Identifies the minimum number of demand intervals that cannot be covered due to unavailable shifts.
📄️ Employee shift assignment feasibility check (Employee-assigned-to-shift-covers-demand-check)
This check determines if employee shift assignments meet demand intervals, highlighting any unsatisfied demands.
📄️ Demand relevant shift templates (Shift-Templates-are-demand-relevant-check)
Verifies if the existing demand can be satisfied by at least one shift generated from the shift template.
📄️ Connected Shift Infeasibilities (Cyclic-Connected-Shifts-Check)
Identifies cycles of shifts caused by NEXT and PREV shift constraints.
📄️ Prioritization Locked Shift Infeasibilities (Prioritization-hard-constraint-locked-shift-check)
Identifies locked shifts that have a priority of -1.
📄️ Locked Shift Task Requirements Check (Locked-shift-task-requirements-check)
Identifies locked shifts that have tasks defined on them with minimum/maximum duration requirements or cooldown requirements that are violated.