Spreadsheet-based 0ptimization

advertisement
Spreadsheet-based 0ptimization
Objective: Execute the
optimization of profit
functions using the
Excel spreadsheet.
With modern
spreadsheets,
optimization
is a snap
Problem : Maximizing profits
from the sale of microchips
Recall our inverse demand function for microchips [2.2]:
P = 170 – 20Q
The Revenue (R) function is given by:
R = P · Q = (170 – 20Q)Q = 170Q – 20Q2
Thus marginal revenue (MR) is given by
dR/dQ = 170 –40Q
The cost function (C) is given by [2.4]
C = 100 + 38Q
Thus the marginal cost (MC) function is given by:
dC/dQ = 38
The profit () function is given by:
R – C = 170Q – 20Q2 –(100 + 38Q) = 132Q – 20Q2 –100
Thus the marginal profit function (M) is given by:
d /dQ = 132 – 40Q
Step 1: Set up a spreadsheet like this
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
Cost
Profit
The Optimal Output of Microchips
Quantity
Price
Revenue
G
Step 2: Type the number “2.0” in cell b7
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
Cost
Profit
The Optimal Output of Microchips
Quantity
2.0
Price
Revenue
G
Step 3: Move your cursor to cell c7 and type the following
in the formula bar: =170-20*b7
Hit “enter” or click right on the green check mark to the
left of the formula bar. Now your spreadsheet should
look like this:
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
Cost
Profit
The Optimal Output of Microchips
Quantity
Price
2.0
130
Revenue
G
Step 4: Move your cursor to cell d7 and type the following
in the formula bar: =b7*c7
Hit “enter” or click right on the green check mark to the
left or the formula bar. Now your spreadsheet should
look like this:
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
Cost
Profit
The Optimal Output of Microchips
Quantity
Price
Revenue
2.0
130
260
G
Step 5: Move your cursor to cell e7 and type the following
in the formula bar: =100+38*b7
Hit “enter” or click right on the green check mark to the
left or the formula bar. Now your spreadsheet should
look like this:
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
Profit
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
2.0
130
260
176
G
Step 6: Move your cursor to cell f7 and type the following
in the formula bar: =d7-e7
Hit “enter” or click right on the green check mark to the
left or the formula bar. Now your spreadsheet should
look like this:
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
2.0
130
260
176
84
G
3 ways to maximize profits ()
Now we will show you 3
methods of maximizing the
profit function using Excel.
Method 1: Change the value of the number in cell b7 until
you find the highest corresponding value in cell f7.
Example: Enter the number “3.0” in cell b7. Notice that
profit increases to 116.
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
3.0
110
330
214
116
G
Method 2: Use MR and MC as guides. Vary the numerical
values in cell b7 until MR =MC (or alternatively, Mprofit
= 0).
Example: Enter the number “3.0” in cell b7. Notice that
profit increases to 116.
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
3.0
110
330
214
116
G
Method 2: Use MR and MC as guides. Vary the numerical values
in cell b7 until MR =MC (or alternatively, Mprofit = 0).
Step 1: Type MR, MC, and Mprofit into cells d12, e12,
and f12 respectively
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
2.0
130
260
176
84
MR
MC
Mprofit
G
Step 2: To compute MR when quantity is equal to 2 lots, place
your cursor in cell d14 and type the following in the formula
bar: =170-40*b7
Your spreadsheet should look like this:
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
2.0
130
260
176
84
MR
MC
Mprofit
90
G
Step 3: Note that MC = 38, so type this into cell e14.To
compute marginal profit (Mprofit) move your cursor to cell f14
and type the following in the formula bar: =132-40*b7
Your spreadsheet should now look like this:
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
2.0
130
260
176
84
MR
MC
Mprofit
90
38
52
G
Step 4: Now adjust the numerical values in cell b7 until MR =
MC, or Mprofit = 0.
Example: Type “3.0” in cell b7. Your spreadsheet should
now look like this:
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
3.0
130
390
214
176
MR
MC
Mprofit
50
38
12
G
Method 3: Use the Excel “solver” function
1. Move your cursor to cell f7.
2. From the “tools” menu select “solver”. You
should see a dialog box like this:
Solver Parameters
Set Target Cells $F$7
Equal to
Max Min
By Changing Cells:
Subject to Constraints:
Solve
Close
Options
Add
Change
Delete
1. Notice that the default is “Max”—that’s OK– we are
trying a maximize a profit function.
2. In the “By Changing Cells” space type: $B$7.
Remember we are seeking to find the profit maximizing
output-price combination.
3. Now click on the “solve” button.
Solver Parameters
Set Target Cells $F$7
Equal to
Max Min
By Changing Cells:
$B$7
Subject to Constraints:
Solve
Close
Options
Add
Change
Delete
The solver function found the profit
maximizing output (3.3 lots) and
price ($104,000 per lot).
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
3.3
104
343.2
225.4
117.8
MR
MC
Mprofit
38
38
0
G
Constrained optimization
Suppose we are seeking to
maximize profits subject
to the constraint that our
price per lot cannot exceed
$91,000—that is:
P  91
1. Move your cursor to cell f7 and access the “solver” dialog
box from the tools menu.
2. Now click on the add button and you will find a dialog box
(something) like this:
3. Type c7 into Cell Reference space and 91 into constraint
space. Now click on OK
Add Constraint
Constraint:
Cell Reference:
<=
c7
OK
Cancel
91
Add
Help
Note: <= is the default, which works in our
case.
The solver function found the
output (4.0 lots) that maximizing
profits subject to the price
constraint.
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
C
D
E
F
The Optimal Output of Microchips
Quantity
Price
Revenue
Cost
Profit
4.0
91
359.45
250.1
109.35
MR
MC
Mprofit
12
38
-26
G
Download