Sie sind auf Seite 1von 52

Linear Programming

Graphical Method

Hassan Rana

HSR 1
HSR 2
Linear Programming
Graphical Method

3
HSR 3
Graphical Method • Linear programming problems with two
variables can be represented and solved
graphically with ease.
• Though in real-life, the two variable problems
are practiced very little, the interpretation of
this method will help to understand the
simplex method.

4
HSR 4
Graphical Method Constructing the LP problem requires four
steps:
• Step 1. Define the decision variables.
• Step 2. Define the objective function.
• Step 3. Determine the constraints.
• Step 4. Declare sign restrictions.
• Step 5. Find the SOLUTION.
• Step 4. Report the results.

5
HSR 5
Finding SOLUTION

6
HSR 6
Finding SOLUTION • Draw all Constraints and Sign Restrictions
• Find Feasible Region
• It represents the set of all feasible solutions
to an LP problem
• Calculate Optimal Solution
• Optimal Solution will be that point in the
feasible region that maximizes or minimize
the objective function.

7
HSR 7
Example

8
HSR 8
• Find numbers x1 and x2 that maximize the sum of two
variables x1and x2; subject to following constraints:
x1 ≥ 0
x2 ≥ 0
x1 + 2 x2 ≤ 4
4x1 + 2 x2 ≤ 12
−x1 + x2 ≤ 1

HSR 9
Objective function
• The objective is to maximize the sum of two numbers
Max S = x1+ x2

Constraint Change to Equalities


x1 + 2 x2 ≤ 4 x1 + 2 x2 = 4
4x1 + 2 x2 ≤ 12 4x1 + 2 x2 = 12
−x1 + x2 ≤ 1 −x1 + x2 = 1
x1 ≥ 0 x1 = 0
x2 ≥ 0 x2 = 0

HSR 10
x2

2
x1 + 2 x2 ≤ 4

x1
-1 0 1 2 3 4 5 6
-1
HSR 11
x2

6
4x1 + 2 x2 ≤ 12
5

x1
-1 0 1 2 3 4 5 6
-1
HSR 12
x2

6
−x1 + x2 ≤ 1
5

x1
-1 0 1 2 3 4 5 6
-1
HSR 13
x2

x1 ≥ 0
7

x1
-1 0 1 2 3 4 5 6
-1
HSR 14
x2

x2 ≥ 0
x1
-1 0 1 2 3 4 5 6
-1
HSR 15
x2

x1 ≥ 0
7

6
4x1 + 2 x2 ≤ 12
−x1 + x2 ≤ 1
5

S = x1+ x2 3

2 P3

1 P2 x1 + 2 x2 ≤ 4
P4 x2 ≥ 0
x1
-1 0 P1 1 2 3 P5 4 5 6
-1
HSR 16
x2

x1 ≥ 0
7

6
S = x1+ x2 4x1 + 2 x2 ≤ 12
−x1 + x2 ≤ 1
5

2 P3

1 P2 x1 + 2 x2 ≤ 4
P4 x2 ≥ 0
x1
-1 0 P1 1 2 3 P5 4 5 6
-1
HSR 17
x2

x1 ≥ 0
7

6
S = x1+ x2 4x1 + 2 x2 ≤ 12
−x1 + x2 ≤ 1
5

2 P3

1 P2 x1 + 2 x2 ≤ 4
P4 x2 ≥ 0
x1
-1 0 P1 1 2 3 P5 4 5 6
-1
HSR 18
Objective function
• The objective is to maximize the sum of two numbers
Max S = x1+ x2

P1 

P2 

P3 

P4 

P5 
HSR 19
Objective function
• The objective is to maximize the sum of two numbers
Max S = x1+ x2

x1 = 0
P1  x2 = 0
−x1 + x2 = 1
P2  x =0
1

−x1 + x2 = 1
P3  x + 2 x = 4
1 2

4x1 + 2 x2 = 12
P4  x + 2 x = 4
1 2

4x1 + 2 x2 = 12
P5 
x2 = 0
HSR 20
Objective function
• The objective is to maximize the sum of two numbers
Max S = x1+ x2

x1 = 0
P1  x2 = 0  (0, 0)
−x1 + x2 = 1
P2  x =0  (0, 1)
1

−x1 + x2 = 1
P3  x + 2 x = 4  (2/3, 5/3)
1 2

