mit and james orlin © 2003 1 more linear programming models

47
MIT and James Orlin © 2003 1 More Linear Programming Models

Upload: michael-reeves

Post on 30-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

1

More Linear Programming Models

Page 2: 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

Page 3: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 4: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

4

Overview

5 in 7 scheduling problem– The model

Page 5: MIT and James Orlin © 2003 1 More Linear Programming Models

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.)

Page 6: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 7: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 8: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 9: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 10: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

10

Overview

5 in 7 scheduling problem– The model– Practical enhancements or modifications

Page 11: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 12: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 13: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 14: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 15: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 16: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 17: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 18: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 19: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 20: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 21: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 22: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 23: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 24: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 25: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 26: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 27: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 28: MIT and James Orlin © 2003 1 More Linear Programming Models

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/

Page 29: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

29

Conventional Radiotherapy

Relative Intensity of Dose Delivered

Page 30: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

30

Conventional Radiotherapy

Relative Intensity of Dose Delivered

Page 31: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 32: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 33: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 34: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

34

Tomotherapy: a diagram

Page 35: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 36: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

36

Display of radiation levels

Page 37: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

37

Linear Programming Model

First, discretize the space– Divide up region into a 2D (or 3D) grid of pixels

Page 38: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 39: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 40: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 41: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 42: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

42

Optimal Solution for the LP

Page 43: MIT and James Orlin © 2003 1 More Linear Programming Models

MIT and James Orlin © 2003

43

An Optimal Solution to an NLP

Page 44: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 45: MIT and James Orlin © 2003 1 More Linear Programming Models

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

Page 46: MIT and James Orlin © 2003 1 More Linear Programming Models

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.

Page 47: MIT and James Orlin © 2003 1 More Linear Programming Models

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