0% found this document useful (1 vote)
2K views

LP Simplex Victoriano

1/2 = 0.5 2/2 = 1 1/2 = 0.5 0/2 = 0 Replace S1 row with new values 8. Compute the new entries for the remaining rows by reducing the optimum column entries to zero (entries in constraint rows). FIRST TABLE Cj column Product mix Constant Variable columns (profit/unit) column column Real Slack Objective coef./ Cj 30 40 0 0 profit per unit row PM Qty. x y S1 S2 Variable row 0 S1 12 0.5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
2K views

LP Simplex Victoriano

1/2 = 0.5 2/2 = 1 1/2 = 0.5 0/2 = 0 Replace S1 row with new values 8. Compute the new entries for the remaining rows by reducing the optimum column entries to zero (entries in constraint rows). FIRST TABLE Cj column Product mix Constant Variable columns (profit/unit) column column Real Slack Objective coef./ Cj 30 40 0 0 profit per unit row PM Qty. x y S1 S2 Variable row 0 S1 12 0.5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Linear Programming:

The Simplex Method


The Simplex Method
• Developed by George Dantzig of Stanford
University
• A repetitive optimizing technique
• It repeats the process of mathematically
moving from extreme point to another
extreme point (in the graphical method) until
an optimal solution is reached.
• Unlike the graphical, the simplex method can
handle an infinite number of variables.
Steps (Maximization)
1. Setup the constraints from the conditions of the problems.
2. Convert the inequality explicit constraints to equations by adding slack variable.
3. Enter the numerical coefficients and variables in the simplex table.
4. Calculate Cj and Zj values
5. Determine the optimum column or entering variable by choosing the MOST
POSITIVE in the Cj-Zj row.
6. Divide the quantity-column values by the non-zero and non-negative entries in the
optimum column. The smallest quotient belongs to the pivotal row.
7. Compute the values for the replacing row by dividing all entries by the pivot.
8. Compute the new entries for the remaining rows by reducing the optimum column
entries to zero (entries in constraint rows).
9. Calcuate Cj and Zj values.
10. If there is a positive entry in the Cj-Zj row, return to step 5.
11. If there is no positive Cj-Zj value, the final solution has been obtained.
Problem 2 (Maximization)
• Ecomoda, a clothing line manufacturer that produces
men’s shirts and pants has two (2) primary resources
available, sewing machine time (in the sewing
department), and cutting machine time (in the cutting
department). Over the next week, Ecomoda can
schedule up to 24 hours of work in the sewing dept.
and 30 hours of work in the cutting dept. Each shirt
produced requires one hour sewing time and 2 hours
cutting time. Producing each pair of pants requires 2
hours of sewing time and one hour of cutting time. If
profit is P30/shirt and P40/pants, determine the best
possible combination of shirt and pants to produce and
sell in order to realize maximum profit.
1. Set up the objective function and
the problem constraints
Let x = no. of shirts ; y = no. of pants

Maximize: Z = 30x + 40 y
Subject to:
x + 2y < 24 x>0
2x + y < 30 y>0
2. Convert the inequalities by adding
slack or artificial variables
Slack – time not used in each department
S1 = slack variable (unused time) in dept. 1
S2 = slack variable (unused time) in dept. 2
x + 2y + S1 = 24 2x + y + S2 = 30
Any unknown variable that occurs in one equation
must appear in all equations. Thus:
To maximize: Z = 30x + 40y + 0S1 + 0S2
Subject to: x + 2y + S1 + 0S2 =24
2x + y + 0S1 + S2 = 30
3. Enter the equation in the simplex
tableau
FIRST TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

0 S1 24 1 2 1 0 constraint
coefficients
0 S2 30 2 1 0 1
Zj gross profit
row
Cj - Zj net profit
row
4. Calculate Cj and Zj values
FIRST TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