4x1 + 2 x2 = 12
P4  x + 2 x = 4  (8/3, 2/3)
1 2

4x1 + 2 x2 = 12
P5   (3, 0)
x2 = 0
HSR 21
Objective function
• The objective is to maximize the sum of two numbers
Max S = x1+ x2

x1 = 0
P1  x2 = 0  (0, 0)  S=0
−x1 + x2 = 1
P2  x =0  (0, 1)  S=1
1

−x1 + x2 = 1
P3  x + 2 x = 4  (2/3, 5/3)  S = 7/3
1 2

4x1 + 2 x2 = 12
P4  x + 2 x = 4  (8/3, 2/3)  S = 10/3
1 2

4x1 + 2 x2 = 12
P5   (3, 0)  S=3
x2 = 0
HSR 22
Objective function
• The objective is to maximize the sum of two numbers
Max S = x1+ x2

x1 = 0
P1  x2 = 0  (0, 0)  S=0
−x1 + x2 = 1
P2  x =0  (0, 1)  S=1
1

−x1 + x2 = 1
P3  x + 2 x = 4  (2/3, 5/3)  S = 7/3
1 2

4x1 + 2 x2 = 12
P4  x + 2 x = 4  (8/3, 2/3)  S = 10/3
1 2

4x1 + 2 x2 = 12
P5   (3, 0)  S=3
x2 = 0
HSR 23
Example

HSR 24
Model Formulation • Par, Inc., is a small manufacturer of golf
equipment and supplies whose management has
decided to move into the market for medium- and
high-priced golf bags. Par’s distributor is
enthusiastic about the new product line and has
agreed to buy all the golf bags Par produces over
the next three months.
• After a thorough investigation of the steps
involved in manufacturing a golf bag,
management determined that each golf bag
produced will require the following operations:
‒ Cutting and dyeing the material
‒ Sewing
‒ Finishing (inserting umbrella holder, club
separators, etc.)
‒ Inspection and packaging
HSR 25
Model Formulation • The director of manufacturing analyzed each of
the operations and concluded that if the company
produces a medium-priced standard model, each
bag will require ⁷⁄₁₀ hour in the cutting and dyeing
department, 1⁄₂ hour in the sewing department, 1
hour in the finishing department, and 1⁄₁₀ hour in
the inspection and packaging department. The
more expensive deluxe model will require 1 hour
for cutting and dyeing, ⁵⁄₆ hour for sewing, 2⁄₃ hour
for finishing, and 1⁄₄ hour for inspection and
packaging.

HSR 26
Model Formulation • Par’s production is constrained by a limited
number of hours available in each department.
After studying departmental workload projections,
the director of manufacturing estimates that 630
hours for cutting and dyeing, 600 hours for
sewing, 708 hours for finishing, and 135 hours for
inspection and packaging will be available for the
production of golf bags during the next three
months.

HSR 27
Model Formulation • The accounting department analyzed the
production data, assigned all relevant variable
costs, and arrived at prices for both bags that will
result in a profit contribution of $10 for every
standard bag and $9 for every deluxe bag
produced.

HSR 28
Understand the problem thoroughly.

HSR 29
Describe the objective
• The objective is to maximize the total contribution to
profit
Max P = 10S + 9D

HSR 30
Describe each constraint
• Constraint 1: Number of hours of cutting and dyeing time
used must be less than or equal to the number of hours of
cutting and dyeing time available.
• Constraint 2: Number of hours of sewing time used must
be less than or equal to the number of hours of sewing
time available.
• Constraint 3: Number of hours of finishing time used must
be less than or equal to the number of hours of finishing
time available.
• Constraint 4: Number of hours of inspection and
packaging time used must be less than or equal to the
number of hours of inspection and packaging time
available
• Constraint 5: Par cannot produce a negative number of
standard or deluxe bags S>0 , D>0
HSR 31
Define the decision variables
• Controllable Inputs
1) Number of standard bags produced, and
2) Number of deluxe bags produced.
• Assumptions - Let
• S = number of standard bags
• D = number of deluxe bags
• Decision variables
In linear programming terminology, S and D are decision
variables

