Sunteți pe pagina 1din 34

Linear

Programming

Slide 1
Outline

 Introduction: Linear Programming Problems


 Introduction: Problem Formulation

 A Maximization Problem

 Graphical Solution Procedure

 A Minimization Problem

Slide 2
Introduction: Linear Programming (LP)
Problems
 A mathematical programming problem is one that
seeks to maximize an objective function subject to
constraints.
 If both the objective function and the constraints are
linear, the problem is referred to as a linear
programming problem.
 Linear functions are functions in which each variable
appears in a separate term raised to the first power
and is multiplied by a constant (which could be 0).
 Linear constraints are linear functions that are
restricted to be "less than or equal to", "equal to", or
"greater than or equal to" a constant.

Slide 3
LP Solutions

 The maximization or minimization of some quantity


is the objective in all linear programming problems.
 A feasible solution satisfies all the problem's
constraints.
 An optimal solution is a feasible solution that results
in the largest possible objective function value when
maximizing (or smallest when minimizing).
 A graphical solution method can be used to solve a
linear program with two variables.

Slide 4
Introduction: Problem Formulation

 Problem formulation or modeling is the process of


translating a verbal statement of a problem into a
mathematical statement.

Slide 5
Example 1: A Maximization Problem

There is a small firm that produces two products. In the


production process, three raw materials are blended
(mixed together) to produce the two products: P1 and P2.
A ton of P1 is a mixture of 1 ton of material 1, 2 ton of
material 2, and 1 ton of material 3. Each ton of P2 is a
mixture of 3 ton of material 2 and 1 ton of material 3.

Table 1: Material Requirements per Ton of


final products
Product
P1 P2
Material 1 1 -
Material 2 2 3
Material 3 1 1

Slide 6
Firm’s production is constrained by a limited availability
of the three raw materials. For the current production
period, the firm has available the following quantities of
each raw material.
Material Amount available for
production
Material 1 6
Material 2 19
Material 3 8

After deducting relevant cost, the profit contribution is $5


per every ton of P1 produced and $7 for every ton of P2
produced.
If the firm is interested in maximizing the total profit
contribution, find the optimal solution.
Slide 7
Guidelines for Model Formulation

1. Understand the problem thoroughly.

2. Write a verbal description of the objective.

3. Write a verbal description of each constraint.

4. Define the decision variables.

5. Write the objective in terms of the decision variables.

6. Write the constraints in terms of the decision variables.

Slide 8
Example 1: Problem Formulation

1. Understand the problem thoroughly.


• The firm wants to determine how much of each
product to produce in order to maximize the total
contribution to profit.
• The number of tons available for the three materials
that are required to produce the two products will
limit the number of tons of each product that can be
produced.

2. Write a verbal description of the objective.


• The firm’s objective is to maximize the total
contribution to profit.

Slide 9
3. Write a verbal description of each constraint.
• Three constraints limit the number of tons of P1 and
the number of tons of P2 that can be produced.
 Constraint 1: The number of tons of material 1
used must be less than or equal to the 6 tons
available.
 Constraint 2: The number of tons of material 2
used must be less than or equal to the 19 tons
available.
 Constraint 3: The number of tons of material 3
used must be less than or equal to the 8 tons
available.

Slide 10
4. Define the decision variables.
• The decision variables are the controllable inputs in
the problem.
• For the this problem the two decision variables are
the number of tons of P1 produced, and
• the number of tons of P2 produced.
• In developing the mathematical model for the RMC
problem, we will use the following notation for the
decision variables:
 x1 - number of tons of product P1
 x2 - number of tons of product P2

Slide 11
5. Write the objective in terms of the decision variables.
• Firm’s profit contribution comes from the
production of x1 tons of P1 and x2 tons of P2.
• Because the firm makes $5 for every ton of P1
produced and $7 for every ton of P2 produced, the
company will make
 $5x1 from the production of P1 and
 $7x2 from the production of the P2.
• Thus, Total profit contribution = 5x1 + 7x2
• Because the objective—maximize total profit
contribution—is a function of the decision variables
x1 and x2, we refer to 5x1 + 7x2 as the objective
function.
Slide 12
• Using “Max” as an abbreviation for maximize, we
can write RMC’s objective as follows:

Max 5x1 + 7x2

Slide 13
6. Write the constraints in terms of the decision variables.
• Tons of material 1 used ≤ Tons of material 1
available.
x1 < 6

• Tons of material 2 used ≤ Tons of material 2


available.
2x1 + 3x2 < 19

• Tons of material 3 used ≤ Tons of material 3


available.
x1 + x2 < 8

Slide 14
• Add non-negativity constraints.
The firm cannot produce a negative number of
tons of P1 or a negative number of tons of P2.
Therefore, nonnegativity constraints must be
added to prevent the decision variables x1 and x2
from having negative values.
These nonnegativity constraints are
x1 > 0 and x2 > 0
 Nonnegativity constraints are a general feature
of many linear programming problems and may
be written in the abbreviated form
x1, x2 > 0

Slide 15
 LP Formulation

Max 5x1 + 7x2

s.t. x1 < 6
2x1 + 3x2 < 19
x1 + x2 < 8

x1, x2 > 0

Slide 16
Example 1: Graphical Solution

 Constraint #1 Graphed
x2
8

6
x1 < 6
5

1 (6, 0)

1 2 3 4 5 6 7 8 9 10 x1

Slide 17
Example 1: Graphical Solution

 Constraint #2 Graphed
x2

8 (0, 6 1/3)
7

6
2x1 + 3x2 < 19
5

4
3

