Download as pdf or txt
Download as pdf or txt
You are on page 1of 226

Are you ready?

Linear Programming 171-181


Part 9 – Primal Simplex Algorithm
Primal Simplex Algorithm

The first Simplex Algorithm we will look at will be the Primal Simplex
Algorithm. This is the core algorithm of which all other Simplex Algorithms
function from.
Conditions
As previously stated, to use a Primal Simplex Algorithm to solve a Linear
Programming Model, very specific conditions of your Linear Programming
Model must be met first.
• Additivity Assumption
• Proportionality Assumption
• Certainty Assumption
• Feasibility
Example – Santa’s Workshop
Using the previously formulated mathematical model for Santa’s workshop as an example:
x1 = number of soldiers produced each week
x2 = number of trains produced each week

max z = 3x1 + 2x2


subject to (s.t.)
2x1 + x2 ≤ 100
x1 + x2 ≤ 80
x1 ≤ 40
x1, x2 ≥ 0
Additivity Assumption
We’ve determined that the Santa’s Workshop problem complies with the
Additivity Assumption, because:
• No matter what the value of x2, the manufacture of x1 soldiers will always
contribute 3x1 Rands to the objective function.
• No matter what the value of x1, the manufacture of x2 trains uses x2
finishing hours and x2 carpentry hours.

Thus, the Santa’s Workshop meets the first requirement to be able to solve
with a Primal Simplex Algorithm.
Proportionality Assumption
We’ve determined that the Santa’s Workshop problem complies with the
Proportionality Assumption, because:
• The contribution to the objective function from making four soldiers (4 × 3
= R12) is exactly four times the contribution to the objective function from
making one soldier (R3).
• It takes exactly three times as many finishing hours (2 × 3 = 6 finishing
hours) to manufacture three soldiers as it takes to manufacture one
soldier (2 finishing hours).

Thus, the Santa’s Workshop meets the second requirement to be able to


solve with a Primal Simplex Algorithm.
Certainty Assumption
We’ve determined that the Santa’s Workshop problem complies with the
Certainty Assumption, because:
• If we were unsure of the exact amount of carpentry and finishing hours
required to build a train, The Certainty Assumption would be violated.

Thus, the Santa’s Workshop meets the third requirement to be able to solve
with a Primal Simplex Algorithm.
Feasibility
The Linear Programming Model must start, before being solved, in an
already feasible area.
• Because the Santa’s Workshop problem is a maximize problem, and all
constraints are ≤-constraints, the starting point of the variables, x1 and x2,
are already in a feasible area, although not yet optimal.
Thus, the Santa’s Workshop meets the final requirement to be able to solve
with a Primal Simplex Algorithm.
Conditions

As the Santa’s Workshop meets all conditions / requirements to be solved


with a Primal Simplex Algorithm, we can now proceed to solve it.
Farmer Brown (Acres)
Using the previously formulated Linear Programming
Model for the Farmer Brown (Acres) problem,
x1 = number of acres of corn planted
x2 = number of acres of wheat planted

Max z = 100x1 + 30x2


s.t. x2 ≥ 3
x1 + x2 ≤ 7
10x1 + 4x2 ≤ 40
x1, x2 ≥ 0
, determine if the Linear Programming Model can be
solved with a Primal Simplex Algorithm.
Farmer Brown (Acres) - Solution
As previously determined, the Farmer Brown
(Acres) Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the
Farmer Brown (Acres) problem is a maximize
problem, and one of the constraints is a ≥-
constraint, the starting point of the variables,
x1 and x2, are not in a feasible area, thus the
Farmer Brown (Acres) problem does not meet
all conditions / requirements to be solved with
a Primal Simplex Algorithm.
Farmer Brown (Bushels)
Using the previously formulated Linear Programming
Model for the Farmer Brown (Bushels) problem,
x1 = number of bushels of corn produced
x2 = number of bushels of wheat produced

Max z = 4x1 + 3x2


s.t. x2 ≥ 30
1 1
x1 + x2 ≤ 7
25
10 10
4
x1 + x2 ≤ 40
25 10
x1, x2 ≥ 0
, determine if the Linear Programming Model can be
solved with a Primal Simplex Algorithm.
Farmer Brown (Bushels) -
Solution
As previously determined, the Farmer Brown
(Bushels) Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the Farmer
Brown (Bushels) problem is a maximize problem,
and one of the constraints is a ≥-constraint, the
starting point of the variables, x1 and x2, are not in
a feasible area, thus the Farmer Brown (Bushels)
problem does not meet all conditions /
requirements to be solved with a Primal Simplex
Algorithm.
Korean Auto
Using the previously formulated Linear Programming
Model for the Korean Auto problem,
x1 = number of comedy adds shown
x2 = number of football adds shown

Min z = 50x1 + 100x2


s.t. 7x1 + 2x2 ≥ 28
2x1 + 12x2 ≥ 24
x1, x2 ≥ 0
, determine if the Linear Programming Model can be
solved with a Primal Simplex Algorithm.
Korean Auto - Solution
As previously determined, the Korean Auto
Linear Programming Model meets the Additivity,
Proportionality and Certainty Assumption
requirements, however, the Korean Auto
problem is a minimization problem, and two of
the constraints are ≥-constraints, the starting
point of the variables, x1 and x2, are not in a
feasible area, thus the Korean Auto problem
does not meet all conditions / requirements to
be solved with a Primal Simplex Algorithm.
Acme Chemical
Using the previously formulated Linear Programming Model
for the Acme Chemical problem,
x1 = running production process 1 for an hour
x2 = running production process 2 for an hour

Min z = 4x1 + x2
s.t. 3x1 + x2 ≥ 10 (Chemical A requirement)
x1 + x2 ≥ 5 (Chemical B requirement)
x1 ≥ 3 (Chemical B requirement)
x1, x2 ≥ 0
, determine if the Linear Programming Model can be solved
with a Primal Simplex Algorithm.
Acme Chemical - Solution
As previously determined, the Acme Chemical Linear
Programming Model meets the Additivity, Proportionality
and Certainty Assumption requirements, however, the
Acme Chemical problem is a minimization problem, and
three of the constraints are ≥-constraints, the starting
point of the variables, x1 and x2, are not in a feasible area,
thus the Acme Chemical problem does not meet all
conditions / requirements to be solved with a Primal
Simplex Algorithm.
Accessories Inc
Using the previously formulated Linear
Programming Model for the Accessories Inc
problem,
x1 = number of belts produced
x2 = number of pairs of shoes produced

Max z = 3x1 + 5x2


s.t. 2x1 + 3x2 ≤ 25
x1 + 2x2 ≤ 15
x1, x2 ≥ 0
, determine if the Linear Programming Model can
be solved with a Primal Simplex Algorithm.
Accessories Inc - Solution
As previously determined, the Accessories Inc
Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, and the Acme
Chemical problem is a maximization problem,
and all of the constraints are ≤-constraints,
the starting point of the variables, x1 and x2,
are in a feasible area, thus the Accessories Inc
problem meets all conditions / requirements
to be solved with a Primal Simplex Algorithm.
Limpopo Furniture
Using the previously formulated Linear Programming Model for the Accessories
Inc problem,
x1 = number of desks produced
x2 = number of tables produced
x3 = number of chairs produced

Max z = 60x1 + 30x2 + 20x2


s.t. 8x1 + 6x2 + x3 ≤ 48
1
4x1 + 2x2 + 1 x3 ≤ 20
1 12
2x1 + 1 x2 + x3 ≤ 8
2 2
x1, x2, x3 ≥ 0
, determine if the Linear Programming Model can be solved with a Primal Simplex
Algorithm.
Limpopo Furniture - Solution
As previously determined, the Limpopo
Furniture Linear Programming Model
meets the Additivity, Proportionality and
Certainty Assumption requirements, and
the Limpopo Furniture problem is a
maximization problem, and all of the
constraints are ≤-constraints, the starting
point of the variables, x1, x2 and x3, are in a
feasible area, thus the Limpopo Furniture
problem meets all conditions /
requirements to be solved with a Primal
Simplex Algorithm.
Auto Company
Using the previously formulated Linear
Programming Model for the Auto Company
problem,
x1 = number of trucks produced daily
x2 = number of cars produced daily

max z = 3x1 + 2x2


s.t. ¹⁄₄₀x1 + ¹⁄₆₀x2 ≤ 1
¹⁄₅₀x1 + ¹⁄₅₀x2 ≤ 1
x1, x2 ≥ 0
, determine if the Linear Programming
Model can be solved with a Primal Simplex
Algorithm.
Auto Company - Solution
As previously determined, the Auto
Company Linear Programming Model meets
the Additivity, Proportionality and Certainty
Assumption requirements, and the Auto
Company problem is a maximization
problem, and all of the constraints are ≤-
constraints, the starting point of the
variables, x1 and x2, are in a feasible area,
thus the Auto Company problem meets all
conditions / requirements to be solved with
a Primal Simplex Algorithm.
Revised Auto Company
Using the previously formulated Linear
Programming Model for the Revised Auto
Company problem,
x1 = number of trucks produced daily
x2 = number of cars produced daily

max z = 3x1 + 2x2


s.t. ¹⁄₄₀x1 + ¹⁄₆₀x2 ≤ 1
¹⁄₅₀x1 + ¹⁄₅₀x2 ≤ 1
x1 ≥ 30
x2 ≥ 20
, determine if the Linear Programming
Model can be solved with a Primal Simplex
Algorithm.
Revised Auto Company -
Solution
As previously determined, the Revised Auto
Company Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the Revised
Auto Company problem is a maximization
problem, and two of the constraints are ≥-
constraints, the starting point of the variables, x1
and x2, are not in a feasible area, thus the
Revised Auto Company problem does not meet
all conditions / requirements to be solved with a
Primal Simplex Algorithm.
Undesignated LP
Using the previously formulated Linear Programming Model for the
Undesignated LP problem,
max z = 2x1 − x2
s.t. x1 − x2 ≤ 1
2x1 + x2 ≥ 6
x1, x2 ≥ 0
, determine if the Linear Programming Model can be solved with a Primal
Simplex Algorithm.
Undesignated LP - Solver
As previously determined, the Undesignated LP Linear Programming Model
meets the Additivity, Proportionality and Certainty Assumption
requirements, however, the Undesignated LP problem is a maximize
problem, and one of the constraints is a ≥-constraint, the starting point of
the variables, x1 and x2, are not in a feasible area, thus the Undesignated LP
problem does not meet all conditions / requirements to be solved with a
Primal Simplex Algorithm.
Panem Bakeries
Using the previously formulated Linear Programming Model for the Panem
Bakeries problem,
𝑥1 = amount of white bread sold.
𝑥2 = amount of whole-wheat bread sold.
𝑥3 = amount of additional flour bought.
𝑥4 = amount of additional flour bought.

