Optimization Modeling and Computational Issues in...

Post on 24-Feb-2018

216 views 1 download

Transcript of Optimization Modeling and Computational Issues in...

Optimization Modeling andComputational Issues in

Radiation Therapy

(lecture developed in collaboration with Peng Sun)

February 5, 2002

Outline

1. Radiation Therapy

2. Linear Optimization Models

3. Computation

4. Nonlinear and Mixed-Integer Models

5. Looking Ahead to the Course

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 1

RadiationTherapy

Overview�This year, 1,200,000 Americans will be diagnosed

with cancer

� 600,000+ patients will receive radiation therapy

– beam(s) of radiation delivered to the body inorder to kill cancer cells

�Sadly, only 67% of “curable” patients will be cured

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 2

RadiationTherapy

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 repairmechanisms for cancer cells is less efficient than fornormal cells

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 3

RadiationTherapy

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

�Spawned the new field of tomotherapy

� “Optimizing the Delivery of Radiation Therapy toCancer Patients,” by Shepard, Ferris, Olivera, andMackie, SIAM Review, Vol. 41, pp. 721–744, 1999.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 4

RadiationTherapy

Overview

Conventional Radiotherapy...

10

9

8

7

6

tumor

Relative Intensity of Dose Delivered

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 5

RadiationTherapy

Overview

...Conventional Radiotherapy...

9

tumor5

4

2

1

5

4

2

2

1

1

5 4

Relative Intensity of Dose Delivered

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 6

RadiationTherapy

Overview

...Conventional Radiotherapy...

In conventional radiotherapy

– 3 to 7 beams of radiation

– radiation oncologist and physicistwork together to determine a set ofbeam angles and beam intensities

– determined by manual “trial-and-error” process

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 7

RadiationTherapy

Overview

...Conventional Radiotherapy

Complex Shaped Tumor Area

Critical Area Present

With only a small number of beams, it is difficult/impossible to

deliver required dose to tumor without impacting the critical area.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 8

RadiationTherapy

Overview

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

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 9

RadiationTherapy

Overview

...Recent Advances

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 10

RadiationTherapy

Overview

Formal Problem Statement...

�For a given tumor and given critical areas

�For a given set of possible beamlet origins andangles

�Determine the weight on each beamlet such that:

– dosage over the tumor area will be at least a targetlevel ��

– dosage over the critical area will be at most atarget level ��

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 11

RadiationTherapy

Overview

...Formal Problem Statement

20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

140

160

180

200

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 12

LinearOptimization Models

Discretize the Space

Divide up region into a 2-dimensional (or3-dimensional) grid of pixels

pixel (i,j)

i

j

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 13

LinearOptimization Models

Create Beamlet Data

Create the beamlet data for each of � � �� � � � � � possiblebeamlets.

�� is the matrix of unit doses delivered by beam � .

0

0

0

0

0

0

0.9

0.9

1.0

0

0.8

0.9

0.9

0

0

0.8

0

0

0

0

0

0

0

1.0

1.0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1.0

��

� � � unit dose delivered to pixel ��� �� by beamlet �.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 14

LinearOptimization Models

Dosage Equations

Decision variables � � ���� � � � ����

�� � intensity weight assigned to beamlet �,

� � �� � � � � �.�� � ��

�������

� � ��

(“��” denotes “by definition”)

� ��

���������

is the matrix of the integral dose (total delivered dose)c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 15

LinearOptimization Models

Definitions of Regions

151

151

� is the target area

� is the critical area

� is normal tissue

� �� � � � � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 16

LinearOptimization Models

Ideal Linear Model������

���������� �

��

���� �� � �

�������

� � �� ��� � � �

� �

�� � � �� ��� � � �

�� � � �� ��� � � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 17

LinearOptimization Models

Ideal Linear Model

������

���������� �

���

���� �� � �

�������

� � �� ��� �� � �

� �

�� � � � ��� �� � �

�� � � ��� �� � �

Unfortunately, this model is typically infeasible.

Cannot deliver dose to tumor without some harm to criticalarea(s).

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 18

LinearOptimization Models

Engineered Approaches������ ��

��������� � � ��

��������� � � �

��������

�� �

������ �� � �

�������

� � �� ��� � � �

� �

��� � ��� � � ��� � ��� � � �

� ��

������� � � �� � � � � �

������������ � � � )

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 19

LinearOptimization Models

Engineered Approaches

Some other possible objective functions:

Let �������� � be the target prescribed dose to bedelivered to pixel ��� �

������ ���

���������� � �������� ��

��

���� �� � �

�������

� � �� ��� � � �

� �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 20

LinearOptimization Models

Engineered Approaches

This is the same as:

������

����

���� ��� � �������� � � ��� � � �

�� � �

�������

� � �� ��� � � �

� �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 21

LinearOptimization Models

