Connected Shift Infeasibilities
Cyclic-connected-shifts-Check
Identifies cycles of shifts caused by a combination of NEXT and PREV shift constraints.
If any cycles of shifts that are identified 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
Example
In this example, we illustrate a payload that will cause an infeasibility through a cycle.
There are three shifts, A, B, and C. Each shift is connected to the next shift, creating a cycle.
- Shift A is linked to Shift B
- Shift B is linked to Shift C
- Shift C is linked back to Shift A
This cycle is identified by the feasibility check and reported as a violation.
- Payload
- Response
Payload example
{
"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"
}
],
"connectedShiftsNextDay": {
"shiftIds": [
"B"
]
}
},
{
"id": "B",
"shiftTypes": [
"DAY"
],
"intervals": [
{
"startTime": "09:00",
"endTime": "19:00",
"dayIndicator": 0,
"workTypeId": "1"
}
],
"connectedShiftsPreviousDay": {
"shiftIds": [
"A"
]
},
"connectedShiftsNextDay": {
"shiftIds": [
"C"
]
}
},
{
"id": "C",
"shiftTypes": [
"DAY"
],
"intervals": [
{
"startTime": "09:00",
"endTime": "19:00",
"dayIndicator": 0,
"workTypeId": "1"
}
],
"connectedShiftsPreviousDay": {
"shiftIds": [
"B"
]
},
"connectedShiftsNextDay": {
"shiftIds": [
"A"
]
}
}
],
"employees": [
{
"id": "1",
"workTime": {
"maxHoursInFTECountPeriod": 72,
"weekHoursRules": {
"maxWeekHours": 36
}
}
}
],
"timeSlots": [
{
"id": "time-slot-1",
"startTime": "09:00",
"endTime": "19:00",
"workTypeId": "1",
}
],
"demands": [
{
"days": {
"dayIndexes": [
0,
1,
2,
3,
4,
5,
7,
8,
9,
10,
11,
12
]
},
"timeDemands": [
{
"timeSlotId": "time-slot-1",
"ideal": 1
}
]
}
],
"constraints": {},
"configuration": {
"workTypes": [
{
"id": "1",
"name": "WORK",
"factor": 1.0
}
],
"weekend": {
"startWeekDay": 6,
"startTime": "00:00",
"endWeekDay": 7,
"endTime": "00:00"
}
}
}
CyclicShiftsResult
{
"title":"Cyclic-connected-shifts-Check",
"category":"INFEASIBILITY",
"description":"Returns any cycles of shifts by a combination of NEXT and PREV connections.",
"violations":[
{
"shift":{
"name":"C"
}
},
{
"shift":{
"name":"A"
}
},
{
"shift":{
"name":"B"
}
},
{
"shift":{
"name":"C"
}
}
]
}