max 𝑧 = 36𝑥1 + 30𝑥2 − 3𝑥3 − 4𝑥4


s.t. 𝑥1 + 𝑥2 − 𝑥3 ≤ 5
6𝑥1 + 5𝑥2 − 𝑥4 ≤ 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
, determine if the Linear Programming Model can be solved with a Primal
Simplex Algorithm.
Panem Bakeries - Solution
As previously determined, the Panem Bakeries
Linear Programming Model meets the Additivity,
Proportionality and Certainty Assumption
requirements, and the Panem Bakeries problem is
a maximization problem, and all of the constraints
are ≤-constraints, the starting point of the
variables, x1 and x2, are in a feasible area, thus the
Panem Bakeries problem meets all conditions /
requirements to be solved with a Primal Simplex
Algorithm.
Money Management
Using the previously formulated Linear Programming
Model for the Money Management problem,
𝑥1 = number of dollars bought (by paying francs)
𝑥2 = number of francs bought (by paying dollars)

max 𝑧 = 𝑥1 + 𝑥2
s.t.
𝑥1 , 𝑥2 ≥ 0
, determine if the Linear Programming Model can be
solved with a Primal Simplex Algorithm.
Money Management - Solution
As previously determined, the Money Management
Linear Programming Model meets the Additivity,
Proportionality and Certainty Assumption
requirements, however, the Money Management
problem is a maximize problem, but has no
constraints, the starting point of the variables, x1 and
x2, can not be determined, thus the Money
Management problem does not meet all conditions
/ requirements to be solved with a Primal Simplex
Algorithm.
Freshman Diet
Using the previously formulated Linear Programming
Model for the Freshman Diet problem,
x1 = number of brownies eaten daily
x2 = number of scoops of chocolate ice cream eaten daily
x3 = bottles of cola drunk daily
x4 = pieces of pineapple cheesecake eaten daily

min z = 50x1 + 20x2 + 30x3 + 80x4


s.t. 400x1 + 200x2 + 150x3 + 500x4 ≥ 500 (Calorie constraint)
3x1 + 2x2 ≥ 6 (Chocolate constraint)
2x1 + 2x2 + 4x3 + 4x4 ≥ 10 (Sugar constraint)
2x1 + 4x2 + x3 + 5x4 ≥ 8 (Fat constraint)
xi ≥ 0 (i = 1, 2, 3, 4)
, determine if the Linear Programming Model can be
solved with a Primal Simplex Algorithm.
Freshman Diet - Solution
As previously determined, the Freshman Diet
Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the
Freshman Diet problem is a minimization
problem, and four of the constraints are ≥-
constraints, the starting point of the variables,
x1, x2, x3 and x4, are not in a feasible area, thus
the Freshman Diet problem does not meet all
conditions / requirements to be solved with a
Primal Simplex Algorithm.
Homer Simpson
Using the previously formulated Linear
Programming Model for the Homer
Simpson problem,
𝑥1 = amount of doughnuts purchased
𝑥2 = amount of beer purchased

min 𝑧 = 7𝑥1 + 𝑥2
s.t. 2𝑥1 + 2𝑥2 ≥ 12
𝑥1 + 3𝑥2 ≥ 18
𝑥1 , 𝑥2 ≥ 0
, determine if the Linear Programming
Model can be solved with a Primal
Simplex Algorithm.
Homer Simpson - Solution
As previously determined, the Homer Simpson
Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the
Homer Simpson problem is a minimization
problem, and two of the constraints are ≥-
constraints, the starting point of the variables,
x1 and x2, are not in a feasible area, thus the
Homer Simpson problem does not meet all
conditions / requirements to be solved with a
Primal Simplex Algorithm.
Blue Beard
Using the previously formulated Linear Programming Model for the Blue
Beard problem,
𝑥1 = amount of days spend in mine 1
𝑥2 = amount of days spend in mine 2

min 𝑧 = 𝑥1 + 𝑥2
s.t. 2𝑥1 + 𝑥2 ≥ 12
2𝑥1 + 3𝑥2 ≥ 18
𝑥1 , 𝑥2 ≥ 0
, determine if the Linear Programming Model can be solved with a Primal
Simplex Algorithm.
Blue Beard - Solution
As previously determined, the Blue Beard
Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the Blue
Beard problem is a minimization problem, and
two of the constraints are ≥-constraints, the
starting point of the variables, x1 and x2, are
not in a feasible area, thus the Blue Beard
problem does not meet all conditions /
requirements to be solved with a Primal
Simplex Algorithm.
Smart Labs
Using the previously formulated Linear
Programming Model for the Smart Labs problem,
𝑥1 = amount of mixed values purchased from supplier 1
𝑥2 = amount of mixed values purchased from supplier 2

min 𝑧 = 7𝑥1 + 𝑥2
s.t. 2𝑥1 + 1𝑥2 ≥ 12
2𝑥1 + 3𝑥2 ≥ 18
𝑥1 , 𝑥2 ≥ 0
, determine if the Linear Programming Model can be
solved with a Primal Simplex Algorithm.
Smart Labs - Solution
As previously determined, the Smart Labs Linear
Programming Model meets the Additivity,
Proportionality and Certainty Assumption
requirements, however, the Smart Labs problem is a
minimization problem, and two of the constraints
are ≥-constraints, the starting point of the variables,
x1 and x2, are not in a feasible area, thus the Smart
Labs problem does not meet all conditions /
requirements to be solved with a Primal Simplex
Algorithm.
Orange River Factory
Using the previously formulated Linear Programming Model for the Orange
River Factory problem,
𝑥1 = amount of tons of waste processed of factory 1
𝑥2 = amount of tons of waste processed of factory 2

min 𝑧 = 7𝑥1 + 𝑥2
s.t. 0,2𝑥1 + 0,1𝑥2 ≥ 1,2
0,1𝑥1 + 0,3𝑥2 ≥ 1,8
𝑥1 , 𝑥2 ≥ 0
, determine if the Linear Programming Model can be solved with a Primal
Simplex Algorithm.
Orange River Factory - Solution
As previously determined, the Orange River
Factory Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the
Orange River Factory problem is a
minimization problem, and two of the
constraints are ≥-constraints, the starting
point of the variables, x1 and x2, are not in a
feasible area, thus the Orange River Factory
problem does not meet all conditions /
requirements to be solved with a Primal
Simplex Algorithm.
Post Office
Using the previously formulated Linear Programming
Model for the Post Office problem,
xi = number of employees beginning work on day i, where i
= 1: Monday; 2: Tuesday; 3: Wednesday; 4: Thursday; 5:
Friday; 6: Saturday; 7: Sunday.

min z = x1 + x2 + x3 + x4 + x5 + x6 + x7
s.t. x1 + x4 + x5 + x6 + x7 ≥ 17
x1 + x2 + x5 + x6 + x7 ≥ 13
x1 + x2 + x3 + x6 + x7 ≥ 15
x1 + x2 + x3 + x4 + x7 ≥ 19
x1 + x2 + x3 + x4 + x5 ≥ 14
x2 + x3 + x4 + x5 + x6 ≥ 16
x3 + x4 + x5 + x6 + x7 ≥ 11
xi ≥ 0 (i = 1, 2, …, 7)
, determine if the Linear Programming Model can be
solved with a Primal Simplex Algorithm.
Post Office
As previously determined, the Post Office
Linear Programming Model meets the
Additivity, Proportionality and Certainty
Assumption requirements, however, the Post
Office problem is a minimization problem,
and seven of the constraints are ≥-
constraints, the starting point of the
variables, xi (where i = 1, 2, 3, …, 7), are not in
a feasible area, thus the Post Office problem
does not meet all conditions / requirements
to be solved with a Primal Simplex Algorithm.
Post Office v2 (Full- / Part-Time)
Using the previously formulated Linear Programming Model for the Post Office v2
problem,
xi = number of full-time employees beginning work on day i
yi = number of part-time employees beginning work on day i
, where i = 1: Monday; 2: Tuesday; 3: Wednesday; 4: Thursday; 5: Friday; 6: Saturday; 7: Sunday.

min z = σ7𝑖=1 600𝑥𝑖 + σ7𝑖=1 200𝑦𝑖