Engineered Approaches

Here is another model:

������

����������� � �������� ��

��

���� �� � �

�������

� � �� ��� � � �

� �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 22

LinearOptimization Models

Engineered Approaches

This is the same as:

������

��������

�� �

����

���� �� � �

�������

� � �� ��� � � �

� �

�� � ��� � �������� � ��� � ��� � � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 23

ComputationBase Case Model

Consider the “base case” example problem:

151

151

�������� � � ��� ��� � � �

�������� � � � ��� � � �

�������� � � � ��� � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 24

ComputationBase Case Model

������ � ��

��������� � � � �

��������� � � � �

��������� �

����

���� �� � �

�������

� � �� ��� � � �

� �

�� � ��� � �������� � ��� � ��� � � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 25

ComputationSize of the Model

Dimensional Analysis...������ � ��

��������� � � ����

��������� � � �

��������

�� �

�����

���� � � �

������

� � �� ��� �� � �

� � �

��� � � � � �������� � �� � ��� �� � �

Dimensional Analysis:number of pixels � �������� � � ��

number of beamlets � ��� ���

�� � � �� ��; ��� � �� ; � � � !���

��� � ������

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 26

ComputationSize of the Model

...Dimensional Analysis...������ � ��

��������� � � ����

��������� � � �

��������

�� �

�����

���� � � �

������

� � �� ��� �� � �

� � �

��� � � � � �������� � �� � ��� �� � �

Decision Variables Number� � �� ��

� ���

�� � �� ��Total � � ��

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 27

ComputationSize of the Model

...Dimensional Analysis

������ � �

��������� � � � �

��������� � � �

��������

�� �

�����

���� �� � �

�������

� � �� ��� �� � �

� �

��� � ��� � � �������� � ��� � ��� �� � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 28

ComputationSize of the Model

Number of Constraints

Simple Variables Upper/Lower Bounds Number

� � � ���

Total ���

Other Constraints* Number�� � �� ��

�� � ���������� ������

Total ������

*We usually exclude simple variable upper/lower bounds when countingconstraints.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 29

ComputationSize of the Model

Summary

Variables Constraints*����� ������

*Excludes variable upper/lower bounds.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 30

ComputationBase Case Model

Optimal Solution

20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

140

160

180

200

Base Case Model Solution

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 31

ComputationAnother Model Solution

20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

140

160

180

200

Solution of a nonlinear model.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 32

ComputationDose Histogram

of Solution

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Dose Volume HistogramQP model

Fraction ofTotal Dose

tumor normal

critical

Dose Volume

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 33

ComputationAnother Model Solution

20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

140

160

180

200

Solution of a nonlinear model, where � � � � � � �.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 34

ComputationComputational Issues

Software/Algorithms

�Software codes:

– CPLEX simplex (pivoting method)– CPLEX barrier– LOQO

�Algorithms:

– Simplex method (“pivoting” method)– Interior-point method (IPM) (“barrier” method)

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 35

ComputationComputational Issues

Counting Iterations

� Iteration Counts:

– Number of pivots for simplex method– Number of Newton steps for IPM

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 36

ComputationComputational Issues

Issues in Running Times

�Running time will be affected by:– number of constraints– number of variables– software code– type of algorithm (simplex or IPM)– properties of linear algebra systems involved

� density/patterns of nonzeroes of matrix systems to besolved

– other problem characteristics specific to problem– idiosyncratic influences– pre-processing heuristics

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 37

ComputationBase Case

No Pre-Processing

�Base Case Model

�No Pre-Processing

Running TimeCPU WallCode Algorithm Iterations(sec) (minutes)

CPLEX Simplex 183,530 440 250CPLEX Barrier 49 13 37

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 38

ComputationSome Generic Rules

1. The simplex algorithm is designed to handle variables withlower bounds and upper bounds:

��� ��

� � �

� � � � �

where �� � � and/or �� � � is allowed.

2. We say �� has no bounds if �� � � and �� � � .Otherwise �� is a bounded variable.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 39

ComputationSome Generic Rules

��� � �

�� � �

� � � � �

3. For the simplex method, the work per pivot generally dependson the number of nonzeros in .

4. If is very sparse (its density of nonzero elements is low), thenthe work per pivot will be low.

5. The number of simplex pivots in a “good” model is roughlybetween � and � �.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 40

ComputationSome Generic Rules

��� ��

� � �

� � � � �

5. The work per iteration of an interior-point method generallydepends on the structure of the matrix

� ��

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 41

ComputationSome Generic Rules

� ��

6. The structure of � is often (but not always) related to thestructure of the matrix because the following two matricesare “similar”:

� ��

� ��

� �

7. The number of interior-point method iterations is typically

��–� (independent of � and/or �).

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 42

ComputationPre-Processing

Heuristics...

