1 ch 7 linear programming linear programming 1 is a mathematical technique that enables a decision...

52
1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems involving the allocation of scarce resources. Typically, many economic and technical problems involve maximization or minimization of a certain objective subject to some restrictions. 1 During World War II US army began to formulate certain linear optimization problems. Their solutions were called plans or programs. Today important application areas include airline crew scheduling, shipping or telecommunication networks, oil refining and blending, and stock and bond portfolio selection.

Upload: fay-edwards

Post on 11-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

11

Ch 7 LINEAR PROGRAMMINGLinear programming1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems involving the allocation of scarce resources.

Typically, many economic and technical problems involve maximization or minimization of a certain objective subject to some restrictions.

1During World War II US army began to formulate certain linear optimization problems. Their solutions were called plans or programs. Today important application areas include airline crew scheduling, shipping or telecommunication networks, oil refining and blending, and stock and bond portfolio selection.

Page 2: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

22

The History of Linear Programming

George Dantzig Leonid Kantorovich

Page 3: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

33

Programming problems, in general, are concerned with the use or allocation of scarce resources - labor, materials, machines, and capital - in the ”best” possible manner so that costs are minimized or profits maximized.

In using the term ”best possible” it is implied that some choice or set of alternative courses of actions is available for making the decision.

Page 4: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

44

Typical Applications of Linear Programming

1. A manufacturer wants to develop a production schedule and inventory policy that will satisfy sales demand in future periods and same time minimize the total production and inventory cost.

2. A financial analyst must select an investment portfolio from a variety of stock and bond investment alternatives. He would like to establish the portfolio that maximizes the return on investment.

Page 5: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

55

Typical Applications of Linear Programming continued

3. A marketing manager wants to determine how best to allocate a fixed advertising budget among alternative advertising media such as radio, TV, newspaper, and magazines. The goal is to maximize advertising effectiveness.

4. A company has warehouses in a number of locations throughout the country. For a set of customer demands for its products, the company would like to determine how much each warehouse should ship to each customer so that the total transportation costs are minimized.

Page 6: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

66

Constructing Linear Programming ModelsNext we list what is required in order to construct a linear programming model:

1. Objective Function. There must be an objective (or goal or target) the firm or organization wants to achieve. For example, maximize dollar profits, minimize dollar cost, maximize total number of expected potential customers, minimize total time used, and so forth.

Page 7: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

77

Constructing Linear Programming Models continued

2. Restrictions and Decisions. There must be alternative courses of action or decisions, one of which will achieve the objective.

3. Linear Objective Function and Linear Constraints. We must be able to express the decision problem incorporating the objective and restrictions on the decisions using only linear equations and linear inequalities. i.e., we must be able to state the problem as a linear programming model.

Page 8: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

88

Economic Significance of Linearity

The simplifying assumption of linearity causes some problems:

1. In profit-maximizing production problem linearity of the objective function implies constant profit rate

per unit as output increases; this means

a) that the selling price is constant; and

Page 9: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

99

b) that average variable cost is constant; the law of diminishing returns does not influence the production process, and input prices are constant

perfect competition in output and input markets

2. Linear resource constraints imply constant combination of inputs; this means constant returns to scale.

Page 10: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1010

Summary of the Economic Implications of the Linearity Assumption

Linear objective function

Constant gross profit per unit(GP = P - AVC = constant)

Price (P) isconstant Constant returns

to variable inputs

Constantinput prices

Firm is a price takerin the output market

Page 11: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1111

The three basic steps in constructing a linear programming model:

Step IIdentify the unknown variables to be determined (decision variables), and represent them in terms of algebraic symbols.

Page 12: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1212

Step IIIdentify all the restrictions or constraints in the problem and express them as linear equations or inequalities which are linear functions of the unknown variables.

Page 13: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1313

Step IIIIdentify the objective or criterion and represent it as a linear function of the decision variables, which is to be maximized or minimized.

Page 14: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1414

Example 1 Product-Mix Problem

The Handy-Dandy Company wishes to schedule the production of a kitchen appliance which requires two resources – labor and material. The company is considering three different models of this appliance and its engineering department has furnished the following data:

Page 15: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1515

The supply of raw materials is restricted to 200 pounds per day. The daily availability of manpower is 150 hours. Formulate a linear programming model to determine the daily production rate of the various models of appliances in order to maximize the total profit.

Resources required Product/Model Resourcesto produce 1 unit A B C AvailableLabour (hours/unit) 7 3 6 150Material (lbs./unit) 4 4 5 200Profit ($/unit) 4 2 3

Page 16: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1616

Step I

Identify the Decision Variables. The unknown activities to be determined are the daily rate of production for the three models (A, B, C) in order to maximize the total profit. Representing them by algebraic symbols,

xA = daily production of model A

xB = daily production of model B

xC = daily production of model C

Page 17: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1717

Step II

Identify the Constraints. In this problem the constraints are the limited availability of the two resources (labor and material).

Model A requires 7 hours of labor for each unit, and its production quantity is xA. Hence, the requirement of manpower for model A alone will be 7xA hours (assuming a linear relationship).

Page 18: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1818

Similarly, models B and C will require 3xB and 6xC hours, respectively. Thus, the total requirement of labor will be 7xA + 3xB + 6xC, which should not exceed the available 150 hours. So the labor constraint becomes:

7xA + 3xB + 6xC 150

Page 19: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

1919

Similarly, the raw material constraint is given by

4xA + 4xB + 5xC 200

In addition, we restrict the variables to have non-negative values. This is called the non-negativity constraint, which the variables must satisfy

xA, xB and xC 0.

Page 20: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2020

Step III

Identifying the Objective. The objective is to maximize the total profit from the sales. Assuming that perfect market exists for the product such that all that is produced can be sold, the total profit from sales becomes

Z = 4xA + 2xB + 3XC.

Page 21: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2121

Thus, the linear programming model for our product mix problem is:

Find numbers xA, xB, xC which will maximize

Z = 4xA + 2xB + 3XC

subject to the constrains

7xA + 3xB + 6xC 150

4xA + 4xB + 5xC 200

xA 0, xB 0, xC 0

Page 22: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2222

Exercise 1: Formulating an LP-Problem

Advertising Media Selection

An advertising company wishes to plan an advertising campaign in three different media – television, radio, and magazines. The purpose of the advertising program is to reach as many potential customers as possible. Result of a market study are given below:  

The company does not want to spend more than $800 000 on advertising. It further requires that (1) at least 2 million exposures take place among women; (2) advertising on TV be limited to $500 000; (3) at least 3 advertising units be bought on day time TV, and two units during prime time; and (4) the number of advertising units on radio and magazines should each be between 5 and 10.Formulate as an LP-problem.

TV, TV,day time prime time Radio Magazines

Cost of anAdvertising 40 000 75 000 30 000 15 000unit, in $

# of potential customers 400 000 900 000 500 000 200 000reached/unit

# of womencustomers 300 000 400 000 200 000 100 000reached/unit

Page 23: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2323

Solving Linear Programming Problems

Graphical Technique First graph the constraints:

the solution set of the system is that region (or set of ordered pairs), which satisfies ALL the constraints. This region is called the feasible set

Page 24: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2424

Solving Linear Programming Problems: Graphical Technique continued

■ Locate all the corner points of the graph:the coordinates of the corners will be determined algebraically

It is important to note that the optima is obtained at the boundary of the solution set and furthermore at the corner points. For linear programs, it can be shown that the optima will always be obtained at corner points.

Page 25: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2525

Solving Linear Programming Problems: Graphical Technique continued

■ Determine the optimal value:test all the corner points to see which yields the optimum value for the objective function

Feasibleset Optimum

Objective function

Page 26: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2626

Example 2Suppose a company produces two types of widgets, manual and electric. Each requires in its manufacture the use of three machines; A, B, and C. A manual widget requires the use of the machine A for 2 hours, machine B for 1 hour, and machine C for 1 hour. An electric widget requires 1 hour on A, 2 hours on B, and 1 hour on C. Furthermore, suppose the maximum numbers of hours available per month for the use of machines A, B, and C are 180, 160, and 100, respectively. The profit on a manual widget is $4 and on electric widget it is $6. See the table below for a summary of data. If the company can sell all the widgets it can produce, how many of each type should it make in order to maximize the monthly profit?

Manual Electric Hoursavailable

A 2 1 180B 1 2 160C 1 1 100

profit $4 $6

Page 27: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2727

Example 2 continued

Step I Identify decision variables:

x = number of manual widgetsy = number of electric widgets

Step II Identify constraints:

2x + y 180 x + 2y 160 x + y 100

x 0 y 0

Page 28: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2828

Example 2 continued

Step III Define objective function:

max P = 4x + 6y

Solving P for y gives

y = -2/3 + P/3.

This defines a so-called ”family” of parallel lines, isoprofit lines.

Each line gives all possible combinations of x and y that yield the same profit.

Page 29: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

2929

Example 2 continued

Page 30: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3030

Example 2 continued

Page 31: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3131

Exercise 2: Solving an LP-problem:

A California vintner has available 660 lbs of Cabernet Sauvignon (CS) grapes, 1860 lbs of Pinot Noir (PN) grapes, and 2100 lbs of Barbera (B) grapes. The vintner makes a Pinot Noir (PN) wine, which contains 20% CS, 60% PN, and 20% B grapes and sells $3 a bottle, and a Barbera (B) wine, which contains 10% CS, 20% PN, and 70% B grapes and sells for $2 a bottle. Assuming each bottle of wine requires 3 lbs of grapes, determine how many bottles of each type of wine should be produced to maximize income.

Page 32: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3232

Solving an LP-problem continued:

Algebraic Technique The graphical method solving

linear programming problems can be used for problems with two variables (with some difficulty three)

However, for problems were the number of variables might run into hundreds or thousands, algebraic techniques must be used

The simplex method, with the aid of the computer, can solve these problems

Page 33: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3333

As with the graphical procedure, the simplex method finds the optimal corner-point solution of the set of feasible solutions.

Regardless of the number of decision variables and regardless of the number of constraints, the simplex method uses the key property of a linear programming problem, which is:

Page 34: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3434

A linear programming problem always has an optimal solution occurring at a corner-point solution

Simplex method begins with a feasible solution and tests whether or not it is optimum.

If not optimum, the method proceeds to a better solution.

Page 35: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3535

Solution of a maximum-type linear programming problem by the simplex algorithm involves the following steps:

1. Adding slack variables to convert the inequalities into equations

In the case of less-than-or-equal-to constraints, slack variables are used to increase the left-hand side to equal the right-hand side limits of the constraint conditions.

Page 36: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3636

Example: max Z = 3x1 + x2

st. 2x1 + x2 8

2x1 + 3x2 12

adding slacks and rewriting the object row:

2x1 + x2 + s1 = 8

2x1 + 3x2 + s2 = 12

-3x1 – x2 + Z = 0

where x1, x2, s1 and s2 are non-negative.

Page 37: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3737

2x1 + x2 + s1 = 8

2x1 + 3x2 + s2 = 12

-3x1 – x2 + Z = 0

2. Setting up the initial simplex tableau

Form an augmented coefficient matrix:

010013

1201032

800112

2

1

2121

Z

s

s

Zssxx

Page 38: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3838

3. Finding an initial feasible solution

Simplex algorithm starts always from origin (if possible). In our case it means that the initial feasible solution is:

x1 = 0, x2 = 0, s1 = 8, s2 =

12.

Simplex method proceeds from this corner point to an adjacent corner point. Such corner points are called basic feasible solutions.

Page 39: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

3939

4. Introducing basic and nonbasic variables as the natural way to express basic feasible solutionsFor any basic feasible solution (B.F.S.), the variables held zero are called nonbasic variables and the other are called basic variables.

Moving form one B.F.S. to another means that one basic variable (we call it a departing or exiting variable) becomes nonbasic and a nonbasic variable (entering variable) becomes a basic variable.

Page 40: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4040

Page 41: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4141

5. Choosing the proper pivot element to advance the solution and maintain the non-negativity of all variables

How to decide which variable to make basic and which nonbasic (in other words in which direction to move from the current B.F.S.)?

Page 42: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4242

The natural direction is the one in which the value of the objective function increases the most:

If in Z = 3x1 + x2, x1 is allowed to become basic, x2 remains at 0 and Z = 3x1; thus for each one-unit increase in x1, Z increases by 3 units. On the other hand, if x2 is allowed to become basic, Z will increase only by one unit if x2 is increased by one unit. This is one way to determine the pivot column.

Page 43: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4343

Choosing the proper pivot element continued

Another way to determine the pivot column is to examine the bottom row of the simplex tableau:

010013

1201032

800112

2

1

2121

Z

s

s

Zssxx

indicators

entering variable

Page 44: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4444

The bottom row entries to the left of the vertical line are called indicators.

We choose the column with the most negative indicator as the pivot column.

Having chosen the pivot column, we must now determine the pivot row in order to know which element in our simplex tableau is the pivoting element.

Page 45: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4545

For that purpose we divide the right hand side entries of the simplex tableau by corresponding entries of the pivot column.

Of the resulting quotients we choose the smallest (minimum quotient). So the pivot element is the intersection of the pivot column and pivot row.

Page 46: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4646

The pivot element is the intersection of the pivot column and pivot row:

entering variable (most negative indicator)

010013

1201032

800112

2

1

2121

Z

s

s

Zssxxdeparting variable

Quotients

8 ÷ 2 = 4 (smaller)

12 ÷ 2 = 6

Page 47: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4747

Since x1 and s2 will be the basic variables in our new B.F.S, it would be convenient to change our previous tableau by elementary row operations into a form where the values of x1, s2, and Z can be read off with ease just as in the initial basic solution.

Page 48: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4848

To do this we want to find a matrix which is equivalent to the tableau above but which has the form:

?1 0 ? ? 0

?0 1 ? ? 0

?0 0 ? ? 12121 Zssxx

where the question marks represent numbers to be determined.

Page 49: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

4949

6. Pivoting, which is done column wise

We must transform the tableau to an equivalent matrix that has a 1 at the place of the pivot element (pivot entry) and 0’s elsewhere in the column x1.

010013

1201032

800112

Z

s

s

Zssxx

2

1

2121

*departing variable

entering variable

Page 50: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

5050

By elementary row operations, we have:

12100

401120

4001

Zssxx

010013

1201032

4001

010013

1201032

800112

Zssxx

23

21

21

21

2121

21

21

2121

½ R1

-2R1 + R2

3R1 + R3

R1

R2

R3

Page 51: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

5151

7. Continuing and recognizing when the algorithm terminates.

General termination rule: all values in the indicator row are non-negative.

Page 52: 1 Ch 7 LINEAR PROGRAMMING Linear programming 1 is a mathematical technique that enables a decision maker to arrive at the optimal solution to problems

5252

We have a new simplex tableau:

12100

401120

4001

Z

s

x

Zssxx

23

21

21

21

2

1

2121

indicators

All values in the indicator row are non-negative. Hence, we have found the optimal solution for the problem.

The solution is: x1= 4, x2= 0 and Z= 12