s.t. 8x1 + 8x4 + 8x5 + 8x6 + 8x7 + 4y1 + 4y4 + 4y5 + 4y6 + 4y7 ≥ 136 (Monday requirement)
8x1 + 8x2 + 8x5 + 8x6 + 8x7 + 4y1 + 4y2 + 4y5 + 4y6 + 4y7 ≥ 104 (Tuesday requirement)
8x1 + 8x2 + 8x3 + 8x6 + 8x7 + 4y1 + 4y2 + 4y3 + 4y6 + 4y7 ≥ 120 (Wednesday requirement)
8x1 + 8x2 + 8x3 + 8x4 + 8x7 + 4y1 + 4y2 + 4y3 + 4y4 + 4y7 ≥ 152 (Thursday requirement)
8x1 + 8x2 + 8x3 + 8x4 + 8x5 + 4y1 + 4y2 + 4y3 + 4y4 + 4y5 ≥ 112 (Friday requirement)
8x2 + 8x3 + 8x4 + 8x5 + 8x6 + 4y2 + 4y3 + 4y4 + 4y5 + 4y6 ≥ 128 (Saturday requirement)
8x3 + 8x4 + 8x5 + 8x6 + 8x7 + 4y3 + 4y4 + 4y5 + 4y6 + 4y7 ≥ 88 (Sunday requirement)
σ7𝑖=1 20𝑦𝑖 ≤ 210 (Labour Restriction)
xi ≥ 0, yi ≥ 0 (i = 1, 2, …, 7)
, determine if the Linear Programming Model can be solved with a Primal Simplex
Algorithm.
Post Office v2 (Full- / Part-
Time) - Solution
As previously determined, the Post Office v2 Linear
Programming Model meets the Additivity,
Proportionality and Certainty Assumption
requirements, however, the Post Office v2 problem
is a minimization problem, and seven of the
constraints are ≥-constraints, the starting point of
the variables, xi and yi (where i = 1, 2, 3, …, 7), are
not in a feasible area, thus the Post Office v2
problem does not meet all conditions /
requirements to be solved with a Primal Simplex
Algorithm.
Post Office v3 (Over-Time)
Using the previously formulated Linear Programming Model for the Post Office v3 problem,
xi = number of regular-time employees beginning work on day i
yi = number of over-time employees beginning work on day i
, where i = 1: Monday; 2: Tuesday; 3: Wednesday; 4: Thursday; 5: Friday; 6: Saturday; 7: Sunday.

min z = σ7𝑖=1 250𝑥𝑖 + σ7𝑖=1 312𝑦𝑖


s.t. x1 + x4 + x5 + x6 + x7 + y1 + y3 + y4 + y5 + y6 + y7 ≥ 17 (Monday requirement)
x1 + x2 + x5 + x6 + x7 + y1 + y2 + y4 + y5 + y6 + y7 ≥ 13 (Tuesday requirement)
x1 + x2 + x3 + x6 + x7 + y1 + y2 + y3 + y5 + y6 + y7 ≥ 15 (Wednesday requirement)
x1 + x2 + x3 + x4 + x7 + y1 + y2 + y3 + y4 + y6 + y7 ≥ 19 (Thursday requirement)
x1 + x2 + x3 + x4 + x5 + y1 + y2 + y3 + y4 + y5 + y6 ≥ 14 (Friday requirement)
x2 + x3 + x4 + x5 + x6 + y1 + y2 + y3 + y4 + y5 + y6 ≥ 16 (Saturday requirement)
x3 + x4 + x5 + x6 + x7 + y2 + y3 + y4 + y5 + y6 + y7 ≥ 11 (Sunday requirement)
xi ≥ 0, yi ≥ 0 (i = 1, 2, …, 7)
, determine if the Linear Programming Model can be solved with a Primal Simplex Algorithm.
Post Office v3 (Over-Time) -
Solution
As previously determined, the Post Office v3 Linear
Programming Model meets the Additivity,
Proportionality and Certainty Assumption
requirements, however, the Post Office v3 problem is
a minimization problem, and seven of the constraints
are ≥-constraints, the starting point of the variables, xi
and yi (where i = 1, 2, 3, …, 7), are not in a feasible
area, thus the Post Office v3 problem does not meet
all conditions / requirements to be solved with a
Primal Simplex Algorithm.
Linear Programming 171-181
Canonical / Standard Form
We saw that an LP can have both equality and inequality constraints. It can
also have variables that are required to be non-negative, as well as those
allowed to be unrestricted in sign (urs). Before using the simplex algorithm
to solve an LP, the LP must be converted into an equivalent problem in
which all constraints are equations and all variables are non-negative. An LP
in this form is said to be in standard form.
Example – Santa’s Workshop
Using the previously formulated mathematical model for Santa’s workshop as an example:
x1 = number of soldiers produced each week
x2 = number of trains produced each week

max z = 3x1 + 2x2


subject to (s.t.)
2x1 + x2 ≤ 100
x1 + x2 ≤ 80
x1 ≤ 40
x1, x2 ≥ 0
Sign-Restriction
All variable must be converted to positive values.
As the sign-restrictions of the Linear Programming,
x1, x2 ≥ 0
is already positive values, nothing else has to be done.
We will evaluate this conversion at a later state when we work with sign-
restrictions other than positive values.
Objective Function
We start with objective function of Linear Programming Model,
z = 3x1 + 2x2
Setting the objective function equal to 0 as a linear equation:
z - 3x1 - 2x2 = 0
Constraints (1)
Each inequality constraint must be replaced by an equality constraint.
For each ≤ constraint we define a slack variable si (si = slack variable for the ith
constraint), which is the amount of the resource unused in the ith constraint.
For the first constraint,
2x1 + x2 ≤ 100
We define s1 which equals the amount of the resource (finishing hours) unused in
the first constraint:
s1 = 100 - 2x1 - x2
Rearranging the constraint with all variables on the left-hand side and all constant
values on the right-hand side:
2x1 + x2 + s1 = 100
Constraints (2)
Applying the same methodology to the two remaining constraints,
x1 + x2 ≤ 80
x1 ≤ 40
we end with:
x1 + x2 + s2 = 80
x1 + s3 = 40
Canonical / Standard Form
The Primal Simplex Canonical / Standard Form for Santa’s Workshop is thus:

z - 3x1 - 2x2 = 0
2x1 + x2 + s1 = 100
x1 + x2 + s2 = 80
x1 + s3 = 40

We can no proceed with the Primal Simplex.


Accessories Inc
Using the previously formulated Linear
Programming Model for the Accessories Inc
problem,
x1 = number of belts produced
x2 = number of pairs of shoes produced

Max z = 3x1 + 5x2


s.t. 2x1 + 3x2 ≤ 25
x1 + 2x2 ≤ 15
x1, x2 ≥ 0
, convert the Linear Programming Model to the
Primal Simplex Canonical / Standard Form.
Accessories Inc - Solution

z - 3x1 - 5x2 = 0
2x1 + 3x2 + s1 = 25
x1 + 2x2 + s2 = 15
Limpopo Furniture
Using the previously formulated Linear Programming Model for the Accessories
Inc problem,
x1 = number of desks produced
x2 = number of tables produced
x3 = number of chairs produced

Max z = 60x1 + 30x2 + 20x2


s.t. 8x1 + 6x2 + x3 ≤ 48
1
4x1 + 2x2 + 1 x3 ≤ 20
1 12
2x1 + 1 x2 + x3 ≤ 8
2 2
x1, x2, x3 ≥ 0
, convert the Linear Programming Model to the Primal Simplex Canonical /
Standard Form.
Limpopo Furniture - Solution
z - 60x1 - 30x2 - 20x2 = 0
8x1 + 6x2 + x3 + s1 = 48
1
4x1 + 2x2 + 1 x3 + s2 = 20
2
1 1
2x1 + 1 x2 + x3 + s 3 = 8
2 2
Auto Company
Using the previously formulated Linear
Programming Model for the Auto Company
problem,
x1 = number of trucks produced daily
x2 = number of cars produced daily

max z = 3x1 + 2x2


s.t. ¹⁄₄₀x1 + ¹⁄₆₀x2 ≤ 1
¹⁄₅₀x1 + ¹⁄₅₀x2 ≤ 1
x1, x2 ≥ 0
, convert the Linear Programming Model to
the Primal Simplex Canonical / Standard
Form.
Auto Company - Solution

z - 3x1 - 2x2 = 0
¹⁄₄₀x1 + ¹⁄₆₀x2 + s1 = 1
¹⁄₅₀x1 + ¹⁄₅₀x2 + s2 = 1
Panem Bakeries
Using the previously formulated Linear Programming Model for the Panem
Bakeries problem,
𝑥1 = amount of white bread sold.
𝑥2 = amount of whole-wheat bread sold.
𝑥3 = amount of additional flour bought.
𝑥4 = amount of additional flour bought.

max 𝑧 = 36𝑥1 + 30𝑥2 − 3𝑥3 − 4𝑥4


s.t. 𝑥1 + 𝑥2 − 𝑥3 ≤ 5
6𝑥1 + 5𝑥2 − 𝑥4 ≤ 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
, convert the Linear Programming Model to the Primal Simplex Canonical /
Standard Form.
Panem Bakeries - Solution

𝑧 − 36𝑥1 − 30𝑥2 + 3𝑥3 + 4𝑥4 = 0


𝑥1 + 𝑥2 − 𝑥3 + s1 =5
6𝑥1 + 5𝑥2 − 𝑥4 + s2 =10
Linear Programming 171-181
Primal Simplex Algorithm
We will now illustrate the function of the Primal Simplex Algorithm.
• Initial Tableau
• Optimality Check
• Determining Pivot Operation
• Pivot Operation
• Optimal Tableau
Example – Santa’s Workshop
Using the previously formulated primal simplex canonical / standard form
for Santa’s workshop as an example:

