Linear Programing
Linear Programing
Mjdah Al Shehri
Mute ur call
TWO-VARIABLE LP MODEL
EXAMPLE:
THE GALAXY INDUSTRY PRODUCTION
Galaxy manufactures two toy models: Space Ray. Zapper. Resources are limited to 1200 pounds of special plastic. 40 hours of production time per week.
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 5
Current production plan calls for: Producing as much as possible of the more profitable product, Space Ray ($8 profit per dozen). Use resources left over to produce Zappers ($5 profit per dozen).
The current production plan consists of:
Management is seeking a production schedule that will increase the companys profit.
8
SOLUTION
Decisions variables:
X1 = Production level of Space Rays (in dozens per week). X2 = Production level of Zappers (in dozens per week). Objective Function: Weekly profit, to be maximized
10
(Weekly profit)
FEASIBLE REGION
12
13
X2 1200
The plastic constraint: The Plastic constraint 2X1+X2<=1200 Total production constraint: X1+X2<=800
Infeasible
600
X1
14
15
Start at some arbitrary profit, say profit = $2,000... X2 Then increase the profit, if possible... 1200 ...and continue until it becomes infeasib
800 600
000
1200
X2
800 600
Feasible region
400 600 800
X1
17
X2 1200
The plastic constraint: The Plastic constraint 2X1+X2<=1200 Total production constraint: X1+X2<=800
A (0,600)
600
Infeasible
B (480,240) C (550,100)
D (450,0)
X1
18
To determine the value for X1 and X2 at the optimal point, the two equations of the binding constraint must be solved.
19
The plastic constraint: 2X1+X2<=1200 2X1+X2=1200 3X1+4X2=2400 Production Time 3X1+4X2<=2400 2X1+X2=1200 X1-X2=450
X1= 480 X2= 240
(0,0)
(450,0) (480,240) (550,100)
0
3600 5040 4900
(0,600)
3000
The maximum profit (5040) will be by producing: Space Rays = 480 dozens, Zappers = 240 dozens
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 21
22
X2 1200
The plastic constraint: The Plastic constraint 2X1+X2<=1200 Total production constraint: X1+X2<=800
Infeasible
(200, 200) (550,100) * (300,0) * *
600 800
600
X1
Interior point
23
24
MORE EXAMPLE
26
Solution:
Let
x1 = tons produced daily of exterior paint x2 = tons produced daily of interior paint
Maximize z = 5 x1
+
Let z represent the total daily profit (in thousands of dollars) Objective:
4 x2
< (Maximum raw material availability)
6x1 + 4x2 tons Usage of raw material M2 per day = 1x1 + 2x2 tons - daily availability of raw material M1 is 24 tons Hamdy A. Taha, Operations Research: An introduction, Prentice Hall - daily availability of raw material M2 is 6 tons
Usage of raw material M1 per day =
28
Restrictions:
6x1
+
x1 + 2x2 < 6 (raw material M2) - Difference between daily demand of interior (x2) and exterior (x1) paints does not exceed 1 ton, so x 2 - x1 < 1 - Maximum daily demand of interior paint is 2 tons, so x2 < 2 - Variables x1 and x2 cannot assume negative values, so x1 > 0 , x2 > 0
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 29
subject to
6x1 + 4x2 < 24 (raw material M1)
Machine 5-ounce bottles 10-ounce bottles X 80/min 30/min Y 40/min 50/min - X and Y machines can run 8 hours per day for 5 days a week - Profit on 5-ounce bottle is 20 paise - Profit on 10-ounce bottle is 30 paise - Weekly production of the drink cannot exceed 500,000 ounces - Market can utilize 30,000 (5-ounce) bottles and 8000 (10ounce) bottles per week - To maximize the profit
33
Solution:
Let
x1 = number of 5-ounce bottles to be produced per week x2 = number of 10-ounce bottles to be produced per week
Objective: Maximize profit z = Rs (0.20x1 + 0.30x2) Constraints: - Time constraint on machine X, (x1/80) + (x2/30) < 8 X 60 X 5 = 2400 minutes - Time constraint on machine Y, (x1/40) + (x2/50) < 8 X 60 X 5 = 2400 minutes - Weekly production of the drink cannot exceed 500,000 ounces, 5x1 + 10x2 < 500,000 ounces - Market demand per week, x1 > 30,000 (5-ounce bottles) x2 > 8,000 (10-ounce bottles)
34
Example 2.1-3 (Production Allocation Model) Two types of products A and B Profit of Rs.4 on type A Profit of Rs.5 on type B Both A and B are produced by X and Y machines Machine Machine Products X Y A 2 minutes 3 minutes B 2 minutes 2 minutes - Machine X is available for maximum 5 hours and 30 minutes during any working day - Machine Y is available for maximum 8 hours during any working day - Formulate the problem as a LP problem.
35
Solution:
Time constraint on machine X, 2x1 + 2x2 < 330 minutes Time constraint on machine Y, 3x1 + 2x2 < 480 minutes Non-negativity restrictions are, x1 > 0 and x2 > 0
36
Complete LP model is, Maximize z = 4x1 + 5x2 subject to 2x1 + 2x2 < 330 minutes 3x1 + 2x2 < 480 minutes x1 > 0 x2 > 0
37
2.2 GRAPHICAL LP SOLUTION The graphical procedure includes two steps: 1) Determination of the feasible solution space. 2) Determination of the optimum solution from among all the feasible points in the solution space.
38
1 2 3 4 5 6
39
1 2
3
4 5 6
x2 = 2 x1 = 0 x2 = 0
40
- Plot graphs of x1 = 0 and x2 = 0 - Plot graph of 6x1 + 4x2 = 24 by using the coordinates of the equation - Plot graph of x1 + 2x2 = 6 by using the coordinates of the equation - Plot graph of x2 - x1 = 1 by using the coordinates of the equation - Plot graph of x2 = 2 by using the coordinates of the equation
41
42
43
Step 2: 2) Determination of the optimum solution from among all the feasible points in the solution space: - After finding out all the feasible half-spaces of all the 6 equations, feasible space is obtained by the line segments joining all the corner points A, B, C, D ,E and F - Any point within or on the boundary of the solution space ABCDEF is feasible as it satisfies all the constraints - Feasible space ABCDEF consists of infinite number of feasible points
44
- To find optimum solution identify the direction in which the maximum profit increases , that is z = 5x1 + 4x2 - Assign random increasing values to z , z = 10 and z = 15 5x1 + 4x2 = 10 5x1 + 4x2 = 15 - Plot graphs of above two equations - Thus in this way the optimum solution occurs at corner point C which is the point in the solution space - Any further increase in z that is beyond corner point C will put points outside the boundaries of ABCDEF feasible space
- Values of x1 and x2 associated with optimum corner point C are determined by solving the equations and
- x1 = 3 and x2 = 1.5 with z = 5 X 3 + 4 X 1.5 = 21 - So daily product mix of 3 tons of exterior paint and 1.5 tons of interior paint produces the daily profit of $21,000 .
1 2
45
46
- Important characteristic of the optimum LP solution is that it is always associated with a corner point of the solution space (where two lines intersect) - This is even true if the objective function happens to be parallel to a constraint - For example if the objective function is, z = 6x1 + 4x2 - The above equation is parallel to constraint of equation 1 - So optimum occurs at either corner point B or corner point C when parallel - Actually any point on the line segment BC will be an alternative optimum - Line segment BC is totally defined by the corner points B and C
47
48
2.2.2 Solution of a Minimization model Example 2.2-3 - Firm or industry has two bottling plants - One plant located at Coimbatore and other plant located at Chennai - Each plant produces three types of drinks Coca-cola , Fanta and Thumps-up
49
Number of bottles produced per day by plant at Coimbatore Chennai______________________ 15,000 15,000 30,000 10,000 20,000 50,000_______________________ 600 400
Market survey indicates that during the month of April there will be a demand of 200,000 bottles of Coca-cola , 400,000 bottles of Fanta , and 440,000 bottles of Thumps-up For how many days each plant be run in April so as to minimize the production cost , while still meeting the market demand?
50
Solution:
Let x1 = number of days to produce all the three types of bottles by plant
at Coimbatore
15,000 x1 + 15,000 x2 > 200,000 30,000 x1 + 10,000 x2 > 400,000 20,000 x1 + 50,000 x2 > 440,000 x1 > 0 x2 > 0
1 2 3 4 5
51
52
z = 600 x1 +
16000 8800 13200
400 x2
- In 12 days all the three types of bottles (Coca-cola, Fanta, Thumps-up) are produced by plant at Coimbatore
- In 4 days all the three types of bottles (Coca-cola, Fanta, Thumps-up) are produced by plant at Chennai - So minimum production cost is 8800 units to meet the market demand of all the three types of bottles (Coca-cola, Fanta, Thumps-up) to be produced in April
53
Sensitivity Analysis
54
55
56
800 600
Range of optimality
800 600
400
600
800
X1
58
It could be find the range of optimality for an objectives function coefficient by determining the range of values that gives a slope of the objective function line between the slopes of the binding constraints.
59
60
To find range optimality for Space Rays, and coefficient per dozen Zappers is C2= 5
Thus the slope of the objective function line can be expressed as C1/5
61
Range of optimality for C1 is found by sloving the following for C1: -2/1 -C1/5 -3/4
3.75 C1 10
62
Range optimality for Zapper, and coefficient per dozen space rays is C1= 8
Thus the slope of the objective function line can be expressed as 8/C2
63
Range of optimality for C2 is found by sloving the following for C2: -2/1 -8/C2 -3/4
4 C2 10.667
64
65
66
67
68
69
70
71
72
73
74
75
76