Version 08-18-10 Chapter 2: Linear Programming -...

62
Version 08-18-10 Chapter 2: Linear Programming - Maximization Copyright © 2010 North Carolina State University: MINDSET 2-1 2.0: Mathematical Programming The next five chapters in the text focus on mathematical programming. The father of mathematical programming is George Dantzig. Between 1947 and 1949, Dantzig developed the basic concepts used for framing and solving linear programming problems. During WWII, he worked on developing various plans which the military calls “programs.” After the war he was challenged to find an efficient way to develop and solve these programs. Dantzig recognized that these programs could be formulated as a system of linear inequalities. Next, he introduced the concept of a goal. At that time, goals usually meant rules of thumb for carrying out a goal. For example, a navy admiral might have said, “Our goal is to win the war, and we can do that by building more battleships.” Dantzig was the first to express the selection of a plan to reach a goal as a mathematical function. Today we call it the objective function. All of this work would not have had much practical value without a way to solve the problem. Dantzig found an efficient method called the simplex algorithm. This algorithm finds the optimal solution to a set of linear inequalities that maximizes (profit) or minimizes (cost) an objective function. Economists were excited by these developments. Several attended Activity Analysis of Production and Allocation, an early conference on linear programming and the simplex method. Some of them later won Nobel prizes in economics for their work. They were able to model fundamental economic principles using linear programming. The first problem Dantzig solved was a minimum cost diet problem. The problem involved the solution of nine inequalities (nutrition requirements) with seventy-seven decision variables (sources of nutrition). The National Bureau of Standards supervised the solution process. It took the equivalent of one man working 120 days using a hand-operated desk calculator to solve the problem. Nowadays, a standard personal computer could solve this problem in less than one second. EXCEL spreadsheet software includes as a standard “add-in” called “solver”, a tool for solving linear programming problems. Mainframe computers became available in the 1950s and grew more and more powerful. This allowed the petroleum and chemical industries to use the simplex algorithm to solve practical problems. One problem was to minimize the cost of blending gasoline to meet performance and content standards. The field of linear programming grew very fast. This led to the development of non-linear programming, in which inequalities and/or the objective function are not linear functions. Another extension is called integer programming, in which the variables can only have integer values. Together, linear, non-linear and integer programming are called mathematical programming.

Transcript of Version 08-18-10 Chapter 2: Linear Programming -...

Page 1: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-1

2.0: Mathematical Programming

The next five chapters in the text focus on mathematical programming. The father of mathematical programming is George Dantzig. Between 1947 and 1949, Dantzig developed the basic concepts used for framing and solving linear programming problems. During WWII, he worked on developing various plans which the military calls “programs.” After the war he was challenged to find an efficient way to develop and solve these programs. Dantzig recognized that these programs could be formulated as a system of linear inequalities. Next, he introduced the concept of a goal. At that time, goals usually meant rules of thumb for carrying out a goal. For example, a navy admiral might have said, “Our goal is to win the war, and we can do that by building more battleships.” Dantzig was the first to express the selection of a plan to reach a goal as a mathematical function. Today we call it the objective function. All of this work would not have had much practical value without a way to solve the problem. Dantzig found an efficient method called the simplex algorithm. This algorithm finds the optimal solution to a set of linear inequalities that maximizes (profit) or minimizes (cost) an objective function. Economists were excited by these developments. Several attended Activity Analysis of Production and Allocation, an early conference on linear programming and the simplex method. Some of them later won Nobel prizes in economics for their work. They were able to model fundamental economic principles using linear programming. The first problem Dantzig solved was a minimum cost diet problem. The problem involved the solution of nine inequalities (nutrition requirements) with seventy-seven decision variables (sources of nutrition). The National Bureau of Standards supervised the solution process. It took the equivalent of one man working 120 days using a hand-operated desk calculator to solve the problem. Nowadays, a standard personal computer could solve this problem in less than one second. EXCEL spreadsheet software includes as a standard “add-in” called “solver”, a tool for solving linear programming problems. Mainframe computers became available in the 1950s and grew more and more powerful. This allowed the petroleum and chemical industries to use the simplex algorithm to solve practical problems. One problem was to minimize the cost of blending gasoline to meet performance and content standards. The field of linear programming grew very fast. This led to the development of non-linear programming, in which inequalities and/or the objective function are not linear functions. Another extension is called integer programming, in which the variables can only have integer values. Together, linear, non-linear and integer programming are called mathematical programming.

Page 2: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-2

2.0.1: An Introductory Problem

In order to get a feel for mathematical programming, we will begin with a problem that has a concrete model that can be built from Lego pieces. When a mathematical model of a real world situation is constructed in symbolic form, it is often helpful to construct a physical or visual model at the same time. The role of the latter model is to help the model builder to understand the real world situation as well as its mathematical model. The Problem. A certain furniture company makes only two products, tables and chairs. We will model the manufacture of tables and chairs using Lego pieces. To make a table requires two large and two small pieces. A chair requires one large and two small pieces. Figure 1 shows a table and a chair made from Legos.

Figure 1: A Lego table and chair.

If the resources needed to build tables and chairs were unlimited, the company would just manufacture as many of each as it thought it could sell. In the real world, however, resources are not unlimited. Suppose that the company can only obtain six large and eight small pieces per day. Figure 2 shows these limited resources.

Figure 2: The furniture company’s limited resources

Page 3: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-3

The profit from each table is $16, and the profit from each chair is $10. The production manager wants to find the rate of production of tables and chairs per day that earns the most profit.

1. What do you think the production rates should be? 2. Use Legos to build a physical model, or draw pictures to explore some possibilities. 3. Compute the profit for each possibility. 4. In a table, record the production rate of tables, the production rate of chairs, and the

profit for each possibility. 5. What production rates generate the most profit?

Solving the Problem. Since the profit from a table is much greater than the profit from a chair, we could begin by making as many tables as possible. Each table requires two large pieces and two small pieces. There are only six large and eight small pieces available. Therefore, only three tables can be built. This generates 3 $16 $48 profit. There are two small pieces left

over, but nothing can be built from them. Thus, $48 is the total profit if we build three tables (and no chairs). Now the question is: Are there any other production rates that generate more profit? We cannot make more than three tables from the limited resources available. Suppose we investigate what happens if we make only two tables. Doing so uses four large and four small pieces. Now there are two large and four small pieces left over. These are just enough resources to build two chairs. (We already know what the result would be if we built another table!) The profit on two tables and two chairs would be: 2 $16 2 $10 $52 . This is more profit than

building three tables, so we should consider all of the possibilities. Table 1 contains all of the possibilities, and Figure 3 shows the solution that generates the most profit.

Production rate: tables Production rate: chairs Total Profit 3 0 3 $16 0 $10 =$48

2 2 2 $16 2 $10 =$52

1 3 1 $16 3 $10 =$46

0 4 0 $16 4 $10 =$40

Table 1: Exploring the Possibilities

Page 4: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-4

Figure 3: Two tables and two chairs yield the most profit. Because the profit has been optimized, the solution in Figure 1 is called the optimal solution. Notice that we have used a set of similar equations in Table 1 to compute the profit for each possibility. These equations are the basis for the objective function. The two production rates varied across the four possibilities, and exploring their variations allows a decision about production to be made. Therefore, the production rates for tables and chairs are the decision variables for this problem. Besides the optimal solution, there are three other solutions listed in Table 1. Although they are not optimal, each is still a feasible solution. Building four tables is an example of an infeasible solution.

6. Why is building four tables infeasible? 7. Give another example of an infeasible solution.

Stepping Beyond the Solution. Operations researchers understand that there is more to their work than merely finding solutions to problems. Once a solution is found, it must be interpreted. One sort of interpretation is called sensitivity analysis. Sensitivity analysis involves exploring how sensitive the solution is to changes in the parameters of the problem. For example, in the Lego problem above, one of the parameters of the problem is the availability of large pieces.

8. Would it make a difference if seven large pieces were available instead of six? 9. If so, what is the new optimal solution, and how much profit does it generate? 10. Would it make a difference if nine small pieces were available instead of eight? 11. If so, what is the new optimal solution, and how much profit does it generate?

Growing the Problem. Suppose now that the furniture company has decided to dramatically expand production. Now it is able to obtain 27 small and 18 large Lego pieces per day. The

profit on tables and chairs remains the same.

12. What should the daily production rates be in order to maximize profit?

Page 5: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-5

13. Would it make a difference if 19 large pieces were available instead of 18? If so, what is the new optimal solution, and how much profit does it generate?

14. Would it make a difference if 28 large pieces were available instead of 27?

If so, what is the new optimal solution, and how much profit does it generate? 15. Was this new problem easier or more difficult to solve than the original? Why? 16. What are some aspects of a problem like this that would make it easier or more

difficult to solve? Explain.

2.0.2: Next Steps

On the pages that follow, you will be introduced to a wide range of real world problems that operations researchers solve every day. While the real world problems can be difficult to solve due to their enormous size, in a very many cases, their solution depends on mathematics that you have already learned in your previous high school mathematics courses. So how, you may wonder, will this course be different? We believe that this new course in the mathematics of operations research for high school students is different, because it is applications-based and problem-driven. Applications-based means that the applications of the mathematics will be upfront—not at the end of the chapter. Problem-driven means that they key ideas will be developed within the sorts of problems that gave them birth. Studying mathematics in this way may require you to develop a new MINDSET about what mathematics is, how it can be used, and the best way to learn it. Whatever mathematics is, it is certainly not a spectator sport. That is why a large portion of this book looks very similar to the Introductory Problem that you just read. Many questions were asked, but not answered in the text. Where will the answers come from? You will provide those answers, and in doing so, you will begin to form that new MINDSET.

Page 6: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-6

Problem 2.1: Computer Flips, a Junior Achievement Company Junior Achievement (JA) is an educational program available worldwide. JA uses hands-on experiences to help young people understand the economics of life. In partnership with businesses and educators, JA brings the real world to students. The JA Company Program provides basic economic education for high school students. The Program uses support and guidance of volunteer consultants from the local business community. By organizing and operating an actual business, students learn how businesses function. They also learn about the structure of the free enterprise system and the benefits it provides.

Gates Williams is the production manager for Computer Flips, a Junior Achievement company. Computer Flips purchases a basic computer at wholesale prices and then adds a display, extra memory cards, extra USB ports, or a CD-ROM or DVD-ROM drive. The company also purchases these extra components at wholesale prices. The computers, with the added features, are then resold at retail prices.

Computer Flips produces two models: Simplex and Omniplex. The profit on each Simplex is $200, and on each Omniplex, the profit is $300. The Simplex model has fewer add-ons, so it requires only 60 minutes of installation time. The Omniplex has more add-ons and requires 120 minutes of installation time. Five JA students do all of the installation work. Each of them works 8 hours per week. Gates Williams must decide the rate of production per week of each computer model in order to maximize the company’s weekly profit.

To make decisions such as the one Gates Williams faces, operations researchers use a technique known as linear programming. Answering the following questions will help you understand this technique.

2.1.1: Exploring the Problem

One way to approach the problem is to make some guesses and test the profit generated by each guess. Suppose Gates Williams decides the company should make 20 of each model.

