# linear programming i - ulisboa .linear programming i ... • linear programming (lp) uses a...

Post on 07-Jul-2018

232 views

Embed Size (px)

TRANSCRIPT

1

Decision Support Models

Linear programming IJoo Carlos Loureno

joao.lourenco@ist.utl.pt

Academic year2012/2013

Readings: Hillier, F.S., Lieberman, G.J., 2010. Introduction to Operations Research, 9th ed. McGraw-Hill, New York. Chapter 3.

2

Most decision problems involve the allocation of limited resources among competing activities in the best possible (i.e., optimal) way.

Linear programming: Purpose

Efficient use of resources

2

3

Linear programming (LP) uses a mathematical model to describe the problem of concern.

Linear means that all the mathematical functions in the model need to be linear.

Programming does not refer to computer programming but to planning.

Linear programming: Characteristics

4

EXAMPLE

The WYNDOR GLASS CO. produces high-quality glassproducts, including windows and glass doors in its three plants.

Top management has decided to discontinue unprofitableproducts, releasing production capacity to launch two newproducts having large sales potential.

Product 1: A glass door with aluminum framing Product 2: A wood-framed window

LP: The Wyndor Glass Co. example

3

5

Product 1

LP: The Wyndor Glass Co. example

Plant 1 Plant 2 Plant 3

Product 2

Which mix would be most profitable?

6

The problem:

Determine what the production rates should be for the twoproducts, in order to maximize their total profit, subject to therestrictions imposed by the limited production capacitiesavailable in the three plants.

(Each product will be produced in batches of 20, so theproduction rate is defined as the number of batches produced perweek.)

LP: The Wyndor Glass Co. example

4

7

The OR team identified the data that to be gathered:

LP: The Wyndor Glass Co. example

1. Number of hours of production time available per week ineach plant for these new products.

2. Number of hours of production time used in each plant foreach batch produced of each new product.

3. Profit per batch produced of each new product.

8

LP: The Wyndor Glass Co. example

5

9

Formulation as a linear programming problem:

LP: The Wyndor Glass Co. example

Let

Thus x1 and x2 are the decision variables for the model.

The objective is to choose the values of x1 and x2 so as to

using the profit per batch referred in the bottom row of Table 3.1 (shown on the previous slide) .

10

LP: The Wyndor Glass Co. example

Each batch of product 1 produced per week uses 1 hour of production time per week in Plant 1, whereas only 4 hours per week are available.

=> x1 4

Plant 2 imposes the restriction that 2x2 12.

The number of hours of production time used per week in Plant 3 by choosing x1and x2 as the new products production rates would be 3x1 + 2x2

=> 3x1 + 2x2 18

6

11

LP: The Wyndor Glass Co. example

In the mathematical language of linear programming, the problem is to choose values of x1 and x2 so as to

Nonnegative decision variables

12

LP: The Wyndor Glass Co. example

Since this linear programming problem only has two decision variables we can represent it in a graph having x1 and x2 as the axes.

Graphical solution:

The first step is to identify the values of (x1, x2) permitted by the restrictions.

To begin, note that the nonnegativityrestrictions x1 0 and x2 0 require (x1, x2) to lie on the positive side of the axes, i.e., in the first quadrant.

Next, observe that x1 4 means that (x1, x2) cannot lie to the right of the line x1 = 4.

7

13

LP: The Wyndor Glass Co. example

In a similar fashion, the restriction 2x2 12 (or x2 6) implies that the line 2x2 = 12 should be added to the boundary of the permissible region.

The final restriction 3x1 + 2x2 18requires adding the new boundary line 3x1 + 2x2 = 18

The resulting region of permissible values of (x1, x2), which is grayed in the graph, is called the feasible region.

14

LP: The Wyndor Glass Co. example

The final step is to pick out the point in this feasible region that maximizes the value of Z = 3x1 + 5x2.

We can start by trial and error. First we try, arbitrarily, Z = 10. By drawing the line 3x1 + 5x2 = 10 we see that there are many points on this line that lie in the feasible region.

Next we try 3x1 + 5x2 = 20, which also has many points inside the region. Notice that the two lines just constructed are parallel.

8

15

LP: The Wyndor Glass Co. example

