• No results found

Optimal Multi-Skilled Workforce Scheduling for Contact Centers Using Mixed Integer Linear Programming: A Method to Automatize Workforce Management

N/A
N/A
Protected

Academic year: 2022

Share "Optimal Multi-Skilled Workforce Scheduling for Contact Centers Using Mixed Integer Linear Programming: A Method to Automatize Workforce Management"

Copied!
82
0
0

Loading.... (view fulltext now)

Full text

(1)

IN

DEGREE PROJECT MATHEMATICS, SECOND CYCLE, 30 CREDITS

STOCKHOLM SWEDEN 2020 ,

Optimal Multi-Skilled Workforce Scheduling for Contact Centers Using Mixed Integer Linear

Programming

A Method to Automatize Workforce Management

SARA ERIKSSON

(2)
(3)

Optimal Multi-Skilled Workforce Scheduling for Contact Centers Using Mixed Integer Linear

Programming

A Method to Automatize Workforce Management SARA ERIKSSON

Degree Projects in Systems Engineering (30 ECTS credits)

Degree Programme in Applied and Computational Mathematics (120 credits) KTH Royal Institute of Technology year 2020

Supervisor at Teleopti: Oskar Ekelius

Supervisor at KTH: Per Enqvist

Examiner at KTH: Per Enqvist

(4)

TRITA-SCI-GRU 2020:042 MAT-E 2020:011

Royal Institute of Technology School of Engineering Sciences KTH SCI

SE-100 44 Stockholm, Sweden

URL: www.kth.se/sci

(5)

Preface

This project is a master thesis in work schedule optimization written by Sara Eriksson during the fall semester in 2019.

I would like to thank my supervisors Per Enqvist at KTH and Oskar Ekelius at Teleopti for their

excellent guidance and support during this process.

(6)
(7)

Abstract

This master thesis in optimization and systems theory is a development of two di↵erent optimization models formulated to schedule multi-skilled agents for contact centers depending on the forecasted demand, assigned by Teleopti. Four mixed integer linear programming models are created with the optimization programming language GAMS and solved by the internet based solver NEOS. Two of the models are formulated to perform an optimal scheduling that matches a forecasted demand per skill and day and the remaining two models are formulated to perform an optimal scheduling that matches a forecasted demand per skill, day and half hour. The first two models are referred to as the Basic Models and the second two are referred to as the Complex Models. The Basic Models includes seven constraints and the Complex Model includes nine constraints, describing regulations at the contact center. The main goal of the project is to find an optimal solution that results in an as even distribution of under or over scheduling.

The scheduling optimization covers a period of 28 days, starting on a Monday which results in four weeks. The optimization models are based on two sets of data, there are 104 assigned agents that possesses one, two or three of the skills Channel, Direct and Product. All agents are bound to work according to a contract specified through the constraints. In the Basic Model the forecasted demand is given in amount of hours per day and skill, the demand is non-cyclical. In the Complex model the forecasted demand is given in amount of half hours per day, skill and half hour. Each day is scheduled from 7 a.m. to 11 p.m. resulting in 32 available half hours.

All optimization models are developed to correctly mathematically formulate the constraints spec- ified by Teleopti. Any non-linear equation that arises are linearized to maintain linearity, this is favourable in the sense of computational time solving the models. The objective functions in this thesis are formulated to describe the main goal of even distribution as correctly as possible.

The result for the Basic Model shows that an optimal solution is achieved after 34 seconds. This

model contains 169,080 variables and 39,913 equations. In the Complex Models integer solutions are

achieved, but no optimal solution is found in 8 hours of computational time. The larger Complex

Model contains 9,385,984 variables and 1,052,253 equations and the smaller Complex Model con-

tains 5,596,952 variables and 210,685 equations. Teleopti’s scheduler produces an integer solution

matching the Complex Model in 4 minutes.

(8)
(9)

Sammanfattning

Svensk titel: Optimal schemal¨ aggning av multikompetent arbetskraft vid kundtj¨ anstkontor med mixad linj¨ ar heltalsprogrammering

En metod f¨ or att automatisera personalplanering

Detta examensarbete i optimering och systemteori ¨ ar framtagningen av tv˚ a olika optimeringsmod- eller formulerade f¨ or att schemal¨ agga multikompetenta agenter f¨ or kontaktcenters beroende av den f¨ orv¨ antade efterfr˚ agan, tilldelad av Teleopti. Fyra blandade heltals linj¨ ara programmeringsmodeller skapas med optimeringsprogrammeringsspr˚ aket GAMS och l¨ oses av den internetbaserade l¨ osaren NEOS. Tv˚ a av modellerna ¨ ar formulerade f¨ or att utf¨ ora en optimal schemal¨ aggning som matchar en prognostiserad efterfr˚ agan per skicklighet och dag och de ˚ aterst˚ aende tv˚ a modellerna ¨ ar formulerade f¨ or att utf¨ ora en optimal schemal¨ aggning som matchar en prognostiserad efterfr˚ agan per f¨ ardighet, dag och en halvtimme. De tv˚ a f¨ orsta modellerna i detta arbete ben¨ amns de Grundl¨ aggande Mod- ellerna och de resterande tv˚ a ben¨ amns de Komplexa Modellerna. Grundmodellerna inkluderar sju bivillkor och de Komplexa modellerna inneh˚ aller nio bivillkor, vilka beskriver arbetsvillkoren p˚ a kon- taktcentret. Projektets huvudm˚ al ¨ ar att hitta en optimal l¨ osning som resulterar i en j¨ amn f¨ ordelning av under- eller ¨ overschemal¨ aggning.

Den schemalagda optimeringen t¨acker en period av 28 dagar, vilken b¨orjar p˚ a en m˚ andag vilket resulterar i fyra veckor. Optimeringsmodellerna ¨ar baserade p˚ a tv˚ a upps¨attningar data, det finns 104 tillg¨angliga agenter vilka har en, tv˚ a eller tre av kompetenserna Channel, Direct och Product.

Alla agenter ¨ar bundna att arbeta enligt det kontrakt som specificeras genom bivillkoren. I grund- modellen anges den prognostiserade efterfr˚ agan i timmar per dygn och kompetens, efterfr˚ agan ¨ar icke-cyklisk. I den komplexa modellen anges den ber¨aknade efterfr˚ agan i m¨angd halvtimmar per dag, kompetens och halvtimme. Varje dag ¨ar schemalagd fr˚ an kl. 07.00 till 23.00 vilket resulterar i 32 tillg¨angliga halvtimmar.

Alla optimeringsmodeller ¨ar utvecklade f¨or att matematiskt beskriva de begr¨ansningar som Teleopti specificerar. Alla icke-linj¨ara ekvationer som uppst˚ ar linj¨ariseras f¨or att uppr¨atth˚ alla linj¨aritet, detta

¨ar gynnsamt i avseendet m¨angd tid ber¨akningen av modellerna tar. M˚ alfunktionerna i detta arbete

¨ar formulerade f¨or att beskriva huvudm˚ alet f¨or j¨amn distribution s˚ a korrekt som m¨ojligt.

Resultatet f¨or grundmodellen visar att en optimal l¨osning uppn˚ as efter 34 sekunder. Denna modell

inneh˚ aller 169,080 variabler och 39,913 ekvationer. I de komplexa modellerna uppn˚ as heltalsl¨osningar,

men ingen optimal l¨osning hittas p˚ a 8 timmars ber¨akningstid. Den st¨orre komplexa modellen in-

neh˚ aller 9,385,984 variabler och 1,052,253 ekvationer och den mindre komplexa modellen inneh˚ aller

5,596,952 variabler och 210,665 ekvationer. Teleoptis schemal¨aggare producerar en heltalsl¨osning

som matchar den komplexa modellen p˚ a 4 minuter.

(10)
(11)

Contents

1 Introduction 6

1.1 Project Objective . . . . 6

1.2 Purpose . . . . 6

1.3 Problem Restrictions . . . . 6

2 Background 7 2.1 Teleopti . . . . 7

2.1.1 Teleopti’s Scheduler . . . . 7

