Linear Programming Notes
Linear Programming Notes
Linear programming is a mathematical technique which permits the determination of the best use of
available resources.
Maximization Model starts with the objective function with the purpose of maximizing a goal which
can be in the form of profits, sales, target audience, number of customers, or any variable wherein
more is desired.
a1x + a2y A
b1x + b2y B
c1x + c2y C
x, y 0 (non-negativity constraint)
where:
a1 = # of units of Resource 1 used per unit of x
a2 = # of units of Resource 1 used per unit of y
A = total available units for Resource 1
b1 = # of units of Resource 2 used per unit of x
b2 = # of units of Resource 2 used per unit of y
B = total available units of Resource 2
c1 = # of units of Resource 3 used per unit of x
c2 = # of units of Resource 3 used per unit of y
C = total available units of Resource 3
SIMPLEX METHOD
Example:
Geena is the Production Manager of Clear Shampoo and she wants to determine the
production mix that will result in maximum profit. She is able to determine the data necessary for her
to make a decision. It will take 5 minutes to mix 1 case of Men’s shampoo and 10 minutes to mix 1
case of Women’s Shampoo and she has a total of 100 minutes available for the mixing process per
day. It will take 7 minutes to bottle 1 case of Men’s Shampoo and 7 minutes to bottle 1 case of
Women’s shampoo and she has a total of 84 minutes available for the bottling process per day. It will
take 9 minutes to pack 1 case of Men’s shampoo and 5 minutes to pack 1 case of Women’s
shampoo and she has a total of 90 available for the packing process per day. She will earn $6 for
every case of Men’s shampoo produced and $8 for every case of Women’s shampoo produced.
How many cases of Men’s shampoo and Women’s shampoo should be produced per day to
maximize profits? How much is the total profit?
CIT 1 – Quantitative Analysis Chapter 6 – Linear Programming
2. Set up the objective function where 0 is the assigned profit per unit of a slack variable:
Maximize P = ______________________________
• Copy the coefficients to the Cj row. Assign the slack variable as the initial solution and
copy the coefficient to the basic Cj column.
Constraint A (mixing):
_______________________________
_______________________________
5x + 10Y + 1s1 + 0s2 + 0s3 = 100
Copy the coefficients to the s1 row.
Constraint B (bottling):
_______________________________
_______________________________
5x + 10 7x + 7Y + 0s1 + 1s2 + 0s3 = 84
Copy the coefficients to the s2 row.
Constraint C (packing):
9X + 5Y_______________________________
_______________________________
5x + 10
x + 10Y+ 0s1 +Copy the coefficients to the s3 row.
= ____________________
= ______________________
Initial Tableau
Basic Cj
Quantity
Cj Solution X Y s1 s2 s3
0 s1
0 s2
0 s3
Gross Zj
Net Cj - Zj Total Profit
Max+? Yes/No
1. Replace the pivot row with the pivot column in the solution mix:
2. Replace the s1 row of the initial tableau with the Y row in the second tableau:
3. Replace the s2 row of the initial tableau with new values in the second tableau:
New s2 row = old s2 row – (number in old s2 row and pivot column)(Y row)
4. Replace the s3 row of the initial tableau with new values in the second tableau:
New s3 row = old s3 row – (number in old s3 row and pivot column)(Y row)
Second Tableau
Basic Cj 6 8 0 0 0
Quantity
Cj Solution X Y s1 s2 s3
8 Y 0.5= 5/10 10/10= 1 1/10=0. 0/10= 0/10= 100/10=1
1 0 0 0
0 s2 7-7*0.5= 3.5 7-7(1)= 0 0-7*0.1= 1-7*0= 0 -7*0 84-7(10) =
-0.7 1 =0 14
0 s3 9-5*.5=6.5 5-5*1=0 0-5*0.1= 0- 1-5*0= 90-
-0.5 5*0)=0 1 5*10=40
Gross Zj .5*8+0*3.5+0*6.5 8*1+0*0+0* 0.8 0 0 80
= 4 0=8
Net Cj - Zj 2 0 -0.8 0 0 Total
Max+? Yes/No Yes No No No no Profit
Qr = Q / pivot column
1. Replace the pivot row with the pivot column in the solution mix:
2. Replace the ____s2 row of the second tableau with the X row in the third tableau:
3. Replace the Y row of the second tableau with new values in the third tableau:
New Y row = old Y row – (number in old Y row and pivot column) (Xrow)
4. Replace the s3 row of the second tableau with new values in the third tableau:
New s3 row = old s3 row – (number in old s3 row and pivot column)(X row)
Third Tableau
Basic Cj 6 8 0 0 0
Quantity
Cj Solution X Y s1 s2 s3
8 Y 0.5-0.5*1= 0 1-0.5*0=1 0.1-0.5*- -0.15 0 8
0.2= 0.2
6 X 1 0 -0.2 0.3 0 4
0 s3 6.5-6.5*1 =0 0-6.5*0 = 0 -0.5-6.5*-0- 1- 40-6.5*4= 14
0.2 = 0.8 6.5*0.3 6.5*
= -1.95 0=1
Gross Zj 8*0+6*1+0*0 8*1+6*0+0* 8*0.2+6*- 0.6 0 88
=6 0=8 0.2+0*0.
8 = 0.4
Net Cj - Zj 0 0 -0.4 -0.6 0 Total Profit
Max+? Yes/No NO No No No No
CIT 1 – Quantitative Analysis Chapter 6 – Linear Programming
Linear Programming: Minimization Model
Minimization Model starts with the objective function with the purpose of minimizing a goal which
can be in the form of expenses or cost, travel time, distance, energy, or any variable wherein less is
desired.
a1x + a2y A
b1x + b2y B
c1x + c2y C
x, y 0 (non-negativity constraint)
where:
a1 = # of units of product 1 made per unit of x
a2 = # of units of product 2 made per unit of y
A = minimum units of product 1 to be made
b1 = # of units of product 2 made per unit of x
b2 = # of units of product 2 made per unit of y
B = minimum units of product 2 to be made
c1 = # of units of product 3 made per unit of x
c2 = # of units of product 3 made per unit of y
C = minimum units of product 3 to be made
Example:
Jacob is the Purchasing Manager of Kraft Foods and he wants to determine the supply mix
that will result on minimum cost. He is able to determine the data necessary for him to make a
decision. He is able to determine the data necessary for him to make a decision. A gallon of Alaska
can produce 5 cases of cheese, 7 cases of butter, and 9 cases of cream. A gallon of Nestle milk can
produce 11 cases of cheese, 8 cases of butter, and 4 cases of cream. He must produce at least 110
cases of cheese, 112 cases of butter, and 72 cases of cream per day. Alaska milk costs $50 per gallon
while Nestle milk costs $55 per gallon.
How many gallons of Alaska milk and Nestle milk should he purchase per day to minimize
cost? How much is the total cost.
Summary Table: Kraft
2. Set up the objective function where a relatively high cost is assigned per unit of an artificial
variable ($100 for this case):
Copy the coefficients to the Cj row. Assign the artificial variables as the initial solution and
copy the coefficient to the basic Cj column.
Constraint A (cheese):
5X +11Y 110
5X + 11Y - 1s1 + 0s2 + 0s3 + 1A1 + 0A2 + 0A3 = 110
Copy the coefficients to theA1 row.
Constraint B (Butter):
7X + 8Y 112
7X + 8Y +0s1 - 1s2 + 0s3 + 0A1 + 1A2 + 0A3 = 112
7x + 7Y + 0s3 = 84
Copy the coefficients to the A2 row.
Constraint C (cream):
9X 9X + 4Y 72
9X + 4Y +0s1 + 0s2 - 1s3 + 0A1 + 0A2 + 1A3 = 72
Initial Tableau
A1 11 110 10 Yes
A2 8 112 14 NO
A3 4 72 18 NO
3. Replace the pivot row with the pivot column in the solution mix:
Exit = 100A1
Enter =55Y
4. Replace the ___A1__ row of the initial tableau with the __Y__ row in the second tableau:
New _____ row = old _____ row – (number in old ____ row and pivot column)(_____ row)
6. Replace the ____ row of the initial tableau with new values in the second tableau:
New _____ row = old _____ row – (number in old ______ row and pivot column)(_____ row)
Second Tableau
Gross Zj
Net Cj - Zj Total
Min-? Yes/No Cost
Qr = Q / pivot column
1. Replace the pivot row with the pivot column in the solution mix:
Exit =
Enter =
2. Replace the _____ row of the second tableau with the _____ row in the third tableau:
3. Replace the _____ row of the second tableau with new values in the third tableau:
New _____ row = old _____ row – (number in old ____ row and pivot column) (____row)
4. Replace the ____ row of the second tableau with new values in the third tableau:
New ____ row = old _____ row – (number in old _____ row and pivot column)(X row)
Third Tableau
Basic Cj
Quantity
Cj Solution X Y S1 S2 S3 A1 A2 A3
Gross Zj
Net Cj - Zj Total
Min-? Yes/No Cost