Professional Documents
Culture Documents
Engineering Department
Computer Systems Engineering
Software Engineering
Operation Research
Homework 1
Prepared By
Under Supervisor
3) A firm makes three products 1,2, and 3. Each product requires production time in
three departments as shown.
Solution:
Let product 1 is x1
Let product 2 is x2
Let product 3 is x3
Subject to :
3x1 + 4x2 + 2x3 <= 600
2x1 + x2 + 2x3 <= 400
x1 + 3x2 + 3x3 <= 300
x1,x2,x3 >= 0
The optimal solution is : z = 2x1 + 4x2 + 2.5x3
4) Consider this problem
Max Z = x1 + 3x2
Subject to:
x1 - 3x2 <= 3
-2 x1 + x2 <= 2
-3x1 + 4x2 <= 12
3x1 + x2 <= 9
x1, x2> = 0
a) Solve by graphic method
b) Identify all extreme points
c) Solve by simplex method
solution :
a)
x1-3x2 = 3
Let x1 = 0,
-3x2 = 3 ==> x2 = -1
P11 (0, -1)
Let x2 = 0,
x1 = 3
P12 (3,0)
-2x1 + x2 = 2
Let x1 = 0,
x2 = 2
P21 (0,2)
Let x2 = 0,
-2x1 = 2 ==> x1 = -1
P22 (-1,0)
-3x1 + 4x2 = 12
Let x1 = 0,
4x2 = 12 ==> x2 = 3
P31 (0,3)
Let x2 = 0,
-3x1 = 12 ==> x1 = -4
P32 (-4,0)
3x1 + x2 = 9
Let x1 = 0,
x2 = 9
P41 (0,9)
Let x2 = 0,
3x1 = 9 ==> x1 = 3
P42(3,0)
b) .
Point A is the result of the intersection of the seconds and third equations.
-2x1 + x2 = 2 ----------- 1
-3x1 + 4x2 = 12 ----------- 2
Multiply the first equation by -4
8x1-4x2 = -8
-3x1 + 4x2 = 12 Sum of equations
5x1 = 4, ---------- x1 = 0.8 Instead of the first equation x2 = 3.6 A (0.8,3.6)
Point B is the result of the intersection of the third and fourth equations
-3x1 + 4x2 = 12 -------------1
3x1 + x2 = 9 ------------ 2
Multiply the second equation by -4
-3x1 + 4x2 = 12 -12x1-4x2 = -36
Sum of equations
-15x1 = -24 >>> x1 = 1.6
Instead of the first equation x2 = 4.2 B (1.6,4.2)
To find the optimal solution, we must substitute the points A, B, C, D, F into the
objective function:
POINTS Z
A(0.8,3.6) 11.6
B(1.6,4.2) 14.2
C(0,2) 6
D(0,0) 0
F(3,0) 3
Basic X1 X2 S1 S2 S3 S4 RHS
Sol -1 -3 0 0 0 0 0
Obj Fun
S1 1 -3 1 0 0 0 3
S2 -2 1 0 1 0 0 2
S3 -3 4 0 0 1 0 12
S4 3 1 0 0 0 1 9
Basic X1 X2 S1 S2 S3 S4 RHS
Sol -7 0 0 3 0 0 6
Obj Fun
S1 -5 0 1 3 0 0 9
X2 -2 1 0 1 0 0 2
S3 5 0 0 -4 1 0 4
S4 5 0 0 -1 0 1 7
Basic X1 X2 S1 S2 S3 S4 RHS
Sol 0 0 0 -13/5 7/5 0 58/5
Obj Fun
S1 0 0 1 -1 1 0 13
X2 0 1 0 -3/5 2/5 0 18/5
X1 0 0 0 -4/5 1/5 0 4/5
S4 0 0 0 3 -1 1 3
Solution:
a)
X1+2x2=6
Let x1=0 , => x2=3
P11(0,3)
Let x2=0 , => x1=6
P12(6,0)
-2x1+x2=4
Let x1=0 , => x2=4
P21(0,4)
Let x2=0 , =>x1=-2
P23(-2,0)
5x1+3x2=15
Let x1=0 , =>x2=5
P31(0,5)
Let x2=0 , =>x1=3
P32(3,0)
Point B is the result of the intersection of the first and third equations
X1+2x2=6 -------------- 1
5x1 +3x2=15 ------------ 2
Multiply the first equation by -5
-5x1 – 10 x2=-30
5x1 + 3x2 =15
Sum of equations
-7x2=-15 >>>x2=2.14
Basic X1 X2 S1 S2 S3 RHS
Sol 0 -1 0 0 1 15
Obj Fun
S1 0 7/5 1 0 -1/5 3
S2 0 11/5 0 1 2/5 10
X1 1 3/5 0 0 1 3
Basic X1 X2 S1 S2 S3 RHS
Sol 0 0 5/7 0 6/7 120/7
Obj Fun
X2 0 1 5/7 0 -1/7 15/7
S2 0 0 -11/7 1 5/7 37/7
X1 0 0 5/7 0 6/7 12/7
Basic X1 X2 X3 S1 S2 S3 RHS
Sol 5 3 -2 0 0 0 0
Obj Fun
S1 1 1 1 1 0 0 5
S2 1 -2 -1 0 1 0 4
S3 3 3 2 0 0 1 15
Basic X1 X2 X3 S1 S2 S3 RHS
Sol 0 13 3 0 -5 0 -20
Obj Fun
S1 0 3 2 1 -1 0 1
X1 1 -2 -1 0 1 0 4
S3 0 9 5 0 -3 1 3
Solution :
Max Z -x1 -x2 +4x3 = 0
Subject to:
1) x1 +x2+2x3+s1 = 9
2) x1 + x2 –x3 +s2=2
3)-x1 +x2 +x3 +s3= 4
4) x1,x2,x3s1,s2,s3 >=0
Basic X1 X2 X3 S1 S2 S3 RHS
Sol -1 -1 4 0 0 0 0
Obj Fun
S1 1 1 2 1 0 0 9
S2 1 1 -1 0 1 0 2
S3 -1 1 1 0 0 1 4
9/2=4.5 , 2/-1=-2 , 4/1=4
Basic X1 X2 X3 S1 S2 S3 RHS
Sol 3 -5 0 0 0 -4 -16
Obj Fun
S1 3 -1 0 1 0 -2 1
S2 0 2 0 0 1 1 6
X3 -1 1 1 0 0 1 4
Basic X1 X2 X3 S1 S2 S3 RHS
Sol 0 -4 0 -1 0 -2 -17
Obj Fun
X1 1 -0.33 0 0.33 0 -0.67 0.33
S2 0 2 0 0 1 1 6
X3 0 0.67 1 0.33 0 0.33 4.33
solution:
a)
X1+x2=1
Let x1=0 , => x2=1
P11(0,1)
Let x2=0 ,=>x1=1
P12(1,0)
-x1+6x2=3
Let x1=0 ,=> x2=0.5
P21(0,0.5)
Let x2=0 ,=>x1=-3
P22(-3,0)
2x2=2
X2=1
P31(0,1)
Point B is the result of the intersection of the first and seconds equations
x1+x2=1 ---------------------1
-x1+6x2=3 ------------------2
Sum of equations
7x2=4 >>x2=4\7 =0.57
Instead of the first equation
x1=0.42
B(0.42,0.57)
Point C is the result of the intersection of the second and third equations
-x1+6x2=3 ---------------1
2x2=2 ------------------2
X2=1
Instead of the first equation
x1=3
C(3,1)
To find the optimal solution you need to find all extreme points (A,B,C).
POINTS Z
A(1,0) -1
B(0.42,0.57) 4.14
C(3,1) 5
D(0,0) 0
Basic X1 X2 S1 S2 S3 R1 RHS
Sol 1 -8 0 0 0 M 0
Obj Fun
R1 1 1 -1 0 0 1 1
S2 -1 6 0 1 0 0 3
S3 0 2 0 0 1 0 2
Basic X1 X2 S1 S2 S3 R1 RHS
Sol -M+1 -M-8 M 0 0 0 -M
Obj Fun
R1 1 1 -1 0 0 1 1
S2 -1 6 0 1 0 0 3
S3 0 2 0 0 1 0 2
Basic X1 X2 S1 S2 S3 R1 RHS
Sol -1.17M-0.33 0 M 0.17M+1.33 0 0 -0.5M+4
Obj Fun
R1 1.17 0 -1 -0.17 0 1 0.5
X2 -0.17 1 0 0.17 0 0 0.5
S3 0.33 0 0 -0.33 1 0 1
Basic X1 X2 S1 S2 S3 R1 RHS
Sol 0 0 0 1 1 M 5
Obj Fun
R1 1 0 0 -1 3 0 3
X2 0 1 0 0 0.5 0 1
X3 0 0 1 -1 3.5 -1 3
2x1+4x2=16
Let x1=0 , => 4x2=16 => x2=4
p11(0,4)
Let x2=0 , => 2x1=16 => x1=8
p21(8,0)
4x1+3x2=24
Let x1=0 , => 3x2=24 , => x2=8
p21(0,8)
Let x2=0 ,4x1=24 ,x1=6
p22(6,0)
Point C is the result of the intersection of the first and seconds equations
2x1+4x2=16 -----------------1
4x1+3x2=24 -------------------2
Multiply the first equation by -2
-4x1-8x2=-32 --------------1
4x1+3x2=24
Sum of equations
-5x2=-8 => x2=-8\-5 =1.6
Instead of the first equation
x1=4.8
C(4.8,1.6)
To find the optimal solution you need to find all extreme points (A,B,C).
POINTS Z
A(0,8) 24
B(0,4) 12
C(4.8,1.6) 33.6
Basic X1 X2 S1 S2 R1 RHS
Sol -6 -3 0 0 -M 0
Obj Fun
R1 2 4 -1 0 1 1
S2 4 3 0 1 0 3
Basic X1 X2 S1 S2 R1 RHS
Sol 2M-6 4M-3 -M 0 0 16M
Obj Fun
R1 2 4 -1 0 1 16
S2 4 3 0 1 0 24
16/4=4 , 24/3=8
Basic X1 X2 S1 S2 R1 RHS
Sol -4.5 0 -0.75 0 -M+0.75 12
Obj Fun
X2 0.5 1 -0.25 0 0.25 4
S2 2.5 0 0.75 1 -0.75 12
solution
Min Z -x1 +2x2 – x3 -MR1 = 0
Subject to:
1) x1 +x2 –x3 -s1+R1 = 4
2) x1 -4x2 +x3 +s2=2
3) x1,x2,x3,s1,s2,R1 >=0
Basic X1 X2 X3 S1 S2 R1 RHS
Sol -1 2 -1 0 0 -M 0
Obj Fun
R1 1 1 -1 -1 0 1 4
S2 1 -4 1 0 1 0 2
Basic X1 X2 X3 S1 S2 R1 RHS
Sol M-1 M+2 -M-1 -M 0 0 4M
Obj Fun
R1 1 1 -1 -1 0 1 4
S2 1 -4 1 0 1 0 2
4/1=4 ,2/-4=-0.5
Basic X1 X2 X3 S1 S2 R1 RHS
Sol -3 0 1 2 0 -M-2 -8
Obj Fun
X2 1 1 -1 -1 0 1 4
S2 5 0 -3 -4 1 4 18
4/-1=-4 , 18/-4=-4.5
Basic X1 X2 X3 S1 S2 R1 RHS
Sol -1 2 -1 0 0 -M 0
Obj Fun
X2 -1 -1 1 1 0 -1 -4
S2 1 -4 1 0 1 0 2
-4/-1=4 , 2/-4=-0.5
Error:
The system has no solutions or has many solutions