2.2 Work Schedule Optimization . . . . 7

2.3 GAMS . . . . 7

2.4 NEOS . . . . 8

2.4.1 Cplex . . . . 8

3 Problem Description 9 4 Mathematical Theory 10 4.1 Mixed Integer Linear Optimization . . . . 10

4.1.1 Linearization of Absolute Values . . . . 11

5 Data Set 12 6 Model 1: Basic Model 15 6.1 Constraint 1: Each agent must have c 1 days o↵ during the period . . . . 15

6.2 Constraint 2: A working day is c 2 hours long . . . . 16

6.3 Constraint 3: Each agent must have a minimum of c 3,min and a maximum of c 3,max days o↵ per week . . . . 16

6.4 Constraint 4: There must be a minimum of c 4,min and a maximum of c 4,max consec- utive days o↵ . . . . 16

6.5 Constraint 5: There must be a minimum of c 5,min and a maximum of c 5,max consec- utive workdays . . . . 17

6.6 Constraint 6: Each agent must have a minimum of c 6,min and a maximum of c 6,max full weekends o↵ during the period . . . . 17

6.7 Constraint 7: Each agent must have a minimum of c 7,min and a maximum of c 7,max weekend days o↵ during the period . . . . 18

6.8 Objectives . . . . 18

6.8.1 Objective 1: Optimize an even distribution of scheduled hours with respect to forecasted hours by forcing di↵erences towards an optimized mean . . . . 18

6.8.2 Objective 2: Optimize an even distribution of scheduled hours with respect to forecasted hours by minimizing the maximal di↵erence . . . . 19

7 Model 2: Complex Model 21 7.1 Additional and Modified Constraints . . . . 22

7.1.1 Constraint 2: A working day is c 2 hours long . . . . 22

7.1.2 Constraint 8: Each agent must work a consecutive shift of c 8 hours . . . . 22

7.1.3 Constraint 9: Each agent must have a minimum of c 9 hours o↵ in between working shifts . . . . 23

7.2 Objective . . . . 24

(12)

7.2.1 Objective 2: Optimize an even distribution of scheduled hours with respect to

forecasted hours by minimizing the maximal di↵erence . . . . 24

8 Model 3: Complex Model 26 8.1 Equations . . . . 26

8.2 Constraints . . . . 27

8.2.1 Constraint 1: Each agent must have c 1 days o↵ . . . . 27

8.2.2 Constraint 2: A working day is c 2 hours long . . . . 28

8.2.3 Constraint 3: Each agent must have a minimum of c 3,min and a maximum of c 3,max days o↵ per week . . . . 28

8.2.4 Constraint 4: There must be a minimum of c 4,min and a maximum of c 4,max consecutive days o↵ . . . . 28

8.2.5 Constraint 5: There must be a minimum of c 5,min and a maximum of c 5,max consecutive workdays . . . . 29

8.2.6 Constraint 6: Each agent must have a minimum of c 6,min and a maximum of c 6,max full weekends o↵ during the period . . . . 29

8.2.7 Constraint 7: Each agent must have a minimum of c 7,min and a maximum of c 7,max weekend days o↵ during the period . . . . 30

8.2.8 Constraint 8: Each agent must work a consecutive shift of c 8 hours . . . . 30

8.2.9 Constraint 9: Each agent must have a minimum of c 9 hours o↵ in between working shifts . . . . 30

8.3 Objective function . . . . 31

9 Results 32 9.1 Teleopti . . . . 32

9.1.1 Daily Distribution of Half Hours . . . . 35

9.2 Model 1 . . . . 38

9.2.1 Objective function 1 . . . . 38

9.2.2 Objective function 2 . . . . 42

9.3 Model 2 . . . . 45

9.3.1 Daily Distribution of Half Hours . . . . 49

9.4 Model 3 . . . . 52

9.4.1 Daily Distribution of Half Hours . . . . 56

10 Discussion 60 10.1 Basic Model . . . . 60

10.2 Complex Model . . . . 60

10.3 Recommendations . . . . 61

11 Appendix 63 11.1 Mathematical Formulation . . . . 63

11.1.1 Model 1, Objective 1 . . . . 63

11.1.2 Model 1, Objective 2 . . . . 64

11.1.3 Model 2 . . . . 66

11.1.4 Model 3 . . . . 68

11.1.5 Available Shifts . . . . 72

(13)

1 Introduction

In this thesis a study about how to construct mixed integer optimization problems to schedule agents at a contact center is carried out. The study will analyze the performance of the optimization models with respect to model size and the number of constraints included in the model. The topic of the thesis is provided by Teleopti.

1.1 Project Objective

Given forecasted demand, agents skill set and a number of constraints, this thesis aims at formulating an optimization model that describes this as accurately as possible. In optimization models a popular objective is to minimize costs. However, in this thesis the cost is a fixed number and the goal is instead to formulate a function that produces an as even distribution of under or over sta↵ed result.

1.2 Purpose

The results and the complete analyzed picture of this thesis will be interesting for companies that work with scheduling problems, such as Teleopti, and for students and researchers that work with mixed integer optimization problems since the models will be applicable to other optimization areas as well.

The purpose for Teleopti is to examine whether it is possible to create a method for automatizing workforce scheduling. Today, Teleopti’s Solver works in three steps, and the question is: Is it possible to perform the entire scheduling in one step?

1.3 Problem Restrictions

When computing mixed integer programs, a common difficulty is the large amount of time needed.

The available software, locally or internet based often hold resource limitations. To be able to receive an optimal solution for a large model, these limitations might be a problem and instead a feasible integer solution, without any guarantees whether this solution is optimal, will be returned by the solver.

The models are analyzed in reference to the data sets provided, with several data sets the design of

the models might have been altered.

(14)

2 Background

2.1 Teleopti

Teleopti was founded by Marita and Nils Bildt, in Sweden in 1992. [1] Since then the company has grown to have customers in more than 90 countries, 1000 customers across the world and have scheduled more than 500.000 employees.

Teleopti provides software for workforce scheduling and work with development in Workforce Man- agement, WFM. Teleopti focuses at enabling contact centers, back-offices and stores with better customer service, satisfied employees and a larger profit - through optimized, automated forecasting and scheduling. [9]

2.1.1 Teleopti’s Scheduler

The software scheduler provided by Teleopti works in three steps when creating a scheduling match- ing the models created in this thesis.

1. Scheduling

2. Free day optimization 3. Optimization within day

Given the data of constraints, available agents with their skill sets and the forecasted demand the scheduler initially sets each agent to work according to the number of constraints. In the second step the scheduler performs an optimization that iteratively attempts to switch agents from working at the days that are most over sta↵ed to the days that are most under sta↵ed and in each iteration checks whether this solution is superior to the previous one. In the last step the scheduler performs the same kind of optimization as in the second step, the di↵erence in this step is that the scheduler iteratively attempts to switch between the shifts associated with the largest over staffing to the shifts associated with the highest under staffing and verifies superiority.

2.2 Work Schedule Optimization

Workforce scheduling is a widely studied subject of research. Some topics of earlier studies are air crew scheduling, audit scheduling and nurse scheduling. Scheduling problems may be classified with respect to their nature of demand and stability of workforce, cyclic versus acyclic, and the properties of single-/multi-skilled agents, work shifts and work regulations.

Acyclic scheduling arises when the forecasted demand varies between day or other time interval, and must be solved each time the demand pattern and/or employee availability change, for a specified planning horizon. Shift scheduling problems are solved to determine which shift an employee should be assigned each working day, especially when shifts are overlapping. The workweek scheduling is applied to determine what days each agent should have a day o↵, this problem arises for example for contact centers with open hours 6-7 days per week, i.e. an employees workweek might be longer or shorter than a regular business week. In a situation that both workweek and shift scheduling are present they must be solved simultaneously, determining working days and shifts. [6]

2.3 GAMS

All models created in this thesis are developed in GAMS - The General Algebraic Modelling System.

GAMS is a modelling system for mathematical programming and optimization that consists of a

(15)

language compiler and a stable of integrated high-performance solvers, the system is designed to model linear, non-linear and mixed integer optimization problems.