z - 3x1 - 2x2 = 0
2x1 + x2 + s1 = 100
x1 + x2 + s2 = 80
x1 + s3 = 40
Initial Tableau (1)
Start by drawing a table. For the columns:
• The first column should be the header column
for each of your rows that you will add later.
Because this will be the first or initial tableau
iteration, label it as “t-i”.
• The next columns will be each of your decision
variables, xi, that you have, e.g.: x1, x2, x3.
• The next columns will be each of your equality
variables, si, that you have, e.g.: s1, s2, s3.
• The next column will be the right-hand side
values, thus label it “rhs”.
• The last column will be a ration calculation.
Initial Tableau (2)
For the rows:
• The first row will be the objective
function row, thus label it “z”.
• The next rows will represent each one
of the constraints, thus label them 1, 2,
and 3 respectively.
Initial Tableau (3)
Next, populate your table with the
coefficient values from the canonical /
standard form that you generate.
Leave the ratio column you created
blank.
Optimality Check (1)
The overall objective for the optimality check for a primal simplex, is:
• If the problem is a maximization problem, the solution is optimal if there
are no negative values in the objective function (z) row, apart from the
objective function row, right-hand side value.
• If the problem is a minimization problem, the solution is optimal if there
are no positive values in the objective function (z) row, apart from the
objective function row, right-hand side value.
Optimality Check (2)
With your current table setup, there are still negative values, namely “-3”
and “-2” in the objective function (z) row. Thus, the current tableau iteration,
is not yet optimal.
Basic Variables (1)
A basic variable, is any variable that currently contains a value.
Basic variables, are represented by columns, that contain only “0”
coefficient values, and one “1” coefficient value, e.g.: the 𝑠1 column.
Basic Variables (2)
The value that the basic variable contains, is indicated by the right-hand
side column, in the row which contains the “1” value, of the basic variable
in question, e.g.: for the 𝑠1 basic variable, the “1” is in the first constraint
row of the column, thus the corresponding right-hand side value for that
row, is “100”.
As the 𝑠1 variable represented
how much unused resources of
Finishing Hours there are, thus
there are 100 units (hours) of
Finishing Hours currently
available.
Non-Basic Variables (1)
A non-basic variable, is any variable that currently contains no value or a
value of “0”.
Non-Basic variables, are represented by columns, that contain anything
other than only “0” coefficient values, and one “1” coefficient value, e.g.:
the 𝑥1 column.
Non-Basic Variables (2)
The 𝑥1 variable represented how much soldiers are being manufactured
and sold, thus there are no / “0” soldiers currently being manufactured and
sold.
Pivot
A Pivot, represents a basic variable, that changes to a non-basic variable,
and a non-basic variable, that changes to a basic variable.
Determining Pivot Operation (1)

Determining the pivot operation, involves the decision on:


1. Which current non-basic variable will change into a basic variable.
2. Which current basic variable will change into a non-basic variable.
Determining Pivot Operation (2)
1. In order to determine which current non-basic variable will change into a
basic variable:
• for a maximization problem, we will select the column for which the
objective function row (z), has the largest negative value, with the
exclusion of the right-hand side column. This will be your pivot column.
• for a minimization problem, we will select the column for which the
objective function row (z), has the largest positive value, with the
exclusion of the right-hand side column. This will be your pivot column.
Determining Pivot Operation (3)
Because we are working with a maximization problem, we will select the
column for which the objective function row (z), has the largest negative
value, e.g.: the “-3”, thus the 𝑥1 column is the pivot column.

This means that soldiers will become a basic


variable, and we would start producing
soldiers.
Determining Pivot Operation (4)
2. In order to determine which current basic variable will change into a non-
basic variable, we will calculate a ratio, for each constraint with the
exclusion of the objective function row (z), based on the pre-determined
pivot column. This will be the pivot row.

To calculate the ratios, for each


constraint, divide each right-hand side
value by each value in the pivot column,
e.g.: for the first constraint, “100 / 2”.
Determining Pivot Operation (5)
This results in the ratios “50”,
“80” and “40”, respectively.

The ration that we chose, is


always the smallest positive
value, e.g.: “40”. This will be
the pivot row.
Pivot Operation (1)
The pivot operations involves:
1. Calculating the pivot row in the next table
iteration.
2. Calculating the all elements in the next
table iteration, using the previously
calculated pivot row in the next table
iteration.

Start by drawing your next table iteration,


using the same column and row headings, but
unpopulated.
Pivot Operation (2)
To calculating the pivot row in the next table
iteration, each element in the pivot row must be
divided my the element in the pivot row, pivot
column.

Thus, starting with the 1st element in the pivot


row (row 3, column 1 (𝑥1 )) e.g.: “1”,
it will be divided by the element in the pivot row
(row 3), pivot column (𝑥1 ), e.g.: “1”.
Pivot Operation (4)

Resulting in the new element, “1”.


Pivot Operation (5)
Next, with the 2nd element in the pivot row (row 3,
column 2 (𝑥2 )) e.g.: “0”, it will be divided by the
element in the pivot row (row 3), pivot column (𝑥1 ),
e.g.: “1”.

Resulting in the new


element, “0”.
Pivot Operation (6)
Next, with the 3rd element in the pivot row (row
3, column 3 (𝑠1 )) e.g.: “0”, it will be divided by the
element in the pivot row (row 3), pivot column
(𝑥1 ), e.g.: “1”.

Resulting in the new


element, “0”.
Pivot Operation (7)
Next, with the 4th element in the pivot row (row 3,
column 4 (𝑠2 )) e.g.: “0”, it will be divided by the
element in the pivot row (row 3), pivot column
(𝑥1 ), e.g.: “1”.

Resulting in the new


element, “0”.
Pivot Operation (8)
Next, with the 5th element in the pivot row (row 3,
column 5 (𝑠3 )) e.g.: “1”, it will be divided by the
element in the pivot row (row 3), pivot column (𝑥1 ),
e.g.: “1”.

Resulting in the new


element, “1”.
Pivot Operation (9)
Next, with the 6th element in the pivot row (row
3, column 6 (𝑟ℎ𝑠)) e.g.: “40”, it will be divided by
the element in the pivot row (row 3), pivot
column (𝑥1 ), e.g.: “1”.

Resulting in the new


element, “40”.
Pivot Operation (10)
To calculating the all elements in the next table iteration, using the previously
calculated pivot row in the next table iteration, use the following formula:
𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑁𝑒𝑤_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑗) = 𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑂𝑙𝑑_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑗) − (𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑂𝑙𝑑_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑃𝑖𝑣𝑜𝑡 𝑐𝑜𝑙𝑢𝑚𝑛) ×
𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑁𝑒𝑤_𝑇𝑎𝑏𝑙𝑒(𝑃𝑖𝑣𝑜𝑡 𝑅𝑜𝑤,𝑗) )

𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑁𝑒𝑤_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑗) : Starting with the element in the z-row and


𝑥1 column, in the new table, e.g.: 𝑇2(1,1)
𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑂𝑙𝑑_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑗) : The corresponding element in the z-row and
𝑥1 column, in the old table, e.g.: 𝑇𝑖(1,1) = “-3”
𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑂𝑙𝑑_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑃𝑖𝑣𝑜𝑡 𝑐𝑜𝑙𝑢𝑚𝑛) : The element in the same z-row
and the pivot column (𝑥1 ), in the old table, e.g.: 𝑇𝑖(1,𝑝) is “-3”
𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑁𝑒𝑤_𝑇𝑎𝑏𝑙𝑒(𝑃𝑖𝑣𝑜𝑡 𝑅𝑜𝑤,𝑗) : The element in the pivot row (3)
and the same column (𝑥1 ), in the new table, e.g.: 𝑇2(𝑝,1) = “1”
Pivot Operation (11)
Substituting our values into the formula,
𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑁𝑒𝑤_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑗) = 𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑂𝑙𝑑_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑗) −
(𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑂𝑙𝑑_𝑇𝑎𝑏𝑙𝑒(𝑖,𝑃𝑖𝑣𝑜𝑡 𝑐𝑜𝑙𝑢𝑚𝑛) × 𝐸𝑙𝑒𝑚𝑒𝑛𝑡_𝑁𝑒𝑤_𝑇𝑎𝑏𝑙𝑒(𝑃𝑖𝑣𝑜𝑡 𝑅𝑜𝑤,𝑗) )
or
𝑇2(1,1) = 𝑇𝑖(1,1) − (𝑇𝑖(1,𝑝) × 𝑇2(𝑝,1) )
we have,
𝑇2(1,1) = −3 − ( −3 × 1 )
which results in a new element of
𝑇2(1,1) = 0
Pivot Operation (12)
Next, for the element 𝑇2(1,2) in the z-row and 𝑥2 -column:
𝑇𝑖(1,2) = −2
𝑇𝑖 1,𝑝 = −3
𝑇2(𝑝,2) = 0
Thus,
𝑇2(1,1) = −2 − −3 × 0 = −2
Pivot Operation (13)
Next, for the element 𝑇2(1,3) in the z-row and 𝑠1 -column:
𝑇𝑖(1,3) = 0
𝑇𝑖 1,𝑝 = −3
𝑇2(𝑝,3) = 0
Thus,
𝑇2(1,3) = 0 − −3 × 0 = 0
Pivot Operation (14)
Next, for the element 𝑇2(1,4) in the z-row and 𝑠2 -column:
𝑇𝑖(1,4) = 0
𝑇𝑖 1,𝑝 = −3
𝑇2(𝑝,4) = 0
Thus,
𝑇2(1,4) = 0 − −3 × 0 = 0
Pivot Operation (15)
Next, for the element 𝑇2(1,5) in the z-row and 𝑠3 -column:
𝑇𝑖(1,5) = 0
𝑇𝑖 1,𝑝 = −3
𝑇2(𝑝,5) = 1
Thus,
𝑇2(1,5) = 0 − −3 × 1 = 3
Pivot Operation (16)
Next, for the element 𝑇2(1,6) in the z-row and 𝑟ℎ𝑠-column:
𝑇𝑖(1,6) = 0
𝑇𝑖 1,𝑝 = −3
𝑇2(𝑝,6) = 40
Thus,
𝑇2(1,6) = 0 − −3 × 40 = 120
Pivot Operation (17)
Next, for the element 𝑇2(2,1) in the 1-row and 𝑥1 -column:
𝑇𝑖(2,1) = 2
𝑇𝑖 2,𝑝 = 2
𝑇2(𝑝,1) = 1
Thus,
𝑇2(2,1) = 2 − 2 × 1 = 0
Pivot Operation (18)
Next, for the element 𝑇2(2,2) in the 1-row and 𝑥2 -column:
𝑇𝑖(2,2) = 1
𝑇𝑖 2,𝑝 = 2
𝑇2(𝑝,2) = 0
Thus,
𝑇2(2,2) = 1 − 2 × 0 = 1
Pivot Operation (19)
Next, for the element 𝑇2(2,3) in the 1-row and 𝑠1 -column:
𝑇𝑖(2,3) = 1
𝑇𝑖 2,𝑝 = 2
𝑇2(𝑝,3) = 0
Thus,
𝑇2(2,3) = 1 − 2 × 0 = 1
Pivot Operation (20)
Next, for the element 𝑇2(2,4) in the 1-row and 𝑠2 -column:
𝑇𝑖(2,4) = 0
𝑇𝑖 2,𝑝 = 2
𝑇2(𝑝,4) = 0
Thus,
𝑇2(2,4) = 0 − 2 × 0 = 0
Pivot Operation (21)
Next, for the element 𝑇2(2,5) in the 1-row and 𝑠3 -column:
𝑇𝑖(2,5) = 0
𝑇𝑖 2,𝑝 = 2
𝑇2(𝑝,5) = 1
Thus,
𝑇2(2,5) = 0 − 2 × 1 = −2
Pivot Operation (22)
Next, for the element 𝑇2(2,6) in the 1-row and 𝑟ℎ𝑠-column:
𝑇𝑖(2,6) = 100
𝑇𝑖 2,𝑝 = 2
𝑇2(𝑝,6) = 40
Thus,
𝑇2(2,6) = 100 − 2 × 40 = 20
Pivot Operation (23)
Next, for the element 𝑇2(3,1) in the 2-row and 𝑥1 -column:
𝑇𝑖(3,1) = 1
𝑇𝑖 3,𝑝 = 1
𝑇2(𝑝,1) = 1
Thus,
𝑇2(3,1) = 1 − 1 × 1 = 0
Pivot Operation (24)
Next, for the element 𝑇2(3,2) in the 2-row and 𝑥2 -column:
𝑇𝑖(3,2) = 1
𝑇𝑖 3,𝑝 = 1
𝑇2(𝑝,2) = 0
Thus,
𝑇2(3,2) = 1 − 1 × 0 = 1
Pivot Operation (25)
Next, for the element 𝑇2(3,3) in the 2-row and 𝑠1 -column:
𝑇𝑖(3,3) = 0
𝑇𝑖 3,𝑝 = 1
𝑇2(𝑝,3) = 0
Thus,
𝑇2(3,3) = 0 − 1 × 0 = 0
Pivot Operation (26)
Next, for the element 𝑇2(3,4) in the 2-row and 𝑠2 -column:
𝑇𝑖(3,4) = 1
𝑇𝑖 3,𝑝 = 1
𝑇2(𝑝,4) = 0
Thus,
𝑇2(3,4) = 1 − 1 × 0 = 1
Pivot Operation (27)
Next, for the element 𝑇2(3,5) in the 2-row and 𝑠3 -column:
𝑇𝑖(3,5) = 0
𝑇𝑖 3,𝑝 = 1
𝑇2(𝑝,5) = 1
Thus,
𝑇2(3,5) = 0 − 1 × 1 = −1
Pivot Operation (28)
Next, for the element 𝑇2(3,6) in the 2-row and 𝑟ℎ𝑠-column:
𝑇𝑖(3,6) = 80
𝑇𝑖 3,𝑝 = 1
𝑇2(𝑝,6) = 40
Thus,
𝑇2(3,6) = 80 − 1 × 40 = 40
Optimality Check (3)
With your pivot operation complete, I do the optimality check again, and
there are still negative value(s), namely “-2” in the objective function (z)
row. Thus, the current tableau iteration, is not yet optimal.
Determining Pivot Operation (6)
Because the current tableau iteration is not yet optimal, we will start the new pivot
operation by determining the next pivot operation. Because we are working with a
maximization problem, we will select the column for which the objective function row
(z), has the largest negative value, e.g.: the “-2”, thus the 𝑥2 column is the pivot column.

