Linear Programming Graphical Method

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

HISTORY OF LINEAR PROGRAMMING

• Dr. George B. Dantzig in 1947 while working on research


projects for U.S. Air force
• Early applications were primarily those in Military operations but
in a few short years its applications spread to business uses.
LINEAR PROGRAMMING: Can be defined as a mathematical
method of allocating scarce resources to achieve a stated
objective when both objective and the environmental
constraints, which limit the degree of achievement of the
objective, can be stated in the form of linear equations and
inequalities.
• Linear means a fixed, definable relationship between the variables
in the problem to be solved.
• Programming refers to the orderly process by which this type of
problem is solved.
LINEAR PROGRAMMING

Example:
Consider a small business to own just one production machine with a
capacity of eight hours of work daily.
CONSTRAINT: The machine is available for only 8hrs/day

Possible
Hours/unit Profit/unit(Rs.)
product
A 2 3

B 4 7

C 1 2

D 5 6

E 3 4
LINEAR PROGRAMMING
LEVEL 1

Possible Possible Profit


product Production(units) Earned(Rs.)

A 8/2 = 4 4*3 = 12

B 8/4 = 2 2*7 = 14

C 8/1 = 8 8*2 = 16

D 8/5 = 1.6 1.6*6 =9.6

E 8/3 = 2.7 2.7*4 = 10.8


LINEAR PROGRAMMING

LEVEL 2 If two machines are required for production

Production Hours/ Unit


Product Profit/Unit
Machine 1 Machine 2

A 2 ½ 3

B 4 3 7

C 1 4 2

D 5 1 6

E 3 2 4
LINEAR PROGRAMMING

A
Machine 1 Machine 1
B
C Available Available
D for for
E 8 hrs/day 8 hrs/day

CONSTRAINTS
LINEAR PROGRAMMING

Hours/unit Max. Production Total


Product Profit/
Profit
Unit
M/c 1 M/c 2 M/c 1 M/c 2 (Rs.)

A 2 ½ 4 8 3 12.0

B 4 3 2 1.3 7 9.10

C 1 4 8 1 2 2.0

D 5 1 1.6 4 6 9.60

E 3 2 2.7 2 4 8.0
LINEAR PROGRAMMING

 Is this the maximum profit?


 Can we have combinations of productions and
maximise the profit?
Objective: Maximise Profit or Minimise Cost
when the resources have alternate uses.

Three methods of solving LP:


 Graphical method
 Algebraic method
 Simplex method
LINEAR PROGRAMMING

Graphical Method:
• Can be used for not more than 3 variables
• NOT generally used for solving real – world LP
problems
Inequalities and equations
Say 5 watches cost Rs 2500
5X = Rs 2500
X = Rs 500/-
But many business problems cannot be expressed in the
form of nice, neat equations.
LINEAR PROGRAMMING

So, specification may provide only that minimum or


maximum requirements be met.

5 watches should not cost more than/ exceed Rs 2500/-

i.e., 5X ≤ Rs 2500/-

=> Innumerable solutions

Salesman shall sell at least 100 watches target100

Point to be noted: Neither the cost < 0 or target < 0 ---


so they are non-negative.
LINEAR PROGRAMMING

Example
Manufacture produces two products,
a) Automobile engine pistons
b) Connecting rod pins
Production of each product requires processing in two
departments,
(1) The lathe department
(2) The drill press department
Department 1 has upto 32 hours available.
Department 2 can handle upto 34 hours of work
LINEAR PROGRAMMING
Contd…….
 Manufacturing one piston requires 3 hours in Dept.1
and 1 hour in Dept. 2
 Manufacturing one pin requires 2 hours in Dept.1 and 4
hours in Dept.2
 Profit contribution is Rs 5 per piston and Rs 6 per pin
 Company has no difficulty in selling all the pistons and
pins it can produce.
 Manufacturer’s problem is to determine the best
possible combination of pistons and pins to produce in
order to maximise profits.
NOTE: Possible profit is limited by time constraints in each
department
LINEAR PROGRAMMING

Piston (X1) Dept.1 Dept.2


Profit Rs 5/unit 3 hr/unit 1 hr/unit
Piston (X2)
2 hr/unit 4 hr/unit
Profit Rs 6/unit

Total hours available = 32


X1 & X2 represent optimum number of pistons & pins respectively.
Objective function:
Max. Profit P = 5X1 + 6X2
Constraints:
3X1 + 2X2 ≤ 32
X1 + 4X2 ≤ 34
Also we know that X1 and X2 are non-negative numbers
LINEAR PROGRAMMING

