Managing Schedules Efficiently Using Integer Programming...

28
1 Managing Schedules Efficiently Using Integer Programming and Assignment Methods Amadou Bocoum Spring 2012 In Partial Fulfillment of Stat 4395-Senior Project Department of Computer and Mathematical Sciences Faculty Advisor: Dr. Timothy Redl _________________________________ Committee Member: Dr. Katarina Jegdic _________________________________ Committee Member: Dr. Kendra Mhoon _________________________________ Department Chairman: Dr. Dennis Rodriguez _________________________________

Transcript of Managing Schedules Efficiently Using Integer Programming...

1

Managing Schedules Efficiently Using Integer

Programming and Assignment Methods

Amadou Bocoum

Spring 2012

In Partial Fulfillment of

Stat 4395-Senior Project

Department of Computer and Mathematical Sciences

Faculty Advisor:

Dr. Timothy Redl _________________________________

Committee Member:

Dr. Katarina Jegdic _________________________________

Committee Member:

Dr. Kendra Mhoon _________________________________

Department Chairman: Dr. Dennis Rodriguez _________________________________

2

Table of Contents

Abstract 3

Introduction 4

Definitions 5

Binary Integer 8

Techniques of Solving Integer Programming 19

Example of branch and Bound methods 10

Problem to be solved 14

Illustration graphic of the problem 15

Shape the problem mathematically 16

Set up of the LP 17

Solution of the problem 18

Analyze, interpretation of the solution and the variation of the problem 22

Analyze of overall table 26

General Conclusion 27

Work cited 28

3

Abstract

Scheduling has always been a big problem among small and big business. The purpose of this

paper is to optimize the schedule of a company at a minimum cost of labor using integer

programming and assignment method.

The goal of the research is also to analyze different cases of variation of the schedule and

optimize those cases.

4

Introduction: Scheduling Problem

The objective of every company is to maximize its profits and minimize its cots. Scheduling is a

tremendous problem for the management of a company. The manager should consider many

aspects (costs, rush hours, reliable personnel) in order to make up the schedule. Most of the big

and small businesses have a big problem of scheduling. Most of the time customers wait inside

the store or on “drive through” for a long period of time before they get their food. Managers

have a little knowledge about computing the schedule in order to minimize the cost and to

make profit. On the week basic they schedule workers on their availability. Sometime, they are

more workers than jobs to do and the labor become very high during that time and when the

rush hour comes the store is short of workers and it loses a lot of money and customers that

become very hungry due to the waiting time to get their order. Many managers get fired due to

the problem of scheduling. For the purpose of my paper, the project will be about making the

schedule of a store at a minimum cost of labor on a twenty four hours basis into three shifts

using integers programming and assignment methods. I am going to use real data get from that

store manager and then compute the data. The project will also going to use software called

Tora in order to compute the algorithm.

5

What is integer programming and Assignment methods?

1 Integer programming:

An integer programming is a linear programming with the added requirement that all variables

be integers [2]. And a linear programming (LP) is a mathematical method of determining the

best outcome such as maximizing the revenue or minimizing the cost in a given model under

certain constraints and linear relationships. Integer programming is a specific case of solving

optimization problems. In an optimization problem, one seeks to maximize or minimize a

specific quantity in our case labor (hours work by an employee in a shift) called the objective

function which depends on a finite number of input variables. These variables may be

independent of one another, or they may be related through one or more constraints [5].

2- Assignment:

Assignment problems involve scheduling workers to jobs on a one-to-one basis [4]. The number

of workers is presumed equal to the number of job. The objective is to schedule every worker

to a job so that all jobs are completed at the minimum cost. Assignment problems can be

converted into transportation problems by considering the workers as sources and the jobs as

destinations, where all supplies and demands are equal to one. But for my algorithm there

would be three destinations but each destination has a demand greater than one.

6

Since we are dealing with people and hours, it will be very messy to deal with fractions

therefore we have to use only integer number to be able to describe the problem efficiently.

Tora has an integer programming in store in the assignment method of computing the problem.

Therefore the assignment method could also be used to compute the problem and it will be like

a check and balance between the two methods.

To solve the algorithm using integer programming we will have to set up the linear program

(LP) of the problem. My objective is to make an optimum schedule, the one with the efficient

number of workers at a given shift and at a minimum cost; the objective function would be to

minimize the costs. After setting up The LP of the problem and taking account all the

constraints, I will use Tora in order to find the optimum solution and the objective value

solution. After that, I will use the solution found by Tora to interpret the solution efficiently and

