Solving Linear Programs Using Excel: Dr. Ron Lembke
Solving Linear Programs Using Excel: Dr. Ron Lembke
Ron Lembke
Formulating in Excel
1.
2.
3.
4.
Formulating in Excel
5. Place inequalities in sheet, so you
remember <=, >=
6. Enter amount of each constraint
7. Enter objective coefficients
8. Calculate value of objective function
9. Make sure you have plenty of labels.
10. Widen columns for readability.
Standard Form
Max7x1 + 5x2
s.t. 4x1 + 3x2 <=
2x1 + 1x2 <=
x1
>=
x2 >=
240 electronics
100 assembly
Formulating in Excel
Current
value of
variables
Constraint
coefficients
Formulating in Excel
Amount of
each
constraint
used
by current
solution
Formulating in Excel
Objective
Function
Value
Objective Function
Coefficients
RHS of constraints,
Inequality signs.
Solving in Excel
All we have so far is a big what if tool. We
need to tell the LP Solver that this is an
LP that it can solve.
Choose Solver from Tools menu
If No Solver, Office2010
Solving in Excel
1.
2.
3.
Solving in Excel
1.
2.
3.
4.
5.
Constraints Added
Assuming Linear
6.
Assume Linear
Assuming Linear
6.
7.
Office 2010
Our
problems
should solve quickly
Solution is Found
Successful Solution
Optimality Conditions?
200
Dead Profits
4000
160
T
2000
0
120
T-shirts
2
Solution #
80
40
0
50
100
S Sweatshirts
150
200
Optimality Conditions
Simplex method
creates dual
Max
Dead Profits
7000
6000
5000
4000
3000
2000
1000
0
Solution #
Answer Report
Gives optimal and initial values of
objective function
Gives optimal and initial values of
variables
Tells amount of slack between LHS and
RHS of each constraint, tells whether
constraint is binding.
Answer Report
Sensitivity Report
Variables:
Final value of each variable
Reduced cost: how much objective
changes if current solution is changed
Objective coefficient (from problem)
Sensitivity Report
Variables:
Allowable increase:
How much the objective coefficient can go up before the optimal
solution changes.
Allowable decrease:
How much the objective coefficient can go down before optimal
solution changes.
Sensitivity Report
Constraints
Final Value (LHS)
Shadow price: how much objective would
change if RHS increased by 1.0
Allowable
Sensitivity Report
Limits Report
Tells ranges of values over which the
maximum and minimum objective values
can be found.
Rarely useful
Limits Report
Summary
Entered the LP into Excel
Opened Solver, told it how we wanted to
solve the LP
Interpreting results of Solver Reports
Answer