Skip to main content

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": [
    ]
}

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 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 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"
}
]
}
],
"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"
}
}
}