MIT and James Orlin © 2003
1
More Linear Programming Models
MIT and James Orlin © 2003
2
Overview
Applications– personnel scheduling– radiation therapy– production and inventory management
Goals– get practice in recognizing and modeling linear
constraints (and non-linear constraints)– use of models in practice
MIT and James Orlin © 2003
3
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
Radiation treatments and Math Programming– Overview of how math programming arises in radiation
treatment design– Formulation as math programs– Discussion issues
MIT and James Orlin © 2003
4
Overview
5 in 7 scheduling problem– The model
MIT and James Orlin © 2003
5
Scheduling Postal Workers Each postal worker works for 5 consecutive days,
followed by 2 days off, repeated weekly.
Day Mon Tues Wed Thurs Fri Sat Sun
Demand 17 13 15 19 14 16 11
Minimize the number of postal workers (for the time being, we will permit fractional workers on each day.)
MIT and James Orlin © 2003
6
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.
MIT and James Orlin © 2003
7
The linear program
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
subject to x1 + x4 + x5 + x6 + x7 17
Day Mon Tues Wed Thurs Fri Sat Sun
Demand 17 13 15 19 14 16 11
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
MIT and James Orlin © 2003
8
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.
MIT and James Orlin © 2003
9
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
MIT and James Orlin © 2003
10
Overview
5 in 7 scheduling problem– The model– Practical enhancements or modifications
MIT and James Orlin © 2003
11
Some Enhancements of the Model
Suppose that one can hire part time workers (one day at a time), and that the cost of a part time worker on day j is PTj.
Let yj = number of part time workers on day j
MIT and James Orlin © 2003
12
What is the Revised Linear Program?
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
z = x1 + x2 + x3 + x4 + x5 + x6 + x7Minimize
MIT and James Orlin © 2003
13
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
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
+ PT1 y1 + PT2 y2 + … + PT7 y7
MIT and James Orlin © 2003
14
Another Enhancement Suppose that the number of workers required on day j is dj.
Let yj be the number of workers on day j.
What is the minimum cost schedule, where the “cost” of having too many workers on day j is -fj(yj – dj), which is a non-linear function?
NOTE: this will lead to a non-linear program, not a linear program.
We will let sj = yj – dj be the excess number of workers on day j.
MIT and James Orlin © 2003
15
What is the Revised Linear Program?
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
z = x1 + x2 + x3 + x4 + x5 + x6 + x7Minimize
MIT and James Orlin © 2003
16
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
MIT and James Orlin © 2003
17
Overview
5 in 7 scheduling problem– The model– Practical enhancements or modifications– Two non-linear objectives that can be made
linear
MIT and James Orlin © 2003
18
A non-linear objective that often can be made linear.
Suppose that one wants to minimize the maximum of the slacks, that is
minimize z = max (s1, s2, …, s7).
This is a non-linear objective.
But we can transform it, so the problem becomes an LP.
MIT and James Orlin © 2003
19
Minimize z
z sj for j = 1 to 7.
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
The new constraint ensures that z max (s1, …, s7)
The objective ensures that z = sj for some j.
MIT and James Orlin © 2003
20
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.
Suppose that the objective is
minimize i | yj – dj |
This is a non-linear objective.
But we can transform it, so the problem becomes an LP.
MIT and James Orlin © 2003
21
Minimize j zj
zj yj - dj for j = 1 to 7.
subject to x1 + x4 + x5 + x6 + x7 = y1
x1 + 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.
zj dj - yj for j = 1 to 7.
MIT and James Orlin © 2003
22
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
MIT and James Orlin © 2003
23
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
MIT and James Orlin © 2003
24
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
MIT and James Orlin © 2003
25
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
Radiation treatments and Math Programming– Overview of how math programming arises in radiation
treatment design– Formulation as math programs– Discussion issues
MIT and James Orlin © 2003
26
Math Programming and Radiation Therapy Excerpted (with small modifications) from notes
developed by Rob Freund (with help from Peng Sun)
Lecture notes from 15.094
MIT and James Orlin © 2003
27
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
MIT and James Orlin © 2003
28
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/
MIT and James Orlin © 2003
29
Conventional Radiotherapy
Relative Intensity of Dose Delivered
MIT and James Orlin © 2003
30
Conventional Radiotherapy
Relative Intensity of Dose Delivered
MIT and James Orlin © 2003
31
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
MIT and James Orlin © 2003
32
Goal: maximize the dose to the tumor while minimizing dose to the critical area
Critical Area
Tumor area
With a small number of beams, it is difficult to achieve these goals.
MIT and James Orlin © 2003
33
Recent Advances
More accurate map of tumor area– CT -- Computed Tomography– MRI -- Magnetic Resonance Imaging
More accurate delivery of radiation– IMRT: Intensity Modulated Radiation Therapy– Tomotherapy
MIT and James Orlin © 2003
34
Tomotherapy: a diagram
MIT and James Orlin © 2003
35
Radiation Therapy: Problem Statement
For a given tumor and given critical areas For a given set of possible beamlet origins
and angles Determine the weight of each beamlet
such that:– dosage over the tumor area will be at least a
target level L .
– dosage over the critical area will be at most a target level U.
MIT and James Orlin © 2003
36
Display of radiation levels
MIT and James Orlin © 2003
37
Linear Programming Model
First, discretize the space– Divide up region into a 2D (or 3D) grid of pixels
MIT and James Orlin © 2003
38
More on the LP
Create the beamlet data for each of p = 1, ..., n possible beamlets.
Dp is the matrix of unit doses delivered by beam p.
pijD = unit dose
delivered to pixel (i,j) by beamlet p
MIT and James Orlin © 2003
39
Linear Program
Decision variables w = (w1, ..., wp)
wp = intensity weight assigned to beamlet p for p = 1 to n;
Dij = dosage delivered to pixel (i,j)
1 n p
ij ij ppD D w
MIT and James Orlin © 2003
40
An LP model
1 n p
ij ij ppD D w
minimize ( , ) iji jD
for ( , )ij LD i j T
for ( , )ij UD i j C
0 for allpw 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)
took 4 minutes to solve.
MIT and James Orlin © 2003
41
What to do if there is no feasible solution
Use penalties: e.g., Dij L – yij
and then penalize y in the objective. Consider non-linear penalties (e.g., quadratic) Consider costs that depend on damage rather
than on radiation Develop target doses and penalize deviation from
the target
MIT and James Orlin © 2003
42
Optimal Solution for the LP
MIT and James Orlin © 2003
43
An Optimal Solution to an NLP
MIT and James Orlin © 2003
44
Further considerations
Minimize damage to critical tissue Maximize damage to tumor cells Minimize time to carry out the dosage
LP depends on the technology
MIT and James Orlin © 2003
45
The pigskin problem (from Practical Management Science)
Pigskin company makes footballs All data below is for 1000s of footballs Forecast demand for next 6 months
– 10, 15, 30, 35, 25 and 10
Current inventory of footballs: 5 Determine the production levels and inventory
levels over the next six months – meet demand at minimum cost– satisfy constraints
MIT and James Orlin © 2003
46
The pigskin problem (continued)
Max Production capacity: 30 per month
Max Storage capacity: 10 per month
Production Cost per football for next 6 months:
– $12.50, $12.55, $12.70, $12.80, $12.85, $12.95
Holding cost: $.60 per football per month
With your partner: write an LP to describe the problem.
MIT and James Orlin © 2003
47
On the formulation Choose decision variables.
– Let xj = the number of footballs produced in month j (in 1000s)
– Let yj = the number of footballs held in inventory from month j to month j + 1. (in 1000s)
– y0 = 5
Then write the constraints and the objective.
Pigskin Spreadsheet
Top Related