Sie sind auf Seite 1von 17

Modeling for Decisions

Sachin Jayaswal
Indian Institute of Management Ahmedabad

sachin@iimahd.ernet.in

Worker scheduling model

A post office requires different numbers of full-time


employees on different days of the week.
Day of Week
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

Min. no. of Workers Required


17
13
15
19
14
16
11

Union rules state that each full-time employee must work 5


consecutive days and then receive 2 days off.
For example, an employee who works Monday to Friday must have
Saturday and Sunday off.

Rothstein, M. 1973. Hospital manpower shift scheduling by Mathematical Programming. Health Services Research, 8 (1), 60-66.

Objective

Find a schedule that meets all daily workforce requirements


with the minimum number of workers.

For the time being, assume fractional workers are permitted.

Choice of Decision Variables


yj

: Number of workers on day j

Objective Function:
Minimize

y1 + y2 + y3 + y4 + y5 + y6 + y7 ???

Constraints:
1. Workers on day j is at least dj

2. Each worker works 5 days followed by 2 days off.

How do you model constraint set 2?


4

Choice of Decision Variables

Let x1 be the number of workers who start working on


Monday, and work till Friday
Let x2 be the number of workers who start on Tuesday
Let x3, x4, , x7 be defined similarly.

The Linear Program


Day

Mon Tues Wed

Demand

17

13

15

Thurs

Fri

Sat

Sun

19

14

16

11

Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7

subject to

x1 +
x4 + x5 + x6 + x7 17
x1 + x2 +
x5 + x6 + x7 13
x1 + x2 + x3 +
x6 + x7 15
x1 + x2 + x3 + x4 +
x7 19
x1 + x2 + x3 + x4 + x5
14
x2 + x3 + x4 + x5 + x6
16
x3 + x4 + x5 + x6 + x7 11
xj 0 for j = 1 to 7

Enhancements
Suppose one wants to minimize the maximum of the
excesses:

Minimize Maximum Excess


Minimize Max {(x1 +
x4 + x5 + x6 + x7 - 17), (x1 + x2 +
x5 + x6 + x7 - 13), (x1 + x2 + x3 +
x6 + x7 - 15), (x1 + x2 + x3 +
x4 +
x7 - 19 ), (x1 + x2 + x3 + x4 + x5 - 14), (x2 + x3 + x4 + x5 +
x6 - 16 ), (x3 + x4 + x5 + x6 + x7 - 11)}
subject to

x4 + x5 + x6 + x7 17

x1 +

x5 + x6 + x7 13

x1 + x 2 +
x1 + x 2 + x 3 +

x6 + x7 15

x1 + x 2 + x 3 + x 4 +
x1 + x 2 + x 3 + x 4 + x5
x2 + x 3 + x 4 + x 5 + x 6

x7 19
14
16

x3 + x4 + x5 + x6 + x7 11
xj 0 for j = 1 to 7
Is the Objective Function Linear?
Can it be made Linear?

Linearizing a non-linear function


Consider

z = Max (x1, x2). Then:

z = x1 if x1 x2
z = x2 if x2 x1
How can you rewrite: Minimize Max (x1, x2)?
If we rewrite it as:

Minimize z

then,
z x1
z x1

Minimize Maximum Excess


Minimize
subject to

z
x1 +

x4 + x5 + x6 + x7

17

x5 + x6 + x7

13

x6 + x7

15

x7

19

x1 + x2 +
x1 + x2 + x3 +
x1 + x2 + x3 + x4 +

14

x1 + x2 + x3 + x4 + x5
x2 + x3 + x4 + x5 + x6
x3 + x4 + x5 + x6 + x7

16
11

xj 0 for j = 1 to 7
z x1 +
z x1 + x2

x4 + x5 + x6 + x7 - 17
+ x5 + x6 + x7 - 13

z x1 + x2 + x3 +
z x1 + x2 + x3 + x4 +

x6 + x7 - 15
x7 - 19

10

Minimize Maximum Excess contd..

z x1 + x2 + x3 + x4 + x5

- 14

- 16

x2 + x3 + x4 + x5 + x6
x3 + x4 + x5 + x6 + x7

- 11

The new constraint ensures that z (excess of each day)


The objective ensures that z = max of them.

11

Minimize Total Deviations


Suppose it is not strictly necessary but desirable to
meet the worker requirement for each day.
In such a case, one may want to minimize the total
deviation (sum of all excesses and shortfalls) across
days:

12

Minimize Total Deviations


Suppose that the goal is to have dj workers on day j. Let yj be
the number of workers on day j.
Suppose that the objective is: Minimize

| yj dj |

Is the Objective Function Linear?

Can it be made Linear?

13

Linearizing a non-linear function


How can you rewrite: zj = | yj dj | ?
zj = Max{(yj dj), (dj yj)}
zj = yj dj if yj dj
zj = dj yj if dj yj
How can you rewrite: Minimize

If we rewrite it as:

Sz

Minimize

| yj dj |?

then,
zj yj dj
zj dj y

14

+ + + + + +
subject to z1 x1 +
z2 x1 + x2

x4 + x5 + x6 + x7 - 17
+ x5 + x6 + x7 - 13

z3 x1 + x2 + x3 +

x6 + x7 - 15

z4 x1 + x2 + x3 + x4 +

x7 - 19

z5 x1 + x2 + x3 + x4 + x5

- 14

z6

- 16

z7

x2 + x3 + x4 + x5 + x6

x3 + x4 + x5 + x6 + x7 - 11

15

Continued
z1 17 (x1 +
z2 13 (x1 + x2

x4 + x5 + x6 + x7)
+ x5 + x6 + x7)

z3 15 (x1 + x2 + x3 +

x6 + x7)

z4 19 (x1 + x2 + x3 + x4 +

x7)

z5 14 (x1 + x2 + x3 + x4 + x5)
z6 16 (
z7 11 (

x2 + x3 + x4 + x5 + x6)
x3 + x4 + x5 + x6 + x7)

x1, x2, x3, x4, x5, x6, x7 0

The constraints ensure that zj | yj dj | for each j.


The objective ensures that zj = | yj dj | for each j.

16

Alternatively
Minimize
subject to

S e +S s
j

x1 +

x4 + x5 + x6 + x7 - e1 + s1 = 17
x5 + x6 + x7 e2 + s2 = 13

x1 + x2 +
x1 + x2 + x3 +

x6 + x7 e3 + s3 = 15

x1 + x2 + x3 + x4 +
x1 + x2 + x3 + x4 + x5
x2 + x3 + x4 + x5 + x6

x7 e4 + s4 = 19
- e5 + s5 = 14
- e6 + s6 = 16

x3 + x4 + x5 + x6 + x7 e7 + s7 = 11
xj 0 , for j = 1 to 7
ej 0 for j = 1 to 7.
sj 0 for j = 1 to 7.

17

Das könnte Ihnen auch gefallen