This means that trains will become a basic


variable, and we would start producing trains.
Determining Pivot Operation (7)
To calculate the ratios, for each
constraint, divide each right-hand
side value by each value in the
pivot column. This results in the
ratios “20”, “40” and “null”,
respectively.
The ration that we chose, is
always the smallest positive value,
e.g.: “20”. This will be the pivot
row.
Pivot Operation (29)
Next, draw your next table iteration, using the same
column and row headings, but unpopulated.

Then, calculating the pivot row in


the next table iteration, each
element in the pivot row must be
divided my the element in the
pivot row, pivot column.
Pivot Operation (30)
With the 1st element in the pivot row (1-row, 𝑥1 -
column) e.g.: “0”, it will be divided by the element in
the pivot row, pivot column (1−row, 𝑥2 −column),
e.g.: “1”.

Resulting in the new


element, “0”.
Pivot Operation (31)
With the 2nd element in the pivot row (1-row, 𝑥2 -
column) e.g.: “1”, it will be divided by the element in
the pivot row, pivot column (1−row, 𝑥2 −column),
e.g.: “1”.

Resulting in the new


element, “1”.
Pivot Operation (32)
With the 3rd element in the pivot row (1-row, 𝑠1 -
column) e.g.: “1”, it will be divided by the element in
the pivot row, pivot column (1−row, 𝑥2 −column),
e.g.: “1”.

Resulting in the new


element, “1”.
Pivot Operation (33)
With the 4th element in the pivot row (1-row, 𝑠2 -
column) e.g.: “0”, it will be divided by the element in
the pivot row, pivot column (1−row, 𝑥2 −column),
e.g.: “1”.

Resulting in the new


element, “0”.
Pivot Operation (34)
With the 5th element in the pivot row (1-row, 𝑠3 -
column) e.g.: “-2”, it will be divided by the element in
the pivot row, pivot column (1−row, 𝑥2 −column),
e.g.: “1”.

Resulting in the new


element, “-2”.
Pivot Operation (35)
With the 6th element in the pivot row (1-row, 𝑟ℎ𝑠-
column) e.g.: “20”, it will be divided by the element in
the pivot row, pivot column (1−row, 𝑥2 −column),
e.g.: “1”.

Resulting in the new


element, “20”.
Pivot Operation (36)
With the pivot row calculated in the next table, we can start calculating all the other elements
in the new table.
Starting with the element 𝑇3(1,1) in the z-row and 𝑥1 -column:
𝑇2(1,1) = 0
𝑇2 1,𝑝 = −2
𝑇3(𝑝,1) = 0
Thus,
𝑇3(1,1) = 0 − −2 × 0 =0
Pivot Operation (37)
Next, for the element 𝑇3(1,2) in the z-row and 𝑥2 -column:
𝑇2(1,2) = −2
𝑇2 1,𝑝 = −2
𝑇3(𝑝,2) = 1
Thus,
𝑇3(1,2) = −2 − −2 × 1 = 0
Pivot Operation (38)
Next, for the element 𝑇3(1,3) in the z-row and 𝑠1 -column:
𝑇2(1,3) = 0
𝑇2 1,𝑝 = −2
𝑇3(𝑝,3) = 1
Thus,
𝑇3(1,3) = 0 − −2 × 1 = 2
Pivot Operation (39)
Next, for the element 𝑇3(1,4) in the z-row and 𝑠2 -column:
𝑇2(1,4) = 0
𝑇2 1,𝑝 = −2
𝑇3(𝑝,4) = 0
Thus,
𝑇3(1,4) = 0 − −2 × 0 = 0
Pivot Operation (40)
Next, for the element 𝑇3(1,5) in the z-row and 𝑠3 -column:
𝑇2(1,5) = 3
𝑇2 1,𝑝 = −2
𝑇3(𝑝,5) = −2
Thus,
𝑇3(1,5) = 3 − −2 × −2 = −1
Pivot Operation (41)
Next, for the element 𝑇3(1,6) in the z-row and 𝑟ℎ𝑠-column:
𝑇2(1,6) = 120
𝑇2 1,𝑝 = −2
𝑇3(𝑝,6) = 20
Thus,
𝑇3(1,6) = 120 − −2 × 20 = 160
Pivot Operation (42)
Next, for the element 𝑇3(3,1) in the 2-row and 𝑥1 -column:
𝑇2(3,1) = 0
𝑇2 3,𝑝 = 1
𝑇3(𝑝,1) = 0
Thus,
𝑇3(3,1) = 0 − 1 × 0 = 0
Pivot Operation (43)
Next, for the element 𝑇3(3,2) in the z-row and 𝑥2 -column:
𝑇2(3,2) = 1
𝑇2 3,𝑝 = 1
𝑇3(𝑝,2) = 1
Thus,
𝑇3(3,2) = 1 − 1 × 1 = 0
Pivot Operation (44)
Next, for the element 𝑇3(3,3) in the 2-row and 𝑠1 -column:
𝑇2(3,3) = 0
𝑇2 3,𝑝 = 1
𝑇3(𝑝,3) = 1
Thus,
𝑇3(3,3) = 0 − 1 × (1) = −1
Pivot Operation (45)
Next, for the element 𝑇3(3,4) in the 2-row and 𝑠2 -column:
𝑇2(3,4) = 1
𝑇2 3,𝑝 = 1
𝑇3(𝑝,4) = 0
Thus,
𝑇3(3,4) = 1 − 1 × 0 = 1
Pivot Operation (46)
Next, for the element 𝑇3(3,5) in the z-row and 𝑠3 -column:
𝑇2(3,5) = −1
𝑇2 3,𝑝 = 1
𝑇3(𝑝,5) = −2
Thus,
𝑇3(3,5) = −1 − 1 × −2 = 1
Pivot Operation (47)
Next, for the element 𝑇3(3,6) in the 2-row and 𝑟ℎ𝑠-column:
𝑇2(3,6) = 40
𝑇2 3,𝑝 = 1
𝑇3(𝑝,6) = 20
Thus,
𝑇3(3,6) = 40 − 1 × (20) = 20
Pivot Operation (48)
Next, for the element 𝑇3(4,1) in the 3-row and 𝑥1 -column:
𝑇2(4,1) = 1
𝑇2 4,𝑝 = 0
𝑇3(𝑝,1) = 0
Thus,
𝑇3(4,1) = 1 − 0 × 0 = 1
Pivot Operation (49)
Next, for the element 𝑇3(4,2) in the 3-row and 𝑥2 -column:
𝑇2(4,2) = 0
𝑇2 4,𝑝 = 0
𝑇3(𝑝,2) = 1
Thus,
𝑇3(4,2) = 0 − 0 × 1 = 0
Pivot Operation (50)
Next, for the element 𝑇3(4,3) in the 3-row and 𝑠1 -column:
𝑇2(4,3) = 0
𝑇2 4,𝑝 = 0
𝑇3(𝑝,3) = 1
Thus,
𝑇3(4,3) = 0 − 0 × (1) = 0
Pivot Operation (51)
Next, for the element 𝑇3(4,4) in the 3-row and 𝑠2 -column:
𝑇2(4,4) = 0
𝑇2 4,𝑝 = 0
𝑇3(𝑝,4) = 0
Thus,
𝑇3(4,4) = 0 − 0 × 0 = 0
Pivot Operation (52)
Next, for the element 𝑇3(4,5) in the 3-row and 𝑠3 -column:
𝑇2(4,5) = 1
𝑇2 4,𝑝 = 0
𝑇3(𝑝,5) = −2
Thus,
𝑇3(4,5) = 1 − 0 × −2 = 1
Pivot Operation (53)
Next, for the element 𝑇3(4,6) in the 3-row and 𝑟ℎ𝑠-column:
𝑇2(4,6) = 40
𝑇2 4,𝑝 = 0
𝑇3(𝑝,6) = 20
Thus,
𝑇3(4,6) = 40 − 0 × (20) = 40
Optimality Check (4)
With your pivot operation complete, we do the optimality check again, and
there are still negative value(s), namely “-1” in the objective function (z)
row. Thus, the current tableau iteration, is not yet optimal.
Determining Pivot Operation (8)
Because the current tableau iteration is not yet optimal, we will start the new pivot
operation by determining the next pivot operation. Because we are working with a
maximization problem, we will select the column for which the objective function row
(z), has the largest negative value, e.g.: the “-1”, thus the 𝑠3 column is the pivot column.
Determining Pivot Operation (9)
To calculate the ratios, for each
constraint, divide each right-hand
side value by each value in the
pivot column. This results in the
ratios “-10”, “20” and “40”,
respectively.
The ration that we chose, is
always the smallest positive value,
e.g.: “20”. This will be the pivot
row.
Pivot Operation (54)
Next, draw your next table iteration, using the same
column and row headings, but unpopulated.