0 S1 24 1 2 1 0 constant
coefficients
0 S2 30 2 1 0 1
Zj 0 0 0 0 0 gross profit
row
Cj - Zj 30 40 0 0 Net profit
row
Zj – is obtained by multiplying the profit contribution in Cj column by each of the
coefficients in the constraints, then add their products.
0 (24 1 2 1 0) = 0 0000
0 (30 2 1 0 1) = + 0 0 0 0 0
Zj = 00000
5. Determine the entering variable of the optimum
column i.e. the column with the highest Cj- Zj value.

FIRST TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

0 S1 24 1 2 1 0 constraint
coefficients
0 S2 30 2 1 0 1
Zj 0 0 0 0 0 gross profit
row
Cj - Zj 30 40 0 0 Net profit
row

Optimum column
Entering variable = y
6. Determine the outgoing variable of the pivot row. Divide the
quantity columns values by their corresponding optimum
column values and choose the smallest positive quotient
(disregard ratios like 3/0, 0/5, -4/3)
FIRST TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

0 S1 24 1 2 1 0 constant
coefficients
0 S2 30 2 1 0 1
Zj 0 0 0 0 0 gross profit
row
Cj - Zj 30 40 0 0 Net profit
row

For S1: 24 / 2 = 12 (smallest positive) S1 is the outgoing


For S2: 30 / 1 = 30 variable.
7. Compute the elements of the entering variable. Divide each
member in the replacement row (S1 row) by the intersectional
element (pivot) of the replaced row.

FIRST TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

0 S1 24 1 2 1 0 constant
coefficients
0 S2 30 2 1 0 1
Zj 0 0 0 0 0 gross profit
row
Cj - Zj 30 40 0 0 Net profit
row

24/2 = 12 | 1/2 = 1/2 | 2/2 = 1| 1/2 = 1/2 | 0/2 = 0


8. Compute the new values for the remaining rows. Use the formula: element in
old row – (intersectional element of old row X corresponding element in replacing
row) OR (corresponding element of the entering variable) X (additive inverse of
intersectional element) + corresponding elements in old row
FIRST TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

0 S1 24 1 2 1 0 constant
coefficients
0 S2 30 2 1 0 1
Zj 0 0 0 0 0 gross profit
row
Cj - Zj 30 40 0 0 Net profit
row
24/2 = 12 | 1/2 = 1/2 | 2/2 = 1 | 1/2 = 1/2 | 0/2 = 0 (elements of entering variable)
(12 1/2 1 1/2 0) (-1) = -12 -1/2 -1 -1/2 0
+ 30 2 1 0 1
18 3/2 0 -1/2 1
The Second Table and Cj-Zj
SECOND TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

40 y 12 1/2 1 1/2 0 constant


coefficients
0 S2 18 1 1/2 0 -1/2 1
Zj 480 20 40 20 0 gross profit
row
Cj - Zj 10 0 -20 0 net profit
row
The presence of positive value (10) in the x column of the Cj – Zj
row of the second solution indicates that further improvement Optimum column
is possible. Therefore, the same process used to develop the 2nd X is the entering variable
solution must be repeated to develop the 3rd solution.
Determine the OV: constant/EV
SECOND TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

40 y 12 1/2 1 1/2 0 constant


coefficients
0 S2 18 1 1/2 0 -1/2 1
Zj 480 20 40 20 0 gross profit
row
Cj - Zj 10 0 -20 0 net profit
row

For y: 12 / 0.5 = 24 For S2: 18/ 3/2 = 12 (smallest positive quotient)


S2 is the outgoing variable.
Element of EV
SECOND TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

40 y 12 1/2 1 1/2 0 constant


coefficients
0 S2 18 1 1/2 0 -1/2 1
Zj 480 20 40 20 0 gross profit
row
Cj - Zj 10 0 -20 0 net profit
row

18/ 1.5 = 12 | 1.5 / 1.5 = 1 | 0/1.5 = 0 | -1/2 / 1.5 = -1/3 | 1 / 1.5 = 2/3
New Y row
SECOND TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