1. How much profit would be generated?

2. Is there enough installation time available to make that number of each model?

3. Answer the same two questions if Gates Williams decides to make:

a. 10 Simplex and 30 Omniplex

b. 30 Simplex and 10 Omniplex

4. Can you find a production mix for which there is enough installation time?

5. How much profit do the production rates you found generate for the company?

Page 7: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-7

2.1.2: A Visual Approach

Sometimes, it is helpful to visualize things. The numbers, variables, and their relationships in a problem can be represented by a graph. Before graphing the Computer Flips problem, you must translate the information in the problem into mathematical statements—equations or inequalities.

6. Let x1 = the weekly production rate of Simplex computers, and x2 = the weekly production rate of Omniplex computers. Write an equation for the amount of weekly profit, z, the company would earn.

The variables x1 and x2 are called decision variables. Gates Williams will use them to help make his decision. The equation you have written expresses the weekly profit, z, as a function of x1 and x2. Because the objective is to maximize profit, it is called the objective function.

7. Write an algebraic expression in terms of x1 and x2 that represents the total number of minutes of installation time required in order to produce x1 Simplex and x2 Omniplex computers each week.

8. What is the total amount of installation time available per week?

9. Write a mathematical statement that captures the relationship between the installation time required to produce x1 Simplex and x2 Omniplex computers each week and the amount of available installation time each week.

10. Can Computer Flips produce a negative number of either model?

11. Write mathematical statements that capture your answer to the previous question.

12. On the same coordinate axes, graph each of the three mathematical statements you have written. For uniformity, place x1 on the horizontal axis and x2 on the vertical axis.

13. What do the points that satisfy all three mathematical statements represent?

2.1.3: Graphing the Problem Based on your work in the previous section, it should be clear that Gates Williams cannot decide to make any number he chooses of each model of computer each week. That is because there is only a certain amount of installation time available each week. We say that the available installation time constrains the number of Simplex and Omniplex computers that can be made each week. We call the inequality that captures this relationship a constraint. Since the other

Page 8: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-8

two inequalities express the fact that the decision variables in this problem cannot be negative, they are called the non-negativity constraints.

Each of the points that satisfies each of the constraint inequalities represents a mix of Simplex and Omniplex computers that could be produced each week. We call that region of the coordinate system the feasible region, because those points represent feasible production mixes.

14. Choose any point in the feasible region, and compute the weekly profit that would be generated by producing that mix of Simplex and Omniplex computers.

15. Choose a second point in the feasible region that generates the same weekly profit as the first point. Draw a line through the two points.

Every point on the line you have drawn generates the same weekly profit. For this reason, such a line is called a line of constant profit.

16. Choose two more points in the feasible region, and compute the weekly profit for each. Now find a companion point for each that generates the same weekly profit, and draw the two new lines of constant profit.

17. What do you notice about the three lines you have drawn?

18. Which of them generates the largest weekly profit?

19. Where does the line that generates the largest weekly profit of all intersect the feasible region?

2.1.4: Solving the Problem

Hopefully, the previous line of investigation has suggested that the point or points representing the largest possible weekly profit are close to the boundary of the feasible region.

20. Choose a point on the boundary of the feasible region, but not at a corner (vertex), and evaluate the profit there.

21. Continue to choose points on the boundary, but try to increase the amount of profit each time.

22. Finally, evaluate the profit at each of the corner points of the feasible region.

23. What is the relationship between the corner points and the set of constraints?

24. At which of the points for which you have evaluated the profit is the profit the greatest? How would you describe this point?

The point at which the profit is maximized is called the optimal solution. If a linear programming problem has a unique optimal solution, where in the feasible region do you think it occurs?

2.1.5: Complicating the Problem After several weeks of operation, one of the students in the sales department of Computer Flips does some market research. Based on this research, she decides that the company cannot sell more than 20 Simplex computers in any given week.

25. Write an inequality that expresses this market constraint.

Page 9: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-9

26. Graph the new system of constraint inequalities. What do you notice about the optimal solution you found earlier?

What is the optimal solution after adding the market constraint?

Now the students in the sales department of Computer Flips decide to extend the market research to the Omniplex model. On the basis of their research, they decide that Computer Flips cannot sell more than 16 Omniplex computers in any given week.

27. Write an inequality for this new market constraint, and graph the new feasible region.

28. Does the previous optimal solution lie in the new feasible region?

29. What is the optimal solution after the addition of the second market constraint?

The students at Computer Flips notice that they are getting a lot of returns. Every computer that was returned had a problem with one of the add-ons. They realize that they need to test their finished products before shipping them. They decide to assign the task of testing the computers to only one of the student installers. To accommodate this change, the other four student installers agree to work 10 hours per week, so that the total available installation time remains 40 hours per week. The student who will do the testing also works 10 hours per week. It takes her 20 minutes to test a Simplex and 24 minutes to test an Omniplex.

30. Write an inequality for the testing constraint based on the information in the previous paragraph.

31. Graph the new feasible region.

32. How does the new constraint change the feasible region?

33. Using the new feasible region, what is the optimal solution?

2.1.6: Success Breeds—An Even More Complicated Problem

Computer Flips has some initial success, so the students are considering producing two additional models: Multiplex and Megaplex. Multiplex will have more add-ons than Simplex, but not as many as Omniplex. Each Multiplex will generate $250 profit. Megaplex, as the name implies, will have more add-ons than any of the other models. Each Megaplex will generate $400 profit.

34. How has the addition of two more computer models changed the structure of the problem?

Page 10: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-10

35. What are the decision variables in the new problem?

36. How does the number of decision variables complicate the problem?

To formulate a linear programming problem means to define the decision variables, define an objective function in terms of the decision variables, and state any constraints in terms of the decision variables.

The installation and testing times for each Multiplex and Megaplex computer appear in Table 2.1.1. In addition, market research indicates that the combined sales of Simplex and Multiplex cannot exceed 20 computers per week, and the combined sales of Omniplex and Megaplex cannot exceed 16 computers per week.

Multiplex Megaplex

Installation time 90 min. 150 min.

Testing time 24 min. 30 min.

Table 2.1.1: Installation and testing times

37. Using the information in the preceding paragraph, formulate the problem after the Multiplex and Megaplex models have been added to the product mix.

[FK Level: 9.9]

Page 11: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-11

Problem 2.2: SK8MAN, Inc. SK8MAN, Inc., manufactures and sells skateboards. A skateboard is made of a deck, two

Figure 2.2.1: A skateboard truck trucks that hold the wheels (see Figure 2.2.1), four wheels, and a piece of grip tape. SK8MAN manufactures the decks of skateboards in its own factory and purchases the rest of the components.

Figure 2.2.2: Sporty and Fancy

Currently, SK8MAN manufactures two types of skateboards: Sporty (Figure 2.2.2, top) and Fancy (Figure 2.2.2, bottom).

G. F. Hurley, the production manager at SK8MAN, needs to decide the production rate for each type of skateboard in order to make the most profit. Each Sporty board earns $15 profit, and each Fancy board earns $35 profit. However, Mr. Hurley might not be able to produce as many boards of either style as he would like, because some of the necessary resources are limited. We say that the production rates are constrained by the availability of the resources.

To produce a skateboard deck, the wood must be glued and pressed, then shaped. After a deck has been produced, the trucks and wheels are added to the deck to complete a skateboard.

Figure 2.2.3: Maple veneers in a hydraulic press

Figure 2.2.4: Shaping a deck Skateboard decks are made of either North American maple or Chinese maple. A large piece of maple wood is peeled into very thin layers called veneers. A total of seven veneers are glued at a gluing machine and then placed in a hydraulic press for a period of time (See Figure 2.2.3). After the glued veneers are removed from the press, eight holes are drilled for the trunk mounts. Then the new deck goes into a series of shaping, sanding, and painting processes. Figure 2.2.4 shows a deck during the shaping process.

Page 12: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-12

The Sporty board is a less expensive product, because its quality is not as good as the Fancy board. Chinese maple is used in the manufacture of Sporty decks. North American maple is used for Fancy decks. Because Chinese maple is soft, it is easier to shape. On average, it takes a worker 5 minutes to shape a Sporty board. However, a Fancy board requires 15 minutes to shape. If SK8MAN, Inc., is open for 8 hours a day, 5 days a week, what is the maximum profit per week, and what production rates of Sportys and Fancys produce that maximum?

2.2.1: Problem Formulation The first step in the formulation of a linear programming problem is to define the decision variables in the problem. The decision variables are then used to define the objective function. This function captures the goal in the problem. In the SK8MAN problem, the goal is to maximize the company’s profits per week. Therefore, the objective function should represent the weekly profit. That profit comes from the sale of the two different styles of skateboards, so we may begin the problem formulation with:

Let: x1 the weekly production rate of Sporty boards, x2 the weekly production rate of Fancy boards, and z the amount of profit SK8MAN, Inc earns per week.

Now, since we know the profit for each style of skateboard, we can write the objective function by expressing z in terms of x1 and x2:

z 15x1 35x

2.

The last step in the formulation of the problem is to represent any constraints in terms of the decision variables. In this case, Mr. Hurley cannot just decide to make as many boards as he wants, because the number made is constrained by the available shaping time. Eight hours per day, five days per week is a 40-hour workweek. However, the information about shaping time is expressed in minutes, so we convert 40 hours to 2,400 minutes. Now, if SK8MAN makes x1 Sportys and x2 Fancys per week, that uses 5x1 15x2 minutes of shaping time. Thus, the shaping time constraint is 5x1 15x2 2400 .

There are also two not-so-obvious, but completely logical constraints. Since the production rate cannot be a negative number for either type of skateboard, x1 0 and x2 0 . We call these last two inequalities the non-negativity constraints.

Finally, the problem formulation written out all together looks like this:

Let: x1 the weekly production rate of Sporty boards, x2 the weekly production rate of Fancy boards, and z the amount of profit SK8MAN, Inc earns per week.

Maximize: z 15x1 35x

2,

subject to: 5x115x

2 2400 and

x1, x

2 0 .

Page 13: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-13

Now that the problem has been formulated, we will solve it graphically. To do so, we set up a coordinate plane with x1 as the horizontal axis and x2 as the vertical axis. Then, we graph the constraints, as shown in Figure 2.2.5.

Figure 2.2.5: Graph of the system of constraints

Every point in the shaded region satisfies all three constraints. Thus, every point in the shaded region is a solution to the system of linear inequalities, and there are an infinite number of points. This shaded region is called the feasible region. Each ordered pair in the feasible region represents a combination of Fancys and Sportys that SK8MAN, Inc., could produce without violating any of the constraints. The solution to our problem of maximizing profit requires us to pick the one mix of products that will generate the most profit, our objective function.

If 5x115x

2 2400 , then x2

24005x1

15160 1

3x1 is an equivalent equation written in slope-

intercept form, according to how we graphed the constraints. Keep in mind that our decision variables are the weekly production rates for both types of skateboards. Thus, the profit generated by a particular mix of products is not a variable.

Let us suppose SK8MAN, Inc., generates $3,500 of profit each week. 3500 15x1 35x

2

represents this situation algebraically, and the graph in Figure 2.2.6 represents it geometrically. If $0 of profit were made, then the equation would be 0 15x

