MIT and James Orlin © More Linear Programming Models
MIT and James Orlin © 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 © 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 © Overview 5 in 7 scheduling problem –The model
MIT and James Orlin © Scheduling Postal Workers Each postal worker works for 5 consecutive days, followed by 2 days off, repeated weekly. Minimize the number of postal workers (for the time being, we will permit fractional workers on each day.)
MIT and James Orlin © Formulating as an LP Select the decision variables –Let x 1 be the number of workers who start working on Monday, and work till Friday –Let x 2 be the number of workers who start on Tuesday … –Let x 3, x 4, …, x 7 be defined similarly.
MIT and James Orlin © The linear program Minimizez = x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 subject to x 1 + x 4 + x 5 + x 6 + x 7 17 x 1 + x 2 + x 5 + x 6 + x 7 13 x 1 + x 2 + x 3 + x 6 + x 7 15 x 1 + x 2 + x 3 + x 4 + x 7 19 x 1 + x 2 + x 3 + x 4 + x 5 14 x 2 + x 3 + x 4 + x 5 + x 6 16 x 3 + x 4 + x 5 + x 6 + x 7 11 x j 0 for j = 1 to 7
MIT and James Orlin © On the selection of decision variables Would it be possible to have y j be the number of workers on day j? –Workers on day j is at least d j. –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 © Some Enhancements of the Model Suppose that there was a pay differential. The cost of workers who start work on day j is c j per worker. Minimizez = c 1 x 1 + c 2 x 2 + c 3 x 3 + … + c 7 x 7
MIT and James Orlin © Overview 5 in 7 scheduling problem –The model –Practical enhancements or modifications
MIT and James Orlin © 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 PT j. Let y j = number of part time workers on day j
MIT and James Orlin © What is the Revised Linear Program? subject to x 1 + x 4 + x 5 + x 6 + x 7 17 x 1 + x 2 + x 5 + x 6 + x 7 13 x 1 + x 2 + x 3 + x 6 + x 7 15 x 1 + x 2 + x 3 + x 4 + x 7 19 x 1 + x 2 + x 3 + x 4 + x 5 14 x 2 + x 3 + x 4 + x 5 + x 6 16 x 3 + x 4 + x 5 + x 6 + x 7 11 x j 0 for j = 1 to 7 z = x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 Minimize
MIT and James Orlin © Minimizez = x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 subject to x 1 + x 4 + x 5 + x 6 + x 7 + y 1 17 x 1 + x 2 + x 5 + x 6 + x 7 + y 2 13 x 1 + x 2 + x 3 + x 6 + x 7 + y 3 15 x 1 + x 2 + x 3 + x 4 + x 7 + y 4 19 x 1 + x 2 + x 3 + x 4 + x 5 + y 5 14 x 2 + x 3 + x 4 + x 5 + x 6 + y 6 16 x 3 + x 4 + x 5 + x 6 + x 7 + y 7 11 x j 0, y j 0 for j = 1 to 7 + PT 1 y 1 + PT 2 y 2 + … + PT 7 y 7
MIT and James Orlin © Another Enhancement Suppose that the number of workers required on day j is d j. Let y j 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 - f j (y j – d j ), which is a non-linear function? NOTE: this will lead to a non-linear program, not a linear program. We will let s j = y j – d j be the excess number of workers on day j.
MIT and James Orlin © What is the Revised Linear Program? subject to x 1 + x 4 + x 5 + x 6 + x 7 17 x 1 + x 2 + x 5 + x 6 + x 7 13 x 1 + x 2 + x 3 + x 6 + x 7 15 x 1 + x 2 + x 3 + x 4 + x 7 19 x 1 + x 2 + x 3 + x 4 + x 5 14 x 2 + x 3 + x 4 + x 5 + x 6 16 x 3 + x 4 + x 5 + x 6 + x 7 11 x j 0 for j = 1 to 7 z = x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 Minimize
MIT and James Orlin © Minimize z = f 1 (s 1 ) + f 2 (s 2 ) + f 3 (s 3 ) + f 4 (s 4 ) + f 5 (s 5 ) + f 6 (s 6 ) + f 7 (s 7 ) subject to x 1 + x 4 + x 5 + x 6 + x 7 - s 1 = 17 x 1 + x 2 + x 5 + x 6 + x 7 - s 2 = 13 x 1 + x 2 + x 3 + x 6 + x 7 - s 3 = 15 x 1 + x 2 + x 3 + x 4 + x 7 - s 4 = 19 x 1 + x 2 + x 3 + x 4 + x 5 - s 5 = 14 x 2 + x 3 + x 4 + x 5 + x 6 - s 6 = 16 x 3 + x 4 + x 5 + x 6 + x 7 - s 7 = 11 x j 0, s j 0 for j = 1 to 7
MIT and James Orlin © 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 © 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 (s 1, s 2, …, s 7 ). This is a non-linear objective. But we can transform it, so the problem becomes an LP.
MIT and James Orlin © Minimize z z s j for j = 1 to 7. subject to x 1 + x 4 + x 5 + x 6 + x 7 - s 1 = 17 x 1 + x 2 + x 5 + x 6 + x 7 - s 2 = 13 x 1 + x 2 + x 3 + x 6 + x 7 - s 3 = 15 x 1 + x 2 + x 3 + x 4 + x 7 - s 4 = 19 x 1 + x 2 + x 3 + x 4 + x 5 - s 5 = 14 x 2 + x 3 + x 4 + x 5 + x 6 - s 6 = 16 x 3 + x 4 + x 5 + x 6 + x 7 - s 7 = 11 x j 0, s j 0 for j = 1 to 7 The new constraint ensures that z max (s 1, …, s 7 ) The objective ensures that z = s j for some j.
MIT and James Orlin © Another non-linear objective that often can be made linear. Suppose that the “goal” is to have d j workers on day j. Let y j be the number of workers on day j. Suppose that the objective is minimize i | y j – d j | This is a non-linear objective. But we can transform it, so the problem becomes an LP.
MIT and James Orlin © Minimize j z j z j y j - d j for j = 1 to 7. subject to x 1 + x 4 + x 5 + x 6 + x 7 = y 1 x 1 + x 2 + x 5 + x 6 + x 7 = y 2 x 1 + x 2 + x 3 + x 6 + x 7 = y 3 x 1 + x 2 + x 3 + x 4 + x 7 = y 4 x 1 + x 2 + x 3 + x 4 + x 5 - = y 5 x 2 + x 3 + x 4 + x 5 + x 6 = y 6 x 3 + x 4 + x 5 + x 6 + x 7 = y 7 x j 0, y j 0 for j = 1 to 7 The new constraints ensure that z j | y j – d j | for each j. The objective ensures that z j = | y j – d j | for each j. z j d j - y j for j = 1 to 7.
MIT and James Orlin © 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 © A ratio constraint: Suppose that we need to ensure that at least 30% of the workers have Sunday off. How do we model this? (x 1 + x 2 )/x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 .3 (x 1 + x 2 ) .3 x x x x x x x x x x x x x x 7 <= 0
MIT and James Orlin © 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 © 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 © Math Programming and Radiation Therapy Excerpted (with small modifications) from notes developed by Rob Freund (with help from Peng Sun) Lecture notes from
MIT and James Orlin © 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 © 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 , Also see
MIT and James Orlin © Conventional Radiotherapy Relative Intensity of Dose Delivered
MIT and James Orlin © Conventional Radiotherapy Relative Intensity of Dose Delivered
MIT and James Orlin © 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 © 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 © 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 © Tomotherapy: a diagram
MIT and James Orlin © 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 © Display of radiation levels
MIT and James Orlin © Linear Programming Model First, discretize the space –Divide up region into a 2D (or 3D) grid of pixels
MIT and James Orlin © More on the LP Create the beamlet data for each of p = 1,..., n possible beamlets. D p is the matrix of unit doses delivered by beam p. = unit dose delivered to pixel (i,j) by beamlet p
MIT and James Orlin © Linear Program Decision variables w = (w 1,..., w p ) w p = intensity weight assigned to beamlet p for p = 1 to n; D ij = dosage delivered to pixel (i,j)
MIT and James Orlin © An LP model minimize 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 © What to do if there is no feasible solution Use penalties: e.g., D ij L – y ij 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 © Optimal Solution for the LP
MIT and James Orlin © An Optimal Solution to an NLP
MIT and James Orlin © 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 © 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 © 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 © On the formulation Choose decision variables. –Let x j = the number of footballs produced in month j (in 1000s) –Let y j = the number of footballs held in inventory from month j to month j + 1. (in 1000s) –y 0 = 5 Then write the constraints and the objective. Pigskin Spreadsheet