In mathematical form,
Maximise: P = 5X1 + 6X2
Subject to these constraints,
3X1 + 2X2 ≤ 32
X1 + 4X2 ≤ 34
X1 ≥ 0
X2 ≥ 0
Step 1 Formulate the problem mathematically
Step 2 Graph Constraint
Step 3 Test the corner points of the feasible solution.
GRAPHICAL METHOD
CONSTRAINT EQUATION 1
3X1 + 2X2 ≤ 32
Such that
X1 ≥ 0 ; X2 ≥ 0
FOR X1 = 0 X2 = 16
X2 = 0 X1 = 10⅔
X2
16 B(0,16)
14

12

10
3X1 + 2X2 ≤ 32
8

2 C(10⅔,0)
X1
A 4 8 12 16 20 24
GRAPHICAL METHOD
CONSTRAINT EQUATION 1
• Any combination of pistons & pins on line BC will use up
all the 32 hours available in Dept.1
• Example for 8 pistons & 4 pin
• Any point on left of line ( say 2,6) will result in unused
capacity
X2
16 B(0,16)
14

12

10
3X1 + 2X2 ≤ 32
8

6 (2,6)
4

2 C(10⅔,0)
X1
A 4 8 12 16 20 24
GRAPHICAL METHOD
CONSTRAINT EQUATION 1
• Any point on right of line (say 10,10) needs – exceed the number
of hours => any combination of pistons & rings which lie on right
side of line BC is not possible without violating the constraint

X2
16 B(0,16)
14

12

10 (10,10)
8
3X1 + 2X2 ≤ 32
6 (2,6)
4 (8,4)
2
C(10⅔,0)
X1
A 4 8 12 16 20 24
GRAPHICAL METHOD
CONSTRAINT EQUATION 2
X1 + 4X2 ≤ 34
Such that X1 ≥ 0 ; X2 ≥ 0

For X1 = 0 X2 = 8½
X2 = 0 X1 = 34
Similar logic for points lying on
a) the line EF
b) Left of line EF
c) Right of line EF
as that of constraint equation 1
X2
12

10
E(0,8½)
8
X1 + 4X2 ≤ 34
6
4

2 F(34,0)
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD

• In order to complete a pin or piston both departments must be used


• Our task is to find an area which is common to both areas so that the
best combination of completed pistons and pins will not exceed the
available time in either department.

X2
16 B(0,16)
14
Dept. 1
12

10
E(0,8½)
8 D
Dept. 2
6

44

2 C(10⅔,0) F(34,0)
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
• Any point outside the common area violates one or the other
constraint, or some resource remains underutilised.
For example
a) 2 pistons & 10 pins require
3(2) + 2 (10) = 26 hr of Dept.1
& 1(2) + 4(10) = 42 hr of Dept.2
X
Dept.1 underutilised & Dept.2 exceeded
2
16 B
14

12

10 (2,10)
E
8 D
6

44 (4,3)
(14,2)
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD

b) 14 pistons & 2 pins require


3(14) + 2(2) = 46 hr of Dept.1
& 1(14) + 4(2) = 22 hr of Dept.2
Dept.1 exceeds Dept.2 remains underutilised

X2
16 B
14

12

10 (2,10)
E FIGURE 6
8 D
6

44 (4,3)
(14,2)
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
What will be the most profitable combination of pistons & pins ?
Assume profit level of Rs 30
Rs 30 = Rs 5X1 + Rs 6X2
When X1 = 0 X2 = 5
& X2 = 0 X1 = 6
Check for profit level of Rs 45
X2
16 B
14 Note that all profit lines are parallel
12

10
E
8 D
6
45 = 5X1 + 6X2
4 30 = 5X1 + 6X2
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
• By going farther from the origin the value of profit function
increases

• Objective is therefore to go as far as possible from the origin, but


has one point in common with the area of feasible solutions; which
is “D” in the present case
X2
16 B
14

12
FIGURE 8

10 (3,9½) 72 = 5X1 + 6X2


E
8 D(6,7)
6
45 = 5X1 + 6X2
4 30 = 5X1 + 6X2
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD

X2

16 B

14

12

10 (3,9½) 72 = 5X1 + 6X2


E
8 D(6,7)
FIGURE 8

45 = 5X1 + 6X2
6

4 30 = 5X1 + 6X2

2 C F
X1
A 4 8 12 16 20 24 28 32 36
LINEAR PROGRAMMING

Exchange Rates
Move/ Examine the four corner points
A(0,0) - No pin, no piston, no profit

C(10, ⅔) - Profit = 5*10⅔ + 6*0


= Rs 53.33
• Maximum no. of pistons processed in Dept.1 and
all 32 hours are utilised.