40 y 12 1/2 1 1/2 0 constant


coefficients
0 S2 18 1 1/2 0 -1/2 1
Zj 480 20 40 20 0 gross profit
row
Cj - Zj 10 0 -20 0 net profit
row
(12 1 0 -1/3 2/3)(-1/2) = -6 -1/2 0 1/6 -1/3
+ 12 1/2 1 1/2 0
6 0 1 2/3 -1/3
The Third Table and Cj-Zj
THIRD TABLE
Cj column Product mix Constant Variable columns
(profit/unit) column column Real Slack
Objective coef./
Cj 30 40 0 0 profit per unit
row

PM Qty. x y S1 S2 Variable row

40 y 6 0 1 2/3 -1/3 constant


coefficients
30 x 12 1 0 -1/3 2/3
Zj 600 30 40 16.67 6.67 gross profit
row
Cj - Zj 0 0 -16.67 -6.67 net profit
row

x = 12 -> no. of shirts


As there are no positive Cj-Zj value, no further profit
improvement is possible. The optimum solution is: y = 6 -> no. of pants
Z = P600 -> max profit
Analysis
THIRD TABLE

Cj column Product mix Constant Variable columns

(profit/unit) column column Real Slack

Objective coef./ profit


Cj 30 40 0 0 per unit row

PM Qty. x y S1 S2 Variable row

40 y 6 0 1 2/3 -1/3 constant


coefficients
30 x 12 1 0 -1/3 2/3

Zj 600 30 40 16.67 6.67 gross profit row

Cj - Z j 0 0 -16.67 -6.67 net profit row

Columns S1 and S2 (Cj-Zj) are both negative; reduce the time available , we would suffer some losses in
contribution, specifically P16.67/hr for sewing, and P6.67/hr. for cutting.

If management decides that one hour must be made available (removed from production),
management would choose to reduce production time in cutting by 1 hour since loss of 1 hour reduces
total contribution by P6.67 only whereas it is P16.67 for sewing.

Increase production time in sewing department – more desirable by P10 (16.67-6.67), opportunity profit
Minimization
• There is a need to use another kind of variable that will save the slack
variable form becoming negative.
• Artificial variable: has a large value which is used as a “computational
device” that prevents an equality constraint from equating a constant to
zero, and prevents the slack variables from becoming negative
• Minimization problems commonly deal with cost. Slack variables do not
contribute any amount to cost, but artificial variables are assumed to
contribute the biggest amount to cost in a minimization problem. It
contributes to the objective an amount greater than any of the
coefficients of solution variables.
• For convenience, in representing the contribution of the artificial
variable to the objective, we may use a quantity (which is power of ten,
greater than any of the coefficients found in the constraints and
objective. Powers of ten are numerals such as 10, 100, 1000 etc.)
Methods for Treating Constraints
(Minimization)

Original Action Required Resulting


Constraints Constraints

x<c Add a slack x+s=c


