Académique Documents
Professionnel Documents
Culture Documents
Optimization Methods
This is the first time that I have included notes to go with the PowerPoint slides. I
hope that they are helpful.
Introductions
James Orlin
Professor of Operations Research at Sloan
Tarik Bourezgue
Professor of Applied Mathematics at MSRI
2
Required Materials
z Course notes
3
Grading Policy
z Midterm 1 (15%)
z Midterm 2 (15%)
z Final Exam (20%)
z Recitation quizzes (20%)
z Homework (except Excel) (15%)
z Excel Homework and Project (15%)
z Extra Credit (up to 5%)
4
Homework Policy
The Excel case study is new this year. In the past, we have had Excel as part of the
regular homework; because homework was done in teams, many students deferred
the Excel to their partner. Moreover, the Excel assignments were very time
consuming.
This year, we have a continuing case study. By using a single example throughout
the term, we can better illustrate the way that Excel can be used in practice to solve
optimization problems. In addition, having a running example makes it more
efficient for students to carry out the assignment.
Many former 15.053 students have told us that learning that Excel Solver has been
very useful in their summer jobs and in their post MIT jobs.
Class Requirements
We have given the requirements of class attendance and recitation attendance a lot
of thought. First of all, we know that requiring lecture attendance goes against the
grain of undergraduate education at MIT and reminds some students of high school
requirements. Ironically, it is also typical of what is expected of MBA students, and
it is expected of job performance in most any job. It is a relatively short phase of
one’s life (undergraduate education), where attendance is usually optional.
Most Sloan classes expect students to keep up with the material by preparing in
advance of class and then participating in class discussions. In 15.053, we provide
incentives for students to keep up with the materials through required class and
recitation attendance and through quizzes. We have found that this is very
effective. Since requiring recitations, students have mastered the material far
better, and their grades have reflected it.
15.053 is not graded on a curve, but is graded based on what students learn.
Moreover, we have set the grading policy in the past, and we do not adjust it
upwards as students are learning more. So, if every student learns the material well,
it is possible for every student to get an A.
“Active Learning”
Even very intelligent people have difficulty absorbing new information for an
extended period of time without being able to reflect on that material. The breaks in
class are sometimes used for reflection, and sometimes used for a mental break
between different subjects.
An optimization problem
Can we do better?
The amazing thing about this Excel example is that it typically leads to solutions
that are under 10, often 0 or 1. This would be extremely hard to achieve without
formal optimization.
What is Operations Research?
the US
found ORSA
For a book on the history of OR, see Professor Morse’s autobiography In at the
Beginnings: A Physicist's Life. Also, there is a book by Gass and Assad entitled
“An Annotated Timeline of Operations Research: and Informal History. (The only
event listed for 1993 was the awarding of the Lanchester Prize to the book Network
Flows, co-authored by Ravi Ahuja, Tom Magnanti, and Jim Orlin).
What is Management Science
(Operations Research)?
Operations Research (O.R.) is the discipline of
applying advanced analytical methods to help
make better decisions.
10
There is a promotional activity in our society which says that OR is the “science of
better.” The hope of this promotion was that it would encourage a dialogue about
what OR really is, with the “science of better” being its starting point.
Unfortunately, it often leads to questions such as “If OR is really the science of
better, why couldn’t they come up with a better slogan?” And I do not have an
answer for this.
Moldavian Airlines
Airline fleet
management
Chisinau
Budapest
Timisoara
12
Some Skills for Operations Researchers
z Modeling Skills
– Take a real world
situation, and Image removed due to
mathematics
Toolkit
Models
http://www.dominoartwo 13
rk.com/prints.html
z Optimization is everywhere
z Models, Models, Models
z The goal of models is “insight” not numbers
– paraphrase of Richard Hamming
14
15
Usually when people brainstorm, they come up with a wide range of places where optimization
occurs.
Within sports, anyone who has read “Moneyball” knows that baseball General Managers try to
develop an optimum team by carefully analyzing each players statistics. And, each manager is
trying to win each game, which is a form of optimization.
Usually several students have worked with firms that are interested in “supply chain management.”
This involves optimizing the obtaining of materials for manufacturing, and also involves the
optimum distribution of delivered products.
At MIT, we want to optimize the use of our classrooms, our parking facilities, our labs, and more.
And everyone is concerned about the optimal use of his or her time.
Countless other applications of optimization can come to mind with more thought.
16
17
On the internet, what is the last
word in the phrase “optimal _”.
Performance
1 1.24 Design
5 .88
2
Control 1.12 6
Time .63
3
Health 1.01 7
Choice .60
4
Solution .96 8
Growth .56
It took me a long time to find out how to do the effects on this slide. Click on a
number and the answer is revealed. Click on a red rectangle and the number of
Google hits (in millions) is revealed. Click on “hide answers” and all the answers
are hidden again.
On 15.053 and Optimization Tools
19
Optimization is everywhere. But that does not mean that we can use the
methodologies taught in 15.053 everywhere. One of the goals of 15.053 is to help
students learn where the optimization methodologies can be used in real life.
Linear Programming
20
The decision variables are the variables whose specification describes the solution
for the problem. It typically comprises the set of decisions to be made.
Max’s linear program
Step 2. Determine the objective function
Step 3. Determine the constraints
subject to 2x + 3y ≤ 60 (constraint)
x ≥ 0 ; y ≥ 0 (non-negativity constraints)
The objective function for a linear program is a linear function that we want to
maximize or minimize. A linear function of x and y is of the form ax + by for some
real numbers a and b.
The constraints provide limits on what choices of decision variables are permissible.
Terminology
z Decision variables: e.g., x and y.
– In general, these are quantities you can control to improve
your objective which should completely describe the set
of decisions to be made.
z Constraints: e.g., 2x + 3y ≤ 24 , x ≥ 0 , y ≥ 0
– Limitations on the values of the decision variables.
z Objective Function. e.g., 4x + 5y
– Value measure used to rank alternatives
– Seek to maximize or minimize this objective
– examples: maximize NPV, minimize cost
22
A geometrical portrayal
y
10
8
2x + 3y ≤ 24
4 The optimal
Feasible solution
2 Region
x
2 4 6 8 10 12
23
In order to get insight into properties of linear programs, it helps to consider the
geometry. In Lectures 3 and 4, we will consider geometrical properties of linear
programs in detail.
David’s Tool Corporation (DTC)
24
Demand 40 30
Profit 3 shekels 5 shekels
25
Formulating the DTC Problem as an LP
subject to
26
When formulating a linear program, one typically chooses the decision variables
first. Then one writes the objectives and constraints. If it is too difficult to express
the constraints, then one may want to reconsider the choice of decision variables.
Stone gathering:
Smoothing:
Delivery:
Slingshot demand:
Shield demand:
maximize 3K + 5S
2K + 3S <= 100
K + 2S <= 60
K + S <= 50
K <= 40
S <= 50
K >= 0 and S >= 0.
We ignore integrality constraints.
Addressing managerial problems: A
management science framework
Steps 3 and 5 are highlighted (underlined) because we will focus on them during the
semester. The other steps are enormously important in practice, but are not the
subject material for 15.053.
How problems get large,
and what to do.
29
Problems presented in 15.053 typically are easy to describe and small. This is
because large problems require much more time to explain, and smaller problems
typically suffice to illustrate concepts and applications.
In practice, problems can get very large, much too large to consider for Excel
Solver. This slide illustates how the simple DTC problem can get very large if one
has lots of products and raw materials. 10,000 products seems like a lot, but there
are more than 10,000 different types of screwdrivers. It is easy to imagine that there
can be lots of products for more complex applications.
Linear Programs
z A linear function is a function of the form:
f(x1, x2, . . . , xn) = c1x1 + c2x2 + . . . + cnxn
= ∑i=1 to n cixi
e.g., 3x1 + 4x2 - 3x4.
problem to problem.
Maximize x1
Not a linear
subject to 3x1 + 4x2 ≥ 7 program.
x1 - 2x5 = 7
|x1| ≥ 0
31
It’s also not a linear program if the inequality constraints are strict, as in x > 0.
A non-linear program is permitted to have a
non-linear objective and constraints.
z maximize f(x,y) = xy
z subject to x - y2/2 ≤ 10
3x – 4y ≥ 2
x ≥ 0, y ≥ 0
32
33
Integer programming is amazingly useful in practice, far more useful than linear
programming. We will see how integer programming can model many different
types of constraints and objectives in lectures in the second half of 15.053. But one
needs to understand linear programming well before one can understand integer
programming. That is why we focus much more on linear programming in 15.053.
Preview of Some 15.053 Examples
Applying LP and
NLP to optimal
radiation therapy.
34
We will discuss pricing issues when we talk about linear programming duality.
Preview Continued
How to solve
puzzles
36
37
2010
1
Overview of Lecture
z Goals
– get practice in recognizing and modeling linear
constraints and objectives
– and non-linear objectives
– to see a broader use of models in practice
2
Announcements
3
Quotes for today
We try to keep models as simple as possible. Too much detail in a model makes it
extremely hard to get accurate information, and actually can lead to less accurate
models in practice. One wants to capture the most important aspects of reality in a
model, and not much more than that.
“Excel Tip of the Day” is a new feature this year. If you have any tips you want to
share, please send them to me.
Overview
linear
5
Scheduling Postal Workers
z Each postal worker works for 5 consecutive days,
followed by 2 days off, repeated weekly.
Demand 17 13 15 19 14 16 11
I like this problem because it was one of the first scheduling problems that I saw as
a graduate student, and it was the first one that I wrote a paper on. My paper,
written in 1977, was of no lasting significance in and of itself and was never
published. But it led me to an interest in optimization in which the requirements
repeat periodically. I later wrote more than 10 papers on this topic as well as my
Ph.D. dissertation.
Formulating as an LP
7
The linear program
Day Mon Tues Wed Thurs Fri Sat Sun
Demand 17 13 15 19 14 16 11
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
subject to x1 + x4 + x5 + x6 + x7 ≥ 17 Mon.
x1 + x2 + x5 + x6 + x7 ≥ 13 Tues.
x1 + x2 + x3 + x6 + x7 ≥ 15 Wed.
x1 + x2 + x3 + x4 + x7 ≥ 19 Thurs.
x1 + x2 + x3 + x4 + x5 ≥ 14 Fri.
x2 + x3 + x4 + x5 + x6 ≥ 16 Sat.
x3 + x4 + x5 + x6 + x7 ≥ 11 Sun.
xj ≥ 0 for j = 1 to 7
8
There are seven equality constraints, one for each day of the week. The first
variable (the number of workers on the Monday to Friday shift) is part of each of the
constraints on Monday through Friday. We normally view a linear program in
terms of constraints and think of constraints one at a time. But sometimes it is useful
to think of a variable and think of what the coefficients will be for that variable as
we consider each constraint.
A Closer Look at the Constraint Matrix
x1 x2 x3 x4 x5 x6 x7
1 0 0 1 1 1 1 ≥ 17 Mon
1 1 0 0 1 1 1 ≥ 13 Tues
1 1 1 0 0 1 1 ≥ 15 Wed
1 1 1 1 0 0 1 ≥ 19 Thurs
1 1 1 1 1 0 0 ≥ 14 Fri
0 1 1 1 1 1 0 ≥ 16 Sat
0 0 1 1 1 1 1 ≥ 11 Sun
It will be standard for us to write the variables at the top, and to express the
constraints in terms of coefficients. So the above formulation is equivalent to the
one on the previous slide.
The fact that there are also consecutive ones in each row is due to the fact that the
workers on any day (for example, Monday) must come from one of five shifts, and
the shifts start in adjacent days.
On the selection of decision variables
10
For most of the models in 15.053, the choice of the decision variables is more
straightforward. But in practice, problems can come up with complex constraints
that are extremely difficult to model as constraints but which can be handled
through a clever choice of decision variables.
Some Modifications of the Model
z 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 pj.
What are the new decision variables?
What are the changes to the model?
11
When one develops a decision model in practice, it is often best to start with a
simple model that captures only a little of reality and then add in more realistic
constraints in subsequent steps. If one tries to capture the whole model in one step,
it is often too complex and too difficult to do.
In addition, we want to emphasize that there are a lot of constraints and costs that
can be handled using linear programming.
What are the new decision variables?
Minimize z=
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
12
Another Enhancement
z Suppose that the desirable number of workers on day j
is dj, but it is not required. Let sj be the “excess”
number of workers day j. sj > 0 if there are more
workers on day j than dj; otherwise sj ≤ 0.
13
In practice, it is often difficult to tell the difference between constraints and goals.
A manager may say that she needs 17 workers on Monday, but we know that the
firm will function OK with 16, albeit perhaps not as well. So, it is not a “hard
constraint”, and we may refer to it as a “soft constraint”, that is, one that can be
violated. A hard constraint is one that can never be violated.
In this model, we treat the number of workers on each day as a goal for the day, and
penalize not reaching the goal exactly. Having too many workers may be inefficient
uses of labor. Having too few workers may make it difficult to handle the tasks for
the day.
What are the new decision variables?
Minimize z =
subject to x1 + x4 + x5 + x6 + x7 d1
x1 + x2 + x5 + x6 + x7 d2
x1 + x2 + x3 + x6 + x7 d3
x1 + x2 + x3 + x4 + x7 d4
x1 + x2 + x3 + x4 + x5 d5
x2 + x3 + x4 + x5 + x6 d6
x3 + x4 + x5 + x6 + x7 d7
xj ≥ 0 for j = 1 to 7
14
Often students will try to come up with something more complex than minimizing
f1(s1) + … f7(s7). Once it is pointed out that this is the correct objective, students
find it quite obvious.
On non-linear functions
15
A great situation occurs when the non-linear program can be transformed into a
linear program without any loss of accuracy. We will soon give a couple of
examples of this very fortuitous situation.
Examples of Non-linear Functions
∑
7
j =1
( s j )2 sum of squared s’s
∑
7
j =1
c j ( s j )2
weighted sum of squared s’s
∑
7
| sj | sum of absolute values of s’s
j =1
2∑ j =1 x j − ∑ j =1 s j
7 7
twice number of workers – sum of s’s
∑ ∑
7 7
i =1 j =1
si s j
There are a lot of nice modeling properties of the sum of squares, and it is a
commonly used objective in practice. For example, in finance models, minimizing
risk corresponds to minimizing variance, which can be expressed as a quadratic
function.
It takes a lot longer to explain how minimizing risk in finance can sometimes be
represented as a non-linear program, and so I will only provide this “teaser” here.
Separable non-linear objectives are often much easier to deal with, and such
problems can typically be solved faster.
Convex functions of one variable
25
20
15
10
0
0 5 10
17
The convex shape of a function f(x) of a single variable is easy to recognize. But
the definition on this slide is the proper mathematical way of saying it.
Yes No
Yes
18
If you guessed wrong for any of these curves, please review the definition of
convexity.
The max of several linear functions is convex.
f1(x) = x/3
f2(x) = 3 f(x) = max{f1(x), f2(x), f3(x)}
f3(x) = 5 – x/2
5 10 15
19
The example gives the max of three linear functions of one variable. But a max of
linear functions of more than one variable is also convex. In fact, the max of
We can see that the max of two convex functions is convex as follows:
Suppose that f( ) and g( ) are both convex functions. Let h(x) = max(f(x), g(x)).
OK. “Friendly” may seem like a weird term, but mathematics is filled with such
terms. And converting a non-linear program to a linear program is so fortuitous that
we should in some way acknowledge our gratefulness.
Note that minimizing a friendly objective function subject to linear constraints leads
to an LP. But this is not true for maximization. In fact, maximizing a friendly
objective function subject to linear constraints creates a very difficult problem to
solve. It is at least as hard as an integer programming problem, a topic discussed in
detail later in this semester.
On minimizing friendly objective functions
5 10 15
z ≥ fi(x) for i = 1 to 3
21
This example illustrates a minimax program of one variable. But the same
transformation shows that minimizing any friendly objective function subject to
linear constraints induces a linear program.
min z
min z = max{f1(x), f2(x), f3(x)}
s.t z ≥ fi(x) for i = 1, 2, 3
s.t a≤x≤b
a≤x≤b
Minimax Problem
LP
min z
min z = max { fi(x): 1 ≤ i ≤ K }
s.t z ≥ fi(x) for i = 1, …, K
s.t x∈F
x∈F
Minimax Problem
LP
23
Suppose that (z*, x*) is optimal for the LP. First one can show that x* is feasible
for the minimax problem. This follows because x* ∈ F, and z* >= max {fi(x): 1 ≤ i
≤ K }. Now this doesn’t prove that z* = max {fi(x): 1 ≤ i ≤ K }. But if z* > max
{fi(x): 1 ≤ i ≤ K }, then (z*, x*) is not optimal for the LP since one could replace z*
by max {fi(x): 1 ≤ i ≤ K }, and get a lower objective. So, it follows that (z*, x*) is
feasible for the minimax problem.
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 24
Minimize z = max {s1, …, s7}, where sj ≥ 0 for each j.
minimize
subject to x1 + x4 + x5 + x6 + x7 - s1 = 17
x1 + x 2 + x5 + x6 + x7 - s2 = 13
x1 + x 2 + x 3 + x6 + x7 - s3 = 15
x1 + x2 + x3 + x4 + x7 - s4 = 19
x1 + x2 + x3 + x4 + x5 - s5 = 14
x 2 + x3 + x 4 + x5 + x6 - s6 = 16
x3 + x4 + x5 + x6 + x7 - s7 = 11
x j ≥ 0 , sj ≥ 0 for j = 1 to 7
25
Friendly objectives: Example 3
We do almost the same trick for minimizing the sum of friendly non-linear
objective functions. But instead of creating one new variable z, we create a new
variable zj for each term in the sum. so, the objective function becomes
Minimize z1 + z2 + … + z7
And we need to append the constraints
z1 >= s1, z1 >= -s1
z2 >= s2, z2 >= -s2
…
z7 >= s7, z7 >= -s7
xj ≥ 0 for j = 1 to 7
27
A ratio constraint: another non-linear
constraint that can be made linear
Suppose that we need to ensure that at least 30% of
the workers have Sunday off.
Workers on Sunday
≥ .3
Total workers
x1 + x2
≥ .3
x1 + x2 + … + x7
Note: x1 + x2 + … + x7 > 0
Multiply both sides of the inequality by x1 + x2 + … + x7.
29
Note that this transformation assumes that the denominator x1 + … +x7 is strictly
greater than 0. The non-linear constraint is not defined well if x1 + … + x7 = 0. In
this particular problem, every feasible solution has x1 + … + x7 > 0, assuming that
there is a demand for workers on some day. Thus, we don’t need worry about the
issue of dividing 0 by 0.
Other enhancements
30
This personnel scheduling problem illustrates a number of useful aspects of modeling. And it can go
a long way towards useful modeling personnel scheduling problems in practice. Of course, in
practical scheduling problems, one needs to address the problem at hand, whatever that problem may
be.
Permitting a fractional number of workers is totally unrealistic, but the fractional solution of the
model is usually easy to deal with in practice. Managers are often comfortable taking a fractional
solution and rounding off the fractional parts. It often leads to a solution that is almost as good in
terms of the objective function and still satisfies the constraints. However, it is better if one can solve
the integer program. And occasionally fractional solutions can’t be rounded to a good integer
solution.
Personnel scheduling typically deals with longer term scheduling than one week because these
models permit one to be fairer to the workers. For example, in the model above, most workers never
get a Friday or Saturday off. But in longer term models, one can ensure that each worker can get part
or all of a weekend off.
And in some scheduling problems, one can make workers happier by giving them days off that they
request, such as to accommodate special days.
Most of these added complexities cannot be modeled easily using linear programming, and rely on
integer programming, which we will discuss later in this subject.
Time for a mental break
31
Cancer cells
Normal cells
32
33
This discussion applies to radiation therapy, where there is high energy radiation
beamed at a patient. It does not apply to proton beam techniques, which have
different physical properties than the usual radiation therapy.
Radiation Imaging
z Recent improvements in
imaging
– MRI
– CT Scan
– other
34
Imaging can reveal precise characteristics of tumors, and make radiation treatment
possible. In addition, the imaging is critical for surgeries. It can also help monitor
the progress of chemo-therapy.
Radiation Delivery
z Improvements of delivery
of radiation
IMRT
1999.
35
The radiation therapy for brain tumors is delivered by a machine that can deliver
large doses of radiation beamed from different angles into the brain.
Use of Multi-leaf Collimaters
z multi-leaf
collimator
– blocks radiation
– turns a large
beam into a
focused beam
36
For more precise beamlets, one uses a multi-leaf collimator. These metal fingers
can be adjusted to create a space for the beams to pass through. It turns a very
large beam into a collection of very focused beamlets.
Conventional Radiotherapy
37
As radiation passes through the brain (or other parts of the body for other types of
cancer), the radiation dose decreases as radiation is absorbed. The largest dose is
where the beam enters the body. The smallest dose is where it leaves.
Conventional Radiotherapy
38
This very simple example shows the significance of aiming beams from multiple
directions. Note that the largest dose is now in the center of the brain.
Conventional Radiotherapy
z 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
39
Critical Area
Tumor area
In the brain, every non-cancerous cell is critical. In other parts of the body, some
cells are more critical to functioning of an organ than others.
We say that we want to maximize the dose to the tumor while minimizing the dose
to the critical area. But this is a figure of speech to indicate that there are two
competing objectives. In reality the minimum possible dose to the critical region is
0, and this is easy to achieve by avoiding radiation therapy. The highest possible
dose to the tumor is extremely high, enough to cause fatality. There is no possible
way of achieving the lowest possible dose to the critical region while
simultaneously achieving the highest possible dose to the tumor.
Radiation Therapy: Problem Statement
41
A natural way to try to balance the competing objectives is to put a lower limit on
the amount of radiation delivered to the cancer cells and an upper limit on the
amount of radiation delivered to critical cells. This is not the only way of trying to
balance the competing objectives, as we shall see.
Display of radiation levels
42
Here is a nice picture of what can be achieved using linear programming. The
orange and red regions indicate the parts of the figure with the highest radiation
levels.
Linear Programming Model
43
To model this problem using linear programming, the decision variables will
correspond to how much radiation is delivered from each possible beamlet.
In order to determine whether a cell gets too much or too little radiation, we
aggregate the cells into “pixels.” If we didn’t divide up the region into pixels, we
could end up with one constraint for each neuron, leading to 100s of billions of
constraints.
More on the LP
44
We estimate the unit dose delivered to pixel (i, j) by beamlet p. This approximation
is pretty close to the exact amount of radiation delivered in the therapy.
Linear Program
45
The primary place where linear programming equality constraints are used is here.
The total dosage delivered to a pixel is the sum of the doses delivered by all the
beamlets to that pixel.
An LP model
took 4 minutes to
minimize ∑ (i, j)
Dij solve in 1999.
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) 46
47
A doctor will naturally try to set the threshold for cancer cells as high as he or she
can achieve while setting the threshold for critical cells as low as possible. Even
with lots of experience in what is achievable, there is a natural tendency for the
doctor to set these parameters so that there is no feasible solution. In this case, then
the doctor would keep adjusting the parameters until eventually getting a feasible
solution. This can be a time consuming process.
An even better model
∑∑( i ,((jii),,(jj))yDyijijij)
2
minimize minimize the sum of
squared violations.
Dij = ∑ p=1 Dijp w p
n
ij ij− ≤yγ
ij U≤ γ U for for
squares
DD ( i , j()i∈ )∈C
, jC
wp ≥ 0 for all p
yij ≥ 0 for all ( i , j )
This is a nonlinear program (NLP). This one can
be solved efficiently. 48
It is far easier to set the parameters conservatively (as far as the patient is
concerned) while allowing some violation. If there is no feasible solution to the
problem on the previous slide, there will definitely be a feasible solution to this non
linear program since one can choose yij to guarantee feasibility.
The objective function would try to set all of the y’s to 0. Failing that, it would set
all of the y’s as small as possible.
Similarly, we don’t want to miss cancer cells with the radiation because those cells
would be the most likely to grow and create more cancer. So, we would prefer a
slightly lower dose for a large number of cancer cells than having a much lower
dose for some cancer cells.
Optimal Solution for the LP
49
50
The NLP worked much better. I suspect that this is true in general, but one example
is not enough to prove it.
Is that the end of the story on modeling?
z Other issues:
– Delivering the radiation doses quicker by
setting the multi-leaf collimators optimally.
– trying to keep average radiation levels low
over part of the critical region.
– how do we trade off the doses to the critical
area with doses to the tumor?
51
The doctors are very excited about using optimization to set beams.
If the optimization can set the multi-leaf collimators optimally, then we can speed
up the delivery of the radiation, and this permits more patients to use the machine.
Also doctors are concerned with radiation delivery over larger areas than single
cells, and want solutions that keep average radiation levels low over the critical
There is often a balance in practice of figuring out the right level of fidelity needed
for a model. Too much fidelity may make the model too hard to solve, and often
too hard to validate. Tool little fidelity can mean that we are solving a model that is
2010
1
Quotes of the day
them.
Herbert Simon
2
Goal of this Lecture
3
A Two Variable Linear Program
z = 3x + 5y objective
2x + 3y ≤ 10 (1)
x + 2y ≤ 6 (2)
x + y ≤ 5 (3)
x ≤ 4 (4)
y ≤ 3 (5)
x, y ≥ 0 (6)
4
We could have used the original variable names of K and S, but it is simpler to use x
and y since we usually think of the two axes as the x and y axis.
Finding an optimal solution
y
5 A point is represented as a pair
(x, y). For example, (2, 3).
4
Sometimes, we will call (x, y)
3 a vector. In that case, it is
often represented with a line
segment directed from the
2
origin.
1
1 2 3 4 5 6 x
6
1 2 3 4 5 6 x 7
The alternative representation is really important, as we shall see on the next few
slides.
Rays
Every pair of (distinct) points determines a
unique ray beginning at the first point.
y
p1 = (1, 5)
5 p1
p2 = (4, 2)
4
2 p2
= (1, 5) + λ(3, -3)
1
for 0 ≤ λ ≤ ∞.
1 2 3 4 5 6 x 8
Line segments
Every pair of points determines a unique
line segment.
y
p1 = (1, 5)
5 p1
p2 = (4, 2)
4
2 p2
= (1, 5) + λ(3, -3)
1
for 0 ≤ λ ≤ 1.
1 2 3 4 5 6 x 9
4
x+ 2y ≤ 6
1 2 3 4 5 6 x 10
A half plane contains the line as well as all points on one side of the line.
Graphing the Feasible Region
y
We will construct
5
and shade the
feasible region
4 one or two
constraints at a
3 time.
1 2 3 4 5 6 x
11
Graph the Constraints:
2x+ 3y ≤ 10 (1)
x ≥ 0 , y ≥ 0. (6)
y
5
2 2x + 3y = 10
1 2 3 4 5 6 x
12
OK. This is really three constraints despite what was said on the last slide.
Add the Constraint:
x + 2y ≤ 6 (2)
y
5
2
x + 2y = 6
1
1 2 3 4 5 6 x
13
Add the Constraint:
x + y ≤ 5
y A constraint is
called redundant
5
if deleting the
constraint does
x + y = 5
4
not increase the
size of the
3
feasible region.
2
“x + y = 5”
is redundant
1
1 2 3 4 5 6 x
14
4 We have now
graphed the
3 feasible
region.
2
1 2 3 4 5 6 x
15
How do we maximize z = 3x + 5y ?
4
Choose p as large as possible.
1 2 3 4 5 6 y
16
If you can do so, try to maximize the objective function before looking ahead.
How do we maximize 3x + 5y ?
y
Is there a feasible solution
such that 3x + 5y = 8?
3
Is there a feasible solution
such that 3x + 5y = 11?
2
1 3x + 5y = 11
3x + 5y = 8
x
1 2 3 4 17
The lines such as “3x + 5y = 8” are often called “isoquant lines” or “isoprofit lines”
or “isocost lines”. Note that if the objective function is linear, then all isoprofit
lines are parallel to each other.
Find the maximum value p such that there is a
feasible solution with 3x + 5y = p.
y
Move the line with profit p parallel as much as
3 possible.
This is called the geometric
method for optimizing in 2D
2 3x + 5y = 16
The optimal
solution
occurs at a
1
3x + 5y = 11 corner point.
3x + 5y = 8
x
1 2 3 4 18
The geometric method for solving a 2-variable LP is to move the isoprofit line so
that
(1) there is still at least one feasible point on the line
(2) moving it any further would make all points on the line infeasible.
If there is exactly one feasible point on the line it will be a “corner point,” which is
defined on the next slide.
Corner Points
z A corner point of the feasible region is a point
that is not the midpoint of two other points of the
feasible region.
19
Note that this is a very simple definition of a corner point. It also leads to some
unintuitive aspects.
First of all, a corner point only makes sense if the feasible region is convex, that is,
if two points p1 and p2 are feasible, then every point on the line segment [p1, p2] is
also feasible. We will discuss convexity later in this lecture.
Second, if the feasible region is a disk, then every point on the outside of the disk is
a corner point even though there are no “corners” to a disk.
Solving for the Corner Point
3 x +2y = 6
2x + 4y = 12
2x + 3y = 10
2
2x +3y = 10
1 y=2
1 2 3 4
x 20
It’s very useful that the corner point lies at the intersection of two lines. Then
solving a system of equations with two variables and two equations will give the
value of the corner point.
Solving for Corner Points
In three dimensions, a corner point is the
intersection of three constraints. (3 planes)
0 ≤ x ≤ 2
0 ≤ y ≤ 2
z
0 ≤ z ≤ 2
x -y +z≤3
21
x = 2
z = 2
x - y + z = 3
3
2x + y ≤ 9
x + 2y ≤ 9
0≤x≤3
2
0≤y≤3
This turns out to be very important in later lectures when we consider the simplex
algorithm, which is the algebraic technique for solving a linear program. Within the
simplex algorithm, there may be many structural descriptions (bases) that
correspond to the same solution. This leads to a number of technical issues that
need to be resolved.
We’ll return to this slide later in the subject when we discuss degeneracy.
Remainder of the lecture: Corner Points.
23
Even a person who has studied linear programming for a long time can forget that
not all linear programs have corner points. Fortunately, all linear programs with
non-negativity constraints do have corner points.
We will generally deal with linear programs that have non-negativity constraints.
Theorem. If there is a feasible solution, and if there is
no feasible line, then there is a corner point.
y
5
1 2 3 4 5 6 x 24
If there is an optimal solution, and if there is a
corner point, is there always an optimal
solution that is a corner point?
y
YES!
3
It is true even if
there is an entire
2 line segment that is
optimal.
x
1 2 3 4 25
It is also possible that the entire feasible region is optimal, but this can only happen
when the objective is to maximize (or minimize) 0x + 0y. In this case, all corner
points are optimal.
z If there is an optimal solution, then there is an
optimal solution that is a corner point.
se
s. t o
t. f p
pr o
of in
it ts
=
a
26
In three dimensions, the isoprofit points form a plane. For example, we may have
an objective of 2x + 3y + w =.
We’ll try to avoid having z as one of the variables since z usually denotes the value
of the objective function.
What types of Linear Programs are there?
There is no max x
feasible solution. s.t. x + 2y ≤ -1
x ≥ 0, y ≥ 0
There is a feasible
max x
solution and an
s.t. x + 2y ≤ 1
optimal solution.
x ≥ 0, y ≥ 0
There is a feasible
solution and the max
objective value is s.t. x - 2y ≤ 1
unbounded from x ≥ 0, y ≥ 0
below
27
Case 2 will always occur when the feasible region is non-empty and bounded.
However, it can also occur with the feasible region is unbounded. For example, min
{x : x >= 1}.
constraints.
Maximize x
28
It might seem obvious that if an LP feasible region is bounded, then it must have an
optimal solution. But this relies on the fact that the inequalities are not strict, as the
example above shows.
1 p2
x
1 2 3 4 29
Notice that we are using the same description of a line segment as earlier.
More on Convexity
Which of the following are convex ? or not ?
y
5
4
3
2
1
1 2 3 4 5 6 x
30
The 8 points (object 8) is not convex because it only contains those 8 points and not
points in between.
31
Not LP: heart and moon and circle. (The circle cannot be expressed as a finite
Corner points: those that are not the midpoints of two other points of the object.
The top of the heart is not a corner point since it is the midpoint of two other points
of the heart. The points on the outside curve are corner points except for the points
All outside points on the circle are corner points, despite the fact that in common
The outside points on the left of the moon are corner points. The outside on the
On corner points
32
When we use corner points in linear programming, it will make intuitive sense.
It is not very useful to talk of corner points of non-convex regions.
A Theorem on Corner Points
www.mathematica.com
33
All one has to two in two dimensions is to find a line that goes through the corner
In three dimensions, one needs to find a plane that goes through a corner point and
Intuitively, this is quite easy to do. However, it is not so easy to prove that it is
In fact, in an n-variable LP, every corner point is an optimal solution for some linear
objective.
1 2 3 4
x 34
To prove that a set is convex, one goes back to the definition. One shows that is p1
and p2 are both in the set and if p3 is on the line segment joining p1 and p2, then p3
must also be in the set.
In the case of a linear programming feasible region, one needs to show that p3
satisfies each of the linear equalities and inequalities. The above is an outline of the
proof why this is true with two variables. Indeed, the proof idea can be generalized
to show that it is true regardless of the number of variables.
The proof continued
35
And now, it’s time for …..
36
z 2D visualization
z infeasibility and unboundedness
z Corner Points and their significance
z Convexity of the feasible region
37
2010
Pentagonal prism 1
Overview of Lecture
z Review of Geometry
z More on convexity
2
Quotes of the Day
1 p2
x
1 2 3 4 4
Corner Points
5
Solving for Corner Points
0 ≤ x ≤ 2
0 ≤ y ≤ 2
z
0≤z≤2
x -y +z≤3
x y
x = 2
z = 2
x - y + z = 3
3 3
2 2
1 1
1 2 3 4
1 2 3 4
Those with an optimal solution Those with no feasible solution.
5
4
Those whose objective
3 Isoprofit value is unbounded
2 line
1
1 2 3 4 5 6 7
The Simplex Method in Two Dimensions
Start at any feasible corner point.
Move to an adjacent corner point with better
y objective value. Move along an edge of the feasible
region.
5
Continue until no adjacent corner point has a better
objective value.
4
Max z = 3 x + 5 y
3
2
3 x + 5 y = 19
1 2 3 4 5 6 x 8 8
The Simplex Method Again
Start at any feasible corner point.
x
objective value. Move along an edge of the feasible
region.
5
1 2 3 4 5 6 y 9
Pentagonal prism 10
An Example of the Simplex Method in 3 Dimensions
y
Maximize y
y=2
The number of
y=1.7 iterations
depends upon
y=1.5
which edge is
chosen at
y=1
each iteration.
y=0 y=.1
x
y=.3
y=.2
Klee and Minty developed an example that is very similar that has n variables. It is
possible that the simplex method would take 2^n – 1 pivots on these examples, thus
showing that the simplex method can take exponential time in the worst case.
In practice, there may be many different edges that the simplex method can select at
a given iteration. The speed in which the simplex method moves to the optimum
depends on the choice of the edge.
The Simplex Method on Unbounded LPs
Maximize x
y If the objective is
5 unbounded from
4 above, then the
simplex method
3 will move
infinitely far along
2
an edge.
1
1 2 3 4 5 6 x 12
Interior Point Algorithms for LP
y
2 3x + 5y = 16
x
1 2 3 4 13
There are a variety of algorithms that move within the interior of linear programs.
These algorithms typically take far fewer iterations than the simplex algorithm and
far more time per iteration for large problems. Sometimes interior point algorithms
obtain answers quicker than the simplex algorithm. Often they are slower.
Interior point algorithms were popularized by Karmarkar in 1984, who proved that
the number of iterations is bounded by a polynomial in the dimension of the
problem and in the number of bits needed to describe the coefficients.
While interior point algorithms are ingenious and have practical import, they are
also beyond the scope of 15.053, and will not be covered further.
Comments on Optimality Conditions
14
Convex Combinations
λ1 + λ2 + ... + λk = 1
and λi ≥ 0 for i = 1 to k .
p1
Suppose k = 2. What points
are convex combinations of p2
p1 and p2?
15
More on Convex Combinations
What points can be represented as the convex
combination of (0,0), (0, 4), and (3, 0)?
5
λ1 (0, 0)
3
+ λ2 (0, 4)
2 + λ3 (3, 0)
1 2 3 4 5 6
16
Convex Combinations and Convex Hulls
4
Note that the
3
convex hull of
points in 2
2 dimensions looks
like an LP feasible
1 region.
17
1 2 3 4 5 6
Convex Hulls in 3 dimensions
z x
18
In Slide show mode, the figure is revealed as a cube that is partially cut off.
Representation Theorem
19
Mental Break
20
Sensitivity Analysis
21
The revised DTC example
z = 3x + 5y
2x + 3y ≤ 10 Gathering time
x + 2y ≤ 6 Smoothing time
x + y ≤ 5 Delivery Time
x ≤ 4 Demand: kits
y ≤ 3 Demand: shields
x, y ≥ 0 non-negativity
22
We could have used the original variable names of K and S, but it is simpler to use x
and y since we usually think of the two axes as the x and y axis.
The optimal solution
3 x +2y = 6
2x + 4y = 12
gathering time
2x + 3y = 10
2
2x +3y = 10
1 y=2
z = 3x + 5y
1 2 3 4
x x = 2, z = 16 23
It’s very useful that the corner point lies at the intersection of two lines. Then
solving a system of equations with two variables and two equations will give the
value of the corner point.
Varying the RHS
Suppose that we consider the problem in which
gathering time is parameterized by G.
Let z(G) be the
y smoothing time optimal objective
value when
3 x +2y = 6 gathering time is
G, and all other
gathering time data is
2 unchanged.
2x +3y = 10
G
1 z(10) = 16
What is z’(10)?
1 2 3 4
x (derivative) 24
It’s very useful that the corner point lies at the intersection of two lines. Then
solving a system of equations with two variables and two equations will give the
value of the corner point.
Computing the derivative
z(10 + Δ ) − z(10)
z '(10) = limΔ→0
Δ
25
On the new corner point
3 x +2y = 6
gathering time
2 2x +3y = G
x 26
1 2 3
Computing the New Corner Point
x + 2y = 6
2x + 3y = 10 + Δ
y smoothing time
3 x +2y = 6 2x + 4y = 12
2x + 3y = 10 + Δ
gathering time
2
2x +3y = 10 + Δ
y=2-Δ
1
z = 3x + 5y x = 2 + 2Δ
z = 16 + Δ
1 2 3 4
x
27
The Shadow Price
z (10 + Δ ) − z (10)
z '(10) = limΔ→0
Δ
28
More on Shadow Prices
29
Exercises
z What is z(10.2)?
z What is z(9.7)?
30
Computing the Shadow Price of a Constraint
31
Bounds on RHS coefficients in
Sensitivity Analysis
z Recall that the optimum solution is a corner
point, which in 2 dimensions is the solution of 2
equations in 2 variables, and the equations are
the binding constraints.
32
What happens if the RHS changes by a lot?
y
3
2 2x +3y = G
1 2 3 4
x 33
More Sensitivity Analysis: Determining the Interval
Constraint after
x =2+2Δ; y= 2-Δ
substitution.
Gathering time: 2 x + 3 y ≤ 10 + Δ 10 + Δ ≤ 10 + Δ
Smoothing time: x + 2 y ≤ 6 6 ≤ 6
Slingshot demand: x ≤ 4 2 + 2Δ ≤ 4
35
And now, it’s time for …..
36