Towards D Moving from point C to D will require


giving up the production of some pistons and add
production of pins.
LINEAR PROGRAMMING

- How many pins can be added against each piston


i.e., 10⅔ 9⅔
3X1 + 2X2 = 32
 3(9⅔) + 2X2 = 32
 X2 = 1½
- By giving up one piston, we can make 1½pins
Profit gained by making 1½ pins Rs 6(1½ ) = Rs 9
Profit lost by giving up 1 piston Rs 5(1) = Rs 5
Rs 4
LINEAR PROGRAMMING

Piston Pin Rs 53.33

10⅔ 0
1 1½ Rs 4
9⅔ 1½
1 1½ Rs 4
8⅔ 3
1 1½ Rs 4
7⅔ 4½
1 1½ Rs 4
6⅔ 6
Rs 69.33

6 7  Rs 72
LINEAR PROGRAMMING

• If we move from D to E total profit will decrease.


• Line DE represents capacity restriction of Dept.2
• For giving up production of 1 piston adding pin.
X1 + 4X2 = 34
5 + 4X2 = 34
 X2 = 29/4
= 7 pin
Profit due to pin = Rs 1.5
Loss due to 1 piston = Rs 5.00
Net loss = Rs 3.50
ALTERNATE OPTIMA
Many different combinations yielding the same maximum profits

 What effect would a change in the profit contribution of each product have on the
feasible solution area? Or, did the objective function play any part in defining the
area of feasibility solutions? NO

X2
16 B
14

12

10
3X1 + 12X2 = 102
E
8 D
6 3X1 + 12X2 = 48
4

2
C F
X1
A 4 8 12 16 20 24 28 32 36
ALTERNATE OPTIMA
 Can any change in the objective function alter the combination of pistons & pins?
Assume profit contribution is Rs 3 per piston and Rs 12 per pin
P = Rs 3X1 + Rs 12X2
Points Profit
A(0,0) 3(0)+12(0) =0

X2 E(0,8½) 3(0)+12(8½) = 102


16 B C(10⅔,0) 3(10⅔)+12(0) = 32
14 D(6,7) 3(6)+12(7) = 102
12
FIGURE 9

10
3X1 + 12X2 = 102
E NOTE: All points on line ED,
8 D
represent diff. combinations of
6 3X1 + 12X2 = 48
pistons & pins yield the same
4 maximum profit.
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
• Assume that the pistons and pins had to be processed in a third department having 60 hours
available.
• A piston requires two hours and a pin requires four hours in the third department.
Third Constraint: 2X1 + 4X2 ≤ 60 (Dept.3)

X2 • The manufacturer has more has


16 B enough time in Dept.3 to make any
of the possible combinations in the
14
AEDC.
12
FIGURE 10

Dept. 1 • Thus the third constraint is


10 ‘redundant’; it is not a key factor in
E Dept. 3 this problem can be ignored.
8 D
6
Dept. 2
44

2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD

A minimisation problem
Objective function is to minimise costs subject to certain constraints.
Suppose an animal food company has developed a new dog food consisting of
two ingredients, A and B, which cost Rs 3 and Rs 5 per pound respectively.
Each pound of ingredient A contains 6 units of protein, 2 units of fat and 2
units of carbohydrate.
Each pound of ingredient B contains 2 units of protein, 4 units of fat and 10
units of carbohydrates.
Each bag of the dog food should contain at least 18 units of protein, 16 units of
fat and 20 units of carbohydrates
Company’s problem is to find the best combination of ingredients A and B
which will meet the minimum requirements of protein, fat and carbohydrate at
the least cost
GRAPHICAL METHOD - minimisation problem

Units of Nutrients in
Ingredients Min units
Nutrients of Nutrient
A (Rs 3/lb) B (Rs 5/lb) required

Protein 6 2 18

Fat 2 4 16

Carbohydrate 2 10 20
GRAPHICAL METHOD - minimisation problem
• Let optimum combination of A & B = X1 & X2
• Minimise Cost C = Rs 3X1 + Rs 5X2
subject to constraints of
6X1 + 2X2 ≥ 18 units of protein
2X1 + 4X2 ≥ 16 units of fat
2X1 + 10X2 ≥ 20 units of carbohydrates
X1 ≥ 0 X2 ≥ 0
• Graph the equations of constraints
• Test the corner points of the feasible solutions area
o When both types of inequalities are involved
o When besides inequalities; equality also is involved
o Problem with no feasible solutions
o A three-dimensional problem
GRAPHICAL METHOD - minimisation problem

• Constraint Equation 1 (for minimum quantity of protein)