Then, calculating the pivot row in


the next table iteration, each
element in the pivot row must be
divided my the element in the
pivot row, pivot column.
Pivot Operation (55)
With the 1st element in the pivot row (2-row, 𝑥1 -
column) e.g.: “0”, it will be divided by the element in
the pivot row, pivot column (2−row, 𝑠3 −column), e.g.:
“1”.

Resulting in the new


element, “0”.
Pivot Operation (56)
With the 2nd element in the pivot row (2-row, 𝑥2 -
column) e.g.: “0”, it will be divided by the element in
the pivot row, pivot column (2−row, 𝑠3 −column), e.g.:
“1”.

Resulting in the new


element, “0”.
Pivot Operation (57)
With the 3rd element in the pivot row (2-row, 𝑠1 -
column) e.g.: “-1”, it will be divided by the element in
the pivot row, pivot column (2−row, 𝑠3 −column), e.g.:
“1”.

Resulting in the new


element, “-1”.
Pivot Operation (58)
With the 4th element in the pivot row (2-row, 𝑠2 -
column) e.g.: “1”, it will be divided by the element in
the pivot row, pivot column (2−row, 𝑠3 −column), e.g.:
“1”.

Resulting in the new


element, “1”.
Pivot Operation (59)
With the 5th element in the pivot row (2-row, 𝑠3 -
column) e.g.: “1”, it will be divided by the element in
the pivot row, pivot column (2−row, 𝑠3 −column), e.g.:
“1”.

Resulting in the new


element, “1”.
Pivot Operation (60)
With the 6th element in the pivot row (2-row, 𝑟ℎ𝑠-
column) e.g.: “20”, it will be divided by the element in
the pivot row, pivot column (2−row, 𝑠3 −column), e.g.:
“1”.

Resulting in the new


element, “20”.
Pivot Operation (61)
With the pivot row calculated in the next table, we can start calculating all the other elements
in the new table.
Starting with the element 𝑇4(1,1) in the z-row and 𝑥1 -column:
𝑇3(1,1) = 0
𝑇3 1,𝑝 = −1
𝑇4(𝑝,1) = 0
Thus,
𝑇4(1,1) = 0 − −1 × 0 =0
Pivot Operation (62)
Next, for the element 𝑇4(1,2) in the z-row and 𝑥2 -column:
𝑇3(1,2) = 0
𝑇3 1,𝑝 = −1
𝑇4(𝑝,2) = 0
Thus,
𝑇4(1,2) = 0 − −1 × 0 = 0
Pivot Operation (63)
Next, for the element 𝑇4(1,3) in the z-row and 𝑠1 -column:
𝑇3(1,3) = 2
𝑇3 1,𝑝 = −1
𝑇4(𝑝,3) = −1
Thus,
𝑇4(1,3) = 2 − −1 × −1 = 1
Pivot Operation (64)
Next, for the element 𝑇4(1,4) in the z-row and 𝑠2 -column:
𝑇3(1,4) = 0
𝑇3 1,𝑝 = −1
𝑇4(𝑝,4) = 1
Thus,
𝑇4(1,4) = 0 − −1 × 1 = 1
Pivot Operation (65)
Next, for the element 𝑇4(1,5) in the z-row and 𝑠3 -column:
𝑇3(1,5) = −1
𝑇3 1,𝑝 = −1
𝑇4(𝑝,5) = 1
Thus,
𝑇4(1,5) = −1 − −1 × 1 = 0
Pivot Operation (66)
Next, for the element 𝑇4(1,6) in the z-row and 𝑟ℎ𝑠-column:
𝑇3(1,6) = 160
𝑇3 1,𝑝 = −1
𝑇4(𝑝,6) = 20
Thus,
𝑇4(1,6) = 160 − −1 × 20 = 180
Pivot Operation (67)
Next, for the element 𝑇4(2,1) in the 2-row and 𝑥1 -column:
𝑇3(2,1) = 0
𝑇3 2,𝑝 = −2
𝑇4(𝑝,1) = 0
Thus,
𝑇4(2,1) = 0 − −2 × 0 = 0
Pivot Operation (68)
Next, for the element 𝑇4(2,2) in the 2-row and 𝑥2 -column:
𝑇3(2,2) = 1
𝑇3 2,𝑝 = −2
𝑇4(𝑝,2) = 0
Thus,
𝑇4(2,2) = 1 − −2 × 0 = 1
Pivot Operation (69)
Next, for the element 𝑇4(2,3) in the 2-row and 𝑠1 -column:
𝑇3(2,3) = 1
𝑇3 2,𝑝 = −2
𝑇4(𝑝,3) = −1
Thus,
𝑇4(2,3) = 1 − −2 × −1 = −1
Pivot Operation (70)
Next, for the element 𝑇4(2,4) in the 2-row and 𝑠2 -column:
𝑇3(2,4) = 0
𝑇3 2,𝑝 = −2
𝑇4(𝑝,4) = 1
Thus,
𝑇4(2,4) = 0 − −2 × 1 = 2
Pivot Operation (71)
Next, for the element 𝑇4(2,5) in the 2-row and 𝑠3 -column:
𝑇3(2,5) = −2
𝑇3 2,𝑝 = −2
𝑇4(𝑝,5) = 1
Thus,
𝑇4(2,5) = −2 − −2 × (1) = 0
Pivot Operation (72)
Next, for the element 𝑇4(2,6) in the 2-row and 𝑟ℎ𝑠-column:
𝑇3(2,6) = 20
𝑇3 2,𝑝 = −2
𝑇4(𝑝,6) = 20
Thus,
𝑇4(2,6) = 20 − −2 × 20 = 60
Pivot Operation (73)
Next, for the element 𝑇4(4,1) in the 3-row and 𝑥1 -column:
𝑇3(4,1) = 1
𝑇3 4,𝑝 = 1
𝑇4(𝑝,1) = 0
Thus,
𝑇4(4,1) = 1 − 1 × 0 = 1
Pivot Operation (74)
Next, for the element 𝑇4(4,2) in the 3-row and 𝑥2 -column:
𝑇3(4,2) = 0
𝑇3 4,𝑝 = 1
𝑇4(𝑝,2) = 0
Thus,
𝑇4(4,2) = 0 − 1 × (0) = 0
Pivot Operation (75)
Next, for the element 𝑇4(4,3) in the 3-row and 𝑠1 -column:
𝑇3(4,3) = 0
𝑇3 4,𝑝 = 1
𝑇4(𝑝,3) = −1
Thus,
𝑇4(4,3) = 0 − 1 × −1 = 1
Pivot Operation (76)
Next, for the element 𝑇4(4,4) in the 3-row and 𝑠2 -column:
𝑇3(4,4) = 0
𝑇3 4,𝑝 = 1
𝑇4(𝑝,4) = 1
Thus,
𝑇4(4,4) = 0 − 1 × 1 = −1
Pivot Operation (77)
Next, for the element 𝑇4(4,5) in the 3-row and 𝑠3 -column:
𝑇3(4,5) = 1
𝑇3 4,𝑝 = 1
𝑇4(𝑝,5) = 1
Thus,
𝑇4(4,5) = 1 − 1 × (1) = 0
Pivot Operation (78)
Next, for the element 𝑇4(4,6) in the 3-row and 𝑟ℎ𝑠-column:
𝑇3(4,6) = 40
𝑇3 4,𝑝 = 1
𝑇4(𝑝,6) = 20
Thus,
𝑇4(4,6) = 40 − 1 × 20 = 20
Optimality Check (5)
With your pivot operation complete, we do the optimality check again, and
there are no negative value(s), in the objective function (z) row. Thus, the
current tableau iteration, is optimal.
Accessories Inc
Using the previously formulated Linear
Programming Model for the Accessories Inc
problem,
x1 = number of belts produced
x2 = number of pairs of shoes produced

Max z = 3x1 + 5x2