1 35x

2. A $7,000 weekly profit

would mean 7000 15x1 35x

2. As you can see in the graph in Figure 2.2.7, all these lines are

parallel; only their vertical intercepts are changing. Each equation represents a line of constant profit. For example, (0, 100), (120, 49), and (233.33, 10) are collinear, and each coordinate pair generates a profit of $3,500 when substituted into the objective function.

x1

x2

(0, 160)

(480, 0)(0, 0)

50

50

1 25 15 2400x x

Page 14: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-14

Figure 2.2.6: Feasible region with line of constant profit of $3,500

Figure 2.2.7: Feasible region with several lines of constant profit

The coordinates of every point on a particular line of constant profit represent a mix of products that generates that amount of profit. When the weekly profit is assumed to be $3,500, you can see there is an infinite number of points on that line that lie within the feasible region. If we were to continue to graph lines with increasingly large values for profit, we would eventually happen upon a line that intersects the feasible region at just one point. If the value of z were made any larger, none of points on the new line would intersect the feasible region.

The maximum profit for SK8MAN, Inc., subject to its constraints, is $7,200 per week. To realize this maximum, SK8MAN, Inc., should produce 480 Sporty skateboards and 0 Fancy skateboards. Notice that the optimal product mix occurs at one of the three corners of the feasible region.

2.2.2: Adding a New Constraint Now, suppose the company that supplies the trucks for SK8MAN’s boards announces that it can provide at most 2,800 trucks per month. Does this new information affect the optimal product mix? Remember that each skateboard needs two trucks, and consider a month to be four weeks.

This new information represents another constraint. The decision variables, objective function, and earlier constraints still apply.

Maximize: z 15x1 35x

2,

z = 3500

(0, 160)

(0, 0) (480, 0)

50

50 13233 ,0

120, 49 0,100

x1

x2

(0, 160)

(0, 0) (480, 0)

z = 0 z = 3500 z = 7000 z = 7200 z = 8750

50

50

x1

x2

Page 15: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-15

subject to: 5x115x

2 2400 ,

2x1 2x

2 700 , and

x1, x

2 0 .

Figure 2.2.8: The feasible region after adding the truck constraint

By graphing the new constraint (see Figure 2.2.8), we can see that the feasible region changes. Our previous optimal solution is no longer included. Graphing several lines of constant profit reveals the optimal solution occurs at the point (285, 65). Notice that as the amount of constant profit increases, the lines are higher and further right in the first quadrant. Try to visualize a single line moving upward or to the right while its slope remains constant. The last point in the feasible region that such a moving line touches will be the optimal solution, because the profit is the greatest of any feasible point. Notice also that this point must be a corner point of the feasible region. In fact, this will generally be the case, and it is called the corner point principle:

If there is a unique solution to a linear programming problem, it must occur at a corner point of the feasible region.

The corner point principle allows us to simply evaluate the objective function at each corner point of the feasible region. Instead of having an infinite number of possibilities for the optimal solution, we have only as many possibilities as there are corners of the feasible region. Table 2.2.1 shows those computations as well as the constraint boundaries that intersect to form each corner point. Now we can easily see that the maximum weekly profit SK8MAN, Inc., can earn is $6,550, and the company does so by manufacturing 285 Sporty skateboards and 65 Fancy skateboards each week.

Constraint Boundaries Corner Point Objective Function Profit x1 0, x2 0 (0, 0) 15(0) + 35(0) $0

2x1 2x2 700, x2 0 (350, 0) 15(350) + 35(0) $5,250 2x1 2x2 700, 5x1 15x2 2400 (285, 65) 15(285) + 35(65) $6,550

x1 0, 5x1 15x2 2400 (0, 160) 15(0) + 35(160) $5,600 Table 2.2.1: Evaluating the objective function at each corner point of the feasible region

z = 0 z = 3500 z = 6550 z = 8750

(0, 160)

(0, 0) (350, 0)

(285, 65)50

50 x1

x2

1 22 2 700x x

Page 16: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-16

2.2.3: Adding a Third Constraint

The U.S. Congress recently enacted legislation regulating the consumption of North American maple by U.S. manufacturers. As a consequence, SK8MAN, Inc.’s supplier has told the company that it can provide no more than 840 veneers per week. How does this law affect the optimal product mix?

The law leads to a new constraint. Again, the decision variables, objective function, and previous constraints remain unchanged.

Maximize: z 15x1 35x

2,

subject to: 5x115x

2 2400 ,

2x1 2x

2 700 ,

7x2 840 , and

x1, x

2 0 .

Figure 2.2.9: The feasible region after adding the North American maple constraint

When the new constraint is graphed (see Figure 2.2.9), we can see that the feasible region changes, but our previous optimal solution is still included. Applying the corner point principle confirms that the maximum profit is unchanged, because the optimal solution without the North American maple constraint remains in the feasible region after the North American maple constraint is added to the formulation. Table 2.2.2 shows the corner point calculations with the new constraint added to the formulation.

Constraint Boundaries Corner Point Profit Function Profit x1 0, x2 0 (0, 0) 15(0) + 35(0) $0

2x1 2x2 700, x2 0 (350, 0) 15(350) + 35(0) $5,250 2x1 2x2 700, 5x1 15x2 2400 (285, 65) 15(285) + 35(65) $6,550

7x2 840, 5x1 15x2 2400 (120, 120) 15(120) + 35(120) $6,000 x1 0, 5x1 15x2 2400 (0, 120) 15(0) + 35(120) $4,200

Table 2.2.2: Evaluating the objective function at each corner point of the new feasible region

0,0

(0, 120) (120, 120)

(350, 0)

(285, 65)50

50x1

x2

27 840x

Page 17: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-17

Since the North American maple constraint has no affect on the optimal product mix, it is called a nonbinding constraint. Notice that the optimal product mix produces 285 Sportys and 65 Fancys per week. Since the Sporty boards do not use North American maple, and the Fancy boards use 7 North American maple veneers per board, the optimal product mix uses only 65(7) = 455 of the 840 available North American maple veneers. Because not all of the available resource is expended in producing the optimal solution, we say there is a slack of 840 – 455 = 385.

2.2.4: A Fourth Constraint Finally, SK8MAN, Inc.’s Chinese maple supplier has decided to limit its exports and will deliver a maximum of 1,470 veneers per week. Now what mix of products will maximize weekly profit? As before, this information leads to a new constraint, but the decision variables, objective function, and previous constraints remain the same.

Maximize: z 15x1 35x

2,

subject to: 5x115x

2 2400 ,

2x1 2x

2 700 ,

7x2 840 ,

7x1 1,470 , and

x1, x

2 0 .

Figure 2.2.10: The feasible region after adding the Chinese maple constraint

As the graph in Figure 2.2.10 shows, the feasible region again changes. The previous optimal solution, (285, 65), is no longer feasible, so we must test each corner point. Notice that the corner points created by the boundary of the Chinese maple constraint are new.

(0, 120) (210, 90)

(120, 120)

(0, 0) (210, 0)

50

50x1

x2

17 1,470x

Page 18: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-18

Constraint Boundaries Corner Point Profit Function Profit x1 0, x2 0 (0, 0) 15(0) + 35(0) $0

7x1 1470, x2 0 (210, 0) 15(210) + 35(0) $3,1507x1 1470, 5x1 15x2 2400 (210, 90) 15(210) + 35(90) $6,3007x2 840, 5x1 15x2 2400 (120, 120) 15(120) + 35(120) $6,000

x1 0, 5x1 15x2 2400 (0, 120) 15(0) + 35(1200) $4,200Table 2.2.3: Evaluating the objective function after the last constraint is added

Now SK8MAN, Inc.’s maximum profit is $6,300 per week. The product mix that achieves that profit is 210 Sportys and 90 Fancys. Notice the tendency for maximum profit to decrease as the number of constraints increases.

2.2.5: Adding a Third Decision Variable SK8MAN is introducing a new product, Pool-Runner, which is made from Chinese maple. It is wider and shorter compared to the Sporty so that it will be easy to use in a pool. It takes 4 minutes to shape a Pool-Runner, and SK8MAN, Inc., earns $20 for each one sold. What will be the new constraints, and what is the optimal product mix?

2.2.6: Problem Formulation with Three Decision Variables

Let: x1 the weekly production rate of Sportys , x2 the weekly production rate of Fancys , x3 the weekly production rate of Pool-Runners , and

z the amount of profit SK8MAN earns per week .

Maximize: z 15x1 35x2 20x3 ,

subject to: 5x115x

2 4x

3 2400 (shaping time constraint),

2x1 2x

2 2x

3 700 (truck constraint),

27 840x (North American maple constraint),

7x1 7x

3 1,470 (Chinese maple constraint), and

Page 19: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-19

x1, x

2, x

3 0 (non-negativity constraints).

Adding the third decision variable, x3, makes it very difficult to solve this problem graphically. Three decision variables means that we need three dimensions in which to graph the feasible region. While it is possible to do so, visualizing such a feasible region is very difficult for most people. There are two other possible ways to solve linear programming problems involving three or more decision variables. The first way is to apply a paper-and-pencil algorithm called the Simplex Method. This algorithm is explained in the Enrichment section at the end of the chapter. Another way to solve this and similar problems is to use a spreadsheet solver, which applies a computer algorithm to solve linear programming problems. The following directions will walk you through the steps needed to use the Excel Solver to solve this problem.

2.2.7: Using the Excel Solver Step 1: Open Excel and go to Tools on the menu bar. If the Solver option in the Tools drop-down menu is not available, we need to add it. To add Solver, we go to Add-Ins under the Tools menu and click on it. The Add-Ins window will appear, and we will check the Solver Add-In box and then click OK. We are now ready to set up a spreadsheet.

Step 2: Setting up the spreadsheet is easy. We just type the following into the cells, as shown in Figure 2.2.11. Notice that the coefficients for each decision variable are in the same column as the decision variable above them. Cells B5, C5, and D5 are empty. Empty cells are treated as zero values. These cells are where Solver will put the values it computes for the decision variables once Solver is run. Because the values in these cells are continually changing, Solver calls them “changing cells.”

Figure 2.2.11: Setting up the problem formulation in an Excel spreadsheet

Page 20: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-20

Step 3: We need to define each of the constraints mathematically so that Solver will know what to compute. To do this we will go to cell E8 and type in:

=B$5*B8+C$5*C8+D$5*D8 Note that this expression computes the sum total of the shaping time that is consumed by a particular set of values of the three decision variables. The dollar signs tell us that row 5 is a fixed row. In other words, the Solver will hold the exact values in that row and will not change them. The formula multiplies the value of each of the decision variables used by Solver by each of the coefficients for the shaping time constraint and computes a total (see Figure 2.2.12). Notice we have not run Solver to find values for the decision variables, so the program assumes they are all zero. This is why a zero appears after the formula for the left-hand side of the constraint is typed in.

Figure 2.2.12: Defining the constraints in the spreadsheet

Next, we will set up a formula like this for the left-hand side of each of the remaining constraints. We will set up the non-negativity constraints later. We will type the following in each of the cells noted below:

E9: =B$5*B9+C$5*C9+D$5*D9 E10: =B$5*B10+C$5*C10+D$5*D10 E11: =B$5*B11+C$5*C11+D$5*D11

Our spreadsheet should look like the one in Fig 2.2.13.

Page 21: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-21

Figure 2.2.13: The spreadsheet with formulas for all four constraints added

Step 4: Next, we need to define the objective function so that Solver will know what to optimize. The objective function will be typed into cell G7. Select cell G7 and type the following:

=B$5*B7+C$5*C7+D$5*D7

Notice that a 0 appears when we are done. Right now there is no profit, since the values of the decision variables are 0. This equation will compute the maximum profit once we set up and run Solver. Our spreadsheet should now look like the one in Figure 2.2.14.

Figure 2.2.14: The spreadsheet with the objective function added

Page 22: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-22

Step 5: For convenience, we will add labels to our spreadsheet. This will help us when we set up Solver. We also need to add the right-hand side of each constraint, which is the amount of each resource that is available.

We will add the following to cells F8 through F11 and G8 through G11 of our spreadsheet.

F8: <= G8: 2400 F9: <= G9: 700 F10: <= G10: 840 F11: <= G11: 1470

Our spreadsheet should now look like the one in Figure 2.2.15. Notice that the amount of each resource that is consumed for a particular set of values of the decision variables will be displayed in column E, and those amounts must be less than or equal to the amount of each resource available that appears in column G.

Figure 2.2.15: The spreadsheet with the SK8MAN problem completely formulated

Step 6: Before we can solve the problem, we have to set up parameters in the Solver program. These parameters include all of the parts of the problem formulation: the decision variables, objective function, and constraints. We need to tell Solver where in the spreadsheet each of these parameters is located. We need to be sure we are located on cell G7 before we do the following: Go to the Tools menu and choose Solver. A Solver Parameters window should come up with the target cell being $G$7 (see Figure 2.2.16). Notice that the target cell is the cell in which we defined the objective function. The dollar signs merely indicate that specific cell. When the Solver Parameters window is opened, if cell G7, containing the value of the objective function, is not already selected, we can select it now.

Page 23: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-23

Figure 2.2.16: Beginning the Solver Parameters setup

Recall that the subtitle of our spreadsheet is “Maximization Problem.” The reason for having the subtitle is to remind us that for this problem we are finding a maximum value. In the Solver Parameters window, we make sure the Max circle is filled in.

Next, look at the By Changing Cells title. This is another way of saying variables or variable cells. We need to tell the Solver that our decision variable cells are B5, C5, and D5. We can type B5, C5, and D5 or use the shortcut B5:D5. When we are done, click inside the box labeled “Subject to the Constraints.” Solver will add dollar signs in the cell names, and you can leave them as they are.

Now we will add the constraints, one at a time. Click Add. As shown in Figure 2.2.17, another window will appear titled Add Constraint. We want the value of the formula we put in

Page 24: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-24

Figure 2.2.17: The Add Constraint window

cell E8 to be less than or equal to cell G8, or 2,400. To do this we type E8 into Cell Reference and G8 into Constraint. The inequality symbol can be changed by using the drop-down menu. In this case we want to leave it as is. Click Add and then continue to the next constraint. We want E9 to be less than or equal to G9, so we type E9 into Cell Reference and G8 into Constraint and then click Add. E10 should be less than or equal to G10, so we enter these cell addresses into the appropriate boxes and then click Add. Finally, E11 should be less than or equal to G11, so repeat the procedure for these cells and then click OK. When we finish, we close the window. Our constraints should be listed in the Subject to the Constraints box in the Solver Parameters window (see Figure 2.2.18 below).

Page 25: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-25

Figure 2.2.18: Continuing to set problem parameters in Solver

Step 7: We did not include the non-negativity constraints, because the Solver has a shortcut for doing so. Click on the Options button in the Solver Parameters window. A new window appears titled Solver Options. Check the box that says Assume Non-Negative. We also want to check the box that says Assume Linear Model. When you are done, click OK (see Figure 2.2.19).

Page 26: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-26

Figure 2.2.19: Adding the Solver Options

Step 8: Now we are ready to solve. Making sure that cell G7 is selected, as it is in Figure 2.2.19 above, we click Solve, the Solver Results window pops up, and the results appear in the spreadsheet, as shown in Figure 2.2.20.

Page 27: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-27

Figure 2.2.20: Solver has solved the three-decision-variable SK8MAN problem

We can observe the optimal product mix that results in the greatest profit for SK8MAN. The program gives us the option of restoring our original values or keeping the Solver’s solution. The program also gives us the option of creating one or all three types of reports. For this example we will create an Answer Report that will appear as a tab (see Figure 2.2.21). The Answer Report summarizes the results. What does this report mean?

Notice that the optimal product mix calls for producing 104 Fancys, 210 Pool-Runners, and 0 Sportys (x1 has a final value of 0) per week. Notice also that two of the constraints are labeled binding, two are labeled nonbinding, and there is a slack amount reported for each constraint. What is the Solver telling us here?

For each constraint, compare the cell value in the Answer Report with the amount of that resource available recorded in column G. Now consider the slack amount for each constraint. Notice that the cell values for shaping time and Chinese maple are equal to the corresponding numbers recorded in column G. That means all of those resources have been consumed, and the slack amount is 0. On the other hand, for the other two constraints, the slack amount equals the number in column G minus the cell value in the Answer Report. This tells us how much of those two resources is left over.

Page 28: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-28

Figure 2.2.21: The Answer Report for the three-decision-variable SK8MAN problem

2.2.8: Even More Decision Variables SK8MAN, Inc., wants to increase its product variety with different colors and decorations. SK8MAN decides to produce three more products in addition to Sporty, Fancy, and Pool-Runner. The new products will be named Pool-Beauty, Recluse, and Ringer. Each Pool-Beauty will earn $22 profit, is manufactured using North American maple, and requires 10 minutes of shaping time. Each Recluse will earn $17 profit, is made of Chinese maple, and requires 7 minutes of shaping time. Each Ringer will earn $19 profit, is made of Chinese maple, and uses 4 minutes of shaping time. Since SK8MAN only purchases trucks from a single supplier, the three new products are also subject to the truck availability constraint. Since the SK8MAN products will differ from one another in color and decoration, they have added a worker to do screen-printing, and we must take into account the time required for screen-printing each deck as well as the available time for doing so. The screen-printing times appear in Table 2.2.4, and we know that SK8MAN is open for 8 hours a day, 5 days a week. However, SK8MAN is now providing all of its workers with two 15-minute breaks each day, so

Page 29: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-29

the total time available for both the screen-printing and shaping operations must be adjusted accordingly.

Product Sporty Fancy Pool-Runner

Pool-Beauty

Recluse Ringer

Time (min.) 7 10 8 10 5 6

Table 2.2.4: Screen-printing time for each skateboard 2.2.9: Problem Formulation with Six Decision Variables

Let: x1 the weekly production rate for Sporty boards , x2 the weekly production rate for Fancy boards ,

x3 the weekly production rate for Pool-Runner boards , x4 the weekly production rate for Pool-Beauty boards , x5 the weekly production rate for Recluse boards , x6 the weekly production rate for Ringer boards , and z the amount of profit SK8MAN earns per week .

Maximize: z 15x1 35x

2 20x

3 22x

417x

519x

6,

subject to: 5x115x

2 4x

310x

4 7x

5 4x

6 2250 ,

2x1 2x

2 2x

3 2x

4 2x

5 2x

6 700 ,

7x2 7x

4 840 ,

7x1 7x

3 7x

5 7x

6 1470 ,

7x110x

2 8x

310x

4 5x

5 6x

6 2250 , and

xi 0, for each i 1,2,K ,6 .

This problem has six decision variables. We cannot even visualize a graphical solution, so we must employ Solver to find a solution. Figure 2.2.22 displays the spreadsheet after Solver has been used to find a solution.

Page 30: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-30

SK8MAN, Inc. S

po

rty

Fan

cy

Po

ol-

Ru

nn

er

Po

ol-

Beau

ty

Reclu

se

Rin

ger

Maximization Problem

Decision Variables x1 x2 x3 x4 x5 x6 Dec. Variable Values 0 94 25 0 0 185 Objective Function 15 35 20 22 17 19 7305 Shaping constraint 5 15 4 10 7 4 2250 <= 2250 Truck constraint 2 2 2 2 2 2 608 <= 700 Am. Maple constraint 0 7 0 7 0 0 658 <= 840 Chin. Maple constraint 7 0 7 0 7 7 1470 <= 1470 Screen-Print constraint 7 10 8 10 5 6 2250 <= 2250

Figure 1.2.22: Solver results for the SK8MAN problem having six decision variables

The Solver Answer Report appears in Figure 2.2.23. Notice that the optimal product mix is to produce 0 Sportys, 94 Fancys, 25 Pool-Runners, 0 Pool-Beautys, 0 Recluses, and 185 Ringers. Notice also that the profit realized in this case is less than in the previous example, which had only three possible products in the mix rather than six. In general, increasing the number of decision variables (products) should increase the profit. What characteristics of this six-decision-variable problem do you think caused a lower profit?

Looking at the Constraints section of the Solver Answer Report, three of the constraints are marked “Binding,” while the other two are marked “Not Binding.” Notice that for each of the binding constraints, the value of the cell containing the formula for the left-hand side of the constraint inequality is exactly equal to the right-hand side of the constraint. However, for the two nonbinding constraints, the cell value is less than the right-hand side of the constraint. There also is a nonzero number listed in the column labeled “Slack.” The slack value is the difference between the left-hand and right-hand sides of the constraint, and may be thought of as the amount of that particular resource that is not used up by the optimal solution. For example, SK8MAN could use 840 North American maple veneers per week, but the optimal solution to this problem uses only 658 of them, resulting in a slack amount of 182 veneers. On the other hand, SK8MAN can use only 2,250 hours of shaping time in this problem, and the optimal solution to this problem completely exhausts that resource. Thus, there is no slack in the shaping time constraint.

Page 31: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-31

Microsoft Excel 10.0 Answer Report Worksheet: [SK8MAN-6 rev.xls]Sheet1 Report Created: 9/4/2007 2:57:05 PM Target Cell (Max) Cell Name Original Value Final Value $J$7 Objective Function 0 7305 Adjustable Cells Cell Name Original Value Final Value $B$5 Decision Variable x1 0 0 $C$5 Decision Variable x2 0 94 $D$5 Decision Variable x3 0 25 $E$5 Decision Variable x4 0 0 $F$5 Decision Variable x5 0 0 $G$5 Decision Variable x6 0 185 Constraints Cell Name Cell Value Formula Status Slack $H$8 Shaping constraint 2250 $H$8<=$J$8 Binding 0 $H$9 Truck constraint 608 $H$9<=$J$9 Not Binding 92 $H$10 Am. Maple constraint 658 $H$10<=$J$10 Not Binding 182 $H$11 Chin. Maple constraint 1470 $H$11<=$J$11 Binding 0 $H$12 Screen-Print constraint 2250 $H$12<=$J$12 Binding 0

Figure 2.2.23: The Solver Answer Report for the six-decision-variable SK8MAN problem