6X1 + 2X2 ≥ 18

X2  Inequality represents a lower boundary


for the feasible solutions.
9

6
6X1 + 2X2 ≥ 18
5

X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD - minimisation problem
• With the objective function C = Rs 3X1 + Rs 5X2
Least cost combinations will be at points
A(0,9) : Rs 3(0) + Rs 5(9) = Rs 45
B(2,3) : Rs 3(2) + Rs 5(3) = Rs 21
X2 C(6 ⅔ ,⅔) : Rs 3(6 ⅔) + Rs 5(⅔) = Rs 23.33
D(10,0) : Rs 3(10) + Rs (0) = Rs 30
9
A(0,9)

6
AREA OF FEASIBLE
SOLUTIONS
5

4
B(2,3)
3

2 C(6⅔, ⅔)
1 D(10,0)
X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD - minimisation problem
• Optimum solution is at point B(2,3)
i.e., 2 lb of ingredient A, 3 lb of ingredient B
Thus each bag will weigh 5 lb,
So cost per pound = Rs 21/5 = Rs 4.20
X2 Examine the constraint function
Protein 6X1 + 2X2 = 18 units/ 5 lb bag
9 A
Fats 2X1 + 4X2 = 16 units/5 lb bag
8
Carbohyd. 2X1 + 10X2 = 34 units/5 lb bag > 20 units
7 reqd.
FIGURE 13

6
 Observe that if excess of
5
carbohydrate is reduced – cost
4 increases
B
3

2
C
1
3X1 + 5X2 = 21 D
X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD
• When both types of inequalities are involved
Maximise P = Rs 2X1 + Rs 1X2
Subject to:
3X1 + 4X2 ≤21

X2 6X1 + 5X2 ≤ 30
4X1 + 6X2 ≥ 24
9

8 FEASIBLE SOLUTION AREA


7

6 6X1 + 5X2 ≤ 30
5
3X1 + 4X2 ≤21
4

3
4X1 + 6X2 ≥ 24
2

X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD
• If one of the constraints in a problem is represented by an
equality (instead of inequality)
• Add a constraint 7X1 + 2X2 = 14 to the previous problem

X2
The feasible solution area
9
reduces to a line segment KE
8 7X1 + 2X2 = 14
7

5
K FEASIBLE SOLUTION AREA
4

3
E
2

X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD

PROBLEM WITH NO FEASIBLE SOLUTION


• For example, constraint equations are
4X1 + 3X2 ≤ 12
X2 5X1 + 6X2 ≥ 30
There is no area common to both.
9

4 5X1 + 6X2 ≥ 30
3

1 4X1 + 3X2 ≤ 12 FIGURE 16


1 2 3 4 5 6 7 8 9 10 X1
GRAPHICAL METHOD – a 3-dimensional problem

Maximise P = Rs (5X1 + 6X2 + 7X3)


Subject to: X1 + 2X2 + 3X3 ≤ 11 (Dept.1)
3X1 + X2 + X3 ≤ 10 (Dept.2)
X1 + 4X2 + X3 ≤ 15 (Dept.3)
Products X1, X2, X3 ≥ 0

X2

(0,5½,0) FIGURE 17
5

5
10
(0,0,3⅔)
5
10 (11,0,0)
X1
X3
GRAPHICAL METHOD – a 3-dimensional problem

X2

10
3X1 + X2 + X3 ≤ 10
X1 + 2X2 + 3X3 ≤ 11
5

5
5 10
15
10
15
X1
X3 X1 + 4X2 + X3 ≤ 15
FIGURE 18
GRAPHICAL METHOD – a 3-dimensional problem

X2

10
3X1 + X2 + X3 ≤ 10
X1 + 2X2 + 3X3 ≤ 11
5

5
5 10
(2,3,1) 15
10
15
X1
X3 X1 + 4X2 + X3 ≤ 15
FIGURE 18
GRAPHICAL METHOD – a 3-dimensional problem

• The solid represents the feasible solution

• Each point inside or on the surface of the solid satisfies


the three constraints of the problem
GRAPHICAL METHOD – a 3-dimensional problem

X2
PLOTS OF PROFIT PLANES

P = Rs 5X1 + Rs 6X2 +Rs


5 7X3
P = Rs 15
P = Rs 25
P = Rs 35

5
5

X1
X3
FIGURE 19
GRAPHICAL METHOD – a 3-dimensional problem

PLOTS OF PROFIT PLANES

P = Rs 5X1 + Rs 6X2 +Rs 7X3

Profit Plane where P = Rs 35 will just touch the


remote corner of the solid at the point (2,3,1)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy