Quantitative Methods: Lecture
Quantitative Methods: Lecture
Quantitative Methods: Lecture
Quantitative Methods
Subject to:
2 x1 + x2 ≤ 200
2 x1 ≤ 120
x1 + 3x2 ≤ 300
x1, x2 ≥ 0
By using the simplex method to solve this problem, prepare the initial
simplex table (first table) and then choose the correct answer:
Solution
Adding slack variables:
2 x1 + x2 +s1 = 200
2 x1 + s2 = 120
x1 + 3x2 +s3 = 300
Main x1 x2 s1 s2 s3 Constants
variables
z 2 8 0 0 0 0 profit
s1 2 1 1 0 0 200
s2 2 0 0 1 0 120
s3 1 3 0 0 1 300
1
(A) 100 (B) zero (C) 120 (D) 200
4- The value of s2 should be equaled to:
(A) 100 (B) zero (C) 120 (D) 200
5- The value of s3 should be equaled to:
(A) 300 (B) zero (C) 120 (D) 200
6- The value of z (profit) should be equaled to:
(A) 300 (B) 200 (C) 800 (D) zero
7- The main column …… x2……..
8- The main row …… s3……..
9- The key number will be ……3……..
Note:
s1 =200 ÷1=200
s2=120 ÷0=∞
s3 =300÷3=100 least number
…………………………………………………………………………
We obtained the second table of simplex (optimal solution) as follow:
Main x1 x2 S1 S2 S3 Constants
variables
z -2/3 -8/3
s1 5/3 -1/3 100
s2 2 0 120
x2 1/3 1/3 100
Solution
Main x1 x2 s1 s2 s3 Constants
variables
z -2/3 0 0 0 -8/3 800
s1 5/3 0 1 0 -1/3 100
s2 2 0 0 1 0 120
x2 1/3 1 0 0 1/3 100
Shadow prices (+) s1=0 s2=0 s3=8/3
Cost of resources=( 0×200 +0×120 +8/3×300 )= 800
Opportunity cost (-) x1=-2/3 x2=0
X1= profit 2 -(2×0 +2× 0 +1× 8/3 ) = 2- 8/3=-2/3
2
x1= 0 , x2=100 , profit=800
Main x1 x2 S1 S2 S3 Constants
variables
z -2/3 0 0 0 -8/3 800
s1 5/3 0 1 0 -1/3 100
s2 2 0 0 1 0 120
x2 1/3 1 0 0 1/3 100
Maximize Z = 2 x1+8 x2
3
Shadow prices :( numbers under s in z row without negative sign)
s1 =0 , s2 =0 , s3 =8/3
Opportunity cost :( numbers under x in z row – with the same sign)
x1 =-2/3 , x2 =0
Cost of resources= Shadow prices× available resources
s1 =0×200=0
s2 =0×120=0
s3 =8/3×300=800
Total profit = 800
…………………………………………………………….
Example (2):
A company produces two types of products. Type 1 requires 3 hours
of labor, and 1 kilogram of material. Type 2 requires 2 hours of
labor, and 2 kilogram of material. 2000 hours are available for
labors, and 1000 kilogram for material. Each unit of Type 1
produces L.E 40 profit, and each unit of Type 2 yields L.E 60 profit.
Find:
1- Formulate the linear programming model.
2- Prepare the initial simplex table (first table) and explain it.
3- We obtained an Optimal table of simplex as follow:
Main x1 x2 s1 s2 Constants
variables
z ? ? -5 -25 ?
x1 ? ? 0.5 -0.5 500
x2 ? ? -0.25 0.75 250
Complete the table and answer the following points:
Maximum profit=
Economic value of resources=
Value of (x1)=
Value of (x2)=
Value of (s1)=
Value of (s2)=
Shadow Prices:
Opportunity Cost:
4
Solution
Simplex Model:
Subject to:
x1, x2 ≥ 0
(2)The initial simplex table (first table):
Transform to equations:
Labor 3 x1 + 2x2 +s1 = 2000
Main x1 x2 S1 S2 Constants
variables
z 40 60 0 0 0
s1 3 2 1 0 2000
s2 1 2 0 1 1000
5
(3)Completing the table:
Main x1 x2 s1 s2 Constants
variables
z 0 0 -5 -25 35000
x1 1 0 0.5 -0.5 500
x2 0 1 -0.25 0.75 250
Max z=40 x1+60 x2
…………………………………………….
Example (3)
A company produces three types of products x1 ,x2 ,and x3 .
Their profits are L.E 4, L.E 5, and L.E 3 respectively. the
following table shows the unit needs of each product from raw
materials, labor hours and the available quantities of these
resources:
Resources x1 x2 x3 Availability
Material 1 1 4 6000 kilogram
Cutting 1 2 1 7000 hours
Rolling 1 4 2 12000 hours
Find:
1- Formulate the linear programming model:
Solution
6
Max z =4 x1 + 5 x2 +3 x3
Material x1 + x2 +4 x3 ≤ 6000
Cutting x1 + 2 x2 + x3 ≤ 7000
Rolling x1 + 4 x2 +2 x3 ≤ 12000
x1, x2 , x3 ≥ 0
2- Prepare the initial simplex table (first table) and explain it:
Solution
Material x1 + x2 +4 x3 + s1 = 6000
Cutting x1 + 2 x2 + x3 + s2 =7000
Rolling x1 + 4 x2 +2 x3 + s3 =12000
Main x1 x2 x3 s1 s2 s3 Constants
variables
z 4 5 3 0 0 0 0
s1 1 1 4 1 0 0 6000
s2 1 2 1 0 1 0 7000
s3 1 4 2 0 0 1 12000
x1 =0 , x2 =0 , x3 =0 , profit=0
s1 =6000, s2 =7000, s3 =12000
Main column: x2
Main row: s3
s1 =6000 ÷1=6000
s2=7000 ÷2=3500
s3 =12000÷4=3000 least number
Key number = 4
……………………………………………………………..
3- We obtained the following table of simplex (optimal solution)
as follow:
7
Main x1 x2 x3 S1 S2 S3 Constants
variables
z ? ? -10 -3 -1 ? ?
S3 ? ? 7 2 -3 ? 3000
x1 ? ? 7 2 -1 ? 5000
x2 ? ? -3 -1 1 ? 1000
x1 1 0 7 2 -1 0 5000
x2 0 1 -3 -1 1 0 1000
Max z =4 x1 + 5 x2 +3 x3
Profit =4(5000)+5(1000)+0 = 25000
x1 =5000 , x2 =1000 , x3 =0
s1 =0 , s2 =0 , s3 =3000
Shadow prices:(numbers under s in z row without negative sign)
s1 =3 , s2 =1 , s3 =0
Opportunity cost:(numbers under x in z row – with the same sign)
x1 =0 , x2 =0 , x3 = -10
………………………………………………………..
4- Suppose that the company can manufacture a new
product(x4) with an estimated profit L.E 19, and it needs 2
8
kilograms of raw material, 4 hours of cutting, and 3 hours
of rolling, should this product be produce? Why?
Solution
Opportunity cost =profit – (needs × shadow prices)
Opportunity cost = positive or 0 (accept)
Opportunity cost = negative (reject)
Opportunity cost=19 – (2× 3 +4 ×1 +3× 0) = 19 -10 =+9 (accept)
9
Assignment
Example (1)
A company produces three types of products x1 ,x2 ,and x3, the linear
programming model for this company is formulated as follow:
Maximize Z = 12 x1+14 x2 +16 x3
Subject to:
Raw Material (by kilogram) 2 x1+4 x2 +2 x3≤ 20
Direct labor hours 6x1+8 x2 +4 x3≤ 24
Hand work (hours) 4 x1+12 x2 +8 x3≤40
x1, x2, x3 ≥ 0
Find:
1- Prepare the initial simplex table (first table) and explain it.
2- We obtained the following table of simplex (optimal
solution) as follow:
Main x1 x2 x3 s1 s2 s3 Constants
variables
z ? -12 ? ? -1 -3/2 ?
10
Example (2)
A company produces three types of products x1 ,x2 ,and x3 . Their
profits are L.E 30, L.E 40, and L.E 15 respectively, Type 1 requires
10 hours of labor, and 15 kilogram of raw material. Type 2 requires
20 hours of labor, and 10 kilogram of raw material. Type 3 requires
5 hours of labor, and 10 kilogram of raw material. 300 hours are
available for labors, and 270 kilogram for raw material.
Find:
1- Formulate the linear programming model.
2- Prepare the initial simplex table (first table) and explain it.
11
Example (3)
A company produces two types of products x1, and x2. Their profits
are L.E 6 and L.E 10, respectively, Type 1 requires 6 kilogram of
Raw material and 2 hours of hand work. Type 2 requires 4 kilogram
of raw material and 2 hours of direct labor hours.36 kilogram are
available for of raw material, 8 hours are available for hand work
and 12 hours are available for direct labor hours.
Find:
1- Formulate the linear programming model.
2- Prepare the initial simplex table (first table) and explain it.
3- We obtained the following table of simplex (optimal solution)
as follow:
Main x1 x2 s1 s2 s3 Constants
variables
z ? ? -1 ? -3 ?
x1 ? ? 1/6 ? -1/3 2
s2 ? ? -1/3 ? 2/3 4
x2 ? ? 0 ? 1/2 6
12
Example (4)
A company produces three types of products x1 ,x2 ,and x3 .The
following table shows their data:
x1 x2 x3 Availability
Material 8 4 2 3200 kilogram
Cutting 5 2 2 2400 hours
Rolling 10 4 2 3200 hours
Selling price(per unit) 200 50 40
Variable cost(per unit) 120 30 28
Find:
1- Formulate the linear programming model.
2- Prepare the initial simplex table (first table) and explain it.
s2 ? 0 1 ? ? -1/2 800
13