Upload
peter
View
219
Download
0
Embed Size (px)
Citation preview
8/18/2019 Introduction to Solver
1/16
8/18/2019 Introduction to Solver
2/16
Adding the SolverFile Options Add-Ins Solver Add-In
1
2
3
4
5
8/18/2019 Introduction to Solver
3/16
What is solverAn Excel add-in that can be used to
an !opti"al# solution to a proble
based on so"e pre-deter"ined ob%e
solved b& changing a set o' decisvariables such that the solutions "e
given a set o' li"itations (constrai
8/18/2019 Introduction to Solver
4/16
Ice +rea" Exa"ple, roble".escription
+onsider a proble" o' diet opti"i/ation* here are 'our di1erent t&pero3nies$ Ice +rea"$ +ola$ and +heeseca4e* he nutrition values andunit are as 'ollo3s,
he ob%ective is to nd a "ini"u"-cost diet that contains at least 500at least 6 gra"s o' chocolate$ at least 70 gra"s o' sugar$ and at least'at*
8/18/2019 Introduction to Solver
5/16
Step 7, .ecision 9ariables
STEP 1: Decision Variables
• o begin 3e enter a heading 'or each t&pe o' 'oo2,E2
• In the range :, E:$ 3e input trial values 'or the o' each 'ood eaten (An& values 3ill 3or4$ but at one should be positive)
For exa"ple$ here 3e indicate that 3e are consideeating three bro3nies$ no scoops o' ice crea"$ ono' cola$ and seven pieces o' cheeseca4e
8/18/2019 Introduction to Solver
6/16
Step 2, Ob%ective FunctionSTEP 2: Objective Fnction
• o see i' the diet is opti"al$ 3e "ust deter"ine as 3ell as the calories chocolate$ sugar$ and 'at provides
• In the range ;, E;$ 3e re'erence the nu"ber o'
• In the range 8,E8$ 3e input the cost 'or each av'ood*
8/18/2019 Introduction to Solver
7/16
Step 2, Ob%ective FunctionSTEP 2: Objective Fnction
•
?@O.>+ (;,E;$ 8,E8) or = (;8) B (+;+8) B(E;E8)
8/18/2019 Introduction to Solver
8/16
Step :, +onstraintsSTEP 3: !onstraints
• o begin$ 3e create a table in Excel that denes h
"an& calories and units o' chocolate$ sugar$ and in each t&pe o' dessert*
8/18/2019 Introduction to Solver
9/16
Step :, +onstraintsSTEP 3: !onstraints
• Next$ 3e need to calculate the total a"ount o' ca
chocolate$ sugar C 'at - given the total nu"ber oite" (decision variables)*
• +reate a !otal# in +olu"n F
=S>?@O.>+(DD;,DED;$7,E7)
8/18/2019 Introduction to Solver
10/16
Step :, +onstraintsSTEP 3: !onstraints
• Finall&$ 3e need to indicate the li"itations highlig
the proble"*
•
8/18/2019 Introduction to Solver
11/16
SOH9E ISte" 1: Set the Ob%ective
• Open Solver and clic4 on the to select the cellspreadsheet that calculates our ob%ective 'unctio70
• Next$ 3e "ust identi'& the t&pe o' proble" 3e arsolving - #$%
8/18/2019 Introduction to Solver
12/16
SOH9E ISte" 2: Identi'& the decision variables
• +lic4 on the to select the cell in our spreadshetell solver 3hich variables it can change to reach opti"al solution*
8/18/2019 Introduction to Solver
13/16
SOH9E ISte" 3: Add constraints
• On the right-hand side o' the 3indo3 there is a ba constraint
• >se the cell re'erence to input the totals 'or each3e calculated*
• +lic4 !Add# i' adding "ore than constraints or +lic
nished*
Exa"ple 'or +alories,
8/18/2019 Introduction to Solver
14/16
SOH9E ISte" 3: Add constraints
•
8/18/2019 Introduction to Solver
15/16
SOH9E I
Ste" 4: ?inor changes to Solverara"eters
• +hec4 the box #a)e *nconstraine'Variables %on+%e(ative (3e do not
3ant an& negative values)• +hange the Solvin( #etho' to
SI?HEL H
• +lic4 SO,VE
8/18/2019 Introduction to Solver
16/16
Solution