Professional Documents
Culture Documents
Solving Linear Optimization Problems Using The Solver Add-In
Solving Linear Optimization Problems Using The Solver Add-In
objective function 10 HB + 18 FF
nonnegativity
constraints Of course HB >= 0 and FF >= 0
Preparing the Worksheet for Solver
start with blank sheet & enter labels and constants
NOTE:
EnterThe
labels
labels
in cells
in A4:A6
B1:E1name
the 3 constraints in this problem
Preparing the Worksheet for Solver
start with blank sheet & enter labels and constants
Enter coefficients
NOTE: of The
objective
labels infunction
cells B1:C1
in cells B3:C3
name the 2 variables in this problem
10 HB + 18 FF
Preparing the Worksheet for Solver
start with blank sheet & enter labels and constants
15 HB + 3 FF
Preparing the Worksheet for Solver
start with blank sheet & enter labels and constants
32 HB + 32 FF
Preparing the Worksheet for Solver
start with blank sheet & enter labels and constants
220 HB + 396 FF
Preparing the Worksheet for Solver
start with blank sheet & enter labels and constants
Click on Name
Preparing the Worksheet for Solver
name the cells for the two decision variables
Click on Create
Preparing the Worksheet for Solver
name the cells for the two decision variables
Click OK
Preparing the Worksheet for Solver
name the cells for the two decision variables
Click on cell D3
Preparing the Worksheet for Solver
enter the formula for the objective function
ClickType
on cell
= B3
Preparing the Worksheet for Solver
enter the formula for the objective function
Click Type
on cell
* B2
Preparing the Worksheet for Solver
enter the formula for the objective function
ClickType
on cell
+ C3
Preparing the Worksheet for Solver
enter the formula for the objective function
ClickType
on cell
* C2
Preparing the Worksheet for Solver
enter the formula for the objective function
formula entered in D3
objective function
(Fat content)
10 HB + 18 FF
current
NOTE:value
Thefor
formula
the
Enter
formula
B3*HB+C3*FF
entered incould
D3
NOTE: Blanks in HB
have
and
been
FF typed
(cells B2
in cell
andD3C2)directly
are considered zeros
Preparing the Worksheet for Solver
copying down the formulas for totals
Click on cell D3 and grab the fill handle + in the lower right corner
Preparing the Worksheet for Solver
copying down the formulas for totals
formula copied in D4
Protein constraint LHS
15 HB + 3 FF
current
Click on
value
cell for
D4 the
to check
formula
your
entered
formula
in D4
Preparing the Worksheet for Solver
copying down the formulas for totals
formula copied in D5
Carbohydrate constraint LHS
32 HB + 32 FF
current
Click on
value
cell for
D5 the
to check
formula
your
entered
formula
in D5
Preparing the Worksheet for Solver
copying down the formulas for totals
formula copied in D6
Calories constraint LHS
220 HB + 396 FF
current
Click on
value
cell for
D6 the
to check
formula
your
entered
formula
in D6
Preparing the Worksheet for Solver
copying down the formulas for totals
Click on Solver
Using Solver
invoking Solver Add-In from the Tools menu
Click on Add
Using Solver
select the constraints’ left-hand-sides
Highlight cells
D4:D6
Using Solver
select the constraints’ left-hand-sides
Using Solver
select the constraints’ types
Click on
Using Solver
select the constraints’ types
Click on
>=
Using Solver
select the constraints’ right-hand-sides
Click on Options
Using Solver
setting the Options
Click OK
Using Solver
executing Solver
Click on Solve
Using Solver
obtaining solutions from the worksheet
Click on OK
Using Solver
viewing the Answer Report
Solution
HB = 6.75 servings of Hamburger
FF = 1.25 servings of French fries
and with
Protein: 105 g
Carbohydrate: 256 g
Calories: 1980 kcal
satisfying the constraints