if possible make a tableau.

Integer Programming

Integer programming has been widely used in conducting optimization research. A special case

of integer programming is the binary integer programming. In binary problem, each variable

can only take on the value 0 or 1 [1]. This may represent the selection or rejection of an option,

yes or no questions, an accepted or failed problem, even or odd problems or many other

situations.

Example of a binary programming

7

One example of the binary integer program is to find the number and positions of points in a

cadre such that no points attack each other and then that those points cover all the

points in the rectangle. In graph theory, this problem can be seen as finding the independence

domination number. The only difficulty we may get while solving this kind of problem is to set

up the right LP. We suppose that

Min

Subject to:

In order for the algorithm to work we have to put in the LP that the sum of all the points in the

same diagonal has to be equal to one. And we will consider binary integers. We consider a

example. We want to:

• Choose few points as possible

• All boxes must be covered

• No points in adjacent boxes are chosen like the figure below.

8

1 2 3

2

3

To solve this problem, we have to compute the following LP

Minimize

Subject to:

With

9

Techniques of solving Integer programming

There are many techniques used to solve integer programming problems. The two most

techniques used are called cutting plane method and branch and bonding method

The cutting plane method consists in adding one or more constraints to the integers

programming problems to help produce an optimum integer solution [2].

There are no theoretical reasons for choosing between the cut algorithm and Branch-and-

Bound algorithm. The only difference is the computing time saved from branch and Bound and

also that it is the newer of the two procedures and appears to be favored slightly among

practitioners. The Branch and Bound method is also the one that will be used in this project.

Branch and Bound (BB) is an algorithm uses to find optimum integer solution of various

optimization problems. It consists of a systematic enumeration of all candidates solution by

using upper and lower estimated bounds of the quantity being optimized [2]. If the first

approximation contains a variable that is not an integer, say X*, then i<X*<J, where I and j are

consecutive, nonnegative integers. Two new integer programs are then created by replacing

the original integer program with X≤ i on the first program and X≥ j on the second one. This is

the branching part of the technique. It has the effect of shrinking the feasibility region in a way

that eliminates from further consideration the current non integral solution for X but still

preserves all possible integral solutions to the original problem [3]. Let’s consider the following

Integer program in which we want the output X1, X2, X3 and X4 to be integers. Let’s proceed by

10

branch and Bound technique. Assume that the following linear program (LP) has to have integer

output and we want to solve it by branch and bound method.

Example of a branch and bound method

Program1

Maximize:

Subject to:

With:

This problem can be solved in many ways either graphically or algebraically. For the purpose of

the branch and bound method we neglect the integer requirement. Solving the equation we

obtain . Since we want to get only integer values out of

the problem we cannot stop the procedure and that is where the branch and bound method

start.

Since nether is integer we can branch the system with either the two consecutives

integer values of is further from an integer value than , therefore we use the

bounded consecutives integer to branch the system with and to generate the following LPS

where in one part we have and the second part . Remarks that 1 and 2 are the

consecutives integers of 1.5.

Program 2

Maximize:

Subject to:

11

With:

Solving this problem algebraically gives us the following result

Program3

Maximize:

Subject to:

With:

Solving program3 gives us the following result

Both program 3 an2 have nonintegral values, we could branch from either one of them. But

program3 has a more value of Z than program2 and since the objective function is to maximize

therefore program3 is chosen.

In program3, is the only nonintegral variable so we do not have to choose with variable to

bound since we only bound nonintegers variables in the B&B method. We will have the

following programs

Program4

Maximize:

Subject to:

With:

12

Solving program4 algebraically gives us

Program5

Maximize:

Subject to:

With:

We can clearly see that program5 is infeasible.

Now the branching can continue either from program2 or program4. But we choose program4

since it has an optimum value of Z than program2.

From program4 we can generate two more programs by bounding again.

Program6

Maximize:

Subject to:

With:

Solving program6 gives us the following solution . Since this is an

integral solution Z=11 is a lower bound from the problem and any value of Z that is lower than

13

11 will not be accepted due to the objective function that is to maximize. But we have another

program left in consideration.

Program7

Maximize:

Subject to:

With:

Solving program7 algebraically give us the following solution

The Z in problem7 is greater than the Z in problem6 and it also yields some integer, it also

greater than the Z in problem2. If The Z in problem7 was less than the one in problem2 the BB

algorithm will link back to problem2 and create more problem until it gets an optimal value Z

greater than 12. Therefore the Z in problem 7 is optimal.

14

Senior Project Problem Description