The modelling system is user-friendly in the sense that the mathematical formulations are very similar to their mathematical description. In GAMS, the user is able to define a list of sets included in the model, assign tables and scalars of the data set and define optimization variables. The user also inputs all equations and may fix variables. When the entire optimization model is defined, there are a list of options, such as resource limitations and preferred output. Lastly, the user specifies what solver to be assigned and what equation to be minimized or maximized. [3]

2.4 NEOS

As mentioned previously in this report, some of the optimization models include a large number of variables and equations, running these codes locally will throw a termination due to a licensing error in the free version of GAMS. To be able to solve these sizes of problems it is possible to use a internet-based service for solving numerical optimization problems. The service chosen for this project is the ”Neos Server: State-of-the-Art Solvers for Numerical Optimization”. Neos is free of charge and provides access to more than 60 state-of-the-art solvers in more than a dozen optimization categories. The server is hosted by Wisconsin Institute for Discovery at the University of Wisconsin in Madison who’s solvers run on distributed high-performance machines enabled by the HTCondor software.[11]

There are a few limitations using Neos, files larger than 16 MB are not accepted as input and a job submitted may run at most 8 hours. The time limitation do a↵ect this project.[10]

2.4.1 Cplex

In this project, for all models, the solver chosen in NEOS is Cplex. Cplex o↵ers solution algorithms

for linear, quadratic and mixed integer programming problems. Each model in this project are mixed

integer programming problems, for which Cplex uses a branch and bound algorithm. This algorithm

solves a series of linear subproblems, the number of subproblems may be as large as 2 n , where n is

the number of variables. It is a common problem to run out of memory when the branch and bound

tree is too large which in turns leaves insufficient available memory to solve a subproblem. In this

project, the maximal resource limit is set to 28700 seconds, this is to ensure that the computational

time does not exceed 8 hours.[4]

(16)

3 Problem Description

The objective of this problem is to create a optimization model that schedules a given number of agents subject to a number of constraints.

The scenario is set at a contact center, where a given number of agents are bound to work according to contract, i.e. the option to not schedule some of the agents is not optional. Each of these agents have a number of skills that they are able to work with. They may work with one skill at a time, these skills are Channel, Direct and Product. An agent may have one, two or three skills.

The contract under which the agents are bound to work include, 1. Each agent must have 8 days o↵ during the period.

2. A working day is 8 hours long.

3. Each agent must have a minimum of 1 and a maximum of 3 days o↵ per week.

4. There must be a minimum of 1 and a maximum of 3 consecutive days o↵.

5. There must be a minimum of 2 and a maximum of 6 consecutive workdays.

6. Each agent needs to have a minimum of 1 and a maximum of 4 full weekends o↵ during the period.

7. Each agent must have a minimum of 2 and a maximum of 8 weekend days o↵ during the period.

8. An agent may only work consecutive half hours during a day.

9. Each agent must have 11 consecutive hours o↵ between working shifts.

The forecasted amount of hours is presented by Teleopti. These forecasts are given in two di↵erent sets. The first set consist of one matrix containing the forecast per skill and per day, and the second set consists of three matrices, one per skill, containing the forecast per half hour and per day.

Normally, when creating schedule optimization, the objective is to minimize costs, i.e. salaries. In

this project this is not an option since all agents are hired to work a fixed amount of hours. The

objective for this project is to create optimization models that schedules the agents in a optimal

manner to achieve an as even under or over scheduled amount of hours. With an even distribution

the problem of a queue building up is reduced. If, for example, the first day would be more under

scheduled than the remaining days, a larger queue of unanswered customers would build up. These

customers might wait until the next day and call again, which would add to the forecasted amount of

hours to be scheduled at that day. On the other hand, if the first day would be more over scheduled

than the remaining days, the agents working at the first day will have less to do than the agents

working on the remaining days. This might seem unfair to the other agents, and if possible it is

favourable to keep the sta↵ as satisfied as possible.

(17)

4 Mathematical Theory

This chapter declares the optimization method, branch-and-bound technique and the method of linearization used in the thesis.

4.1 Mixed Integer Linear Optimization

In linear programming where the decision variables are not allowed to be fractional the optimization problem is a integer programming problem on the form,

minimize X n j=1

c j x j

subject to X n j=1

a ij x j = b i , i = 1, 2, ..., m, x j 0, j = 1, 2, ..., n,

x j integer for some or all j = 1, 2, ..., n

(1)

The problem is said to be a mixed integer program if some, but not all, variables are restricted to be integer and otherwise a pure integer program if all decision variables are restricted to be integer. When formulating an optimization problem the integrality restrictions often reflect the natural indivisibilities of the problem under study, such a scheduling where an agent either do work at a specific hour or not. In this case the integer variable is a binary variable.

