Prioritization Locked Shift Infeasibilities
Prioritization-hard-constraint-locked-shift-check
Identifies locked shifts that have a hard priority of -1 defined in a prioritization constraint.
Instances of locked shifts with a priority of -1 are returned as an infeasibility in the feasibility response.
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"
]
}
]
}
The following fields are used in the "violation" object:
- shift
- name
In this example, we illustrate a payload that will cause an infeasibility through locking a shift and assigning a priority of -1.
Shift A is a locked shift for employee 1, meaning that this shift assignment cannot be removed by the solver. In the PrioritizationConstraint there is a priority of -1 set for employee 1 and shift A, meaning that the shift cannot be assigned to employee 1 under any circumstance.
This contradiction is identified by the feasibility check and is reported as a violation.
- Payload
- Response
{
"jobInfo": {
"id": "xxx",
"organisationId": "xxx",
"scheduleType": "RECURRING",
"demandType": "TIME_DEMAND",
"planningHorizon": {
"startDate": "2022-01-01",
"nrOfWeeks": 1,
}
},
"shifts": [
{
"id": "A",
"shiftTypes": [
"DAY"
],
"intervals": [
{
"startTime": "09:00",
"endTime": "19:00",
"dayIndicator": 0,
"workTypeId": "1"
}
]
}
],
"employees": [
{
"id": "1",
"scheduledShifts": [
{
"shiftId": "A",
"locked": true,
"scheduleDays": {
"dayIndexes": [0]
}
}
]
}
],
"demands": [
{
"days": {
"dayIndexes": [0, 1]
},
"shiftDemands": [
{
"shiftId": "A",
"ideal": 2
}
]
}
],
"constraints": {
"prioritizationConstraints": [
{
"id": "pc-123",
"weight": 100,
"employeeGroups": [
{
"employeeIds": ["1"]
}
],
"shiftGroups": [
{
"shiftIds": ["A"]
}
],
"scoreMatrix": [
[-1]
]
}
]
},
"configuration": {
"workTypes": [
{
"id": "1",
"name": "WORK",
"factor": 1.0
}
],
"weekend": {
"startWeekDay": 6,
"startTime": "00:00",
"endWeekDay": 7,
"endTime": "00:00"
}
}
}
{
"title":"Prioritization-hard-constraint-locked-shift-check",
"category":"INFEASIBILITY",
"description":"If there is a priority of -1 given for a locked shift, that shift is returned as an infeasibility. This is because it is not possible to have a locked shift where the assigned employee has a hard priority of -1.",
"violations":[
{
"shift":{
"name":"A"
}
}
]
}