Pre-Processing Heuristics inCommercial-Grade Software

�Designed to Eliminate Constraints and/or Variables

�Example:

�� ��� �� � ��

� � � � � � � ! � � � � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 43

ComputationPre-Processing

...Heuristics...

Example:��� ��� �� � ��

� � � � � � � � � � � � �

� � ��� ��� �� � ��� �� �� ���� � �� � �

� � ��� ��� �� � ��� ����� �� � � �� � �

Therefore we can eliminate the bounds on �

Therefore we can treat � as a free variable

Therefore we can eliminate � from our model altogether.

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 44

ComputationPre-Processing

...Heuristics

�Base Case Model

�With Pre-Processing

Running TimeCPU WallCode Algorithm Iterations(sec) (minutes)

CPLEX Simplex 18,428 4.3 4CPLEX Barrier 16 130 133

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 45

ComputationEquivalent Formulation

“Small” Model...

Equivalent Formulation: (eliminate �� �)

“Small” Model:

������ � �

��������� � � � �

��������� � ��

��������

�� �

������� ��� � �

�������

� � �� � �������� � ��� � ��� �� � �

� �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 46

ComputationEquivalent Formulation

...“Small” Model...

Base Case Model Small ModelVariables ����� ������

Constraints* ������ �!����

*always excludes simple variable upper/lower bounds

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 47

ComputationEquivalent Formulation

...“Small” Model

�Small Model

Running TimeCPU WallCode Algorithm Iterations(sec) (minutes)

CPLEX Simplex 171,656 390 216CPLEX Barrier 57 80 31

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 48

ComputationComparisons

Running TimeWallCode Algorithm Model

(minutes)Base Case 250

CPLEX Simplex Pre-Processed 4Small Model 216

Base Case 37CPLEX Barrier Pre-Processed 133

Small Model 31

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 49

NonlinearOptimization

Quadratic Model�� � ������ � �

���������� � ������� ���

���

� � �

���������� � ������� ���

� �

��������

��� � ������� ���

���� �� � �

�������

� � �� ��� �� � �

� �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 50

NonlinearOptimization

Quadratic Model

Quadratic Model Output

20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

140

160

180

200

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 51

NonlinearOptimization

Quadratic Model

Computational Results

Running TimeCPUModel Code Algorithm Iterations(sec)

Base Case QP Model LOQO Barrier 31 82.7Small QP Model LOQO Barrier 32 149.0

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 52

Mixed IntegerOptimization

Limiting the Number of Beamlets

������ � ��

��������� � � ����

��������� � � �

��������

�� �

�����

���� � � �

������

� � �� ��� �� � �

� � �

��� � � � � �������� � �� � ��� �� � �

�� ����� � � �� � � � � �

�� � ���� � � �� � � � � �

������� ���

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 53

Mixed IntegerOptimization

Computation

CPLEX MIP Solver

Running TimeMIP Gap Simplex CPU Wall

(%) Pivots (seconds) (minutes)20 11,646 7 415 11,646 7 412 11,646 5 410 14,538 9 67 14,538 7 65 14,538 10 64 14,538 7 63 14,538 5 62 3,655,445 1,700 25.3 hours

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 54

Modifications ofthe Model

Partial Volume Constraints

Partial Volume Constraints:

“No more than ! " of the critical region can exceed adose of � ��.”

“No more than �" of the critical region can exceed adose of � ��.”

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 55

Modifications ofthe Model

Partial Volume Constraints

Approach #1 (Integer Programming Model)

Let � be a very large number,

�� � � � �� � �� �� �� � � � ���� �� � � �

�� � � � �� � �� �� �� � � � ���� �� � � �

��� ������ � � ��� � �!

��� ������ � � ��� � � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 56

Modifications ofthe Model

Partial Volume Constraints

Approach #2 (Error Function Approach)

The error function, or sigmoid function, is of the form:

������ �

�� ����

������ � ��

�� � �

������ � � �� ���

������ � �� �� �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 57

Modifications ofthe Model

Partial Volume Constraints

Instead of integer variables, we use

��� ����

������ � � � � ��� � �!

��� ����

������ � � � � ��� � � �

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 58

Looking AheadModeling Languages

Used in the Course

�Modeling languages and software used in the course

– OPL Studio

linear and mixed-integer programming

solver is CPLEX simplex and/or CPLEX barrier

first half of course– AMPL

linear and nonlinear programming

solver is LOQO

second half of course

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 59

Looking AheadModeling Tools

and Issues

� “Column Generation” (week 3)

– generates new decision variables “on the fly”

�Exact optimization and exact feasibility

– in models– in algorithms

�Computational Issues in LP (next lecture)

– simplex method with upper/lower bounds– methods for updating the basis inverse

c�2002 Massachusetts Institute of Technology. All rights reserved. 15.094 60