Page 32: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-32

2.2.10: The Simplex Method (Optional) New Concepts

RHS, LHS Slack variables Basis Iteration

Matrices o Augmented o Pivot o Canonical form o Row operations

Simplex algorithm o Starting o Direction o Comparison o Stopping o Interpreting

Figure 2.2.24: Graph of feasible region with two decision variables and three constraints showing path of the simplex method

(480,0)

(230,120)

(0,160)

(0,350)

(0, 120) (120, 120)

(350, 0)

(285, 65)

50

50 (0, 0) x1

x2

Page 33: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-33

The simplex method is an algorithm used to solve linear programming problems. It can be used for solving complex problems, but we will demonstrate a case with just two decision variables in order to visualize the process more easily.

Recall the situation from section 1 when we were maximizing a profit function with five constraints. The formulation was:

Let: x1 the number of Sporty boards produced per week ,

x2 the number of Fancy boards produced per week , and

z the amount of profit SK8MAN, Inc. earns per week .

Maximize: z 15x1 35x

2,

subject to: 5x115x

2 2400 ,

2x1 2x

2 700 ,

7x2 840 , and

x1, x

2 0 .

In the graph of the above system of equations, there are nine points of intersection between any two constraint lines. Although the feasible region has just five corner points, the simplex method considers all nine points of intersection.

Figure 2.2.25: The feasible region for the SK8MAN problem with two

decision variables and five constraints

While this problem can be solved graphically, the simplex method lets us approach it algebraically. The process begins at one corner point. The origin is an ideal starting point, because there is zero profit when no products are produced. We evaluate the objective function there, and then we move along an edge of the feasible region to an adjacent corner point and evaluate the objective function there. We continue this process until it is impossible to move to an adjacent corner point where the objective function will be greater than the current corner point. Because this process involves repeating the same steps over and over, it is said to be iterative. The profit at the corner point whose associated profit is greater than that of all its neighbors will be the greatest profit possible. In other words, any local maximum is also the global maximum.

(0, 120) (120, 120)

(350, 0)

(285, 65)50

50(0, 0) (480,0)

(230,120) (0,160)

(0,350)

x1

x2

Page 34: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-34

Conceptual review of the simplex method for a profit maximization problem:

1. Evaluate the objective function at the origin. 2. Moving in the direction of greatest increase, evaluate the objective function at a

neighboring corner point. 3. Continue moving to an adjacent corner point until an increase in the objective function is

not possible. 4. The corner point where the objective function is greater than its neighbors is the

maximum.

2.2.11: The Algebra of the Simplex Method The simplex method relies on a matrix. Algebraic manipulation of a matrix is much simpler for equations than it is for inequalities. That being the case, we need to change our constraints from inequalities to equalities.

The first three constraints from above:

1 25 15 2400x x ,

1 22 2 700x x , and

27 840x

represent the limitations of shaping time, available trucks, and North American maple, respectively.

To change these inequalities into equations, we must introduce slack variables. A slack variable represents the amount of a resource left over after any particular mix of products has been produced. Let: the number of excess minutes of shaping times , the number of excess truckst , and the number of excess North American maple veneersm .

We can now rewrite our constraints as equations.

1 25 15 1 0 0 2400x x s t m (shaping time constraint),

1 22 2 0 1 0 700x x x t m (truck availability constraint), and

1 20 7 0 0 1 840x x s t m (North American maple constraint).

Our objective function can also be written to include the slack variables.

1 215 35 0 0 0z x x s t m

Why are the coefficients of the slack variables in the above four equations the values they are?

The format of all equations we include in the matrix needs to be consistent, with all of the coefficients of the variables on the left-hand side and the values that they generate on the right-hand side. For our example, that means the right-hand side of the objective function needs to be a constant term, so we subtract all of the terms on the right-hand side from both sides of the equation.

Page 35: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-35

1 215 35 0 0 0z x x s t m

1 215 35 0 0 0 0z x x s t m

1 215 35 0 0 0 0z x x s t m

With our objective function and constraint equations all in standard form, we are ready to create the matrix. Each column in the matrix will correspond to one of the variables in our system of equations. The top row of the matrix will always represent the objective function. The bottom three rows show which three variables are in our basis. The basis refers to the output of the current production mix.

x1 x2 s t m Solution Basis 0 z –15 –35 0 0 0 0 1 s 5 15 1 0 0 2400 2 t 2 2 0 1 0 700 3 m 0 7 0 0 1 840 This matrix shows s, t, and m in the basis because our starting point for the simplex method is the origin. The origin represents a production mix of 0 Sportys (x1) and 0 Fancys (x2), so the output is merely leftover shaping time, trucks, and North American maple veneers. The solution column of the matrix shows that for that production mix, we make 0 profit and have 2,400 minutes of shaping time, 700 trucks, and 840 North American veneers left over.

Why do these values make sense when starting at the origin?

Notice the columns corresponding to the variables in the basis. The basis variables are s, t, and m, and those columns all contain a single 1, and every other number in the column is 0. When this is the case, those columns are said to be in canonical form. Mathematicians have proven that the simplex method always maintains the canonical form of the current basis.

The next step in the simplex method calls for us to move in the direction of greatest increase. At the origin we are making 0 Sportys and 0 Fancys. Our next corner point to check will involve either building some Sportys or some Fancys. This means we are either going to add Sportys or Fancys to our basis, and whichever resource we run out of first will leave the basis.

To determine which product will enter the basis, we compare the coefficients in the top row of the matrix. The negative coefficient of greatest absolute value, which is the most negative coefficient, represents the product that will generate the greater profit, so that is the one we pick. In our example, we will choose to start producing Fancys.

x1 x2 s t m Solution Basis 0 z –15 –35 0 0 0 0 1 s 5 15 1 0 0 2400 2 t 2 2 0 1 0 700 3 m 0 7 0 0 1 840 Since we will be making Fancys, eventually we will run out of a resource necessary for their production. When that happens, we will not be able to produce any more. To determine which

Page 36: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-36

resource will leave the basis, we compare the ratios of the right-hand side (solution) and the coefficients from the column entering the basis (x2). The ratio that is smallest shows us which resource we will run out of first and thus will leave the basis.

x1 x2 s t m Solution Basis 0 z –15 –35 0 0 0 0 1 s 5 15 1 0 0 2400 2 t 2 2 0 1 0 700 3 m 0 7 0 0 1 840

In our example the ratios are as follows.

2400 minutes shaping time

15 minutes shaping time per fancy 160 Fancys

700 trucks

2 trucks per fancy 350 Fancys

840 North American maple veneers

7 North American veneers per Fancy 120 Fancys

These ratios show us that we will run out of North American maple veneers first, so it will be the resource to leave the basis as Fancys enter the basis.

The column for Fancys was selected in the first step, and the row for North American maple veneers was selected in the second step. This corresponds to Fancys entering the basis and North American maple veneers leaving the basis. The element of the matrix where this column and row intersect is called the pivot element.

x1 x2 s t m Solution Ratios Basis 0 z –15 –35 0 0 0 0 1 s 5 15 1 0 0 2400 2400/15 2 t 2 2 0 1 0 700 700/2 3 m 0 7 0 0 1 840 840/7

To pivot a matrix around a particular element means to make that element equal to 1, and all other elements in its column equal to 0. In other words, the pivot column changes to canonical form, with the pivot element being the element that is equal to 1.

Pivoting a matrix requires elementary row operations. Just as addition, subtraction, multiplication, and division are basic operations with numbers, there are three basic row operations for matrices: row switching, row multiplication, and row addition.

The first elementary row operation, row switching, is precisely what the name suggests: one row is switched with another row.

Page 37: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-37

1 2 3

4 5 6

7 8 9

R1R2 4 5 6

1 2 3

7 8 9

The second elementary row operation, row multiplication, allows you to multiply an entire row by a single number.

1 2 3

4 5 6

7 8 9

3R1R1 3 6 9

4 5 6

7 8 9

The last elementary row operation, row addition, involves adding a multiple of one row to another row.

1 2 3

4 5 6

7 8 9

2 R2 R3R3

1 2 3

4 5 6

15 18 21

The first step in pivoting our matrix will be to make the pivot element equal one. To do this, we multiply the pivot row by the reciprocal of the pivot element.

15 35 0 0 0 0

5 15 1 0 0 2400

2 2 0 1 0 700

0 7 0 0 1 840

1

7R4 R4

15 35 0 0 0 0

5 15 1 0 0 2400

2 2 0 1 0 700

0 1 0 0 17

120

Next, we will need to make all the other numbers in the pivot column equal to 0. To do this we will use row addition. Each row will require a separate operation. We will multiply the pivot row by the opposite of the number we are to make 0 and then add the product of the pivot row to the row in question. Keep in mind this operation affects the entire row, not just the element in the pivot column. For example, in the first row, there is a –35 in the pivot column. To make the –35 equal 0, we need to multiply the 1 in the pivot row by 35 and add the two together to replace the original first row.

15 35 0 0 0 0

5 15 1 0 0 2400

2 2 0 1 0 700

0 1 0 0 17

120

35R4 R1R1 15R4 R2 R2 2 R4 R3R3

15 0 0 0 5 4200

5 0 1 0 157

600

2 0 0 1 27

460

0 1 0 0 17

120

Adding the row and column headings back to our matrix allows us to get a better picture of what we have accomplished algebraically. Geometrically, this is equivalent to moving from (0, 0) to (0, 120) on the boundary of the feasible region.

Page 38: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-38

x1 x2 s t m Solution Basis 0 z –15 0 0 0 5 4200 1 s 5 0 1 0 –15/7 600 2 t 2 0 0 1 –2/7 460 3 x2 0 1 0 0 1/7 120

Now we can see that Fancys entered the basis and North American maple veneers left the basis. Notice that the columns for whatever variables are in the basis are also in canonical form. Focusing on the solution column, we can see the production mix represented by this matrix calls for us to make 120 Fancys. This would leave us with 600 excess minutes of shaping time and 460 excess trucks. We would earn a profit of $4,200.

Now we go through the process again.

Identify the pivot element: the most negative number in the profit row of our current matrix shows the pivot column. Selecting the smallest of the ratios of the right-hand side and the coefficients from the pivot column gives us the pivot row. Notice that one of these ratios is undefined. This occurs because it is the ratio associated with the variable x2. If x2 were to leave the basis while x1 entered the basis, that is the geometric equivalent of moving to the corner point (350, 0). However, the current corner point (0, 120) and the corner point (350, 0) are not adjacent. Thus, there is no way to travel along just one edge of the feasible region to move from one to the other.

x1 x2 s t m Solution Ratios Basis 0 z –15 0 0 0 5 4200 1 s 5 0 1 0 –15/7 600 600/5 2 t 2 0 0 1 –2/7 460 460/2 3 x2 0 1 0 0 1/7 120 120/0 Again we will use elementary row operations to make the pivot element equal to 1 and all other entries in the pivot column equal to 0.

15 0 0 0 5 4200

5 0 1 0 157

600

2 0 0 1 27

460

0 1 0 0 17

120

1

5R2 R2

15 0 0 0 5 4200

1 0 15

0 37

120

2 0 0 1 27

460

