Professional Documents
Culture Documents
9 Linear Programming 171-181 LPR171-181 (Primal Simplex) Solutions
9 Linear Programming 171-181 LPR171-181 (Primal Simplex) Solutions
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
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 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
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 𝑧 = 𝑥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 𝑧 = 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.
z - 3x1 - 2x2 = 0
2x1 + x2 + s1 = 100
x1 + x2 + s2 = 80
x1 + s3 = 40
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
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.
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)
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)