Linear Programming
Linear Programming
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
Linear programming:
Linear programming involves the planning of activities to obtain an
optimum result, i.e a result that reaches the specified goal best (according to the
mathematical model) among all feasible alternatives.
Subject to,
Where,
aij xj ≤ bi i = 1, 2, 3,…………m
j = 1, 2, 3,………….n
xj ≥ 0
Where,
i = refers to ith resources
j = jth activity
bi = available amount of resource, i
aij = amount of resource i that must be denoted to activity, j
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
cj = worth/ cost per unit activity, j
xj = decision variable
m = number of constraints
n = number of decision variables
Characteristics of standard form of linear programming:
Three characteristics of standard form
1. All decision variables are non-negative;
2. All constraints are of the less than or equal to type and
3. The objective function is maximization.
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
C. Matrix standard form of linear programming:
Max Z = C X
Subject to, constrains A X ≤ b
X ≥0
Where, X =
[] b=
[]
A=
[ ]
C = [ C1 C2 . . . Cn ]
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
For example, in the general LP problem, the net return per unit of Xj produced is cj. If
the solution uses one unit of Xj, then cj units of return are earned, and if 100 units are
produced, then returns are 100cj. Under this assumption, the total contribution of Xj
to the objective function is always proportional to its level.
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
▪ A large variety of problems in diverse field be represented or at least
approximated as linear programming model.
▪ Efficient techniques for solving linear programming problems are available.
▪ Ease through which data variation (sensitivity analysis) can be handled
through linear programming model.
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
Liner programming formulation
1. A Farm grows Jute and Wheat on its 500 acre of land. An acre of Jute brings Tk.
100 profit and an acre of Wheat brings Tk. 200 profit. Because of Govt. regulation
no more than 200 acres can be planted in Jute. During the planting season 1200
man-hrs of planting time will be available. Each acre of Jute requires 2 man-hrs
while each acre of Wheat requires 6 man-hrs. How many acres of Jute and how
many acres of Wheat should be planted in order to maximum profit.
Solution:
Let,
X1 = amount of land for Jute, acre
X2 = amount of land for Wheat, acre
Objective function,
Maximize profit P = 100X1 + 200X2
Subject to,
X1 + X2 ≤ 500
X1 ≤ 200
2 X1 + 6 X2 ≤ 1200
X1, X2 ≥ 0
2. A manufacturing firm has three departments, namely cutting, mixing and packing
departments to produce two products, A and B. The product A and B are sold to
the market with net profit of Tk. 40 per ton and Tk. 30 per ton respectively. Each
ton of product A requires 30 minutes for cutting, 20 minutes for packing. Each ton
of product B requires 60 minutes for mixing, 40 minutes for packing. The daily
capacities of the manufacturing plant are 8 hours. Determine the optimum
quantity of A and B to be produced per day to maximize profit.
Solution:
Let,
X1 = amount of product A to be produced per day, ton
X2 = amount of product B to be produced per day, ton
Objective function,
Maximize profit P = 40X1 + 30X2
Subject to,
½ X1 + 0 X2 ≤ 8
0 X1 + 1 X2 ≤ 8
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
⅓ X1 + ⅔X2 ≤ 8
X1, X2 ≥ 0
3. Two foods A and B contain Calcium, protein and Calories. Each kg of food A
contains 10 units of calcium, 5 units of protein and 2 units of calories. Each kg of
food B contains 4 units of calcium, 5 units of protein and 6 units of calories. The
minimum daily requirement of calcium, protein and calories are 20 units, 20 units
and 12 units respectively. The cost of food A and B if Tk. 0.6 /kg and Tk. 1 /kg.
Determine the optimum amount of each food combination, which will satisfy the
specified nutritional requirements and minimize the total cost of the diet.
Solution:
Let,
X1 = amount of food A to be consumed per day, kg
X2 = amount of food B to be consumed per day, kg
Objective function,
Minimum cost C = 0.6X1 + 1.0X2
Subject to,
10 X1 + 4 X2 ≥ 20
5 X1 + 5 X2 ≥20
2 X1 + 6 X2 ≥ 12
X1, X2 ≥ 0
4. The management of Padma Oil Company has received orders from Bangladesh
Railway to supply 600 units of diesel and 500 units gasoline. Padma Oil Company
has two processes that can be used (process A and process B ) for manufacturing
of diesel and gasoline. One hour of process A produces 5 units of diesel and 10
units of gasoline. One hour of process B produces 8 units of diesel and 6 units of
gasoline. Process A uses a particular combination of crude’s which cost Tk. 7 per
hour, Process B uses a different combination of crude’s which cost Tk. 9.20 per
hour. Find the optimal mix of process A and Process B.
Solution:
Let,
X1 = No. of hrs process A to be run
X2 = No. of hrs process B to be run
Objective function,
Minimum cost C = 7X1 + 9.2X2
Subject to,
5 X1 + 8 X2 = 600
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
10 X1 + 6 X2 = 500
X1 , X2 ≥ 0
Hints:
Availability / Daily capacity / More than use ≤
Minimum / must produced / Minimum daily requirement use ≥
Supply / The company has use =
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
Liner programming Simplex method solution
P 1 1 0 0 25 0 15 760
X1 2 0 1 0 1 0 0 16
Y2 3 0 0 0 1/2 1 - 1/2 4
X2 4 0 0 1 - 1/2 0 1/2 4
There are no negative values in step 3 so this is the optimum solution,
P = 760, X1 = 16, X2 = 4, Y1 = 0, Y2 = 4 and Y3 = 0
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
Sensitivity Analysis:
In general means, the relative magnitude of change in the measure of merit
caused by one or more changes in estimated elements or variables.
If the resource of constraint no. 1 be changed from 16 to 17 what would be the new
value of P?
Answer:
In the step 3,
The equation number 1 shows the value of Y1 is 25. Therefore,
Profit, P = 760+25 =785
Duality:
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
2. Maximize profit Z = 4X1 + 3X2 + 7X3
Subject to,
2X1 + X2 + 3X3 ≤ 120
X1 + 3X2 + 2X3 = 120
X1, X2, X3 ≥ 0
Find the optimum value of X1, X2, and X3 for maximization of profit Z?
Solution:
Z - 4X1 -3X2 -7X3 - 0X4 + MX5 = 0----------(1)
Subject to,
2 X1 + X2 + 3X3 +X4 =120--------(2)
X1 + 3X2 +2X3 +X5 =120 --------(3)
X1, X2, X3, X4 ≥ 0; X5 = 0
B.V E.N Z X1 X2 X3 X4 X5 R.H.S Ratio
1 1 -4 -3 -7 0 M 0
Unadjusted 2 0 2 1 3 1 0 120
3 0 1 3 2 0 1 120
EV
Z 1 1 -4-M -3-3M -7-2M 0 0 -120M -
X4 2 0 2 1 3 1 0 120 120
X5 3 0 1 3 PE 2 0 1 120 40 (mini.)
EV
Z 1 1 -3 0 -5 0 1+M 120 -
X4 2 0 5/3 0 7/3 PE 1 -1/3 80 240/7(mini.)
X2 3 0 1/3 1 2/3 0 1/3 40 60
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
3. Maximize profit Z = 3X1 + 5X2
Subject to,
X1 ≤ 4
X2 ≤ 6
3X1 +2X2 ≥ 18
X1, X2 ≥ 0
Find the optimum value of X1, X2 for maximization of profit Z?
Solution:
Z - 3X1 - 5X2 - 0 X3- 0 X4- 0 X5 +MX6 = 0 --------------(1)
Subject to,
X1 +X3 = 4 --------------(2)
X2 +X4 = 6 --------------(3)
3X1 + 2X2 -X5 +X6 = 24 ------------(4)
X1, X2, X3, X4, X5 ≥ 0; X6 = 0
Z 1 1 0 0 3 5 0 M 42
X1 2 0 1 0 1 0 0 0 4
X5 3 0 0 0 3 2 1 -1 6
X2 4 0 0 1 0 1 0 0 6
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
Assignment
1. Graphical Solution:
Maximize profit P = 40X1 + 30X2 Minimize cost, C = 0.6Y1 +Y2
Subject to, Subject to,
X1 ≤ 16 10Y1 +4Y2 ≥ 20
X2 ≤ 8 5Y1+5Y2 ≥ 20
X1 +2X2 ≤ 24 2Y1 +6Y2 ≥ 12
X1, X2 ≥ 0 Y1, Y2 ≥ 0
2. Simplex Method:
a. Maximize profit P = 2X1 + 5X2 b. Maximize profit P = 100X1 + 200X2
Subject to,
Subject to,
X1 + X2 ≤ 500
X1 ≤ 4
X1 ≤ 200
X2 ≤ 3
2 X1 + 6 X2 ≤ 1200
X1 +2X2 ≤ 8 X1, X2 ≥ 0
X1, X2 ≥ 0
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU
1. A food processing plant manufactures hotdog and burger. They grind their own flour for the
burger at a maximum rate of 200 kg per week. Each burger requires 0.1 kg of flour. They
currently have a contract with Macdonald Co. which specifies that a delivery of 800 kg of beef
is delivered every Monday. Each hotdog requires 0.25 kg of beef. Five employees working full
time (40 hours per week). Each hotdog requires 3 minutes of labour and each burger requires 2
minutes of labour. Each hotdog yields a profit of Tk. 0.20 and each burger yields a profit of Tk.
0.10. The company wants to know how many hotdogs and burger they should produce each
week to achieve the highest possible profit.
2. A manufacturer produces three products A, B and C. Each product can be produced on either of
the two machines I and II. The time required to produce one unit of each product on a machine
is given in the table.
Time to produce one unit (hrs)
Product
Machine I Machine II
A 0.5 0.6
B 0.7 0.8
C 0.9 1.05
There are 850 hours available on each machine. The operating cost is Tk. 5/hr for Machine I
and Tk. 4/hr for Machine II. The market requirements are at least 90 units of A, at least 80 units
of B and at least 60 units of C. The manufacturer wishes to meet the requirement at minimum
cost. Formulate this problem as LP problem.
3. A farmer has a 100 acre farm. He can sell the tomatoes, lettuces and radishes, he can rise. The
prices he can obtain at Tk. 1 per kg of tomatoes, Tk. 0.75 per head of lettuces and Tk. 2 per kg
of radishes. The average yield per acre is 2000 kg of tomatoes, 3000 heads of lettuce and 1000
kg of radishes. Fertilizer is available 1000 kg at price of Tk. 0.50 per kg for this season’s. The
amounts required per acre are 100 kg each for tomatoes and lettuce and 50 kg for radishes.
Labour required for sowing, cultivating and harvesting per acre are 5 man-days for tomatoes
and radishes and 6 man-days for lettuce. A total of 400 man-days of labour available at Tk. 20
per man-day. Formulate an LP model for this problem in order to maximize the farmer’s total
profit.
Dr. Md. Ashik-E-Rabbani, Professor, Department of Farm Power and Machinery, BAU