You are on page 1of 17

Introduction to Management

Science
Session 4
Wednesday 14th September
Recap
• Graphical solution of 2-variable LPs
– Plot constraints as straight lines
– Identify feasible region
– Plot objective function and find where it is
tangential to or overlaps with the boundary region
of the feasible solution space
• Basic Solver Setup
Preparing the Spreadsheet for Solver
• Organize the data for the model on the
spreadsheet.
• Reserve separate cells in the spreadsheet for
each decision variable in the model.
• Create a formula in a cell in the spreadsheet that
corresponds to the objective function.
• For each constraint, create a formula in a
separate cell in the spreadsheet that corresponds
to the left-hand side (LHS) of the constraint.
Importance of Spreadsheet Design
• Communication - A spreadsheet's primary business
purpose is communicating information to managers.
• Reliable - The output a spreadsheet generates should
be correct and consistent.
• Auditable - A manager should be able to retrace the
steps followed to generate the different outputs from
the model in order to understand and verify results.
• Modifiable - A well-designed spreadsheet should be
easy to change or enhance in order to meet dynamic
user requirements.
Guidelines for Spreadsheet Design
• Organize the data, then build the model around the data
• Do not embed numeric constants in formulas
• Things which are logically related should be physically related
• Use formulas that can be copied
• Column/rows totals should be close to the columns/rows
being totaled
• The English-reading eye scans left to right, top to bottom
• Use color, shading, borders and protection to distinguish
changeable parameters from other model elements
• Use text boxes and cell notes to document various elements
of the model
Applying Solver
• Target cell - the cell in the spreadsheet that represents
the objective function

• Changing cells - the cells in the spreadsheet representing


the decision variables

• Constraint cells
– the cells in the spreadsheet representing the LHS formulas on
the constraints
– the cells in the spreadsheet representing the RHS formulas on
the constraints
Applying Solver
• At this point the challenge is not Solver – it is
problem formulation!

• Solver will do the math provided the


formulation is correct AND it has been
correctly entered in Excel
Applying Solver
Solver Setup
Practice

MAX: 4 X1 + 5 X2
Subject: 2 X1 + 3 X2 ≤ 120
4 X1 + 3 X2 ≤ 140
X1 + X2 ≥ 80
X 1, X 2 ≥ 0
The Simplex Method
• Powerful method of solving LPs
• Finds the optimal point on the surface of the
feasible solution space
• Step 1: Convert all inequalities to equalities
using slack variables
For example: ak1X1 + ak2X2 + … + aknXn <= bk
converts to: ak1X1 + ak2X2 + … + aknXn + Sk = bk

And: ak1X1 + ak2X2 + … + aknXn >= bk


converts to: ak1X1 + ak2X2 + … + aknXn - Sk = bk
The Simplex Method
• If there are n variables in a system of m
equations (where n >= m) we can select any m
variables and solve the equations (setting the
remaining n-m variables to 0)
• Variables whose values are set to 0 are called
non-basic variables and the others are called
basic variables
• A solution is called basic solution and if it is
feasible, it is called a basic feasible solution
For Our Favorite Problem...
MAX: 350X1 + 300X2 } profit
S.T.: 1X1 + 1X2 + S1 = 200 } pumps
9X1 + 6X2 + S2 = 1566 } labor
12X1 + 16X2 + S3 = 2880 } tubing
X1, X2, S1, S2, S3 >= 0 } nonnegativity

 If there are n variables in a system of m equations


(where n>m) we can select any m variables and
solve the equations (setting the remaining n-m
variables to zero.)
Possible Basic Feasible Solutions
Basic Nonbasic Objective
Variables Variables Solution Value
1 S1, S2, S3 X1, X2 X1=0, X2=0, S1=200, S2=1566, S3=2880 0
2 X1, S1, S3 X2, S2 X1=174, X2=0, S1=26, S2=0, S3=792 60,900
3 X1, X2, S3 S1, S2 X1=122, X2=78, S1=0, S2=0, S3=168 66,100
4 X1, X2, S2 S1, S3 X1=80, X2=120, S1=0, S2=126, S3=0 64,000
5 X2, S1, S2 X1, S3 X1=0, X2=180, S1=20, S2=486, S3=0 54,000
6* X1, X2, S1 S2, S3 X1=108, X2=99, S1=-7, S2=0, S3=0 67,500
7* X1, S1, S2 X2, S3 X1=240, X2=0, S1=-40, S2=-594, S3=0 84,000
8* X1, S2, S3 X2, S1 X1=200, X2=0, S1=0, S2=-234, S3=480 70,000
9* X2, S2, S3 X1, S1 X1=0, X2=200, S1=0, S2=366, S3=-320 60,000
10* X2, S1, S3 X1, S2 X1=0, X2=261, S1=-61, S2=0, S3=-1296 78,300
* denotes infeasible solutions
Basic Feasible Solutions &
Extreme Points
X2
250
Basic Feasible Solutions
1 X1=0, X2=0, S1=200, S2=1566, S3=2880

5 2 X1=174, X2=0, S1=26, S2=0, S3=792


200
3 X1=122, X2=78, S1=0, S2=0, S3=168
4 X1=80, X2=120, S1=0, S2=126, S3=0
150
4 5 X1=0, X2=180, S1=20, S2=486, S3=0

100
3

50
1 2
0
0 50 100 150 200 250 X1
Simplex Method Summary
 Identify any basic feasible solution (or extreme
point) for an LP problem, then moving to an
adjacent extreme point, if such a move improves
the value of the objective function.
 Moving from one extreme point to an adjacent one
occurs by switching one of the basic variables with
one of the nonbasic variables to create a new
basic feasible solution (for an adjacent extreme
point).
 When no adjacent extreme point has a better
objective function value, stop -- the current
extreme point is optimal.
The Simplex Method
• What if you have 5 inequalities and 3 decision
variables, how many basic solutions are you
going to compute?
– That’s 5 slack variables
– So 5 equations and 8 variables
– Set 3 variables to 0 at a time to solve 5 equations
with 5 variables
– How many basic solutions?

You might also like