variable
x>c Subtract a slack x–s+A=c
variable (surplus)
and add an
artificial variable
x=c Add an artificial x+A=c
variable
Steps (Minimization)
(Similar to maximization except for 3 processes)
1. The Cj column of the initial table begins with the
coefficients of artificial variables and of slack
variables in the objective with positive
coefficients in the constraints.
2. Instead of looking for the most positive quantity
in Cj – Zj row for the optimum column, look for
the most negative entry.
3. The optimum table or final table has entries in
the Cj-Zj row which are either zero or positive.
Problem 2 (Minimization)
• A manufacturer of commercial chemicals has an
order for a certain mixture consisting of two
ingredients, x and y, which cost P4.00 and P5.00
per kilogram respectively. The following are the
specifications:
a. The weight of the mixture must be 100 kg.
b. It cannot contain more than 30 kg. of x
c. It must contain at least 20 kg. of y
Find the mixture of the two ingredients which satisfies
the customer requirements and still yields a minimum
total cost of raw materials.
Objective and Constraints
• Minimize: C = 4x + 5y
• Constraints
x + y = 100  x + y + A1 = 100
x < 30  x + S1 = 30
y > 20  y – S2 + A2 = 20
x > 0, y > 0
Note: For the cost of A1 and A2, use values in powers of
10 e.g. 10, 100,…depending on the highest cost of x and
y. Here the highest cost is P5.00, then use P10.00
Objective and Constraints with Slack
and Artificial Variables
• Minimize: C = 4x + 5y +0S1 + 0S2 + 10A1 + 10A2
• Constraints:
x + y + 0S1 + 0S2 + A1 + 0A2 = 100
x +0y + S1 + 0S2 + 0A1 + 0A2 = 30
0x + y + 0S1 – S2 + 0A1 + A2 = 20
Enter the equation in the simplex table with positive
slack and artificial variables in the product mix column
FIRST TABLE
Cj Product Consta Variable columns
mix
column nt
(profit/un column colum Real Slack
it)
n
Objective
Cj 4 5 0 0 10 10 coef./ profit
per unit row

Variable
PM Qty. x y S1 S2 A1 A2 row

10 A1 100 1 1 0 0 1 0 constant
coefficien
0 S1 30 1 0 1 0 0 0 ts

10 A2 20 0 1 0 -1 0 1 gross
profit row

Zj 1200 10 20 0 -10 10 10

Cj - Zj -6 -15 0 10 0 0 net
profit
row
Entering variable (most negative value)
FIRST TABLE
Cj Product Consta Variable columns
mix
column nt
(profit/un column colum Real Slack
it)
n
Objective
Cj 4 5 0 0 10 10 coef./ profit
per unit row

Variable
PM Qty. x y S1 S2 A1 A2 row

10 A1 100 1 1 0 0 1 0 constant
coefficien
0 S1 30 1 0 1 0 0 0 ts

10 A2 20 0 1 0 -1 0 1 gross
profit row

Zj 1200 10 20 0 -10 10 10

Cj - Zj -6 -15 0 10 0 0 net
profit
row
Determine the outgoing variable (OV),
smallest positive quotient
FIRST TABLE
Cj Product Consta Variable columns
mix
column nt
(profit/un column colum Real Slack
it)
n
Objective
Cj 4 5 0 0 10 10 coef./ profit
per unit row

Variable
PM Qty. x y S1 S2 A1 A2 row

10 A1 100 1 1 0 0 1 0 constant
coefficien
0 S1 30 1 0 1 0 0 0 ts

10 A2 20 0 1 0 -1 0 1 gross
profit row

Zj 1200 10 20 0 -10 10 10

Cj - Zj -6 -15 0 10 0 0 net
profit
row

For A1 : 100/1 = 100 | For S1: disregard, division by 0 | For A2: 20/1 = 20
Determine elements of EV (y)
FIRST TABLE
Cj Product Consta Variable columns
mix
column nt
(profit/un column colum Real Slack
it)
n
Objective
Cj 4 5 0 0 10 10 coef./ profit
per unit row

Variable
PM Qty. x y S1 S2 A1 A2 row

10 A1 100 1 1 0 0 1 0 constant
coefficien
0 S1 30 1 0 1 0 0 0 ts

10 A2 20 0 1 0 -1 0 1 gross
profit row

Zj 1200 10 20 0 -10 10 10

Cj - Zj -6 -15 0 10 0 0 net
profit
row

