Professional Documents
Culture Documents
4
• PERSONNEL
SCHEDULING • BINARY
• RADIATION • GOAL
PART I PART II
THERAPY • NON-LINEAR
• OIL REFINING PROGRAMMING
• INTEGER 1
1
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 1
More Linear Programming Models
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 2
Overview
– 5 in 7 scheduling problem
• The model
Personnel Scheduling • Practical enhancements or
Programming Models modifications
• Two non-linear objectives that can be
made linear
• A non-linear constraint that can be
made linear
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 3
Overview
5 in 7 scheduling problem
– The model
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 4
Scheduling Postal Workers
Each postal worker works for 5 consecutive days,
followed by 2 days off, repeated weekly.
Demand 17 13 15 19 14 16 11
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 5
Formulating as an LP
Select the 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.
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 6
Day Mon Tues Wed Thurs Fri Sat Sun
The linear
Demand 17 program
13 15 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
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 7
On the selection of decision variables
Would it be possible to have yj be the
number of workers on day j?
– Workers on day j is at least dj.
– Each worker works 5 days on followed by 2
days off.
Conclusion: sometimes the decision
variables incorporate constraints of the
problem.
– Hard to do this well, but worth keeping in mind
– We will see more of this in integer
programming.
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 8
Some Enhancements of the Model
Suppose that there was a pay differential. The
cost of workers who start work on day j is cj
per worker.
Minimize z = c1 x1 + c2 x2 + c3 x3 + … + c7 x7
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 9
Overview
5 in 7 scheduling problem
– The model
– Practical enhancements or modifications
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 10
Some Enhancements of the Model
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 11
What is the Revised Linear Program?
Minimize z = z = c1 x1 + c2 x2 + c3 x3 + … + c7 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
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 12
Minimize z = c1 x1 + c2 x2 + c3 x3 + … + c7 x7
+ PT1 y1 + PT2 y2 + … + PT7 y7
subject to x1 + x4 + x5 + x6 + x7 + y1 17
x1 + x2 + x5 + x6 + x7 + y2 13
x1 + x2 + x3 + x6 + x7 + y3 15
x1 + x2 + x3 + x4 + x7 + y4 19
x1 + x2 + x3 + x4 + x5 + y5 14
x2 + x3 + x4 + x5 + x6 + y6 16
x3 + x4 + x5 + x6 + x7 + y7 11
xj 0 , yj 0 for j = 1 to 7
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 13
Another Enhancement
Suppose that the number of workers required on
day j is dj. Let yj be the number of workers on
day j.
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 14
What is the Revised Linear Program?
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
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 15
Minimize
z = f1(s1) + f2(s2) + f3(s3) + f4(s4) + f5(s5) + f6(s6) + f7(s7)
subject to x1 + x4 + x5 + x6 + x7 - s1 = 17
x1 + x2 + x5 + x6 + x7 - s2 = 13
x1 + x2 + x3 + x6 + x7 - s3 = 15
x1 + x2 + x3 + x4 + x7 - s4 = 19
x1 + x2 + x3 + x4 + x5 - s5 = 14
x2 + x3 + x4 + x5 + x6 - s6 = 16
x3 + x4 + x5 + x6 + x7 - s7 = 11
xj 0 , sj 0 for j = 1 to 7
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 16
Overview
5 in 7 scheduling problem
– The model
– Practical enhancements or modifications
– Two non-linear objectives that can be made
linear
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 17
A non-linear objective that often can be made
linear.
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 18
Minimize z
z sj for j = 1 to 7.
subject to x1 + x4 + x5 + x6 + x7 - s1 = 17
x 1 + x2 + x5 + x6 + x7 - s2 = 13
x1 + x2 + x3 + x6 + x7 - s3 = 15
x1 + x2 + x3 + x4 + x7 - s4 = 19
x1 + x2 + x3 + x4 + x5 - s5 = 14
x2 + x3 + x4 + x5 + x6 - s6 = 16
x3 + x4 + x5 + x6 + x7 - s7 = 11
xj 0 , sj 0 for j = 1 to 7
The new constraint ensures that z max (s1, …, s7)
The objective ensures that z = sj for some j.
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 19
Another non-linear objective that often can be
made linear.
Suppose that the “goal” is to have dj workers on
day j. Let yj be the number of workers on day j.
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 20
Minimize Sj zj
z j d j - yj for j = 1 to 7.
zj yj - dj for j = 1 to 7.
subject to x1 + x4 + x5 + x6 + x7 = y1
x 1 + x2 + x5 + x6 + x7 = y2
x1 + x2 + x3 + x6 + x7 = y3
x1 + x2 + x3 + x4 + x7 = y4
x1 + x2 + x3 + x4 + x5 - = y5
x2 + x3 + x4 + x5 + x6 = y6
x3 + x4 + x5 + x6 + x7 = y7
xj 0 , yj 0 for j = 1 to 7
The new constraints ensure that zj | yj – dj | for each j.
The objective ensures that zj = | yj – dj | for each j.
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 21
Overview
5 in 7 scheduling problem
– The model
– Practical enhancements or modifications
– Two non-linear objectives that can be made
linear
– A non-linear constraint that can be made linear
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 22
A ratio constraint:
Suppose that we need to ensure that at least 30% of the
workers have Sunday off.
How do we model this?
(x1 + x2 )/x1 + x2 + x3 + x4 + x5 + x6 + x7 .3
(x1 + x2 ) .3 x1 + .3 x2 + .3 x3 + .3 x4 + .3 x5 + .3 x6 + .3 x7
-.7 x1 - .7 x2 + .3 x3 + .3 x4 + .3 x5 + .3 x6 + .3 x7 <= 0
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 23
Other enhancements
Require that each shift has an integral
number of workers
– integer program
Consider longer term scheduling
– model 6 weeks at a time
Consider shorter term scheduling
– model lunch breaks
Model individual workers
– permit worker preferences
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 24
Radiation Treatments – Overview of how math
Problem programming arises in radiation
treatment design
– Formulation as math programs
– Discussion issues
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 25
Radiation Therapy Overview
High doses of radiation (energy/unit mass) can kill cells and/or
prevent them from growing and dividing
– True for cancer cells and normal cells
Radiation is attractive because the repair mechanisms for cancer
cells is less efficient than for normal cells
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 26
Radiation Therapy Overview
Recent advances in radiation therapy now make it possible to
– map the cancerous region in greater detail
– aim a larger number of different beamlets with greater specificity
This has spawned the new field of tomotherapy
“Optimizing the Delivery of Radiation Therapy to Cancer patients,”
by Shepard, Ferris, Olivera, and Mackie, SIAM Review, Vol 41, pp
721-744, 1999.
Also see http://www.tomotherapy.com/
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 27
Conventional Radiotherapy
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 28
Conventional Radiotherapy
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 29
Conventional Radiotherapy
In conventional radiotherapy
– 3 to 7 beams of radiation
– radiation oncologist and physicist work together to determine a
set of beam angles and beam intensities
– determined by manual “trial-and-error” process
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 30
Goal: maximize the dose to the tumor while minimizing
dose to the critical area
Critical Area
Tumor area
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 31
Recent Advances
More accurate map of tumor area
– CT -- Computed Tomography
– MRI -- Magnetic Resonance Imaging
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 32
Tomotherapy: a diagram
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 33
Radiation Therapy: Problem Statement
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 34
Display of radiation levels
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 35
Linear Programming Model
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 36
More on the LP
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 37
Linear Program
Dij p1 D w p
n p
ij
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 38
An LP model took 4 minutes to
minimize (i, j)
Dij
solve.
Dij p1 D w p
n p
ij
Dij L for ( i , j ) T
Dij U for ( i , j ) C
wp 0 for all p
In an example reported in the paper, there were more than 63,000 variables,
and more than 94,000 constraints (excluding upper/lower bounds)
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 39
What to do if there is no feasible solution?
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 40
Optimal Solution for the LP
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 41
An Optimal Solution to an NLP
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 42
Further considerations
Minimize damage to critical tissue
Maximize damage to tumor cells
Minimize time to carry out the dosage
LP depends on the technology
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 43
Oil Refining Programming Model
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 44
Problem Statement
A manager of an oil refinery has 8 million barrels of crude oil ‘A’
and 5 million barrels of crude oil ‘B’ allocated for production
during the coming month. These resources can be used to
make either gasoline, which sells for $38 per barrel or home
heating oil, which sells for $33 per barrel. There are three
production processes with following characteristics:-
Process 1 Process 2 Process 3
Input Crude A 3 1 5
Input Crude B 5 1 3
Output Gasoline 4 1 3
Output Heating Oil 3 1 4
Cost ($) 51 11 40
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST
MIT and James Orlin © 2003 45
Solution of Oil Refinery problem
DVs X1= Unit quantity with process 1
A manager of an oil refinery has 8 million barrels of crude oil
‘A’ and 5 million barrels of crude oil ‘B’ allocated for X2=Unit quantity with process 2
production during the coming month. These resources can X3 =Unit quantity with process 3
be used to make either gasoline, which sells for $38 per
barrel or home heating oil, which sells for $33 per barrel. Selling: 38 x (4X1+X2+3X3 ) + 33 x (3X1+X2+4X3 )
There are three production processes with following
= 251X1+71X2+246X3 )
characteristics:-
Cost : 51X1+11X2+40X3
Process 1 Process 2 Process 3
Input Crude A 3 1 5 Net Revenue: Sale – Cost
Input Crude B 5 1 3 = (251X1+71X2+246X3) – (51X1+11X2+40X3)
Output Gasoline 4 1 3 = 200X1+60X2+206X3
Output Heating Oil 3 1 4
Max. Objective, z: 200X1 + 60X2 + 206 X3
Cost ($) 51 11 40
Constraints:
Crude Oil A: 3X1+X2+5X3 8 x 106
Maximize the revenue of the company
Crude Oil B: 5X1+X2+3X3 5 x 106
X1 ≥ 0, X2 ≥ 0, X3 ≥ 0
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 46
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 47
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 48
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 49
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 50
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 51
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 52
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 53
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 54
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 55
(Binary)
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 56
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 57
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 58
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 59
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 60
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 61
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 62
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 63
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 64
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 65
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 66
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 67
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 68
We use Branch and Bound Method to solve ILP
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 69
Questions
1
Dr. Faheem Qaisar Jamal, School of Industrial Engineering (SIE), CAE, NUST 70