This project will be about managing the schedule of a company that has 20 employees. Most of

the employees are paid at the minimum wage salary that is7.25 per hour except four of them;

three assistant managers (AS) and one general manager (GM). The three AS are paid around

nine dollars per hour and the general manager has a salary; therefore his check does not

depend on the hour he works but anytime he clocks in to work the computer show a significant

increase in the labor. If the GM is able to maintain the labor efficiently, he will get a bonus

check. His objective is to minimize the cost at any shift. The company has three shifts a day and

open 5 days a week. Each shift is worth 8 hours and the employees are given a 30 minutes

break that is not deductive from their check. The GM wants to minimize the cost of the labor.

We will assume in the project that all the employees are working full time, no overtime is

allowed. The problem with the shifts is that the third shift is slowest business time i.e. the

company makes less money than the other two and the second one is the busier one i.e. the

company makes a lot of money and the first one is steady with some down and up time in

business. By that the company is willing to put more employees in the second shift than the

other two and more employees in the first than the third. Some employees are willing to work

any shift they are schedule (split their hours of work between shifts), some on only two shifts

and some only on a particular shift. Based on how the business works the company want to

allocate at least 70 hours a day for the second shift, at least 50 hours for the first and at least 25

hours for the third shift.

15

Graph of the problem

16

In the figure above the center boxes represent the shifts and the extreme ones represent the

employees. Each blue line represents a variable. There should be a total of 60 of them. The

number on the line represent the maximum hour that an employee is able to work at a given

shift. That number should be between [0, 8].

Solving the Problem:

Integer Programming:

When using integer programming to solve any problem, we have first to know the

objective of the problem. Here, since we are trying to reduce the costs of labor, we will

take it as a minimization problem.

The objective function will then be: Min Z= I with Si the wages of the employees.

Since we have 3 shifts and 20 employees, we will then have a total of 3*20 variables= 60

variables. The number of constraints is 20+3= 23 constraints. The first three constraints

are the shift constraints. Since each shift has a minimum number of hours that has to be

fulfill. The 20 other constraints are for employees since each employee has a demand

for a particular shift and their total hours should not exceed 8 hours. Modeling this kind

of problem would consist of solving the following linear equations.

Minimize Z = where W is the wage of the employees

The first three constraints are

17

is the availability of the employee at the shift j.

The last twenty equations are

is the maximum hour that an employee can work at all combine shift. The LP

associated to the problem looks like the following:

Minimize Z=

Subject to:

18

With all the

Solving this equations using Tora gives the following table:

S₁ S₂ S₃ TOTAL

GM 0 0 0 0

AS₁ 0 1 0 1

AS₂ 0 0 8 8

AS₃ 0 0 8 8

19

E₁ 4 4 0 8

E₂ 0 8 0 8

E₃ 0 4 4 8

E₄ 0 6 2 8

E₅ 0 8 0 8

E₆ 0 8 0 8

E₇ 0 8 0 8

E₈ 5 3 0 8

E₉ 0 8 0 8

E₁₀ 5 0 3 8

E₁₁ 0 8 0 8

E₁₂ 8 0 0 8

E₁₃ 8 0 0 8

20

E₁₄ 8 0 0 8

E₁₅ 5 3 0 8

E₁₆ 7 1 0 8

The objective value is Z=1081$ and it was found at the first iteration and verified at the second.

Analyze of the solution S₁ = 50; S₂= 70; S₃=25

By inspection we see that the optimal solution allocate no hour for the GM and only one 1 hour

for the AS₁. This is in part due to the minimization of the objective function and also that the

dual price of the GM is far greater than the rest of the employee. An increase of the amount of

hour of GM will imply a greater increase in the objective function that we are trying to

minimize. Therefore it will be fine to not allocate any hour to GM unless it has been given a

lower bound greater than 0. We can force the solution so that the GM can work. For that we

will have to increase the lower bond of the GM at any shift to say that he will have to work at

least the hour we want him to work and we will see how the optimal solution will change.

From this fact less increases the lower bound of the GM at the first shift from 0 to 8. That mean

we want him to work at the first shift and compare it from the preceding result:

The objective value Z= 1105 the optimum solution was found at iteration 1 and result verified at

iteration 2. The red rows are the rows that have changed from the previous table

21

S₁ = 50; S₂= 71; S₃=24

22

Increasing the lower bound of the GM has implied a change in the schedule and an increase of

the objective function. Some employee hour has stayed unchanged. We can also see in the new

table that there is almost no management scheduled in the second shift.

