QMS 203 - Lecture2 - Classical - Optimization1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

QMS 203: Quantitative Methods

Optimization Techniques
Example An airport shuttle currently charges $15 and
carries an average of 1,200 passengers per day. It
estimates that for each dollar it raises its fare, it
loses an average of 50 passengers.

Current Revenues: $15(1,200) = $18,000

Could we do better?
First, lets figure out the demand curve this business faces. For simplicity, lets assume
that the demand is linear.
Q  A  BP

Price
We also know that every dollar change in price alters passengers
by 50.

0  A  BP A
A B  50
P B
B
$15

1,200 A Passengers

Q  A  B *0  A
First, lets figure out the demand curve this business faces. For simplicity, lets assume
that the demand is linear.

We can use the one data point we have to find the


Price missing parameter

1,950
 $39 1, 200  A  50 15 
50

A  1,950 Q  1,950  50 P
$15

1,200 1,950 Passengers


The problem here is to maximize revenues.

Fare
Revenues  P * Q

1,950
 $39 Q  1,950  50 P
50

Revenues  P 1,950  50 P   1,950 P  50 P 2


$P

Revenues

So, we have revenues as a


Q 1,950 Passengers
function of the price charged.
Now what?
Q  1,950  50 P 1,950 P  50 P 2
Revenues

20000
Price Quantity Revenues
18000
0 1,950 0
16000
1 1,900 1,900
14000
2 1,850 3,700
3 1,800 5,400 12000

10000

8000
Price Quantity Revenues
6000
19.50 975 19,012.50
4000

2000
Price Quantity Revenues
0 15
36 150 5,400 1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728293031323334353637383940
Price
19.50
37 100 3,700
38 50 1,900
39 0 0 We could do better! Now, how do we find this
point without resorting to excel?
“Take the derivative and set it equal
to zero!”

But, what’s a derivative and why set it


equal to zero?
The derivative is the result of the
Imagine calculating the slope
distance between those two
between two distinct points on a
points approaching zero
function

 f  x  x   f  x  
slope  lim    f ' x
f  x  x   f  x  x  0
 x 
slope 
x
f x 
f x 
Now, let those two points get
f  x  x  closer and closer to each
other

f ' x

f x 
f x 

x x
x x  x x
Let’s try one numerically… 2

f  x  x   f  x 
36  4 slope 
slope  8 x
4
x f  x  x  Slope
4 36 8
f x 
x2 2 16 6
1 9 5
36
.5 6.25 4.5
.25 5.0625 4.25
.1 4.41 4.1
.05 4.2025 4.05
4
.01 4.0401 4.01
x .001 4.004001 4.001
2 6

x
The slope gets closer and closer to 4
Or, in general… slope 
f  x  x   f  x 
x

 x  x 
2
 x2
slope 
x
f x 
x2

f  x  x  slope 
x 2  2 xx  x 2  x 2
x

2xx  x 2
f x slope 
x

x slope  2 x
x x  x
slope  2 x  x
f ' 2  4
Let the change in x go to 0
x
Some useful derivatives
Exponents
Linear Functions
f ( x)  Ax n  f ' ( x)  nAx n 1
f ( x)  Ax  f ' ( x)  A
Example: f ( x)  4 x Example: f ( x)  3x 5
f ' x   4 f ' x   15x 4

Logarithms
A
f ( x)  A ln( x)  f ' ( x) 
x
Example: f ( x)  12 ln x 
12
f ' x  
x
Suppose you know that demand for your product depends on the
price that you set and the level of advertising expenditures.

Q p, A  5,000  10 p  40 A  pA  0.8 A  0.5 p 2 2

Choose the level of advertising AND price top maximize sales


Choose the level of advertising AND price to maximize sales

Q  5, 000  10 p  40 A  pA  .8 A  .5 p
2 2

Now, we need
Q p  10  A  p  0
partial derivatives 40  p  1.6 A  0
with respect to both
‘p’ and ‘A’. Both are 10  A  p  0
set equal to zero QA  40  p  1.6 A  0
This gives us two
equations with two
unknowns
We could solve one of the equations
for ‘A’ and then plug into the other
40  p  1.6 A  0
40  p  1.6 A  0
10  A  p  0  A  p  10
Price
10  A  p  0