HSR 32
Write the objective in terms of the decision variables
• Par’s profit contribution comes from two sources:
(1) the profit contribution made by producing S standard
bags, &
(2) the profit contribution made by producing D deluxe
bags.
• If Par makes $10 for every standard bag, the company will
make $10S if S standard bags are produced. Also, if Par
makes $9 for every deluxe bag, the company will make $9D
if D deluxe bags are produced.
Total Profit Contribution = 10S + 9D
• Because the objective—maximize total profit contribution—
is a function of the decision variables S and D, we refer to
10S + 9D as the objective function. Using “Max” as an
abbreviation for maximize, we write Par’s objective as
follows:-

HSR
Max 10S + 9D 33
Write the constraints in terms of the decision variables.
• Constraint 1: Number of hours of cutting and dyeing time used
must be less than or equal to the number of hours of cutting and
dyeing time available

• Every standard bag Par produces will use ⁷⁄₁₀ hour cutting and
dyeing time; therefore, the total number of hours of cutting and
dyeing time used in the manufacture of S standard bags is ⁷⁄₁₀S.
• In addition, because every deluxe bag produced uses 1 hour of
cutting and dyeing time, the production of D deluxe bags will
use 1D hours of cutting and dyeing time.

HSR 34
Write the constraints in terms of the decision variables.
• Constraint 1: ---
• Thus, the total cutting and dyeing time required for the
production of S standard bags and D deluxe bags is given by
Total hours of cutting and dyeing time used = ⁷⁄₁₀S + 1D
• The director of manufacturing stated that Par has at most 630
hours of cutting and dyeing time available. Therefore, the
production combination we select must satisfy the requirement

⁷⁄₁₀S + 1D = 630

HSR 35
Write the constraints in terms of the decision variables.
• Constraint 2: Number of hours of sewing time used must be
less than or equal to the number of hours of sewing time
available

• Every standard bag manufactured will require 1⁄₂ hour for


sewing, and every deluxe bag will require ⁵⁄₆ hour for sewing.
Because 600 hours of sewing time are available, it follows that

1⁄₂ S + ⁵⁄₆ D < 600

HSR 36
Write the constraints in terms of the decision variables.
• Constraint 3: Number of hours of finishing time used must be
less than or equal to the number of hours of finishing time
available

• Every standard bag manufactured will require 1 hour for


finishing, and every deluxe bag will require 2⁄₃ hour for
finishing. With 708 hours of finishing time available, it
follows that

1S + 2⁄3 D < 708

HSR 37
Write the constraints in terms of the decision variables.
• Constraint 4: Number of hours of inspection and packaging
time used must be less than or equal to the number of hours of
inspection and packaging time available

• Every standard bag manufactured will require 1⁄₁₀ hour for


inspection and packaging, and every deluxe bag will
require 1⁄₄ hour for inspection and packaging. Because 135
hours of inspection and packaging time are available, it
follows that
1⁄₁₀ S + 1⁄₄ D < 135

• Constraint 5: Par cannot produce a negative number of


standard or deluxe bags

S, D > 0
HSR 38
HSR 39
HSR 40
HSR 41
HSR 42
HSR 43
HSR 44
HSR 45
HSR 46
HSR 47
D

P = 10S + 9D = 1800 Extreme Points


P2
1⁄₁₀ S + 1⁄₄ D < 135
P3
⁷⁄₁₀S + 1D = 630
S>0 P4
(0, 200)
Feasible
Region
1S + 2⁄3 D < 708
(180, 0)
D>0
P1
S
P5

HSR 48
D

P = 10S + 9D Extreme Points


P2
1⁄₁₀ S + 1⁄₄ D < 135
P3
⁷⁄₁₀S + 1D = 630
S>0 P4

Feasible
1S + 2⁄3 D < 708
Region D>0
P1
S
P5

HSR 49
• The objective is to maximize the total contribution to
profit
Max P = 10S + 9D
• P1
Solve S = 0 and D=0
• P2
Solve S = 0 and 1⁄₁₀S + 1⁄₄D = 135
• P3
Solve 1⁄₁₀S + 1⁄₄D = 135 and ⁷⁄₁₀S + 1D = 630
• P4
Solve ⁷⁄₁₀S + 1D = 630 and 1S + 2⁄3D = 708
• P5
Solve D = 0 and 1S + 2⁄3D = 708 50
HSR
Questions

HSR 51
HSR 52

Das könnte Ihnen auch gefallen