0 1 0 0 17

120

15 0 0 0 5 4200

1 0 15

0 37

120

2 0 0 1 27

460

0 1 0 0 17

120

15R2 R1R1

2 R2 R3R3

0 0 3 0 107

6000

1 0 15

0 37

120

0 0 25

1 47

220

0 1 0 0 17

120

Page 39: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-39

As we did previously, we will add the row and column headings to interpret our new matrix.

x1 x2 s t m Solution Basis 0 z 0 0 3 0 –10/7 6000 1 x1 1 0 1/5 0 –3/7 120 2 t 0 0 –2/5 1 4/7 220 3 x2 0 1 0 0 1/7 120 This production mix has both Sportys and Fancys in the basis. The solution column tells us that if we make 120 Sportys and 120 Fancys, we generate $6,000 of profit. The $6,000 of profit is greater than the $4,200 we would make with the production mix from the previous matrix.

Now we go through another iteration of the process. We’ll identify the pivot element the same as before and then pivot the matrix about that element. Notice, however, that one of the ratios is negative. This situation arises when you would have to move backward to reach the point of intersection, and doing that is equivalent to moving in the direction of decreasing profit.

x1 x2 s t m Solution Ratios Basis 0 z 0 0 3 0 –10/7 6000 1 x1 1 0 1/5 0 –3/7 120 120/(–3/7) 2 t 0 0 –2/5 1 4/7 220 220/(4/7) 3 x2 0 1 0 0 1/7 120 120/(1/7)

0 0 3 0 107

6000

1 0 15

0 37

120

0 0 25

1 47

220

0 1 0 0 17

120

7

4R3R3

0 0 3 0 107

6000

1 0 15

0 37

120

0 0 25

1 47

220

0 1 0 0 17

120

0 0 3 0 10

76000

1 01

50

3

7120

0 0 2

51

4

7220

0 1 0 01

7120

10

7R3 R1R1

3

7R3 R2 R2

1

7R3 R4 R4

0 0 25

20 6550

1 0 1

10

3

40 285

0 0 7

10

7

41 220

0 11

10

1

40 65

Page 40: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-40

x1 x2 s t m Solution Basis 0 z 0 0 2 5/2 0 6550 1 x1 1 0 –1/10 3/4 0 285 2 m 0 0 –7/10 7/4 1 385 3 x2 0 1 1/10 –1/4 0 65 If we try to go through our process again, we get stuck identifying the pivot column. Since there are no longer any negative numbers in the top row of our matrix, we can stop. The simplex method makes it unnecessary for us to check any other corner points. Doing so would only show us a decrease in the objective function. Our maximum profit will be $6,550, which we earn by making 285 Sportys and 65 Fancys.

The following graphs visually review the iterations of the simplex method we performed. We started our process at the origin and then moved in the direction of greatest increase of the objective function. We continued in that direction until we were unable to make a move that would further increase the objective function.

Page 41: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-41

Figure 2.2.26: Moving in the direction of greatest increase from the origin

Figure 2.2.27: Moving to the next corner point of the feasible region

Figure 2.2.28: Increasing the objective function by moving to the next corner point

(0, 120) (120, 120)

(350, 0)

(285, 65)50

50(0, 0)x1

x2

(0, 120) (120, 120)

(350, 0)

(285, 65)50

50(0, 0)x1

x2

A(0, 120)

(120, 120)

(350, 0)

(285, 65)50

50(0, 0)

BC

x1

x2

Page 42: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-42

At this point, let us investigate the elegance of the simplex method. We will rely on the graph of the feasible region for the discussion. Notice that the points A(250, 50), B(100, 120), and C(285, 65) all lie in the feasible region. Point A, the green point, is in the interior of the feasible region, while B, the red point, is on one of the edges, and C, the purple point, is a corner point. Using the coordinates for each point as the values for x1 and x2 and substituting those values into the constraint equations that are part of the simplex formulation, we obtain the following results.

A(250, 50): 400s 100t 490m B(100, 120): 100s 260t 0m C(285, 65): 0s 0t 385m Notice that when we compute the values of all the decision variables for a corner point, two of them are equal to 0. In the context of the problem, this tells us that when we make 285 Sportys and 65 Fancys, we will use up all our available shaping time and trucks, but we will have 385 North American maple veneers left over. Since the simplex method only considers corner points, it will always be the case that two of the five decision variables will be equal to 0. The three nonzero decision variables form the current basis. As the simplex method moves from corner point to corner point, it is evaluating a different basis each time.

Moving from one corner point to the next changes the basis. As a new decision variable enters the basis, another one is forced to leave. The logic of the simplex method chooses which decision variable enters the basis. In our example, the choice was based on profitability. The mathematics of the problem formulation determines which decision variable leaves the basis.

[FK Level: 9.5]

Page 43: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-43

Problem 2.3: The Pallas Sport Shoe Company—Interpreting Results

The Pallas Sport Shoe Company manufactures six different lines of sport shoes: High Rise, Max-Riser, Stuff It, Zoom, Sprint, and Rocket. Table 2.3.1 displays the amount of profit generated by each pair of shoes for each of these six lines. The production manager of the company would like to determine the daily production rates for each line of shoes that will maximize profit.

Product High Rise Max-Riser Stuff It Zoom Sprint Rocket Profit $18 $23 $22 $20 $18 $19

Table 2.3.1: Profit per pair for six lines of sport shoes

As shown in Figure 2.3.1, there are six main steps in the production of a pair of sport shoes at Pallas. First, the parts that will go together to form the upper portion of the shoe are cut using patterns on a large stamping machine. This process resembles cutting dough with a cookie cutter. Next, these parts are stitched or cemented together to form an upper, and holes for the laces are punched. Then, an insole is stitched to the sides of the upper. The completed upper is then placed on a plastic mold to form the final shape of the shoe. After the upper has been molded, it is cemented to the bottom sole using heat and pressure. Finally, the shoe is inspected, and any excess cement is removed.

Figure 2.3.1: The steps in manufacturing a sport shoe

The time it takes to complete each of these steps differs across the six lines, and the total time available for each process constrains the daily production rates. Table 2.3.2 shows the time in

MOLDING

Page 44: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-44

minutes required per pair for each of the six production steps for each of the six lines of sport shoe produced by Pallas, as well as the total number of minutes available per day for each step.

Cutting Upper Finishing

Insole Stitching

Molding Sole-to-Upper Joining

Inspecting

High Rise 1.25 3.5 2 5.5 7.5 2 Max-Riser 2 3.75 3.25 6 7.25 3 Stuff It 1.5 5 2.75 7 6 2 Zoom 1.75 3 2.25 6.5 7 3 Sprint 1 4 3 8 6.75 2 Rocket 1.25 4.25 2.5 5 6.5 3 Total Min. Available

420

1,260

840

2,100

2,100

840

Table 2.3.2: Time in minutes per step per pair by product line and total time available

2.3.1: Problem Formulation The linear programming formulation of the Pallas Sport Shoe Company problem appears below.

Let: x1 = the daily production rate of High Rise. x2 = the daily production rate of Max-Riser. x3 = the daily production rate of Stuff It. x4 = the daily production rate of Zoom. x5 = the daily production rate of Sprint. x6 = the daily production rate of Rocket.

Maximize: z = 18x1 + 23x2 + 22x3 + 20x4 + 18x5 + 19x6,

subject to: 1.25x1 + 2x2 +1.5x3 + 1.75x4 + x5 + 1.25x6 ≤ 420, 3.5x1 + 3.75x2 + 5x3 + 3x4 + 4x5 + 4.25x6 ≤ 1,260, 2x1 + 3.25x2 + 2.75x3 + 2.25x4 + 3x5 + 2.5x6 ≤ 840, 5.5x1 + 6x2 + 7x3 + 6.5x4 + 8x5 + 5x6 ≤ 2,100, 7.5x1 + 7.25x2 +6x3 + 7x4 + 6.75x5 + 6.5x6 ≤ 2,100, and 2x1 + 3x2 +2x3 + 3x4 + 2x5 + 3x6 ≤ 840.

Figure 2.3.2 contains this formulation in an Excel spreadsheet format for use with Solver.

Page 45: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-45

Pallas Sport Shoes Maximization Problem Decision Variables x1 x2 x3 x4 x5 x6 Dec. Var. Values 0 0 0 0 0 0 Objective Function 18 23 22 20 18 19 0 Constraints: Cutting Time 1.25 2 1.5 1.75 1 1.25 0 <= 420 Upper Finishing Time 3.5 3.75 5 3 4 4.25 0 <= 1260 Insole Stitching Time 2 3.25 2.75 2.25 3 2.5 0 <= 840 Molding Time 5.5 6 7 6.5 8 5 0 <= 2100 Sole-to-Upper Joining Time 7.5 7.25 6 7 6.75 6.5 0 <= 2100 Inspecting Time 2 3 2 3 2 3 0 <= 840

Figure 1.3.2: An Excel spreadsheet formulation of the Pallas Shoe problem

2.3.2: Problem Solution Solver generated the Answer Report in Figure 2.3.3 and the Sensitivity Report in Figure 2.3.4.

Examine the Answer Report for the Pallas Shoe Co. problem that appears in Figure 2.3.3. It contains the optimal product mix.

1. Which of the six sport shoe lines should be produced, and at what daily rates, in order to maximize profit? (Express any fractions in the rates correct to two decimal places.)

Looking at the Constraints section, notice that the first five constraints are binding and the sixth one is not. Recall that a constraint is binding if its constraining resource would be completely used up by producing the optimal solution.

2. What do the numbers in the column labeled “Slack” mean?

Page 46: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-46

Microsoft Excel 10.0 Answer Report Worksheet: [Pallas.xls]Sheet3 Report Created: 10/10/2007 4:22:42 PM Target Cell (Max) Cell Name Original Value Final Value $J$9 Objective Function 0 6132.573 Adjustable Cells Cell Name Original Value Final Value B$7 Dec. Var. Values x1 0 0 C$7 Dec. Var. Values x2 0 4.282944 D$7 Dec. Var. Values x3 0 45.12172 E$7 Dec. Var. Values x4 0 72.32747 F$7 Dec. Var. Values x5 0 104.902 G$7 Dec. Var. Values x6 0 89.82118 Constraints Cell Name Cell Value Formula Status Slack H11 Cutting 420 H11<=J11 Binding 0 H12 Upper Finishing 1260 H12<=J12 Binding 0 H13 Insole Stitching 840 H13<=J13 Binding 0 H14 Molding 2100 H14<=J14 Binding 0 H15 Sole-to-Upper Joining 2100 H15<=J15 Binding 0 H16 Inspecting 799.3421903 H16<=J16 Not Binding 40.65780969

Figure 1.3.3: Answer Report for Pallas Shoe Co.

Copy the Excel spreadsheet from Figure 2.3.2, but change the entry for the RHS of the cutting time constraint from 420 to 425. Run Solver and obtain an Answer Report.

3. In terms of the problem, what does this change represent?

4. How does the Answer Report you obtained differ from the one in Figure 2.3.3? Is the first constraint still binding?

5. Change the RHS of the cutting time constraint to 450, 500, and 550. What is the effect of each of these changes on the Answer Report?