s.t. 2x1 + 3x2 ≤ 25
x1 + 2x2 ≤ 15
x1, x2 ≥ 0
, solve the Linear Programming Model using the
Primal Simplex Algorithm.
Accessories Inc - Solution
Limpopo Furniture
Using the previously formulated Linear Programming Model for the Accessories
Inc problem,
x1 = number of desks produced
x2 = number of tables produced
x3 = number of chairs produced

Max z = 60x1 + 30x2 + 20x2


s.t. 8x1 + 6x2 + x3 ≤ 48
1
4x1 + 2x2 + 1 x3 ≤ 20
2
1 1
2x1 + 1 x2 + x ≤ 8
2 2 3
x1, x2, x3 ≥ 0
, solve the Linear Programming Model using the Primal Simplex Algorithm.
Limpopo Furniture - Solution
Linear Programming 171-181
Interpreting Solution (1)
Looking at the basic variables in the optimal solution, we interpret the
following:
• 𝑥1 is a basic variable, representing
soldiers with a 𝑟ℎ𝑠-side value of 20,
thus we are currently producing 20
soldiers.
Interpreting Solution (2)
• 𝑥2 is a basic variable, representing trains with a 𝑟ℎ𝑠-side value of 60, thus
we are currently producing 60 trains.
Interpreting Solution (3)
• 𝑠3 is a basic variable, representing the maximum demand of soldiers with
a 𝑟ℎ𝑠-side value of 20, thus we are currently producing 20 soldiers under
the maximum demand of 40 soldiers.
Interpreting Solution (4)
• 𝑠1 and 𝑠2 are non-basic variables, representing the finishing hours and
carpentry hours of soldiers and trains, thus we are currently using all
available finishing hours and carpentry hours in the production of
soldiers and trains, and nothing is left.
Interpreting Solution (5)
• The z-𝑟ℎ𝑠, representing the profit from the sale of soldiers and trains, is
180, thus we are making R180 profit.
Accessories Inc
Using the solved Linear Programming Model
for the Accessories Inc problem,
x1 = number of belts produced
x2 = number of pairs of shoes produced

Max z = 3x1 + 5x2


s.t. 2x1 + 3x2 ≤ 25
x1 + 2x2 ≤ 15
x1, x2 ≥ 0
, interpret your results from the Primal
Simplex Algorithm.
Accessories Inc - Solution
• 𝑥1 is a basic variable, representing belts with a 𝑟ℎ𝑠-side
value of 5, thus we are currently producing 5 belts.
• 𝑥2 is a basic variable, representing shoes with a 𝑟ℎ𝑠-
side value of 5, thus we are currently producing 5 shoes.
• 𝑠1 and 𝑠2 are non-basic variables, representing the
leather and skilled used in producing belts and shoes,
thus we are currently using all available leather and
skilled labour in the production of belts and shoes, and
nothing is left after production.
• The z-𝑟ℎ𝑠, representing the profit from the sale of belts
and shoes, is 40, thus we are making R40 profit.
Limpopo Furniture
Using the solved Linear Programming
Model for the Accessories Inc problem,
x1 = number of desks produced
x2 = number of tables produced
x3 = number of chairs produced

Max z = 60x1 + 30x2 + 20x2


s.t. 8x1 + 6x2 + x3 ≤ 48
1
4x1 + 2x2 + 1 x3 ≤ 20
1 12
2x1 + 1 x2 + x3 ≤ 8
2 2
x1, x2, x3 ≥ 0
, interpret your results from the Primal
Simplex Algorithm.
Limpopo Furniture - Solution
• 𝑥1 is a basic variable, representing desks with a 𝑟ℎ𝑠-side value of 2,
thus we are currently producing 2 desks.
• 𝑥2 is a non-basic variable, representing tables, thus we are currently
not producing any tables.
• 𝑥3 is a basic variable, representing chairs with a 𝑟ℎ𝑠-side value of 8,
thus we are currently producing 8 chairs.
• 𝑠1 is a basic variable, representing lumber using in producing desks,
tables and chairs, with a 𝑟ℎ𝑠-side value of 24, thus we currently
have 24 units of lumber left after production.
• 𝑠2 and 𝑠2 are non-basic variables, representing the finishing hours
and carpentry hours of desks, tables and chairs, thus we are
currently using all available finishing hours and carpentry hours in
the production of desks, tables and chairs, and nothing is left.
• The z-𝑟ℎ𝑠, representing the profit from the sale of desks, tables and
chairs, is 280, thus we are making R280 profit.
Linear Programming 171-181
Primal Simplex Algorithm (MS)
We will now illustrate the function of the Primal Simplex Algorithm, using
Microsoft Excel.
• Initial Tableau
• Optimality Check
• Determining Pivot Operation
• Pivot Operation
• Optimal Tableau
Example – Santa’s Workshop
Using the previously formulated primal simplex canonical / standard form
for Santa’s workshop as an example:

z - 3x1 - 2x2 = 0
2x1 + x2 + s1 = 100
x1 + x2 + s2 = 80
x1 + s3 = 40
Initial Tableau – MS (1)
Start by creating a table in Microsoft Excel. For
the columns:
• The first column should be the header column
for each of your rows that you will add later.
Because this will be the first or initial tableau
iteration, label it as “t-i”.
• The next columns will be each of your decision
variables, xi, that you have, e.g.: x1, x2, x3.
• The next columns will be each of your equality
variables, si, that you have, e.g.: s1, s2, s3.
• The next column will be the right-hand side
values, thus label it “rhs”.
• The last column will be a ration calculation.
Initial Tableau – MS (2)
For the rows:
• The first row will be the objective
function row, thus label it “z”.
• The next rows will represent each one
of the constraints, thus label them 1, 2,
and 3 respectively.
Initial Tableau – MS (3)
Next, populate your table with the
coefficient values from the canonical /
standard form that you generate.
Leave the ratio column you created
blank.
Optimality Check (1)
The overall objective for the optimality check for a primal simplex, is:
• If the problem is a maximization problem, the solution is optimal if there
are no negative values in the objective function (z) row, apart from the
objective function row, right-hand side value.
• If the problem is a minimization problem, the solution is optimal if there
are no positive values in the objective function (z) row, apart from the
objective function row, right-hand side value.
Optimality Check (2)
With your current table setup, there are still negative values, namely “-3”
and “-2” in the objective function (z) row. Thus, the current tableau iteration,
is not yet optimal.
Determining Pivot Operation (1)

Determining the pivot operation, involves the decision on:


1. Which current non-basic variable will change into a basic variable.
2. Which current basic variable will change into a non-basic variable.
Determining Pivot Operation (2)
1. In order to determine which current non-basic variable will change into a
basic variable:
• for a maximization problem, we will select the column for which the
objective function row (z), has the largest negative value, with the
exclusion of the right-hand side column. This will be your pivot column.
• for a minimization problem, we will select the column for which the
objective function row (z), has the largest positive value, with the
exclusion of the right-hand side column. This will be your pivot column.
Determining Pivot Operation (3)
Because we are working with a maximization problem, we will select the
column for which the objective function row (z), has the largest negative
value, e.g.: the “-3”, thus the 𝑥1 column is the pivot column.

This means that soldiers will become a basic


variable, and we would start producing
soldiers.
Determining Pivot Operation (4)
2. In order to determine which current basic variable will change into a non-basic
variable, we will calculate a ratio, for each constraint with the exclusion of the objective
function row (z), based on the pre-determined pivot column. This will be the pivot row.
i. Start with the first constraint.
ii. Type “=“; select the 1st constraint
row, 𝑟ℎ𝑠 column, cell (𝑇𝑖(2,6) );
type “/”; select the 1st constraint
row, pivot column, cell (𝑇𝑖(2,𝑝) );
press “Enter”.
iii. Drag the new formula down the
column, to the last constraint, to
copy it.
Determining Pivot Operation (5)
The ration that we chose, is always the smallest positive value, e.g.: “40”.
This will be the pivot row.
Pivot Operation (1)
The pivot operations in Microsoft Excel involves
the same steps as previously explained, however
you will be doing them in reverse, to avoid
overriding your first step:
1. Calculating the all elements in the next table
iteration, using the previously calculated pivot
row in the next table iteration
2. Calculating the pivot row in the next table
iteration.

Start by creating your next table iteration, using


the same column and row headings, but
unpopulated, in Microsoft Excel.
Pivot Operation (2)
To calculate all the elements in the next table
iteration, using Microsoft Excel:
i. Select the 1st element in the new table,
e.g.: 𝑇2(1,1) .
ii. Type “=“ to start the formula; select the
corresponding 1st element in the previous
table (𝑇𝑖(1,1) ); type”-”; type “(“; select the
z-row, pivot-column element in the
previous table (𝑇𝑖(1,𝑝) ); press “F4” three
times to lock the column; type “*”; select
the pivot-row, 1st-column element in the
next table (𝑇2(𝑝,1) ); press “F4” twice to
lock the row; type “)“; press Enter.
Pivot Operation (3)
iii. Drag the new formula to the right, to the last
column, to copy it.
iv. Drag the entire row down, to the last row, to
copy it.
v. You will get a circular reference error.
vi. Select OK.
Pivot Operation (4)
To calculate all the new pivot row in the new
table iteration, using Microsoft Excel:
i. Select the pivot-row, 1st-column element, in
the new table, e.g.: 𝑇2(3,1) .
ii. Type “=“ to start the formula; select the
corresponding pivot-row, 1st-column
element, in the previous table (𝑇𝑖(3,1) ); type
“/”; select the pivot-row, pivot-column
element, in the previous table (𝑇𝑖(𝑝,𝑝) );
press “F4” once to lock the cell; press Enter.
iii. Drag the row to the right, to the last column,
to copy it.
The table is now finished.
Optimality Check (3)
With your new table, there are still negative values, namely “-3” and “-2” in
the objective function (z) row. Thus, the current tableau iteration, is not yet
optimal.
Determining Pivot Operation (7)
Because the current tableau iteration is not yet optimal, we will start the new pivot
operation by determining the next pivot operation. Because we are working with a
maximization problem, we will select the column for which the objective function row
(z), has the largest negative value, e.g.: the “-2”, thus the 𝑥2 column is the pivot column.

