Shift Creation

Input

The goal of the Shift Creation solver is creating shifts that minimise the difference with a certain variable demand. These shifts have a predefined pattern.

Shift

Property

Type

Description

day

string

Day of the week. The shift is def

definition

Shift Definition

An entire shift definition defined over multiple days.

skill

string

Skill of the employee type that will execute the shift. Should match with Demand skill requirement.

value

integer

Number of resources assigned to this shift. This is the actual result of the solve. Alternatively, this can be used as input for the solver to warm start it.

min

integer

Minimum value for the number of resources (value).

max

integer

Maximum value for the number of resources (value).

Shift Definition

A definition of a shift pattern.

Property

Type

Description

name

string

Unique identifier for a pattern

patterns

array of Pattern

List of patterns

preference

integer

[1,100] Preferential value for having a shift of this kind.

cost

integer

Financial cost for having this kind of shift.

Pattern

Repeating from-to pattern for a shift.

Property

Type

Description

day

string

Day of the Week.

from

string (time)

Starttime of the shift pattern on that day.

to

string (time)

End time of the shift pattern on that day.

Demand

The shifts will form the supply that will as closely as possible follow the demand curve.

Property

Type

Description

day

string

Day of the week.

from

string (time)

Starttime of the Demand block.

to

string (time)

End time of the demand block.

skill

string

Skill requirements

demand

integer

The actual demand in FTE's.

Example

In the example of Single Day Shift Creation we will be testing a simple demand curve against 2 patterns from 9am to 5pm and 10am to 2pm.

{
  "solver": "CREATE",
  "definitions": [
    {
      "name": "MON:9-5",
      "patterns": [
        {
          "day": "MONDAY",
          "from": "09:00:00",
          "to": "17:00:00"
        }
      ]
    },
    {
      "name": "FLEX:11-14",
      "patterns": [
        {
          "day": "MONDAY",
          "from": "10:00:00",
          "to": "14:00:00"
        }
      ]
    }
  ],
  "demands": [
    {
      "day": "MONDAY",
      "from": "08:15:00",
      "to": "11:30:00",
      "skill": "Skill A",
      "demand": 3
    },
    {
      "day": "MONDAY",
      "from": "11:30:00",
      "to": "15:15:00",
      "skill": "Skill A",
      "demand": 6
    },
  ],
  "options": {
    "maxCapacity": 40
  }
}

Output

Output: supply of shifts vs demandOutput: supply of shifts vs demand

Output: supply of shifts vs demand

The actual number of FTE's required per skill are defined by shift.value.

Objective

The solver will determine the optimal amount of shifts per definition (shift.value) in order to minimise the difference between supply (all the shifts) and demand for every time block of the demand. Under utilisation will be penalised more than over utilisation.

Constraints

Most importantly, all demand needs to be supplied at the right time. We differentiate between Under Demand and Over Demand as penalised supply.
Additionally, we take into account the costs of the shifts as we are minimising total costs and assigning based on a preference of having that shift.

Name

Level

Description

Total Demand

HARD

The total required demand must be met.

Under demand

HARD

For every demand timeblock, the supply that is less than the demand must be minimised.

Over demand

HARD

For every demand timeblock, the supply that is more than the demand must be minimised.

Costs

SOFT

Cost based minimisation of the shifts.

Preference

SOFT

Preference based maximisation of the shifts.