Locked Shift Task Requirements Check
Locked-shift-task-requirements-check
Identifies locked shifts that have tasks defined on them with minimum/maximum duration or cooldown requirements that are violated. Instances of these will be returned as a warning.
The solver can run when such a locked shift is in the payload, but a full demand cover won't be possible for this shift: the solver can at best make a partial demand cover such that the task requirements are not violated.
The result is returned as a warning in the feasibility response.
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"
]
}
]
}
The following fields are used in the "violation" object:
- taskId
- lockedShiftName
- employeeId
- violatedProperties
The following payload illustrates what the response looks like for a payload with a locked shift that violates the minimum duration and the cooldown requirements of a task.
In this example, we illustrate a payload that will cause a warning in the feasibility check. The payload contains a locked shift working on task-1 for employee 1, which will cause a warning as it violates task requirements.
Task-1 has the following requirements:
- At least 15 consecutive minutes have to be worked on the task.
- At most 60 consecutive minutes can be worked on the task.
- There should be at least 30 minutes between periods of working on task-1.
The locked shift that is defined for employee-1 violates the minimum duration and cooldown of task-1. The first interval of the shift only works 10 minutes on the task, which is below the required 15. Also, there are 20 minutes between the two intervals working on task-1, which is less than the required 30.
The response will contain a warning for task-1 and the locked shift, which includes the violated properties of the task: MIN and COOLDOWN.
- Payload
- Response
{
"jobInfo": {
"id": "xxx",
"organisationId": "xxx",
"scheduleType": "RECURRING",
"demandType": "TIME_DEMAND",
"planningHorizon": {
"startDate": "2022-01-01",
"nrOfWeeks": 1,
}
},
"shifts": [
{
"id": "shift-min-and-cooldown-violated",
"intervals": [
{
"startTime": "00:00",
"endTime": "00:10",
"dayIndicator": 0,
"workTypeId": "1",
"taskId": "task-1"
},
{
"startTime": "00:30",
"endTime": "01:30",
"dayIndicator": 0,
"workTypeId": "1",
"taskId": "task-1"
}
]
}
],
"employees": [
{
"id": "employee-1",
"scheduledShifts": [
{
"shiftId": "shift-min-and-cooldown-violated",
"locked": true,
"scheduleDays": {
"dates": [
"2022-10-03"
]
}
}
]
}
],
"timeSlots": [
{
"id": "00:00_00:10",
"startTime": "00:00",
"endTime": "00:10",
"workTypeId": "1",
"taskId": "task-1"
},
{
"id": "00:30_01:30",
"startTime": "00:30",
"endTime": "01:30",
"workTypeId": "1",
"taskId": "task-1"
}
],
"demands": [
{
"days": {
"dates": [
"2022-10-03"
]
},
"timeDemands": [
{
"timeSlotId": "00:00_00:10",
"ideal": 1
},
{
"timeSlotId": "00:30_01:30",
"ideal": 1
}
]
}
],
"configuration": {
"workTypes": [
{
"id": "1",
"name": "WORK",
"factor": 1.0
}
]
},
"tasks": [
{
"id": "task-1",
"minMinutes": 15,
"maxMinutes": 60,
"cooldownMinutes": 30
}
]
}
{
"title":"Locked-shift-task-requirements-check",
"category":"WARNING",
"description":"If there is a locked shift with a task with a min/max/cooldown requirement that is violated when executed, this locked shift and task are returned as a warning. The solver can run with such a locked shift in the payload, but it will find a (partial) demand cover such that the task requirements are met.",
"violations":[
{
"taskId": "task-1",
"lockedShiftName": "shift-min-and-cooldown-violated",
"employeeId": "employee-1",
"violatedProperties": [
"MIN",
"COOLDOWN"
]
}
]
}