6. Change the RHS of the cutting time constraint to 415, 410, and 400. What is the effect of each of these changes on the Answer Report?

7. To what number could you change the RHS of the inspecting time constraint in order to make that constraint binding?

Page 47: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-47

8. What does the slack value for each constraint tell you about that constraint?

Microsoft Excel 10.0 Sensitivity Report Worksheet: [Pallas.xls]Sheet3 Report Created: 10/10/2007 4:22:42 PM Adjustable Cells Final Reduced Objective Allowable Allowable Cell Name Value Cost Coefficient Increase Decrease B$7 Dec. Var. Values x1 0 -0.0507 18 0.0507 1E+30 C$7 Dec. Var. Values x2 4.283 0 23 0.08304 0.23925 D$7 Dec. Var. Values x3 45.12 0 22 0.10084 1.12025 E$7 Dec. Var. Values x4 72.33 0 20 0.25648 0.05543 F$7 Dec. Var. Values x5 104.9 0 18 6.26039 0.52976 G$7 Dec. Var. Values x6 89.82 0 19 0.57258 0.0405 Constraints Final Shadow Constraint Allowable Allowable Cell Name Value Price R.H. Side Increase Decrease H11 Cutting 420 5.58018 420 113.582 8.85918 H12 Upper Finishing 1260 1.7939 1260 15.4508 111.801 H13 Insole Stitching 840 0.25566 840 72.562 4.00806 H14 Molding 2100 0.20338 2100 29.9097 134.352 H15 Sole-to-Upper Joining 2100 0.42226 2100 20.1486 179.707 H16 Inspecting 799.3 0 840 1E+30 40.6578

Figure 2.3.4: Sensitivity Report for Pallas Shoe Co.

Recall that the decision variable x1 is not in the optimal solution. A logical question to ask is whether increasing the profitability of x1 could allow it to enter the optimal solution and, if so, how much of an increase would be necessary. Return again to the spreadsheet in Figure 2.3.2, reset the RHS of the cutting time constraint to its original value, and change the value of the objective function coefficient of x1 from 18 to 19.

9. In terms of the problem, what does this change represent?

10. Run Solver and observe the optimal solution. Is anything different?

The increase in the profitability of x1 caused it to enter the optimal solution, and although other decision variables left the optimal solution, the total profit was increased. However, it was not necessary to increase the profitability of x1 from 18 to 19. Examining the Sensitivity Report in Figure 2.3.4 will tell us by how much the profitability must be increased in order to bring a particular decision variable that was outside the optimal solution into the optimal solution. Notice that for the decision variable x1, the report shows an allowable increase for the objective coefficient of just over 0.05. Now try changing the profitability of x1 to 18.05.

Page 48: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-48

11. Does anything about the optimal solution change?

Now try changing the profitability of x1 to 18.06.

12. What do you observe about the optimal solution? Can you explain what happened in these two instances?

13. If a decision variable is not part of the optimal solution, explain how the Sensitivity Report tells you by how much the coefficient of that variable in the objective function would have to change in order for that decision variable to enter the optimal solution.

14. Based on this example, what do you think will also happen if a new decision variable enters the optimal solution?

Next, notice that the Sensitivity Report in Figure 2.3.4 shows an allowable increase of just over 0.10 in the objective coefficient of x3 and an allowable decrease of just over 1.12. Suppose the coefficient of x3 in the objective function were increased from 22 to 22.10.

15. Would that change affect which decision variables are in the optimal solution?

16. Would it affect the maximum profit generated?

Suppose the objective coefficient of x3 were increased instead to 22.15.

17. What would be the effect of this second change on the optimal solution?

The decision variable that exhibits the smallest range between the allowable increase and the allowable decrease in its objective coefficient is the decision variable that is the most sensitive to change.

18. Which of the decision variables in the Pallas Shoe problem is most sensitive to change?

Finally, the Sensitivity Report in Figure 2.3.4 provides us with information about the constraints. Notice that for each of the binding constraints, its final value and the constraint right-hand side are identical, but for the nonbinding constraint, its final value is less than the constraint right-hand side. Also, notice that there is an allowable increase and an allowable decrease provided for each of the six constraints. One at a time, for each of the constraints, change the value of its RHS to something within the allowable range of increase or decrease. Before you move from one decision variable to the next, be sure to restore the right-hand side of the constraint to its original value.

19. What effect do these changes have on the optimal solution?

Page 49: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-49

Now, for each of the constraints, change its right-hand side to a number that is outside the allowable range.

20. What effect does the second set of changes have on the optimal solution?

Notice that there is a shadow price listed for each of the binding constraints. For example, the shadow price for the cutting time constraint is 5.58. In order to understand what this means, we need to change the right-hand side of this constraint to something within the allowable range. Suppose we change it from 420 to 430.

21. Why is this change within the allowable range?

22. After making this change in the spreadsheet, run Solver and record the new Final Value of the objective function.

23. By how much did the objective function change?

24. Now multiply the shadow price of 5.58 by 10, the amount of change in the constraint right-hand side.

25. What do you observe?

26. How would you describe the shadow price of a constraint?

[FK Level: 9.4]

Page 50: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-50

Chapter 2 (LP-max) Homework Questions 1. Referring back to Problem 2.2, SK8MAN Inc., we might explore what happens if the lines

of constant profit in Figure 2.7 are rotated. Recalling that these lines are determined by the objective function:

a.) What changes in the objective function would result in such a rotation? b.) Now, we should consider what would happen if the slope of the rotated lines of

constant profit matched the slope of one of the constraints. How many points of intersection between the rotated lines of constant profit and the feasible region would there be in that case?

c.) How would this effect the optimal solution?

# of Sportys made

# of

Fan

cys

mad

e

(285, 65)50

50

# of Sportys made

# of

Fan

cys

mad

e

(285, 65) 50

50

# of Sportys made

# of

Fan

cys

mad

e

(285, 65)50

50

Page 51: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-51

2. Sensitivity Analysis

osoft Excel 11.0 Sensitivity Report

Worksheet: [sk8man inc..xls]Sheet1

table Cells Final

Value Reduced

Cost Objective

Coefficient Allowable Increase

Allowable Decrease Cell Name

$B$5 Decision Variable Values x1 0 -7.333334 15 7.333334 1E+30$C$5 Decision Variable Values x2 104 0 35 40 35

$D$5 Decision Variable Values x3 210 0 20 1E+30 7.333334

raints Final

ValueShadow

Price Constraint R.H. Side

Allowable Increase

Allowable Decrease Cell Name

$E$8 Shaping time constraint 2400 2.333333 2400 240 1560$E$9 Truck availability constraint 628 0 700 1E+30 72$E$10 N. A. maple constraint 728 0 840 1E+30 112

$E$11 Chinese maple constraint 1470 1.523810 1470 343.63636 420

The above is a sensitivity report for the SK8MAN INC. problem with four constraints. The sensitivity report helps us to determine how “sensitive” the optimal solution is to changes in data values. This includes analyzing changes in the objective function’s coefficients and the right hand (R.H.) side values of the constraints.

a.) Recall that x1 represents the production rate of Sportys. If the profit on each Sporty

increased from $15 to $22.50, would that be a large enough increase to add Sportys to the optimal product mix?

b.) If the RHS of the shaping time constraint is changed to 2500, what effect would that have on the optimal solution? Explain.

c.) If the RHS of the Chinese Maple constraint were changed to 1100, what would be the effect on the optimal solution? Explain.

3. John Farmer is studying operations research in school. He is curious about applying what

he learns in class to actual problems. John’s father owns a farm in Missouri and has 640 acres under cultivation. John would like to help his father find the mix of corn and soybeans to plant that would maximize his father’s profit. Table 1 contains some data that John collected about corn and soybean production in Missouri.

Page 52: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-52

Corn Soybeans

Price/Bushel $2.90-3.50 $7.85-8.85 Yield/Acre 155.8 bu. 41.4 bu.

Seed Cost/Acre $45.50 $34.00 Fertilizer cost/acre $88.10 $37.80

Fuel Cost/Acre $24.40 $10.00 Worker Cost/Acre $13.00 $9.50

Table 1: 2007-08 USDA corn and soybean estimates for Missouri. a.) In order to formulate the problem, John must know the price per bushel at which corn

and soybeans can be sold. However, the USDA data contains a range of values for both of these crops. What value do you think John should use for each? Why?

b.) What is the largest gross revenue before considering expenses that Mr. Farmer can

make? What crop mix produces this gross revenue?

c.) What is the largest net revenue after expenses that Mr. Farmer can make. What crop mix produces this net revenue?

d.) Suppose Mr. Farmer has budgeted only $60,000 to cover all of the expenses of his

crop production. What is the largest net revenue he can earn under this constraint? 4. Corn and soybeans are used in the production of biofuels. Biofuel consumption is

important for the environment, because greenhouse gas emissions are reduced 12% by ethanol combustion and 41% by biodiesel combustion. The total corn and soybean production in the United States can meet only 12% of the demand for gasoline and 6% of the demand for diesel fuel. In order to encourage corn production, the USDA pays a subsidy to increase the price per bushel to $3.50. However, to get the subsidy, the farmer must produce at least 40,000 bushels of corn.

a.) Assuming that the price per bushel that Mr. Farmer can sell his corn for without the

subsidy is $2.90, should Mr. Farmer accept the constraint of producing at least 40,000 bushels of corn in order to earn the subsidy?

b.) If accepting the subsidy is more profitable, what is the new net revenue? If accepting

the subsidy is not more profitable, what would the subsidy have to be per bushel in order to make accepting it more profitable?

5. After doing some research, John learned that soybean followed by corn a year after,

increases corn yield by 7.5% and saves 25% of the soybean residue nitrogen, which will reduce the fertilizer use in corn production by $2.50 per acre. The reduction in fertilizer use will also reduce its harmful affect to the environment. In the news, he heard that nitrate leaching causes surface and ground water to degrade. This will harm the living things that use water for drinking or swimming. For all of these reasons, John wants to convince his

Page 53: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-53

father, who planted 200 acres of land with soybean last year, to begin to rotate corn and soybeans.

Should John’s father begin to rotate his corn and soybean crops?

6. John gathered some data related to wheat production (Table 2). Is it profitable to produce

some wheat under the constraints in question 1?

Table 2: 2007-2008 Corn, soybean, and wheat estimates for Missouri

Corn Soybean Wheat

Price/bushel $2.90-3.50 $7.85-8.85 $3.75-4.15

Yield/acre 155.8 bushels 41.4 bushels 60 bushels

Seed cost/acre $45.50 $34 $24

Fertilizer cost/acre $88.10 $37.80 $69.25

Fuel cost/acre $24.40 $10 $40

Worker cost/acre $13 $9.50 $9

7. At the end of Problem 2.1, you were asked to formulate the Computer Flips problem after the addition of two new products. Your formulation should have used four decision variables and should have included eight constraints, including four non-negativity constraints. In an Excel spreadsheet, set up this formulation, and use solver to obtain a solution. Then create an Answer Report and a Sensitivity Report. a.) What is the optimal solution?

b.) What does this optimal product mix imply about the planned addition of new

products?

