MPD445 - Lecture 02 - 252
MPD445 - Lecture 02 - 252
DEPARTMENT
4th year Production
MDP445
Computer in Planning,
Analysis and Control
Lecture: 2
Computer in Planning:
Linear Programming
Figure: Objective
function values at
each extreme
point of the
feasible region
Linear Programming (LP):Graphical Method
Step 5: For the objective function, draw straight line, called as
isoprofit/isocost line. This may be done by equating the objective
function to a very small profit figure or a high cost figure depending
upon the nature of the objective function, i.e., maximization or
minimization respectively.
Linear Programming (LP):Graphical Method
Step 6: Draw parallel lines to the isoprofit
line in maximization problem: moving away
from the origin. Stop only when there is only
one point_ in the feasible region, which is
also on the isoprofit line.
For the minimization problem, draw parallel
lines to the isocost line and move towards
the origin. Stop when there is only, one
point in the feasible, region which is also on
the isocost line.
Step 7: This point represents optimal
solution. From the optimal solution point,
draw perpendicular lines on both axes (X
and Y axes). The point of intersection on the
axis will give the values of two variables
which give optimal solution.
Example:
A company is manufacturing two different types of products, A and B.
Each product has to be processed in 3 different departments casting,
machining and finally quality inspection. The capacity of the
departments is limited to 35, 32, and 24 hrs./week respectively. Product
A requires 7 hrs., in casting department, 8 hrs., in machining shop and 4
hrs. in inspection, whereas product B requires 5 hrs., 4 hrs., and 6 hrs.,
respectively in each shop. The profit contribution for a unit product of A
and B is $40 and $30 respectively.
A. Formulate the LP problem and solve the problem by graphical
method.
B. Solve the LPP by using QM software.
C. Create a spreadsheet model for this problem, write the different
formula, and solve it using Solver.
D. By using the coordinates of corner points for feasible solution area in
part (A), write the C++ program to find the optimal quantities of
product A and B and the total profit contribution.
Solution:
Processing time by product and department:
a) Formulation of problem:
1) Decision variables:
Let X1 = number of units from product A.
X2 = the number of units from product B.
2) Objective function:
The objective function, to be maximized:
Z = 40X1 + 30X2
Solution:
3) Constraints:
7X1 + 5X2 ≤ 35 (1)
8X1 + 4X2 ≤ 32 (2)
4X1 + 6X2 ≤ 24 (3)
Also, X1 ≥ 0 and X2 ≥0
Constraint (3):
Assume 4X1 + 6X2 = 24, then
(X1, X2) = (6,4)
The optimal profit (maximum) is at point N; when (X1, X2) is (3, 2).
Hence, 3 units of A and 2 units of B should be manufactured.
Flow chart
Solution:
Solution:
Solution:
The input and the final results screen:
END
Lecture
You can win, if you want