40
40  p  1.6 A  0
40  p  1.6  p  10   0
10 25 50
Advertising
24  .6 p  0
-10
p  40
A  50
-40
Joseph-Louis Lagrange The method of Lagrange multipliers is a strategy for
1736-1813 finding the local maxima and minima of a function
subject to equality constraints.

Harold Kuhn and Albert Tucker later extended this


method to inequality constraints
The Lagrange method writes the constrained optimization
problem in the following form
Objective

Choice
max f x, y  Constraint(s)
x, y
variables
subject to g x,y   0

The problem is then rewritten as follows

  f  x, y    g  x, y 
Multiplier (assumed greater or equal to zero)
Here’ s how this would look in two dimensions…we’ve created a new function that includes
the constraints. This new function coincides with the original objective at one point – the
maximum of both!
f x 

 g  x  0

  f  x   g x

f x
x
x*
The new function is
x  0 maximized
Therefore, at the maximum,
two thigs have to be true  g x   0 The new function coincides
with the original objective
So, we have our Lagrangian function….

  f  x, y    g  x, y 

We need the derivatives with respect o both ‘x’ and ‘y’ to be zero

x  f x  x , y    g x  x , y   0
 y  f y  x, y    g y  x, y   0

And then we have the “multiplier conditions”

0 g x , y   0  g x , y   0
Example: Suppose you sell two products ( X and Y ). Your profits
as a function of sales of X and Y are as follows:

Profit  10 x  20 y  .1( x 2  y 2 ) Objective


f  x, y 

Your production capacity is equal to 100 total units. Choose X


and Y to maximize profits subject to your capacity constraints.

Constraint
x  y  100 g  x, y 
First, for comparison purposes, lets solve this unconstrained….

Profit  10 x  20 y  .1( x 2  y 2 )

Take derivatives with respect to ‘x’ and ‘y’


y

Px  10  .2 x
P  1, 250
100 Py  20  .2 y
Set the derivatives equal to
zero and solve for ‘x’ and ‘y’

x*  50
y*  100
x
50 P  1, 250
Now, add the constraint Profit  10 x  20 y  .1( x 2  y 2 )

Subject to x  y  100

y We need to get the problem in the right format….we need


unconstrained
solution g  x, y   0 x  y  100
P  1, 250
100 Subtract ‘x’ and ‘y’
from both sides

The constraint matters! 100  x  y  0


Acceptable Now, we can write the lagrangian
values for ‘x’
and ‘y’
  10 x  20 y  .1( x 2  y 2 )   (100  x  y )
50
x
100 Objective Constraint
Multiplier
Now, the mechanical   10 x  20 y  .1( x  y )   (100  x  y )
2 2

part
Take derivatives with respect to ‘x’ and ‘y’

x  10  .2 x    0
y
unconstrained  y  20  .2 y    0
solution
P  1, 250 And the multiplier conditions
100
0 100  x  y  0  (100  x  y )  0

Acceptable
values for ‘x’
and ‘y’

50
x
Now, the mechanical x  10  .2 x    0
part  y  20  .2 y    0

0 100  x  y  0  (100  x  y )  0


y
unconstrained First, let’s suppose that lambda equals zero
solution
P  1, 250 10  .2 x  0 x*  50
100
That puts us here! 20  .2 y  0 y*  100
100  x  y  0 100  50  100  50  0
Acceptable
values for ‘x’
and ‘y’ Nope, that doesn’t work!! So, lambda
must be a positive number

50
x
Now, the mechanical x  10  .2 x    0  0  (100  x  y )  0 100  x  y  0
 y  20  .2 y    0
part
So, we have three equations and three unknowns (‘x’, ‘y’, and lambda)

10  .2 x    0   10  .2 x
y 20  .2 y    0   20  .2 y
Solve the first
unconstrained two expressions
solution for lambda
P  1, 250
100 10  .2 x  20  .2 y
P  1,125
75 constrained solution
rearrange

y  x  50
x*  25
Plug into third equation
y*  75
x 100  x   x  50   0  5
25 50
P  1,125
Exercise: submission date, Friday 10th December, 2021, 08:00 AM.
Group exercise: 10 people
Suppose that the production constraint increases from 100 to 101.
What will be the values of x and y that could maximize the profit ?
TUTORIAL PROLEMS

You might also like