This means that trains will become a basic


variable, and we would start producing trains.
Determining Pivot Operation (8)
2. In order to determine which current basic variable will change into a non-basic
variable, we will calculate a ratio, for each constraint with the exclusion of the objective
function row (z), based on the pre-determined pivot column. This will be the pivot row.
i. Start with the first constraint
(𝑇2(2,7) ).
ii. Type “=“; select the 1st constraint
row, 𝑟ℎ𝑠 column, cell (𝑇2(2,6) );
type “/”; select the 1st constraint
row, pivot column, cell (𝑇2(2,𝑝) );
press “Enter”.
iii. Drag the new formula down the
column, to the last constraint, to
copy it.
Determining Pivot Operation (9)
The ration that we chose, is always the smallest positive value, e.g.: “20”.
This will be the pivot row.
Pivot Operation (5)
Start by creating your next table iteration, using the
same column and row headings, but unpopulated, in
Microsoft Excel.

To calculate all the elements in the next table iteration,


using Microsoft Excel:
i. Select the 1st element in the new table, e.g.:
𝑇3(1,1) .
ii. Type “=“ to start the formula; select the
corresponding 1st element in the previous table
(𝑇2(1,1) ); type”-”; type “(“; select the z-row, pivot-
column element in the previous table (𝑇2(1,𝑝) );
press “F4” three times to lock the column; type
“*”; select the pivot-row, 1st-column element in
the next table (𝑇3(𝑝,1) ); press “F4” twice to lock
the row; type “)“; press Enter.
Pivot Operation (6)
iii. Drag the new formula to the right, to the last
column, to copy it.
iv. Drag the entire row down, to the last row, to
copy it.
v. You will get a circular reference error.
vi. Select OK.
Pivot Operation (7)
To calculate all the new pivot row in the new
table iteration, using Microsoft Excel:
i. Select the pivot-row, 1st-column element, in
the new table, e.g.: 𝑇3(𝑝,1) .
ii. Type “=“ to start the formula; select the
corresponding pivot-row, 1st-column
element, in the previous table (𝑇2(𝑝,1) ); type
“/”; select the pivot-row, pivot-column
element, in the previous table (𝑇2(𝑝,𝑝) );
press “F4” once to lock the cell; press Enter.
iii. Drag the row to the right, to the last column,
to copy it.
The table is now finished.
Optimality Check (4)
With your new table, there are still negative value(s), namely “-1” in the
objective function (z) row. Thus, the current tableau iteration, is not yet optimal.
Determining Pivot Operation (10)
Because the current tableau iteration is not yet optimal, we will start the new pivot
operation by determining the next pivot operation. Because we are working with a
maximization problem, we will select the column for which the objective function row
(z), has the largest negative value, e.g.: the “-1”, thus the 𝑠3 column is the pivot column.
Determining Pivot Operation
(11)
2. In order to determine which current basic variable will change into a non-basic
variable, we will calculate a ratio, for each constraint with the exclusion of the objective
function row (z), based on the pre-determined pivot column. This will be the pivot row.
i. Start with the first constraint
(𝑇3(2,7) ).
ii. Type “=“; select the 1st constraint
row, 𝑟ℎ𝑠 column, cell (𝑇3(2,6) );
type “/”; select the 1st constraint
row, pivot column, cell (𝑇3(2,𝑝) );
press “Enter”.
iii. Drag the new formula down the
column, to the last constraint, to
copy it.
Determining Pivot Operation
(12)
The ration that we chose, is always the smallest positive value, e.g.: “20”.
This will be the pivot row.
Pivot Operation (8)
Start by creating your next table iteration, using the
same column and row headings, but unpopulated, in
Microsoft Excel.

To calculate all the elements in the next table iteration,


using Microsoft Excel:
i. Select the 1st element in the new table, e.g.:
𝑇4(1,1) .
ii. Type “=“ to start the formula; select the
corresponding 1st element in the previous table
(𝑇3(1,1) ); type”-”; type “(“; select the z-row, pivot-
column element in the previous table (𝑇3(1,𝑝) );
press “F4” three times to lock the column; type
“*”; select the pivot-row, 1st-column element in
the next table (𝑇4(𝑝,1) ); press “F4” twice to lock
the row; type “)“; press Enter.
Pivot Operation (9)
iii. Drag the new formula to the right, to the last
column, to copy it.
iv. Drag the entire row down, to the last row, to
copy it.
v. You will get a circular reference error.
vi. Select OK.
Pivot Operation (10)
To calculate all the new pivot row in the new
table iteration, using Microsoft Excel:
i. Select the pivot-row, 1st-column element, in
the new table, e.g.: 𝑇4(𝑝,1) .
ii. Type “=“ to start the formula; select the
corresponding pivot-row, 1st-column
element, in the previous table (𝑇3(𝑝,1) ); type
“/”; select the pivot-row, pivot-column
element, in the previous table (𝑇3(𝑝,𝑝) );
press “F4” once to lock the cell; press Enter.
iii. Drag the row to the right, to the last column,
to copy it.
The table is now finished.
Optimality Check (5)
With your pivot operation complete, we do the optimality check again, and
there are no negative value(s), in the objective function (z) row. Thus, the
current tableau iteration, is optimal.
Accessories Inc
Using the previously formulated Linear
Programming Model for the Accessories Inc
problem,
x1 = number of belts produced
x2 = number of pairs of shoes produced

Max z = 3x1 + 5x2


s.t. 2x1 + 3x2 ≤ 25
x1 + 2x2 ≤ 15
x1, x2 ≥ 0
, solve the Linear Programming Model using the
Primal Simplex Algorithm (with MS Excel).
Accessories Inc - Solution
Limpopo Furniture
Using the previously formulated Linear Programming Model for the Accessories
Inc problem,
x1 = number of desks produced
x2 = number of tables produced
x3 = number of chairs produced

Max z = 60x1 + 30x2 + 20x2


s.t. 8x1 + 6x2 + x3 ≤ 48
1
4x1 + 2x2 + 1 x3 ≤ 20
1 12
2x1 + 1 x2 + x3 ≤ 8
2 2
x1, x2, x3 ≥ 0
, solve the Linear Programming Model using the Primal Simplex Algorithm (with
MS Excel).
Limpopo Furniture - Solution
Linear Programming 171-181
Graphing the Primal Simplex Algorithm
A Primal Simplex Algorithm, starts its Pivot operations in a feasible area.
The pivot operations, moves along the convex set of the feasible area, from
extreme point to extreme point, until it finally finds a feasible solution.

Thus, a Primal Simplex Algorithm, can also graphically be represented.


Example – Santa’s Workshop
Using the previously solved Santa’s workshop problem,
using the Primal Simplex Algorithm, as an example:
Graphing the Primal Simplex Algorithm
(2)
In the initial table, both
decision variables, 𝑥1 and
𝑥2 , are non-basic variables,
thus they currently have null
/ 0 values.
This is because we have not
started making either
soldiers or trains.
Thus, on your graph, the
starting point for 𝑥1 and
𝑥2 is at coordinates [0; 0].
Graphing the Primal Simplex Algorithm
(3)
In the 2nd table, we pivot the
𝑥1 variable, making it a basic
variable and it gets a value of
40. The 𝑥2 variable is still a
non-basic variable, thus it still
has a null / 0 value.
This is because we started
making 40 soldiers, but still no
trains.
Thus, on the graph, the point
for 𝑥1 and 𝑥2 moves from
coordinates [0; 0], horizontally
along the 𝑥1 -axis to
coordinates [40; 0].
Graphing the Primal Simplex Algorithm
(4)
In the 3rd table, we pivot the
𝑥2 variable, making it a basic
variable and it gets a value of
20. The 𝑥1 variable is still a
basic variable, and has a value
of 40.
This is because we started
making 20 trains, but still
made 40 soldiers.
Thus, on the graph, the point
for 𝑥1 and 𝑥2 moves from
coordinates [40; 0, vertically
along the 𝑥2 -axis to
coordinates [40; 20].
Graphing the Primal Simplex Algorithm
(5)
In the 4th table, we pivot the
𝑠3 variable. Both the 𝑥1 and
𝑥2 the are still basic variables,
however their values changed
during the pivot to 20 and 60,
respectively.
We are no making 20 soldiers
and 60 trains, where we find this
is most optimal solution.
Thus, on the graph, the point for
𝑥1 and 𝑥2 moves from
coordinates [40; 20], diagonally
to coordinates [20; 60]. This
brings us to optimal point “P”.
Accessories Inc
Using the solved Linear Programming Model
for the Accessories Inc problem,
x1 = number of belts produced
x2 = number of pairs of shoes produced

Max z = 3x1 + 5x2


s.t. 2x1 + 3x2 ≤ 25
x1 + 2x2 ≤ 15
x1, x2 ≥ 0
, plot the pivots graphically for the Primal
Simplex Algorithm.
Accessories Inc - Solution
• In the initial table, both decision variables, 𝑥1 and 𝑥2 , are non-basic
variables, thus they currently have null / 0 values. Thus, on your
graph, the starting point for 𝑥1 and 𝑥2 is at coordinates [0; 0].
• In the 2nd table, we pivot the 𝑥2 variable, making it a basic variable
and it gets a value of 7½. The 𝑥1 variable is still a non-basic variable,
thus it still has a null / 0 value. Thus, on the graph, the point for 𝑥1
and 𝑥2 moves from coordinates [0; 0], vertically along the 𝑥2 -axis to
coordinates [0; 7½].
• In the 3rd table, we pivot the 𝑥1 variable, making it a basic variable
and it gets a value of 5. The 𝑥2 variable is still a basic variable, and has
a value of 5. Thus, on the graph, the point for 𝑥1 and 𝑥2 moves from
coordinates [0; 7½], diagonally to coordinates [5; 5]. This brings us to
optimal point.
To be continued…

You might also like