( x j = 1, if the agent works at hour j

x j = 0, if the agent does not work as hourj (2) When solving a linear program the simplex method is commonly used, but for integer programs there is no single method for solving. Instead, there are three broadly classified approaches:

1. enumeration techniques, such as branch-and-bound 2. cutting-plane techniques

3. group-theoretic techniques

The idea of the branch-and-bound technique is to first partition the feasible region into more man- ageable subdivisions and then, if necessary, further partition the subdivisions. That is, the method first solves a relaxation of the undivided region giving an optimal value Optimum 0 . Based on this optimal value, one of the decision variables are set to the nearest upper and lower valued integer giving the first subdivision from which the enumeration tree will grow due to the number of variables.

[8]

Optimum 0

x 1  a x 1 b

x 2  c x 2 d

(18)

In conclusion, integer requirements in an optimization program often makes the problem significantly harder and they are NP hard, meaning that there are no known methods to solve all such problems efficiently. [5]

4.1.1 Linearization of Absolute Values

Absolute value functions are not continuous di↵erentiable functions and they are non-linear, but it is possible to linearly reformulate these functions.

If an absolute value function contains a linear function, the absolute value may be reformulated into two linear expressions.[2] Mathematically formulated, if the absolute value lies in the objective function on the form

minimize |f(x)| (3)

by adding a variable ↵ and the two equations

f (x)  ↵ (4)

f (x)  ↵ (5)

, |x|  ↵ (6)

the linearized objective function becomes

minimize ↵ (7)

which visualized by a number line is presented as:

f (x)

↵ 0 ↵

(19)

5 Data Set

The data used in this project is assigned by Teleopti. There are two di↵erent sets of data, for each set a di↵erent model is developed. The forecasted demand data is collected from a customer of Teleopti’s.

In the first set the data consists of two matrices. The first of these matrices is a binary matrix containing each available agent’s skill set. The skills are Channel, Direct and Product. Each agent may hold one, two or three skills. This matrix will be referred to as Skills i,j and is of dimensions 104 ⇥ 3.

Skills i,j = 2 6 6 6 6 4

skill 1,1 skill 1,2 skill 1,3

skill 2,1 skill 2,2 skill 2,3

.. . .. . .. . skill 104,1 skill 104,2 skill 104,3

3 7 7 7 7

5 2 {0, 1}

The second matrix presents the forecasted demand, per day and per skill, given in an integer number of hours. The demand di↵ers from day to day and also between skills. An instance of 0 in this matrix indicates that this particular skill is closed for customer service that day. This matrix will be referred to as Forecast l,j and is of dimensions 28 ⇥ 3.

Forecast l,j = 2 6 6 6 6 4

forecast 1,1 forecast 1,2 forecast 1,3

forecast 2,1 forecast 2,2 forecast 2,3

.. . .. . .. .

forecast 28,1 forecast 28,2 forecast 28,3

3 7 7 7 7 5 2 N +

In the second set of data, the matrix representing the skills is the same. However, the forecasted demand is now divided into three separate matrices presenting one skill each, the demand is now given per half hour and per day. These matrices will be referred to as ForecastChannel k,l , ForecastDirect k,l

and ForecastProduct k,l . They are all of size 32 ⇥ 28.

ForecastChannel k,l = 2 6 6 6 6 4

channel 1,1 channel 1,2 . . . channel 1,28

channel 2,1 channel 2,2 . . . channel 2,28

.. . .. . .. . .. .

channel 32,1 channel 32,2 . . . channel 32,28

3 7 7 7 7 5 2 N +

ForecastDirect k,l = 2 6 6 6 6 4

direct 1,1 direct 1,2 . . . direct 1,28

direct 2,1 direct 2,2 . . . direct 2,28

.. . .. . .. . .. . direct 32,1 direct 32,2 . . . direct 32,28

3 7 7 7 7 5 2 N +

ForecastProduct k,l = 2 6 6 6 6 4

product 1,1 product 1,2 . . . product 1,28 product 2,1 product 2,2 . . . product 2,28

.. . .. . .. . .. .

product 32,1 product 32,2 . . . product 32,28

3

7 7

7 7

5 2 N +

(20)

All model parameters, provided by Teleopti, are set to describe the regulations at a real contact center and are presented in section 6. The model parameters describing these regulations are listed in the table below.

Model Parameters

Description Notation value

Free days c 1 8

Hours per day c 2 8

Free days per week min c 3,min 1 Free days per week max c 3,max 3 Consecutive free days min c 4,min 1 Consecutive free days max c 4,max 3 Consecutive scheduled days min c 5,min 2 Consecutive scheduled days max c 5,max 6 Full weekend days o↵ min c 6,min 1 Full weekend days o↵ max c 6,max 4

Free weekend days min c 7,min 2

Free weekend days max c 7,max 8

Daily rest c 9 11

The forecasted demand for the Basic Models is presented below, per day and skill. It is noted that the skill Channel is closed in the weekends and otherwise lies around 150 hours per day. Direct is the skill with the largest amount of forecasted demand per day and it is stated by Teleopti that the number of agents that possess this skill is insufficient to fulfil this demand. From this the assumption is made that this skill will be under sta↵ed each day. Due to the size of the forecasted amount of hours per skill, day and half hour, these matrices are omitted from the report. However, summing up each day over the half hours these are the same results as the forecast per day and skill.

The total amount of forecasted demand over the entire period is 16,687 hours and the total amount of schedulable hours is calculated as,

agents · (28 c 1 ) · c 2 = 16, 640 (8)

resulting in that there will be a total under staffing of 47 hours summed over the period.

(21)

Forecasted Demand

Monday Tuesday Wednesday Thursday Friday Saturday Sunday

W 1

Channel 157 h 150 h 150 h 152 h 153 h 0 h 0 h

Direct 210 h 301 h 346 h 324 h 321 h 314 h 290 h

Product 143 h 152 h 212 h 212 h 209 h 206 h 198 h

W 2

Channel 157 h 156 h 156 h 159 h 141 h 0 h 0 h

Direct 208 h 297 h 352 h 329 h 327 h 320 h 296 h

Product 156 h 166 h 232 h 215 h 199 h 196 h 188 h

W 3

Channel 163 h 149 h 149 h 152 h 135 h 0 h 0 h

Direct 212 h 303 h 342 h 320 h 317 h 310 h 287 h

Product 149 h 158 h 221 h 211 h 199 h 197 h 188 h

W 4

Channel 156 h 158 h 158 h 144 h 127 h 0 h 0 h

Direct 206 h 295 h 396 h 370 h 263 h 256 h 238 h

Product 149 h 158 h 221 h 204 h 187 h 191 h 189 h

(22)

6 Model 1: Basic Model

This section will describe the whole process in which the model is developed. In this optimization model the following sets are included.

Set Name Items Description

I Agents /1 ⇤ 104/ the set of available agents

J Skills /Channel, Direct, Product/ the set of agent skills

L Days /1 ⇤ 28/ the set of days over the period

S(L) Saturdays /6, 13, 20, 27/ the set of Saturdays U(L) Weekdays /1 ⇤ 5, 8 ⇤ 12, 15 ⇤ 19, 22 ⇤ 26/ the set of weekdays

The mixed integer linear programming uses a set of binary variables, listed in the table below.

Variable Description

x i,j,l binary variable indicating whether agent i works on skill j at day l y i,l binary variable indicating whether agent i works at day l

Weekend i,l binary variable indicating whether agent i works at Saturday l FreeDay i,l binary variable indicating whether agent i has a day o↵ at day l

ConsecutiveDays i,l binary variable indicating whether agent i starts a sequence of consecutive workdays at day l

ConsecutiveFreeDays i,l binary variable indicating whether agent i starts a sequence of consecutive days o↵ at day l

In the Basic Model, to ensure that agents only do work with skills they possess and that no scheduling is done when the forecast for Channel is equal to zero, a fixing of the variables is made in GAMS, see Figure 1.

Figure 1: Fixed values for Model 1

6.1 Constraint 1: Each agent must have c 1 days o↵ during the period

During the entire working period each agent should have a given number, c 1 , days o↵. The amount of working days is received by summing the variable y i,l over the set L and the first constraint (C1) is set by setting the total working days equal to the total amount of days subtracted by the number of days o↵.

X L l=1

y i,l = 28 c 1 , 8i (C1)

(23)

6.2 Constraint 2: A working day is c 2 hours long

An entire working day is 10 hours, each agent is constrained to work a given number, c 2 , hours of the workday. This calculations are done by summing the variable x i,j,l over the set J and setting these binary values equal to y i,l . This model does not take into consideration what specific hours an agent is assigned to work. The amount of hours c 2 is used later in the model formulation to calculate the total amount of hours.

X J j=1

x i,j,l = y i,l , 8i, 8l (C2)

6.3 Constraint 3: Each agent must have a minimum of c 3,min and a max- imum of c 3,max days o↵ per week

The entire optimization period is set over four weeks. Each week, each agent may not have more than c 3,max and not less than c 3,min days o↵. The Mondays of the period are l = 1, 8, 15, 22 and by summing the variable y i,l over one executive week, i.e. 7 consecutive days starting on a Monday, the total amount of days scheduled that week is calculated. The amount of scheduled days on an executive week may not exceed 7 minus the minimum amount of days o↵ nor be less than 7 minus the maximum amount of days o↵, as stated in constraints (C3.1) and (C3.2).

X l+6 l= {1,8,15,22}

y i,l  7 c 3,min , 8i (C3.1)

X l+6 l= {1,8,15,22}

y i,l 7 c 3,max , 8i (C3.2)

6.4 Constraint 4: There must be a minimum of c 4,min and a maximum of c 4,max consecutive days o↵

Each agent should not have more than c 4,max consecutive days o↵. Firstly, the variable y i,l is transformed into the variable FreeDay i,l , indicating whether agent i has day l o↵ or not. By summing the variable FreeDay i,l from l to l + c 4,max the amount of days o↵ over a period of c 4,max + 1 days is calculated. This sum is set to be less than or equal to c 4,max to ensure that no agent is scheduled not to work more than c 4,max consecutive days, as stated in constraint (C4.1).

(y i,l 1) · ( 1) = FreeDay i,l , 8i, 8l (C4.1)

l+c X 4,max

l=1

FreeDay i,l  c 4,max , 8i (C4.2)

The constraint for minimum of consecutive days o↵ is calculated in three steps. The binary variable ConsecutiveFreeDay i,l indicated whether agent i starts a sequence of consecutive days o↵ at day l.

A sequence of days o↵ starts at day l if the agent does not work at day l whilst working at day

l 1, i.e. FreeDay i,l = 1 and FreeDay i,l = 0. In constraint (C4.2) ConsecutiveFreeDay i,l is set to be

equal to FreeDay i , l. Constraint (C4.3) forces ConsecutiveFreeDay i,l to be 1 if agent i ends working

(24)

at day l and (C4.4) forces ConsecutiveFreeDay i,l to be 0 if agent i do work at least the upcoming c 4,min days, including current day.

ConsecutiveFreeDay i,1 = FreeDay i,1 , 8i (C4.2)

ConsecutiveFreeDay i,l FreeDay i,l FreeDay i,l 1 , 8i, 8l 2 (C4.3) c 4,min · ConsecutiveFreeDay 

c 4,min 1

X

t=0

FreeDay i,l+t , 8i, l = 2, 3, ..., 28 c 4,min + 1 (C4.4)

6.5 Constraint 5: There must be a minimum of c 5,min and a maximum of c 5,max consecutive workdays

Each agent should not work more than c 5,max consecutive days. By summing the variable y i,l from l to l + c 5,max the amount of days scheduled over a period of c 5,max + 1 days is calculated. This sum is set to be less than or equal to c 5,max to ensure that no agent is scheduled on more than c 5,max

consecutive days, as stated in constraint (C5.1).

l+c X 5,max

l=1

y i,l  c 5,max , 8i (C5.1)

The constraint for minimum of consecutive work days is calculated in three steps. The binary variable ConsecutiveDays i,l indicated whether agent i starts a sequence of consecutive workdays at day l. A sequence of working days starts at day l if the agent do work at day l whilst not working at day l 1, i.e. y i,l = 1 and y i,l 1 = 0. In constraint (C5.2) ConsecutiveDays i,l is set to be equal to y i,l . Constraint (C5.3) forces A i,l to be 1 if agent i starts working at day l and (C5.4) forces ConsecutiveDays i,l to be 0 if agent i does not work at least the upcoming c 5,min days, including current day.

ConsecutiveDays i,1 = y i,1 , 8i (C5.2)

ConsecutiveDays i,l y i,l y i,l 1 , 8i, 8l 2 (C5.3)

c 5,min · ConsecutiveDays i,l 

c 5,min 1

X

t=0

y i,l+t , 8i, l = 2, 3, ..., 28 c 5,min + 1 (C5.4)

6.6 Constraint 6: Each agent must have a minimum of c 6,min and a max- imum of c 6,max full weekends o↵ during the period

The optimization model is constrained under the condition that each agent should have a minimum

and maximum number of full weekends o↵ during the period. By summing the variable y i,l from

l 2 S(L) to l + 1 and constraining this sum from 1 · (1 Weekend i,l ) to 2 · (1 Weekend i,l ). This

sets the binary variable Weekend i,l = 1 if agent i has the weekend o↵ and Weekend i,l = 0 if agent

i works on either Saturdays or Sunday. By summing over the variable Weekend i,l the total amount

(25)

of weekends o↵ is calculated and restricted to be no less than c 6,min and not exceed c 6,max . X l+1

l= {6,13,20,27}

y i,l  2 · (1 Weekend i,l ), 8i (C6.1)

X l+1 l= {6,13,20,27}

y i,l 1 · (1 Weekend i,l ), 8i (C6.2) X

l={6,13,20,27}

Weekend i,l c 6,min , 8i (C6.3)

X

l= {6,13,20,27}

Weekend i,l  c 6,max , 8i (C6.4)

6.7 Constraint 7: Each agent must have a minimum of c 7,min and a max- imum of c 7,max weekend days o↵ during the period

During the period, each agent should have a minimum and maximum amount of weekend days o↵.

By summing the variable y i,l over all weekend days, from l 2 S(L) to l + 1 the total amount of scheduled weekend days is calculated. This sum is constrained from below by 8 c 7,max and above by 8 c 7,min as stated in (C7.1) and (C7.2).

X l+1 l= {6,13,20,27}

y i,l  8 c 7,min , 8i (C7.1)

X l+1 l= {6,13,20,27}

y i,l 8 c 7,max , 8i (C7.2)

6.8 Objectives

In this section the two di↵erent objective functions used for Model 1 are declared.

6.8.1 Objective 1: Optimize an even distribution of scheduled hours with respect to forecasted hours by forcing di↵erences towards an optimized mean

To achieve an even distribution of under/over scheduled hours with respect to the forecasted hours this objective aims at minimizing the di↵erence between the minimal and maximal di↵erence in scheduled hours and forecasted hours by forcing the values towards a calculated mean.

Firstly, the variable x i,j,l is summed over i and multiplied by the number of working hours in a day, c 2 to calculate the matrix of scheduled hours C j,l per skill, per day. Then, the di↵erence di↵erence j,l

is calculated.

X I i=1

x i,j,l · c 2 = skillhours j,l , 8j, 8l (9)

skillhours j,l forecast j,l = di↵erence j,l , 8j, 8l (10)

(26)

Secondly, the mean value for each skill is calculate as the total amount per skill divided by the total number of days over the period.

P L

l=1 di↵erence Channel,l

28 = mean Channel (11)

P L

l=1 di↵erence Direct,l

28 = mean Direct (12)

P L

l=1 di↵erence P roduct,l

28 = mean P roduct (13)

The objective function is now to minimize the absolute value per skill subtracted by the mean value of that particular skill.

minimize X L l=1

||di↵erence Channel,l mean channel ||+ (14)

X L l=1

||di↵erence Direct,l mean Direct || + X L

l=1

||di↵erence P roduct,l mean P roduct || (15)

In order to linearize the objective function the method described in section 7.1.1 is applied. This adds 3 variables and 6 constraint to the optimization problem, listed below.

di↵erence Channel,l mean Channel  ↵ l (CL1) (di↵erence Channel,l mean Channel )  ↵ l (CL2)

di↵erence Direct,l mean Direct  l (CL3)

(di↵erence Direct,l mean Direct )  l (CL4)

di↵erence P roduct,l mean P roduct  l (CL5) (di↵erence P roduct,l mean P roduct )  l (CL6) and the objective function for the linearization becomes;

minimize X L l=1

↵ l + l + l (16)

6.8.2 Objective 2: Optimize an even distribution of scheduled hours with respect to forecasted hours by minimizing the maximal di↵erence

In the same manner as Objective 1, an even distribution of under/over scheduled hours is the subject of optimization by Objective 2. This objective function aims at minimizing the maximum di↵erences over each skill. Firstly, the total amount of scheduled hours, per skill per day, are calculated.

X I i=1

x i,j,l · c 2 = skillhours j,l (17)

The relative di↵erence is preferred and in the same manner as in objective function 1 the absolute

value is linearized according to Equations 9 and 10. Creating a matrix containing the relative

(27)

di↵erences per skill per day.

skillhours j,l forecast j,l  di↵erence j,l (18) (skillhours j,l forecast j,l )  di↵erence j,l (19) The objective aims at minimizing the maximum relative di↵erence, to maintain the problem linear the maximal value per skill is chosen according to equation 11.

max j {di↵erence l } j  di↵erence j,l (20) And the final objective function is now expressed as,

minimize X J j=1

max j {di↵erence l } j (21)

(28)

7 Model 2: Complex Model

In addition to the constraints in Model 1 Constraint 2 is modified and two more constraints are added to the optimization to arrive at Model 2. The problem is also added an extra dimension, k, for time unit in half-hours. A working day starts at 07.00 and ends at 23.00, with each individual skill having di↵erent open hours. In Model 2 the optimization is made with respect to the forecasted demand per half-hour and per skill.

This problem becomes more complex due to the added dimension and a submodel containing two of the total four weeks is initially created. The submodel is created to analyse Model 2 with a decreased number of equations and non-zero elements to see how well the implemented constraints calculates what is intended.

In this optimization model there are the following sets included.

Set Name Set Description

I Agents /1 ⇤ 104/ the set of available agents

J Skills /Channel, Direct, Product/ the set of agent skills

K Half hours /1 ⇤ 32/ the set of half hours over the period

L Days /1 ⇤ 28/ the set of days over the period

S(L) Saturdays /6, 13, 20, 27/ the set of Saturdays U(L) Weekdays /1 ⇤ 5, 8 ⇤ 12, 15 ⇤ 19, 22 ⇤ 26/ the set of weekdays

The mixed integer linear programming uses a set of binary variables, listed in the table below.

Variable Description

x i,j,k,l binary variable indicating whether agent i works on skill j at half hour k at day l

y i,l binary variable indicating whether agent i works at day l Weekend i,l binary variable indicating whether agent i works at Saturday l FreeDay i,l binary variable indicating whether agent i has a day o↵ at day l FreeHalfHour i,k,l binary variable indicating whether agent i has half hour k o↵

at day l

ConsecutiveDays i,l binary variable indicating whether agent i starts a sequence of consecutive workdays at day l

ConsecutiveFreeDays i,l binary variable indicating whether agent i starts a sequence of days o↵ at day l

ConsecutiveHalfHours i,k,l binary variable indicating whether agent i starts a sequence of consecutive working half hours at half hour k

ConsecutiveFreeHalfHours i,k,l binary variable indicating whether agent i starts a sequence of consecutive half hours o↵ at half hour k

In Model 2, to ensure that agents only do work with skills they possess and that no scheduling is

done when the forecast for Channel or Product is equal to zero, a fixing of the variables is made in

GAMS, see Figure 2. Additionally to ensure that no agent starts a sequence of consecutive hours

after half hour 16 the variable ConsecutiveHalfHours is fixed.

(29)

Figure 2: Fixed values Model 2

7.1 Additional and Modified Constraints

7.1.1 Constraint 2: A working day is c 2 hours long

In Model 2 ... Each day that an agent is working, the number of hours must be equal to c 2 , this constraint is met by summing the variable x i,j,k,l over the sets J and K and setting this sum equal to 2 · c 2 times a binary variable y i,l . The binary variable y i,l will be equal to 1 if agent i works on day l and 0 otherwise.

X J j=1

X K k=1

x i,j,k,l = 2 · c 2 · y i,l , 8i, 8l (C2)

7.1.2 Constraint 8: Each agent must work a consecutive shift of c 8 hours

For each day of the period which is optimized over, each agent should work consecutive shifts. These shifts should be c 8 hours long. The binary variable ConsecutiveHalfHours i,k,l is intialized as equal to the binary variable x i,j,k,l summed over all skills, the set J. This enables ConsecutiveHalfHours i,k,l

to be equal to 1 at the first scheduled half hour, for agent i at day l, see equations (C8.1) - (C8.2).

ConsecutiveHalfHours i,1,l = X J j=1

x i,j,1,l , 8i, 8l (C8.1)

ConsecutiveHalfHours i,k,l

X J j=1

x i,j,k,l

X J j=1

x i,j,k 1,l , 8i, 8k > 1, 8l (C8.2) The number calculated by summing the variable x i,j,k,l over the set J and over the 2 · c 8 next half hours the variable C i,k,l forces each agent to work consecutive shifts.

2 · c 8 · ConsecutiveHalfHours i,k,l  X J j=1

t=2 X ·c 8 1 t=0

x i,j,k+t,l , 8i, 8k, 8l (C8.3) Furthermore, each agent is allowed to be scheduled to work 1 or 0 shifts per day, concluded in equation (C8.4).

X K k=1

ConsecutiveHalfHours i,k,l  1, 8i, 8l (C8.4)

(30)

7.1.3 Constraint 9: Each agent must have a minimum of c 9 hours o↵ in between working shifts

In between shifts, each agent needs to have a minimum of c 9 hours o↵, a so called daily rest. A working day is possible to be scheduled from 7.00 until 23.00, leaving a minimum of 8 hours o↵ for each agent. However, we know that c 9 = 11 > 8 and additional constraint are necessary to ensure the agents’ daily rest. The Binary variable ConsecutiveFreeHalfHours i,k,l is set to be equal to the binary variable FreeHalfHour i,k,l at the first half hour at the first day of the period in equation (C9.1).

( X J j=1

x i,j,k,l 1) · ( 1) = FreeHalfHour i,k,l , 8i8k8l (C9.1)

ConsecutiveFreeHalfHours i,1,1 = FreeHalfHour i,1,1 , 8i, 8l (C9.2) After the initial half hour, the variable ConsecutiveFreeHalfHours i,k,l is set to be greater than or equal to the di↵erence between the variable FreeHalfHour i,k,l and the previous half hour, making the variable ConsecutiveFreeHalfHours i,k,l = 1 the start of a consecutive sequence of scheduled half hours.

ConsecutiveFreeHalfHours i,k,l FreeHalfHour i,k,l FreeHalfHour i,k 1,l , 8i, 8k > 1, 8l (C9.3) Equation (C9.4) - (C9.10) all represents the same pattern of calculations as the optimization model should not be allowed to scheduled agents with a gap smaller than 6 in the set K. If ConsecutiveFreeHalfHours i,1,l = 1 i.e. agent i starts a sequence of consecutive half hours o↵ at 07.00, then agent i needs to have at least the first 6 half hours o↵ (C.9.3), in the same manner constraint (C9.4) is calculated.

6 · ConsecutiveFreeHalfHours i,1,l  X 6 k=1

FreeHalfHour i,k,l , 8i, 8l (C9.4)

6 · ConsecutiveFreeHalfHours i,27,l  X 32 k=27

FreeHalfHour i,k,l , 8i, 8l (C9.5) If agent i starts a sequence of consecutive half hours o↵ at half hour k = 28, then agent i may not be scheduled to work until half hour k = 2 the following day, if agent i starts the sequence of consecutive half hour k = 29 then agent i may not be scheduled to work until half hour k = 3 the following day and so forth. This means that the variable FreeHalfHour i,k,l is summed over the current day and the following day, ensuring that each agent has their daily rest.

6 · ConsecutiveFreeHalfHours i,28,l  X 32 k=28

FreeHalfHour i,k,l + X 1 k=1

FreeHalfHour i,k,l+1 , 8i, 8l (C9.6)

6 · ConsecutiveFreeHalfHours i,29,l  X 32 k=29

FreeHalfHour i,k,l + X 2 k=1

FreeHalfHour i,1,l+1 , 8i, 8l

(C9.7)

(31)

6 · ConsecutiveFreeHalfHours i,30,l  X 32 k=30

FreeHalfHour i,k,l + X 3 k=1

FreeHalfHour i,1,l+1 , 8i, 8l (C9.8)

6 · ConsecutiveFreeHalfHours i,31,l  X 32 k=31

FreeHalfHour i,k,l + X 4 k=1

FreeHalfHour i,1,l+1 , 8i, 8l (C9.9)

6 · ConsecutiveFreeHalfHours i,32,l  X 32 k=32

FreeHalfHour i,k,l + X 5 k=1

FreeHalfHour i,1,l+1 , 8i, 8l (C9.10)

7.2 Objective

In Model 2 there is one objective function applied.

7.2.1 Objective 2: Optimize an even distribution of scheduled hours with respect to forecasted hours by minimizing the maximal di↵erence

Objective 2 is chosen as objective function for Model 2 since it is less expensive in computational time. The di↵erence between this objective function and the one for Model 1 is that this function aims at minimizing the maximal di↵erence for each half hour over the entire period instead of the maximal di↵erence with respect to days. When summing over all agents i, for the variable x i,j,k,l , for each skill, the total scheduled time per skill is calculated. See the equations below.

X I i=1

x i,Channel,k,l = HoursChannel k,l (22)

X I i=1

x i,Direct,k,l = HoursDirect k,l (23)

X I i=1

x i,Product,k,l = HoursProduct k,l (24)

In the same manner as in Model 1, the absolute values may be linearized as follows, Equations 16 -21.

HoursChannel k,l ForecastChannel k,l  Di↵erenceChannel k,l (25)

(HoursChannel k,l ForecastChannel k,l )  Di↵erenceChannel k,l (26)

HoursDirect k,l ForecastDirect k,l  Di↵erenceDirect k,l (27)

(HoursDirect k,l ForecaslDirect k,l )  Di↵erenceDirect k,l (28)

HoursProduct k,l ForecastProduct k,l  Di↵erenceProduct k,l (29)

(HoursProduct ForecastProduct )  Di↵erenceProduct (30)

(32)

The maximum di↵erences per each skill is picked as the largest elements from matrices Di↵erenceChannel k,l , Di↵erenceDirect k,l and Di↵erenceProduct k,l respectively.

max {Di↵erenceChannel} Di↵erenceChannel k,l (31)

max {Di↵erenceDirect} Di↵erenceDirect k,l (32)

max {Di↵erenceProduct} Di↵erenceProduct k,l (33) And the final objective function is now expressed as,

minimize max {Di↵erenceChannel} + max {Di↵erenceDirect} + max {Di↵erenceProduct} (34)

(33)

8 Model 3: Complex Model

Model 3 is formulated to match the same data as Model 2, however, this model will attempt to reduce the number of variables and equations by including a set for the available shifts. A working day starts at 07.00 at the earliest and ends at 23.00 at the latest. Since a working shift is 8 hours long and the forecast is given in half hours there are 17 possible shifts. An illustration of the available shifts is presented in the Appendix, section 14.1.5.

In this optimization Model 3 the following sets are included.

Set Name Items Description

I Agents /1 ⇤ 104/ the set of available agents

J Skills /Channel, Direct, Product/ the set of agent skills

K Half Hours /1 ⇤ 32/ the set of half hours during one day

L Days /1 ⇤ 28/ the set of days over the period

M Shifts /1 ⇤ 17 the set of shifts during one day

S(L) Saturdays /6, 13, 20, 27/ the set of Saturdays U(L) Weekdays /1 ⇤ 5, 8 ⇤ 12, 15 ⇤ 19, 22 ⇤ 26/ the set of weekdays

The mixed integer linear programming uses a set of binary variables and integer variables, listed in the table below.

Variable Description

x i,j,k,l binary variable indicating whether agent i works on skill j at half hour k at day l

a i,l,m binary variable indicating whether agent i works at day l on shift m y i,l binary variable indicating whether agent i works at day l

Weekend i,l binary variable indicating whether agent i works at Saturday l FreeDay i,l binary variable indicating whether agent i has a day o↵ at day l ConsecutiveDays i,l binary variable indicating whether agent i starts a sequence of

consecutive workdays at day l

ConsecutiveFreeDays i,l binary variable indicating whether agent i starts a sequence of days o↵ at day l

8.1 Equations

In order to ensure that each agent is working consecutive half hours in a shift, the variable a i,l,m

is set to be less than or equal to 16 consecutive half hours in the variable x i,j,k,l summed over all

(34)

skills, according to Equations 26 - 30.

16 · a i,l,1  X J j=1

X 16 k=1

x i,j,k,l , 8i, 8l (35)

16 · a i,l,2  X J j=1

X 17 k=2

x i,j,k,l , 8i, 8l (36)

16 · a i,l,3  X J j=1

X 18 k=3

x i,j,k,l (37)

.. . (38)

16 · a i,l,17  X J j=1

X 32 k=17

x i,j,k,l , 8i, 8l (39)

Two auxiliary equations are added to the model, preventing each agent to only work one shift per day, Equation 31, and only work with one skill per half hour, Equation 32.

X M m=1

a i,l,m  1, 8i, 8l (40)

X J j=1

x i,j,k,l  1, 8i, 8k, 8l (41)

Furthermore, to ensure that agents only do work with skills they possess and that no scheduling is done when the forecast for Channel or Product is equal to zero, a fixing of the variables is made in GAMS, see Figure 1.

Figure 3: Fixed values Model 3

8.2 Constraints

In this model, the problem presents the same constraints as Model 2, but some of them are di↵erently mathematically formulated.

8.2.1 Constraint 1: Each agent must have c 1 days o↵

The amount of working days is received by summing the variable a i,l,m over the sets L and M.

This sum is then set to be equal to the total amount of days subtracted by the number of days o↵,

Equation (C1.1). To ensure that these are the only scheduled half hours, the varaiable x i,j,k,l is

(35)

summed over the sets J, K and L, calculating the total number of scheduled half hours per agents and set to be equal to 2 · c 2 · times the total numbers of days during the period subtracted by the number of days o↵.

X L l=1

X M m=1

a i,l,m = 28 c 1 , 8i (C1.1)

X J j=1

X K k=1

X L l=1

x i,j,k,l = 16 · (28 c 1 ), 8i (C1.2)

8.2.2 Constraint 2: A working day is c 2 hours long

Each day that an agent is working, the number of hours must be equal to c 2 , this constraint is met by summing the variable x i,j,k,l over the sets J and K and setting this sum equal to 2 · c 2 times a binary variable y i,l . The binary variable y i,l will be equal to 1 if agent i works on day l and 0 otherwise.

X J j=1

X K k=1

x i,j,k,l = 2 · c 2 · y i,l , 8i, 8l (C2)

8.2.3 Constraint 3: Each agent must have a minimum of c 3,min and a maximum of c 3,max days o↵ per week

The Mondays of the period are l = 1, 8, 15, 22 and by summing the variable a i,l,m over one executive week, i.e. 7 consecutive days starting on a Monday, the total amount of days scheduled that week is calculated. The amount of scheduled days on an executive week may not exceed 7 minus the minimum amount of days o↵ nor be less than 7 minus the maximum amount of days o↵, as stated in constraints (C3.1) and (C3.2).

X M m=1

X l+6 l= {1,8,15,22}

a i,l,m  7 c 3,min , 8i (C3.1)

X M m=1

X l+6 l={1,8,15,22}

a i,l,m 7 c 3,max , 8i (C3.2)

8.2.4 Constraint 4: There must be a minimum of c 4,min and a maximum of c 4,max

consecutive days o↵

Firstly, the variable a i,l,m is transformed into the variable FreeDay i,l , this variable is equal to 1 if agent i has day l o↵.

( X M m=1

a i,l,m 1) · ( 1) = FreeDay i,l , 8i, 8l (C4.1)

Secondly, summing the variable FreeDay i,l over c 4,max + 1 consecutive days and setting this value

less than, or equal to c 4,max ensures that each agent’s maximum number of days o↵ is fulfilling

part of Constraint 4. The variable ConsecutiveFreeDay i,l = 1 indicates that day l for agent i is the

start of a sequence of consecutive free days, the variable is intialized as equal to the first element

(36)

equal to 0, the variable ConsecutiveFreeDay i,l is assigned the value 1. Lastly, the product of c 4,min

and ConsecutiveFreeDay i,l is set to be less than or equal to the variable FreeDay i,l summed over c 4,min days, ensuring that each agent has the correct minimal amount of consecutive days o↵.

l+c 4,max 1

X

l=1

FreeDay i,l  c 4,max , 8i (C4.2)

ConsecutiveFreeDay i,1 = FreeDay i,1 , 8i (C4.3)

ConsecutiveFreeDay i,l = FreeDay i,l FreeDay i,l 1 , 8i, 8l > 1 (C4.4) c 4,min · ConsecutiveFreeDay i,l 

l+c 4,min 1

X

l=1

FreeDay i,l , 8i, 8l (C4.5)

8.2.5 Constraint 5: There must be a minimum of c 5,min and a maximum of c 5,max

consecutive workdays

Constraint 5 is formulated similar to Constraint 4, there is no need in this constraint to make a transformation since summing the variable a i,l,m over the set M gives the binary matrix indicating whether agent i is working on day l or not.

X M m=1

X l+6 l=1

a i,l,m  c 4,max , 8i (C5.1)

ConsecutiveDays i,1 = X M m=1

a i,1,m , 8i, 8l (C5.2)

ConsecutiveDays i,l X M m=1

a i,l,m

X M m=1

a i,l 1,m , 8i, 8l (C5.3)

c 4,min · ConsecutiveDays i,l  X M m=1

a i,l,m

X M m=1

a i,l+1,m , 8i, 8l (C5.4)

8.2.6 Constraint 6: Each agent must have a minimum of c 6,min and a maximum of c 6,max full weekends o↵ during the period

This constraint is formulated as Constraint 6 from Model 1. The di↵erence in this model is that the variable a i,l,m is summed over all shifts and over one weekend at a time.

X M m=1

X l+1 l= {6,13,20,27}

a i,l,m  2 · (1 Weekend i,l ), 8i (C6.1)

X M m=1

X l+1 l= {6,13,20,27}

a i,l,m 1 · (1 Weekend i,l ), 8i (C6.2)

X

l={6,13,20,27}

Weekend i,l c 6,min , 8i (C6.3)

X

l= {6,13,20,27}

Weekend i,l  c 6,max , 8i (C6.4)

(37)

8.2.7 Constraint 7: Each agent must have a minimum of c 7,min and a maximum of c 7,max weekend days o↵ during the period

In the same manner as constraint 6, constraint 7 only di↵ers from model 1 in what variable is summed, in this case variable a i,l,m is summed over all weekend days and all shifts.

X M m=1

X l+1 l={6,13,20,27}

a i,l,m  8 c 7,min , 8i (C7.1)

X M m=1

X l+1 l= {6,13,20,27}

a i,l,m 8 c 7,max , 8i (C7.2)

8.2.8 Constraint 8: Each agent must work a consecutive shift of c 8 hours

Constraint 8 is covered by the model formulation in the first equations since the set of shifts is added to the model.

8.2.9 Constraint 9: Each agent must have a minimum of c 9 hours o↵ in between working shifts

In comparison to Constraint 9 in Model 2, the formulation of Constraint 9 in Model 3 is simpler. As mentioned earlier, each agent already have at least 8 hours o↵ between shifts, leaving 3 hours = 6 half hours that need to be regulated through constraints. There are five possible combinations where this constraint might be violated, for example if an agent works until half hour 31 this agent is not allowed to work until half hour 6 the upcoming day. The following table illustrates this example.

Half Hour ... 28 29 30 31 32

Day l X X X X -

Half Hour 1 2 3 4 5 ...

Day l + 1 - - - - -

The five aforementioned possible combinations give rise to five constraints. Starting from shift

m = 14 on day l up to shift m = 1 and summing over the following five shifts, six in total, the

sum over the variable a i,l,m is set to be less than or equal to 1, ensuring that no agent’s scheduling

violates Constraint 9.

(38)

a i,l+1,1 + X 17 m=13

a i,l,m  1, 8i, 8l (C9.1)

X 17 m=14

a i,l,m + X 2 m=1

a i,l+1,m  1, 8i, 8l (C9.2)

X 17 m=15

a i,l,m + X 3 m=1

a i,l+1,m  1, 8i, 8l (C9.3)

X 17 m=16

a i,l,m + X 4 m=1

a i,l+1,m  1, 8i, 8l (C9.4)

a i,l,17 + X 5 m=1

a i,l+1,m , 8i, 8l  1 (C9.5)

8.3 Objective function

In Model 3, objective function 2 from Model 2 is applied. The mathematical formulation is exactly

the same.

(39)

9 Results

In this section the results from Teleopti, Model 1 Objective function 1, Model 1 Objective function 2, Model 2 and Model 3 are presented and analyzed. Each solution is presented visually in the form of plots and in resulting di↵erences in absolute value and percentage. All figures in this thesis presents the forecasted demand in blue and the scheduled hours in red.

9.1 Teleopti

The solution provided by Teleopti’s scheduler performs three steps as stated in the section Teleopti.

The initial step, that sets each agent to work according to the constraints, takes 35 seconds. The second step, determining which days each agents should be assigned to work takes 26 seconds and the last step, determining what shift within the set days each agent should be scheduled to takes 3 minutes. This is a total solution time of 4 minutes and 1 second. It is important to notice that this model does the same scheduling as Model 2 and Model 3, the optimization referred to as the Complex Model.

Solution time Step 1 35 s.

Step 2 26 s.

Step 3 3 min.

Analyzing Figure 4, Teleopti’s scheduler performs very well. The skills Channel and Product are

over sta↵ed, Direct is under sta↵ed and the distribution within each skill is even. Channel is slightly

more over sta↵ed than Product, and the scheduled solution performs as to be assumed from the

forecasted demand combined with the available agents. There are not enough agents that do possess

skill Direct to met the demand and these agents must be distributed over the skill or skills they do

possess.

(40)

Figure 4: Total amount of scheduled hours for all skills for Teleopti’s Scheduler.

Since each skill is evenly distributed in over or under staffing the total amount of scheduled hours also matches the total forecasted demand. Some days are over sta↵ed and some days are under sta↵ed, the under sta↵ed days are the days with a large forecasted demand in Direct and where Channel is unscheduled.

Figure 5: Total amount of scheduled hours summarized over all skills for Teleopti’s Scheduler.

In the following tables the absolute di↵erences in hours and the di↵erence in percentage per day and

per skill is presented. For the skill Channel the interval of absolute di↵erence span from + 28.62

(41)

hours to + 42.92 hours. The di↵erence in percentage lies around + 25 % and the model has favoured to schedule days at the end of the each week.

Note: The solution provided by Teleopti was reported as di↵erence in percentage per half hour and later recalculated in MATLAB into the di↵erences presented in these tables. Due to round o↵ error from these calculations the presented values are decimal numbers.

Teleopti

Channel Monday Tuesday Wednesday Thursday Friday Saturday Sunday W 1 Di↵ +30.72 h +29.21 h +28.62 h +30.41 h +39.63 h +0 h +0 h

Perc +19.60% +19.48% +19.08% +20.00% +25.90% -% -%

W 2 Di↵ +29.70 h +29.58 h +29.41 h +30.76 h +34.96 h +0 h +0 h

Perc +18.92% +18.96% +18.86% +19.35% +24.79% -% -%

W 3 Di↵ +30.32 h +31.33 h +29.40 h +30.91 h +42.92 h +0 h +0 h

Perc +18.60% +21.03% +19.73% +20.33% + 31.80% -% -%

W 4 Di↵ +29.92 h +30.99 h +30.86 h +31.75 h +40.70 h +0 h +0 h

Perc +19.18% +19.61% +19.53% +22.05% +32.05% -% -%

The skill Direct is under sta↵ed each day, percentage wise the di↵erence lies around -17 % and is even better distributed than the skill Channel.

Teleopti

Direct Monday Tuesday Wednesday Thursday Friday Saturday Sunday W 1 Di↵ -36.15 h -52.05 h -56.00 h -55.99 h -54.57 h -50.01 h -51.04 h Perc -17.22% -16.79% -16.19% -17.28% -17.00% -15.93% -17.60%

W 2 Di↵ -38.01 h -45.03 h -59.98 h -59.02 h -45.83 h -44.01 h -44.11 h Perc -18.27% -15.16% -17.04% -17.94% -14.01% -13.75% -14.90%

W 3 Di↵ -38.03 h -43.54 h -57.98 h -58.01 h -35.82 h -42.00 h -39.01 h Perc -17.94% -14.37% -16.95% -18.13% -11.30% -13.55% -13.59%

W 4 Di↵ -38.01 h -45.03 h -60.00 h -52.24 h -34.12 h -45.99 h -48.01 h Perc -18.45% -15.26% -15.15% -14.11% -12.97% -17.97% -20.17%

Analyzing the table for skill Product, the amount of over sta↵ed hours spans an interval from +

1.87 hours to + 30.60 hours. Each Friday stands out in the sense that these days are the least over

sta↵ed, the Saturdays are also slightly less over sta↵ed than the remaining weekdays that are evenly

distributed in absolute di↵erence. This trend is also noted in di↵erences presented in percentage.

References

Related documents

The continuity-related results included key evaluation indicators average caregiver continuity, average day continuity and average time continuity, while the non-continuity

We have taken a somewhat dierent perspective in the main result, Theorem 3.1, showing that a traditional model validation test immediately gives a \hard" bound on an integral of

31 from these international programmes and proposes that in addition to competencies  in  public  health,  health  care  managers  also  required  general 

Meanwhile, a goal programming based method is illustrated to solve the problem of critical path identifi cation, considering four considerable criteria including time, cost,

xed hypotheses in general linear multivariate models with one or more Gaussian covariates. The method uses a reduced covariance matrix, scaled hypothesis sum of squares, and

We develop a sound, complete, and practically implementable tableau-based decision method for constructive satisfiability testing and model synthesis for the fragment ATL+ of the

As for case 1, the left panel in figure 4.4 shows the frequencies of selected compartment combinations used for the two load items carried in case 2 tests, normal (BY) and priority

Av tabellen framgår att det behövs utförlig information om de projekt som genomförs vid instituten. Då Tillväxtanalys ska föreslå en metod som kan visa hur institutens verksamhet