Elements of the EV (y) will be the same elements in the old row since the intersectional element is 1.
Calculations for Second Table
Determine the OV in First Table: Formula:
A1: 100/1 = 100 (New entering variable row) x (additive inverse of the
corresponding intersection element) + old row
S1: 30/0 = 0 (ignore)
A2: 20/1 = 20 <- OV New S1 Row:
(smallest positive quotient) (20 0 1 0 -1 – 1) (0)= 0 0 0 0 0 0 0
+ 30 1 0 1 0 0 0
New y row: 30 1 0 1 0 0 0
20/1 = 20 New A1 Row:
0/1 = 0 (20 0 1 0 -1 – 1) (-1) = -20 0 -1 0 1 0 -1
1/1 = 1 + 100 1 1 0 0 1 0
0/1 = 0 80 1 0 0 1 1 -1
-1/1 = -1
0/1 = 0
1/1 = 1
Second Table
SECOND TABLE
Cj Product Consta Variable columns
mix
column nt
(profit/un column colum Real Slack
it)
n
Objective
Cj 4 5 0 0 10 10 coef./ profit
per unit row

Variable
PM Qty. x y S1 S2 A1 A2 row

10 A1 80 1 0 0 1 1 -1 constant
coefficien
0 S1 30 1 0 1 0 0 0 ts

5 y 20 0 1 0 -1 0 1 gross
profit row

Zj 900 10 5 0 5 10 -5

Cj - Zj -6 0 0 -5 0 15 net
profit
row

EV is x | OV: For A1 = 80/1 = 80, For S1: 30/1 = 30 | OV is S1


Calculations
• Calculations for the next tables: just follow
the steps/procedure done as in the second
table.
Third Table
THIRD TABLE
Cj Product Consta Variable columns
mix
column nt
(profit/un column colum Real Slack
it)
n
Objective
Cj 4 5 0 0 10 10 coef./ profit
per unit row

Variable
PM Qty. x y S1 S2 A1 A2 row

10 A1 50 0 0 -1 1 1 -1 constant
coefficien
4 x 30 1 0 1 0 0 0 ts

5 y 20 0 1 0 -1 0 1 gross
profit row

Zj 720 4 5 -6 5 10 -5

Cj - Zj 0 0 6 -5 0 15 net
profit
row
Fourth & Final Table
FOURTH TABLE
Cj Product Consta Variable columns
mix
column nt
(profit/un column colum Real Slack
it)
n
Objective
Cj 4 5 0 0 10 10 coef./ profit
per unit row

Variable
PM Qty. x y S1 S2 A1 A2 row

0 S2 50 0 0 -1 1 1 -1 constant
coefficien
4 x 30 1 0 1 0 0 0 ts

5 y 70 0 1 -1 0 1 0 gross
profit row

Zj 470 4 5 -1 0 5 0

Cj - Zj 0 0 1 0 5 10 net
profit
row
There are no negative values in Cj-Zj therefore, the table is optimal.
Answer: x = 30 kg, y= 70 kg, Zj= P470 is the cost (min) of the mixture
Decision and Analysis
• Decision: x = 30 kg
y = 70 kg
Cost = P470.00
• Cj – Zj row assures that there are no negative net
contribution.
• S1, A1, and A2 are all equal to zero (0).
• S2 = 50, surplus of 50 kg of y, more than required by
the constant y > 20
• Zj = 470  cost of the mix of 30 kg of x and 70 kg of y
Problem 2 (Minimization)
• Livestock Feed Inc. produces specially blended
feed supplement. It has an order of 400 pounds
of the mixture. This consists of two ingredients---
P, a protein source and C, a carbohydrate source.
The first ingredient P, costs P6.00 a pound. The
second ingredient C costs P16.00 a pound. The
mixture cannot be more than 150 pounds P and it
must have at least 200 pounds C. The company’s
problem is to determine how much of each
ingredient to use to minimize cost but satisfy the
requirements.
• Minimize: Z = 6P + 16 C
Z = 6p + 16p + 0S1 + 0S2 + 100A1 + 100A2
• Subject to:
P + C =400 total order P + C + A1 = 400
P < 150 P content P + S1 = 150
C > 200 C content C – S2 + A2 = 200
P > 0, C > 0

You might also like