c.) What research do you think the Sales Department should conduct before implementing the optimal product mix?

d.) Market research indicates that Computer Flips could increase the price of a Megaplex

computer so as to increase the profit on each by $50 without affecting the number that could be sold per week. Would doing so affect the optimal solution?

Page 54: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-54

e.) Assuming that a price increase would not affect the number that could be sold each week, by how much could Computer Flips increase the profit on a Simplex computer without affecting the optimal solution?

f.) Suppose that production costs decreased the profit on a Simplex computer by $30.

Would that decrease affect the optimal solution?

g.) New market research indicates that the combined number of Simplex and Multiplex computers sold per week cannot exceed 15, and the combined number of Optiplex and Megaplex computers sold per week cannot exceed 12. What is the effect on the optimal solution?

8. Elegant Fragrances, Ltd. decides to produce two new perfumes, L’Arbre d’Amour and

Evening Rose. The factory management asked the industrial engineering department to develop a mathematical model for maximizing the profit obtained from producing these products. There are also some limitations in resources, budget and the capacity of the factory that should be considered in the model. At the beginning, the industrial engineering team studied the problem and gathered information from which a model can be developed. The team collected the following information:

Each perfume is made of two main components. A fragrant perfume oil and a solvent

such as a combination of ethanol and water, which is necessary to reduce the allergic reactions of skin to the perfume oil.

A fragrant oil for L’Arbre d’Amour is obtained from Mango Pulp, Tea Leaves, and

Juniper Berry, and a fragrant oil for Evening Rose is obtained from Mango Pulp, Tea Leaves, and White Rose.

There are two main processes in the production of these perfumes: Extraction and

blending. In the extraction stage, physical and chemical processes change the raw materials and the perfume oil is extracted. In the blending stage, the perfume oil is blended with the solvent. However, Elegant Fragrances does not work directly with the fragrance raw materials, but instead purchases fragrance essences from suppliers and only blends them.

The annual budget for producing the two new perfumes is limited to $1,000,000.

The capacity of blending regardless of the perfume type is 50,000 pounds per year.

The other information needed for formulating this problem is summarized in Tables 3 and 4:

Page 55: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-55

Table 3: Some information about the perfumes

L’Arbre d’Amou Evening Rose

Income (per pound) $408.1 $209.9 P

erce

nta

ge o

f ra

w m

ater

ials

Fra

gran

ce O

il (

Pu

re) Mango 3 5

Tea Leaves 5 7

Juniper Berry

7 0

White Rose 0 8

Sol

ven

t

Ethanol and Water

85 80

Process Costs (Per Pound)

Blending $12 $12

Table 4: Ingredient information

Availability

(pounds per year)Cost

($ per pounds)

Mango 3500 14.4

Tea Leaves 2920 10.8

Juniper Berry

1530 384

White Rose 2000 56

Ethanol and Water

40000 7

Page 56: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-56

a. Define the decision variables as the amount of annual production of each perfume and help the industrial engineering team formulate this problem for maximizing the profit within the given constraints.

b. Use Solver to obtain the optimal solution to the Elegant Fragrances problem.

9. The management at Elegant Fragrances decides to produce two more new perfumes, Evergreen and Embrasser du Soir. The production capacity remains the same, but $500,000 more will be allocated for production. The income and costs, as well as the key ingredients and their proportions for the new perfumes are given in Table 5 below. If the availability of resources is unchanged, what production rates for each of the four new perfumes should the industrial engineering team recommend in order to maximize profit?

Evergreen Embrasser du

Soir

Income (per pound) $479.4 $218.8

Per

cen

tage

of

raw

mat

eria

ls

Fra

gran

ce O

il (

Pu

re) Mango 8 7

Tea Leaves 7 5

Juniper Berry

9 0

White Rose 0 10

Sol

ven

t

Ethanol and Water

76 78

Process Costs (Per Pound)

Blending $12 $12

Table 5: New Perfumes Information

10. Fleur de Lis, a company that plants and trades lily flowers, decides to develop a linear programming model in order to maximize its annual profit. There are two types of lilies the company plans to produce: Asiatic and Stargazer. The company purchases lily bulbs from Holland and, after planting and harvesting, sells the flowers. The purchasing cost, the approximate production cost, and the selling price for each lily type are given in Table 6.

Page 57: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-57

Table 6: Information about two types of lily

Lily Type Purchasing

Cost Production

Cost Selling Price

Asiatic $1.59/bulb $1/bulb $2.74/stem

Stargazer $2.33/bulb $1.5/bulb $3.06/stem

If the annual budget is $1 million and annual capacity is enough to grow lilies from 350,000 bulbs, what is the optimal production plan if the lilies are sold in stems, and each bulb yields two stems?

11. Fleur de Lis realizes that their model is not realistic because lilies are typically not sold in stems, but in bunches or pots. Accordingly, it must change the model. The total budget is increased to $1.5 million and the annual capacity is allocated to the production of cut lilies from 350,000 bulbs and potted lilies from 50,000 bulbs. One bulb is inserted in a pot to produce a potted Asiatic or Stargazer lily. Asiatic and Stargazer lily cuts are sold in bunches; there are 10 stems in a bunch of an Asiatic lily and 7 stems in a bunch of Stargazer lily. The cost of pots used for Asiatic and Stargazer lilies are $2 and $1, respectively. Use this information and the information in Table 7 to reformulate the problem. What is the optimal product mix?

Table 7: Selling prices of Potted Lilies and Cut Lilies

Category Type Selling Price for each Lily Type

Asiatic Stargazer

Potted Lilies $8.48/pot $9.15/pot

Cut Lily Bunches $21.66/bunch $19.89/bunch

12. Fleur de Lis’s production is further constrained when it learns that the company can obtain no more than 100,000 Stargazer bulbs a year from Holland. Add this constraint to the constraints of question 11. What, if any, is the effect on the optimal solution?

Page 58: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-58

13. There is a customer group that begins to buy potted Asiatic lilies in quantity, since They are

cheaper than potted Stargazer lilies and have more blooms in one pot. Fleur de Lis’s sales records show that demand for potted Asiatic lilies is now more than 40,000 a year. What effect does this have on the problem formulation? What effect, if any, does is have on the optimal solution?

Page 59: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-59

Chapter 2 Summary What have we learned? Linear programming is a process of taking a real world situation, modeling it with inequalities, and finding the best or optimal solution.

Modeling the situation o We start by finding the decision variables – what things can you choose?

Typically this is how much to make of a particular product or how much to invest in a particular option. We assign a variable for each of these choices.

o Next we write an objective function that captures the goal of the problem. – What will determine when you have found the optimal solution? This is the equation that we want to maximize.

o Finally we define the constraints - those things that limit our choices. These are typically the amount of money, time, people, or resources available.

Once we have defined our problem, we use a spreadsheet program such as Microsoft Excel to find the optimal solution. After entering the inequalities we set up the solver parameters and run solver. This gives us an answer and sensitivity report.

The answer report will show: o The objective function’s final value o The value for each of the decision variables o The amount of each constraint that is used

Last we perform sensitivity analysis to determine the effect of different changes.

o What if the situation changes? Will the optimal solution change and if so by how much?

o How much would the situation have to change before we would need to re-run solver?

Terms Linear programming: A mathematical approach to allocating limited resources among

options in an optimal manner. Objective function The function that is to be optimized. Feasible solution A solution that satisfies all the constraints Optimal solution The feasible solution with the best value for the objective function. Decision variable A quantity that the decision-maker controls. Constraint A condition that must be satisfied. Binding constraint A constraint for which a resource is fully utilized. Non-binding constraint A constraint with slack; that is a resource is not fully utilized. Answer report Gives the optimal solution. Slack The amount of a resource that is not used in the optimal solution. Final Value The decision variable and objective function values for the optimal

solution Sensitivity report Show how changes to the situation will affect the optimal solution.

Page 60: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-60

Reduced cost How much would a objective function’s coefficient have to change to change the optimal mix

Shadow price The amount the optimal solution would change if there is a change in the constraint.

Allowable increase and Gives the range in which the constraint could change for the Allowable decrease shadow price to remain valid You should be able to:

Identify the decision variables Define the objective function by finding the goal to be solved for the situation

Identify the constraints and write inequalities to model them.

Enter each of these into Microsoft Excel Use solver to find the Optimal Solution and generate Answer and Sensitivity Reports Analyze the Answer Report Analyze the Sensitivity Report

What can go wrong? Troubleshooting is a valuable skill when using Excel and Solver. Quite often a problem is developed and solved and the answer will not make sense. As you work through this book try to remember the mistakes you make so you can avoid them in the future.

One thing that students may do when working through the problems with the text is to look ahead. They realize that the answers to the questions are on the next page and will copy them onto their spreadsheet. This can lead to problems running solver. When setting up the constraints, the right side must be a value – how much of the resource is available. The left side must be a formula that multiplies the decision variables by the amount used for each one. This formula does not appear on the screen, only the value appears. Typing values printed in the book rather than the formula will cause a problem.

Another common mistake is to forget to change the direction of the inequality in solver. The default in solver is a less than or equal (<=) constraint. For example, if you have up to 40 hours to produce something, you use the <= constraint. Some situations require something to be at least a certain value. For example if you make tables and chairs you have to make at least 4 chairs for each table. This requires you to use the greater than or equal (>=) constraint.

When a model changes, don’t forget to make the changes in solver. Recall that when we develop a spreadsheet, we start by entering our decision variables, then write our objective function, and finally a row for each constraint. We then start solver and enter the decision variables, objective function and constraints. If you revise a problem, either by adding new decision variables or adding new constraints, you follow the same process. First change the decision variables and/or constraints in excel but then you must

Page 61: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-61

make the same changes in solver. Otherwise the computer will not recognize that the situation has changed.

Chapter 2 Study Guide

1. What are decision variables? Where do they come from in the word problem?

2. What is the objective function? Where does it come from in the word problem?

3. What are constraints? Where do they come from in the word problem?

4. What information have we used from the Answer Reports?

5. Write a definition for each in your own words. a. Binding constraint-

b. Non-binding constraint-

6. What is the “Final Value” on an Answer Report?

7. What is slack? What does the cell value tell us?

8. What information have we used from the Sensitivity Reports?

9. For the decision variables, what do the allowable increase and decrease tell us about the variables?

10. What does the reduced cost tell us?

Page 62: Version 08-18-10 Chapter 2: Linear Programming - Maximizationhrhsdiscrete.pbworks.com/f/ch2+student+text.pdf · Version 08-18-10 Chapter 2: Linear Programming - Maximization ... will

Version 08-18-10 Chapter 2: Linear Programming - Maximization

Copyright © 2010 North Carolina State University: MINDSET 2-62

11. Complete each statement describing what happens to the objective function:

a. If the shadow price for a constraint is 0, then

b. If the shadow price for a constraint is 100, then

12. How does “Constraint R. H. Side” relate to the word problem? 13. What information is listed in the final value column?

14. Which report would you use to find the final value of the objective function?

15. In 5 or more COMPLETE, GRAMMATICALLY CORRECT sentences compare and contrast the answer report and sensitivity report. Tell how they can be used to analyze problems. Use at least one example of how we have used them with the problems done in class.