You are on page 1of 9

Computer Applications in Mechatronics

Prepared by / Mohammed Ali Mohammed Lotfy


{400 Mechatronics}

Supervisor / Prof Ahmed A. Megahed

Assignment 1: Optimization
1- A company which operates 10 hours a day manufactures two products on three sequen
processes. The following table summarizes the data of the problem:

Formulate the problem as a linear program to find the optimal mix of the two
products to maximize the total return.
Maximize Optimum solution Z = 2X1 + 3X2
Subject to:
10 X1 +5 X2 ≤ 600
6 X1 +20 X2 ≤ 600
8 X1 +10 X2 ≤ 600
X1 ≥ 0 , X2 ≥ 0

C
A B
At A= (0,0) Za = 0
At B = (60,0) Za =(2×60)= 120
At D = (0,30) ZD = (3×30)= 90
At C:
From Solving the two Equations 10 X1 +5 X2 ≤ 600
6 X1 +20 X2 ≤ 600

∴ X1 = 52.941 , X2 =14.128
ZC = 148.266
Optimum mix is at point C.

2- Consider the following LP problem:


Maximize z = 5𝑋1 + 4𝑋2

Subject to:
6𝑋1 + 4𝑋2 ≤ 24
𝑋1 + 2𝑋2 ≤ 6
−𝑋1 + 𝑋2 ≤ 1
𝑋2 ≤ 2
𝑋1 ≥ 0, 𝑋2 ≥ 0
(a) Determine the solution space graphically.
(b) Identify all the feasible and infeasible extreme points of the solution space.
(c) Find the optimum solution from the solution space.

(a)
(b) (0,0) A feasible
(0,2) B feasible
(2,2) C feasible
(3,1.5) D feasible
(4,0) E feasible
(0,1) F feasible
(6,0) infeasible
(−1,0) infeasible
(0,3) infeasible
(0,6) infeasible

At A= (0,0) ZA = 0
At B = (0,2) ZB = (4×2) = 8
At F = (0,1) ZF = (4×1)= 4

At D:
From Solving the two Equations 6 X1 +4 X2 ≤ 24
X1 +2 X2 ≤ 6

∴ X1 =3 , X2 =1.5

ZD = (5×3) +(4×1.5) = 21
At C:
From Solving the two Equations X2 ≤ 2
X1 +2 X2 ≤ 6
∴ X1 = 2 , X2 = 2

ZC = (5×2) +(4×2) = 18

Optimum mix is at point D.

ZD =21
X1 =3 , X2 =1.5

3- Determine the optimum solution for the following LP problem using simplex
method:

Minimize Z = 5X1 − 4X2 + 6X3 − 8X4

subject to:
X1 + 2X2 + 2X3 + 4X4 ≤ 40
2X1 – X2 + X3 + 2X4 ≤ 8
4X1 – 2X2 + X3 – X4 ≤ 10
X1 , X 2 , X 3 , X 4 ≥ 0
Solution
Maximize Z = −5X1 + 4X2 − 6X3 + 8X4
subject to:
X1 + 2X2 + 2X3 + 4X4 ≤ 40
2X1 – X2 + X3 + 2X4 ≤ 8
4X1 – 2X2 + X3 – X4 ≤ 10
X1 , X 2 , X 3 , X 4 ≥ 0
Standard Form:

Z + 5X1 − 4X 2 + 6X 3 − 8X 4 = 0
X1 + 2X 2 + 2X 3 + 4X 4 +S1 = 40
2X1 – X 2 + X 3 + 2X 4 +S2 = 8
4X1 – 2X 2 + X 3 – X 4 +S3 = 10
𝑧𝑚𝑎𝑥 = 80 At X 2 = 6 , X 4 =7

Verify solution using EXCEL software.


4- Form the dual problem for the following primal LP problem:
Minimize w = 16 X1 + 9 X2 + 21 X3
subject to:
X1 + X2 + 3X3 ≥ 12
2X1 + X2 + X3 ≥16
X1 , X 2 , X 3 ≥ 0

Then find the optimum solution of the dual problem using either TORA software or
Solver Add-in of Microsoft Excel.

Solution
1-construct a matrix for the problem as:
1 1 3 12
[2 1 1 16]
16 9 21 1

2-The transpose of the matrix is created by switching the rows and columns
1 2 16
1 1 9
[ ]
3 1 21
12 16 1

Maximize w = 12 X1 + 16 X2
subject to:
X1 + 2 X2 ≤ 16
X1 + X 2 ≤ 9
3X1 + X2 ≤ 21
X1 , X 2 ≥ 0

Standard Form:
W − 12X1 − 16X2 = 0
X1 + 2X2 +S1 = 16
X1 + X2 +S2 = 9
3X1 + X2 +S3 = 12
BASIC X1 X2 S1 S2 S3 RHS
W 0 0 4 -1 0 136
X2 0 1 1 2 0 7
X1 1 0 -1 1 0 2
S3 0 0 -0.1 -0.8 1 12.2

Verify solution using EXCEL software

You might also like