ENGR 111 Lecture 12 - Excel 5
ENGR 111 Lecture 12 - Excel 5
Goal Seek
SOLVER
1
Iterative Solutions
2
Iterative Solutions (cont’d)
• We can go into our sheet and keep iterating the initial velocity until we
achieve an xmax value of 655 meters:
– In other words
• Try a value of V0
• Observe the resulting xmax value
• Try a new value of V0 by increasing/decreasing the original value
– In other words, does V0 need to increase to reach xmax = 655 m, or does it need to
decrease?
• Rinse and repeat until you’ve achieved the desired level of accuracy!
• After iterating a few times, you should get a solution of around 80.16 m/s
3
Goal Seek
• There are a couple of tools in Excel that can do iteration for you :
– Goal Seek (easier to use, but less powerful)
– SOLVER (a little more involved, but many more capabilities)
• Let’s try Goal Seek (in the Data tab of the Ribbon):
4
Goal Seek (cont’d)
5
Goal Seek (cont’d)
• Here’s a few other examples for practice :
– If your cannon is stuck at 30°, what initial velocity is needed to hit a target 400
meters away?
• 67.313 m/s
– If your cannon is stuck at 10°, what initial velocity is needed to hit a target 400
meters away?
• 107.112 m/s
– If your cannon can only fire at 37 m/s, what initial angle is needed to hit a target
125 meters away?
• Which one? (31.801°, 58.199°)
6
SOLVER
• Goal Seek works well with “simple” targets. However, if you have a
more involved problem, SOLVER is more robust.
– First, we need to add SOLVER to our interface:
• Got to “File,” then “Options” at the bottom.
• Go to Add-Ins, then hit the “Go” button at the bottom
• Make sure “Analysis TookPak” and “Solver Add-In” are checked.
• Click “OK” to confirm settings.
– Done correctly, your Data tab should look like this:
7
SOLVER (cont’d)
8
SOLVER (cont’d)
– If your cannon can only fire at 37 m/s, what initial angle is needed to hit a target
125 meters away?
• We got two answers (31.801°, 58.199°)
9
SOLVER (cont’d)
10
SOLVER (cont’d)
– Let’s say that you are the production manager for a company that makes three
different products. For every unit of product you make, you earn some profit.
The table below details how much product you earn for each unit you
manufacture:
Product Profit/Unit
Product A $13.00
Product B $18.00
Product C $22.00
11
SOLVER (cont’d)
• Based on these constraints, what production schedule will generate the most
profit for your company?
12
SOLVER (cont’d)
– Note that we are using Excel to compute profit in the right hand column and the
sums on the lower row.
13
SOLVER (cont’d)
14
SOLVER (cont’d)
15