2
(9 1/2, 0)
1

1 2 3 4 5 6 7 8 9 10
x1

Slide 18
Example 1: Graphical Solution

 Constraint #3 Graphed
x2
(0, 8)
8

6
x1 + x2 < 8
5

1 (8, 0)
1 2 3 4 5 6 7 8 9 10
x1

Slide 19
Example 1: Graphical Solution

 Combined-Constraint Graph
x2
8
x1 + x2 < 8
7

6
x1 < 6
5

2
2x1 + 3x2 < 19
1

1 2 3 4 5 6 7 8 9 10
x1

Slide 20
Example 1: Graphical Solution

 Feasible Solution Region


x2
8
Any point on the boundary of the feasible
region, or within the feasible region, is a
7
feasible solution point for the linear
6 programming problem.
5

2 Feasible
1
Region

1 2 3 4 5 6 7 8 9 10 x1

Slide 21
Example 1: Graphical Solution

 Objective Function Line


x2 We select an arbitrary value for profit
8
contribution and identify all the feasible solutions
that yield the selected value.
7
(0, 5)
6

5 5x1 + 7x2 = 35
4

1 (7, 0)

1 2 3 4 5 6 7 8 9 10
x1

Slide 22
Example 1: Graphical Solution

 Optimal Solution
x2
8
5x1 + 7x2 = 46
7

5
Optimal Solution
4

1 2 3 4 5 6 7 8 9 10
x1

Slide 23
Summary of the Graphical Solution Procedure
for Maximization Problems
 Prepare a graph of the feasible solutions for each of the
constraints.
 Determine the feasible region that satisfies all the
constraints simultaneously..
 Draw an objective function line.
 Move parallel objective function lines toward larger
objective function values without entirely leaving the
feasible region.
 Any feasible solution on the objective function line with
the largest value is an optimal solution.

Slide 24
Extreme Points and the Optimal Solution

 The corners or vertices of the feasible region are


referred to as the extreme points.
 An optimal solution to an LP problem can be found at
an extreme point of the feasible region.
 When looking for the optimal solution, you do not have
to evaluate all feasible solution points.
 You have to consider only the extreme points of the
feasible region.

Slide 25
Example 1: Graphical Solution

 The Five Extreme Points

7 5x1 + 7x2
5
6

3
4

2 Feasible 3
1
Region
1 2
1 2 3 4 5 6 7 8 9 10 x1

Slide 26
Example 2: A Minimization Problem

 LP Formulation

Min z = 5x1 + 2x2

s.t. 2x1 + 5x2 > 10


4x1 - x2 > 12
x1 + x2 > 4

x1, x2 > 0

Slide 27
Example 2: Graphical Solution

 Graph the Constraints


Constraint 1: When x1 = 0, then x2 = 2; when x2 = 0,
then x1 = 5. Connect (5,0) and (0,2). The ">" side is
above this line.
Constraint 2: When x2 = 0, then x1 = 3. But setting x1 to
0 will yield x2 = -12, which is not on the graph.
Thus, to get a second point on this line, set x1 to any
number larger than 3 and solve for x2: when x1 = 5,
then x2 = 8. Connect (3,0) and (5,8). The ">" side is
to the right.
Constraint 3: When x1 = 0, then x2 = 4; when x2 = 0,
then x1 = 4. Connect (4,0) and (0,4). The ">" side is
above this line.

Slide 28
Example 2: Graphical Solution

 Constraints Graphed

x2 Feasible Region

4x1 - x2 > 12
5

4 x1 + x2 > 4

3
2x1 + 5x2 > 10
2

1
x1
1 2 3 4 5 6

Slide 29
Example 2: Graphical Solution

 Graph the Objective Function


Set the objective function equal to an arbitrary
constant (say 20) and graph it. For 5x1 + 2x2 = 20, when
x1 = 0, then x2 = 10; when x2= 0, then x1 = 4. Connect
(4,0) and (0,10).

 Move the Objective Function Line Toward Optimality


Move it in the direction which lowers its value
(down), since we are minimizing, until it touches the
last point of the feasible region, determined by the last
two constraints.

Slide 30
Example 2: Graphical Solution

 Objective Function Graphed

x2 Min z = 5x1 + 2x2

4x1 - x2 > 12
5

4 x1 + x2 > 4

3
2x1 + 5x2 > 10
2

1
x1
1 2 3 4 5 6

Slide 31
Example 2: Graphical Solution

 Solve for the Extreme Point at the Intersection of the


Two Binding Constraints
4x1 - x2 = 12
x1+ x2 = 4
Adding these two equations gives:
5x1 = 16 or x1 = 16/5.
Substituting this into x1 + x2 = 4 gives: x2 = 4/5
 Solve for the Optimal Value of the Objective Function
Solve for z = 5x1 + 2x2 = 5(16/5) + 2(4/5) = 88/5.
Thus the optimal solution is

x1 = 16/5; x2 = 4/5; z = 88/5

Slide 32
Example 2: Graphical Solution

 Optimal Solution

x2 Min z = 5x1 + 2x2

4x1 - x2 > 12
5

4 x1 + x2 > 4

3 2x1 + 5x2 > 10


2
Optimal: x1 = 16/5
1 x2 = 4/5
x1
1 2 3 4 5 6

Slide 33
Computer Solutions

 Computer programs designed to solve LP problems are


now widely available.
 Most large LP problems can be solved with just a few
minutes of computer time.
 Small LP problems usually require only a few seconds.
 Linear programming solvers are now part of many
spreadsheet packages, such as Microsoft Excel.

Slide 34

S-ar putea să vă placă și