This is no coincidence, since any line constructed in this way has the form Z = 3x1 + 5x2 for the chosen value of Z, which implies that

x2 = 3/5 x1 + 1/5 ZThis last equation demonstrates that the slope of the line is 3/5 (since each unit increase in x1 changes x2 by 3/5), whereas the intercept of the line with the x2 axis is 1/5 Z. As the slope is fixed at 3/5 means that all lines constructed in this way are parallel.

16

LP: The Wyndor Glass Co. example

Comparing the 3x1 + 5x2 = 10 and 3x1 + 5x2 = 20 lines, we note that the line giving a larger value of Z (Z = 20) is farther up and away from the origin than the other line (Z = 10).

These observations imply that our trial-and-error procedure for constructing lines involves nothing more than drawing a family of parallel lines containing at least one pointin the feasible region and selecting the line that corresponds to the largest value of Z.

9

17

LP: The Wyndor Glass Co. exampleThe parallel line that passes through the point (2, 6), indicates that the optimal solution is x1= 2 and x2 = 6.

The equation of this line is 3x1 + 5x2 = 3(2) + 5(6) = 36 = Z, indicating that the optimal value of Zis Z = 36.

Now, instead of using a trial-and-error procedure to find out the optimal solution we can just draw one line and use a ruler to find that solution (by moving the ruler in the appropriate direction).

18

LP: The Wyndor Glass Co. example

This procedure often is referred to as the graphical method for linearprogramming.

It can be used to solve any linear programming problem with two decisionvariables.

With considerable difficulty, it is possible to extend the method to three decisionvariables but not more than three. (We use the simplex method for solving largerproblems).

Conclusion of the exampleThe OR team used this approach to find that the optimal solution is x1= 2 and x2 = 6with Z = 36. This solution indicates that the Wyndor Glass Co. should produceproducts 1 and 2 at the rate of 2 batches per week and 6 batches per week,respectively, with a resulting total profit of $36,000 per week. No other mix of thetwo products would be so profitable according to the model.

10

19

The LP model: Terminology

Certain symbols are commonly used to denote the various components of a linearprogramming model. These symbols are listed below, along with their interpretationfor the general problem of allocating resources to activities.

20

The LP model: Terminology

The model poses the problem in terms of making decisions about the levels of theactivities, so x1, x2, . . . , xn are called the decision variables. The values of cj, bi,and aij (for i = 1, 2, . . . , m and j = 1, 2, . . . , n) are the input constants for themodel, which are also referred to as the parameters of the model.

A standard form of the model (Hillier and Lieberman)We can now formulate the mathematical model for this general problem ofallocating resources to activities can be formulated. In particular, this model is toselect the values for x1, x2, . . . , xn so as to

11

21

The LP model: Terminology

22

The LP model: Terminology

Any situation whose mathematical formulation fits this model is a linearprogramming problem.Notice that the model for the Wyndor Glass Co. problem fits our standard form,with m = 3 and n = 2.

Common terminology for the linear programming model:- The function being maximized, c1x1 + c2x2 + + cnxn, is called the objective

function.- The restrictions normally are referred to as constraints.- The first m constraints (those with a function of all the variables ai1x1 + ai2x2 +

ainxn on the left-hand side) are sometimes called functional constraints (orstructural constraints).

- Similarly, the xj 0 restrictions are called nonnegativity constraints (ornonnegativity conditions).

12

23

The LP model: Terminology

Other possible forms:

Any problem that mixes some of or all these forms with the remaining parts of thepreceding model is still a linear programming problem.

24

The LP model: Terminology

Terminology for the solutions of the model

Any specification of values for the decision variables (x1, x2, . . . , xn) is called asolution, regardless if whether it is a desirable or even an allowable choice.Different types of solutions are then identified by using an appropriate adjective.

A feasible solution is a solution for which all the constraints are satisfied.An infeasible solution is a solution for which at least one constraint isviolated.

In the example, the points (2, 3) and (4, 1) in thefigure are feasible solutions, while the points(1, 3) and (4, 4) are infeasible solutions.

The feasible region is the collection of all feasiblesolutions (shaded area in the figure).

13

25

The LP model: Terminology

It is possible for a problem tohave no feasible solutions.

26

The LP model: Terminology

Given that ther

Recommended