Simplex 3
Simplex 3
PROGRAMMING PROBLEMS:
The Simplex Method
Simplex Method
• Used for solving LP problems will be presented
• Put into the form of a table, and then a number of
mathematical steps are performed on the table
• Moves from one extreme point on the solution boundary to
another until the best one is found, and then it stops
• A lengthy and tedious process but computer software
programs are now used easily instead
• Programs do not provide an in-depth understanding of how
those solutions are derived
• Can greatly enhance one's understanding of LP
First Step
• First step is to convert model into standard form
• s1 and s2, represent amount of unused labor and
wood
• No chairs and tables are produced, s1=40 and
s2=120
• Unused resources contribute nothing to profit, Z=0
• Decision variables as well as profit at origin are:
Assigning (n-m) Variables Equal to
Zero
• Determine values of variables at every possible
solution point
• Have two equations and four unknowns, which
makes direct simultaneous solution impossible
• Assigns n-m variables=0
– n=number of variables
– m=number of constraints
• Have n = 4 variables and m = 2 constraints
• x1 = 0 and s1 = 0 and substituting them results in
x2 = 20 and s2=60
Feasible and Basic Feasible Solution
• Solution corresponds to A
• Referred to as a basic feasible
solution X1=0 chairs
• Feasible solution is any S1=0
X2=20 tables
solution that satisfies the S2=60
constraints A
• Basic feasible solution not only
satisfies the constraints but also
contains as many variables with B
nonnegative values as there are
model constraints
– m variables with nonnegative C
values and n-m values equal to
zero
Feasible and Basic Feasible Solution
• x2=0 and s2=0, results in
x1=30 and s1=10
• Corresponds to point C
• s1=0 and s2=0, results in
two equations with two A
unknown variables
• Get a solution which X1=30 chairs
corresponds to point B, B S1=10
X2=0 tables
where x1=24, x2=8, s1=0, S2=0
and s2= 0 C
• Previously identified as
optimal solution point
Two Questions
• Two questions can be raised by
the identification of solutions at
points O, A, B, and C
• How was it known which
variables to set equal to zero? X1=0 chairs
S1=0
• How is the optimal solution A X2=20 tables X1=24 chairs
S2=60 S1=0
identified? X2=8 tables
• Answers these questions by S2=0
O C
• Chooses x2 as the entering
variable
Leaving Basic Variable
• One of s1 or s2 has to leave and R
become zero
• Produce tables as many as
possible Wood constraint
been reached
• x1 = 24 chairs, x2= 8
tables and z= $1,360
profit
– Corresponds to point B
shown previously
Summary of the Simplex
1. Transform constraint inequalities into equations
2. Set up the initial tableau
3. Determine the pivot column (entering nonbasic solution
variable)
4. Determine the pivot row (leaving basic solution variable)
5. Compute the new pivot row values
6. Compute all other row values
7. Determine whether or not the new solution is optimal
1. If these coefficients are zero or positive, the solution is optimal
2. If a negative value exists, return to step 3 and repeat the simplex
steps
Simplex Tableaus by TORA
• Used manually to solve
relatively small problems
• Can be so time-consuming and
subject to error that manual
computation
• Computer solution has become
so important
• Many computer programs use
the simplex method
• Computer output includes
option to display simplex
tableaus
• Simplex tableaus provided by
TORA software
Minimization Problem
• Demonstrated simplex method for a maximization problem
• A minimization problem requires a few changes
• Recall the minimization model
minimize Z = 6 x1 + 3 x2
subject to
2 x1 + 4 x2 ≥ 16
4 x1 + 3 x2 ≥ 24
x1 and x2 ≥ 0
• Transformed this model into standard form by subtracting surplus
variables
2 x1 + 4 x2 – s1 = 16
4 x1 + 3 x2 – s2 = 24
Introducing Artificial Variable
• Simplex method requires initial basic A
solution at the origin Feasible area
• Test this solution at origin
• Violates the non-negativity restriction
• Reason is shown in Figure
• Solution at origin is outside feasible
solution space
• Add an artificial variable (R1) to the
constraint equation
• Create an artificial positive solution at
the origin
• Artificial solution helps get the simplex B
process started
– Not want it to end up in the optimal
solution
• Our phosphate constraint becomes C
2 x1 + 4 x2 – s1 + R1= 16
Effect of Surplus and Artificial
Variables on Objective Function
• Effect of surplus and artificial variables on objective function
• Surplus variable has no effect on objective function
• 0 is assigned to each surplus variable
• Must also ensure that an artificial variable is not in the final solution
• Achieved by assigning a very large cost
• Assign a value of M, which represents a large positive cost
• Produces objective function:
• Minimization model can now be summarized as
minimize Z = 6 x1 + 3 x2 + MR1 + MR2
subject to 2 x1 + 4 x2 – s1 + R1 = 16
4 x1 + 3 x2 – s2 + R2 = 24
Basic Z x1 x2 s1 s2 R1 R2 Solution
Z 1 0 0 0.6 -1.8 -M-0.6 M-1.8 33.6
Basic Z x1 x2 s1 s2 R1 R2 Solution
Z 1 -2 0 0 -1 -M -M+1 24
R1 0 1 1 0 1 0 0 30
R2 0 2 8 -1 0 1 0 80
s2 0 1 0 0 0 0 1 20
Second and Third Tableau
Basic Z x1 x2 s1 R1 R2 s2 solution
s2 0 1 0 0 0 0 1 20
Basic Z x1 x2 s1 R1 R2 s2 solution
x1 0 1 0 0 0 0 1 20
Optimal Tableau
• Solution is:
x1=20, x2=10, s1=40
Z=10,000
Basic Z x1 x2 s1 R1 R2 s2 solution
s1 0 0 0 1 8 -1 -6 40
x2 0 0 1 0 1 0 -1 10
x1 0 1 0 0 0 0 1 20
Transforming Rules
• Rules for transforming all three types of model
constraints
• Are as follows
Objective Function
Coefficient
Basic x1 x2 s1 s2 s3 s4 Solution
z -3 -2 0 0 0 0 0 Ratio
s1 1 2 1 0 0 0 6 6/1=6
s2 2 1 0 1 0 0 8 8/2=4
s3 -1 1 0 0 1 0 1 -
s4 0 1 0 0 0 1 2 -
z
s1
x1 1 1/2 0 1/2 0 0 8/2=4
s3
s4
Complete New Tableau
Basic x1 x2 s1 s2 s3 s4 Solution
x1 0 1 0 -0.6 0.4 24
The Infeasible Solution
• Special case where a LP
has not feasible solution
area
Max Z=5x1+3x2
s.t. 4x1+2x2<=8
x1>=4
X>=6
• Because no point satisfies
all three constraints
simultaneously, there is no
solution.
The Infeasible Solution (cont.)
All values are zero or positive indicating that it is optimal
• Solution: x2=4, R1=4, and R2=2
– Existence of artificial variables in final tableau makes the solution
meaningless
• Occur as a result of making errors in defining problem correctly or in
formulating the LP problem
Basic Z x1 x2 s1 s2 s3 R1 R2 Solution
Z 1 M+1 0 M M 0.5M+1.5 0 0 -0.6M+12
x2 0 2 1 0 0 0.5 0 0 4
R1 0 1 0 -1 0 0 1 0 4
R2 0 -2 0 0 -1 -0.5 0 1 2
Unbounded Problems
• Occur where feasible solution
area is not closed.
• Objective function increases
indefinitely without ever
reaching a maximum value
– Never reaches boundary of the
feasible solution area
Z=4x1+2x2
Subject to
x1≥4
x2≤2
x1, x2≥0
Unbounded Problems (cont.)
First tableau
next slide
Graphical Analysis
• The intersection causes the
tie for pivot row and the
degeneracy
– Simplex process stays
at point B
• Degeneracy occurs when a
problem continually loops B
back to same solution
• Two tableaus represent
two different basic
feasible solutions with two
different model constraint
equations
HW Assignments
1. Problem set 3.2A, problem 2, part a, b, and c.
2. Given the following linear programming model:
Min Z=4x1+x2
s.t.
3x1+6x2>=15
8x1+2x2>=12
x1, x2>=0
Solve graphically and using the simplex method.
What type of special case is this problem? Explain?
3. Transform the following linear programming model into proper form and setup the initial tableau. Do not solve it.
Min Z=40x1+55x2+30x3
s.t.
x1+2x2+3x3 <=60
2x1+x2+x3 = 40
x1+3x2+x3>=50
5x2+x3>=100
x1, x2, x3>=0
4. Given the following linear programming model:
Max Z=x1+2x2-x3
s.t.
4x2+x3<=40
x1-x2<=20
2x1+4x2+3x3<=60
x1, x2, x3>=0
Solve this problem using the simplex method.
What type of special case is this problem? Explain?