We can also read from the table that not all the shifts are optimal i.e. the third shift doesn’t

have the minimum number of hour needed while the second shift has an excess of one hour of

the minimum required. That tell us even though we have more hours for people to work on

that shift it will not be covered because people don’t want to work at that time. The

management can have the following solution:

Make people work at that shift by increasing the wage at that shift than the other two

so that many people would want to work at that shift.

Hire more people to work only on that shift to cover the lack

Reinforce lower bound of the management team at the first shift

To see which solution is optimal between this two, the management would have to solve

another program different from this one in which it will increase the wage of the people that

want to work at that shift and also it would have to put some lower bond otherwise no hour

will be allocate at the worker at that shift because they can be paid at a minimum wage at

another shift different from the first one. For the second case the program will introduce new

variable that has the same wage everywhere but have availability to work only on the first shift.

The third case would not be optimal because increase the number of hour of the management

will increase the objective function that we want to keep minimum and also if we increase the

lower bond of the management at that shift fewer hours will be available for them to work for

23

the other shift. So the first and second case will have to be the optimal ones and the third case

will be considered only if those two will not be able to in a short time.

We can also read on the table that all the employees still have the same eight hours for the

entire shifts they can work. The employees that have their schedule changed was in part due to

the fact that the GM was given eight hours to work on the first shift and since those employees

can work on other shifts it is necessary to put them in another shift to equilibrate the constraint

of that shift (i.e. try to keep it 50) any difference of hours (if the first shift was more than 50,

excess-50) can be distributed among the other shift to have them in equilibrium too.

We can also imply from these two tables that any adjustment of the lower bond of the GM or

the assistants will only allocate that adjustment at the place we made it but the employee’s

hours will always remain a total of eight, the only thing that can change is their schedule. To

confirm this lets considerer a third case where we make the lower bound of the AS₁ and AS₂ 4 at

the second shift since we don’t have any management working at that shift.

In the following table we see that AS₁ and AS₂ have been assigned four hours each on the

second shift but AS₃ hours has been cut down to one. To equilibrate that change some

employees schedule have change but they still have the same eight hours. Since AS₃ cannot

work on the first shift let’s increase his/her lower bound on the third shift from 0 to 8

Z=1105

24

25

Z= 1117.25

Increasing the lower bound of AS₃ to 8 gives us the last table. But we see that E₁₆ has

only been assigned one hour. He/her will prefer in that case not to come to work

26

because the cost of attending work (time, transportation etc……) is greater than the

benefit of working one hour. And if He/she decides not to come the company will be

short one hour of labor. If that happen the company can either:

Cut down everybody hour( decrease the upper bound)

Lay out one of the assistant and make the GM cover that lack of management

since his/her salary is fixed and give that assistant hour to E₁₆ because the dual

price of the employees is far less than the one of the assistant.

Analyze of the overall table:

We can remark that in all four tables the maximum total hour to cover the entire shifts is equal

to 145. This give us an incentive that if we increase the lower bound of the management there

will not be an increase of the maximum hour to overcome that increase but instead hours are

taken from some worker to compensate that increase, like we see clearly on the last table. But

the objective function change.

27

Conclusion:

The project has permitted me to understand deeply the way integer programming works. The

only real problem with the model is the concordance of the shift. We were able to assign hours

to workers. The real problem now is what time those employees will work at that given shift.

For the employees that have eight hours in a shift, there is not a problem but for those ones

that have fewer than eight will be difficult to schedule again. For instance for an employee that

is scheduled for 3 hours in a shift we don’t know at this point where to schedule the employee.

We may want to put him on the first three hours or the last three hours or on the middle of the

schedule. To overcome this problem we will have to compute an LP for each shift and that will

be another problem to solve and a future work for me. As you may see in the research we

didn’t talk a lot about the assignment method of solving the problem and that also will be

considered as a future work. Other than that the problem works very fine and to adjust any

changes in the schedule we just may change it at the constraints level and Tora will give us and

optimal solution.

28

References:

[1] John W Chinneck 2004: Practical Optimization: A gentle Introduction www.sce.carleton.ca/faculty/chinneck/po.html [2] Rim Jaber Binary Integer Programming

www.pageout.net/user/www/r/j/rjaber/week7/1.%20IPandBIP.ppt

[3] Operation Research second Edition: Richard Bronson Govindasami Naadimuthu [4] Integer and Combinatorial Optimization: Laurence A. Wolsey, George L. Nemhauser

[5] Schaum's Outline of Theory and Problems of Operations Management (Schaum's Outline Series) Joseph G. Monks