# 1 Chapter 11 Here we see cases where the basic LP model can not be used.

## Presentation on theme: "1 Chapter 11 Here we see cases where the basic LP model can not be used."— Presentation transcript:

1 Chapter 11 Here we see cases where the basic LP model can not be used.

2 Integer Programming In a linear programming problem the possibility that the solution would have one or more of the decision variables take on fractional values was not ruled out. But, sometimes one or more of the decision variables can NOT have a fractional value. Example: People will only buy a whole house, not a fraction of a house. Integer programming is the method to use in this case. Caution: do not just do a linear programming solution and round up to the nearest whole integers. This method may not yield a feasible solution (won’t satisfy the constraints), or the optimal solution (have the highest value of the objective function).

3 Types of integer programming problems Pure - all decision variables must take on integer values. Mixed - some of the decision variables must take on integer values. Zero-one - all of the decision variables must take on the values zero or one. I will go over the logic of finding a solution with the branch and bound method. In the real world you will just use the computer to do the solution, but here we see what is happening behind the scenes.

4 Harrison Electric problem Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 6X1 + 5X2 <= 30 On the next slide I have a graph of the problem and you can see the solution of the basic LP problem, ignoring the integer feature, is an interior solution at X1 = 3.75 and X2 = 1.5. OK, it is hard to see in the graph. The profit function has a slope that is darn close to the slope of the 2 nd constraint.

5

6 On the next slide you will see my rendition of the graph of the solution. Since an integer solution is not appropriate, the QM for Windows computer program has been built to essentially shift in a parallel fashion the profit function and hit parts of the constraints that have integer values for both X1 and X2. On several slides after the next one I attempt to explain the logic of the program.

7 X1 X2

8 Now, when X1 = 3.75 and X2 = 1.5, profit is 35.25. Since the solution is of the noninteger variety, we are not done. But call the profit of 35.25 the upper bound on profit. This is the upper bound because it was chosen and still meets the constraints, except of course the integer solution part. To get a lower bound on profit round down the solution values to X1 = 3 and X2 = 1 for a profit of 27. Now, if you look at the next slide, you will see I have put a vertical line at X1 = 3 and X1 = 4. I did this because the first solution had X1 = 3.75. In the search for the best solution I will say look for X1 values of 3 or less and look for X1 values of 4 or more, and still satisfy the other constraints. In fact, to branch off from the initial solution we will do two subproblems: a) the same LP program as the first with the added constraint that X1 >= 4, b) the same with X1 <= 3. Look at graph to see why the inequalities are the way they are, OK.

9

10 Subproblem a is Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 6X1 + 5X2 <= 30 X1 >= 4 And the solution is X1 = 4 X2 = 1.2 and profit 35.2 Subproblem b is Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 6X1 + 5X2 <= 30 X1 <= 3 And the solution is X1 = 3 X2 = 2 and profit 33

11 Subproblem a still has a noninteger value for a solution, but feasible otherwise. Subproblem b has a feasible solution. The profit for subproblem a becomes the new upper bound and the value for profit for subproblem b becomes the lower bound. Next we want to do subproblems off subproblem a because it still has a noninteger solution. Sincece X2 =1.2 in the solution we will add constraints X2 >=2 and X2 <=1. Go to the next screen to see the two new subproblems.

12 Subproblem c is Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 6X1 + 5X2 <= 30 X1 >= 4, X2 >=2 This branch is terminated because neither of the original constraints would be satisfied with the two new constraints. Subproblem d is Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 6X1 + 5X2 <= 30 X1 >= 4, X2 <= 1 And the solution is X1 = 4.17 and X2 = 1 and profit 35.17 and this profit becomes the new upper bound. We need to branch off the subproblem next, because we still have a noninteger solution.

13 Subproblem e is Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 6X1 + 5X2 <= 30 X1 >= 4, X2 <=1, X1 <=4 It is obvious X1 will equal 4 in the solution here. We have X1 = 4 and X2 =1 for a profit = 34. Subproblem f is Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 6X1 + 5X2 <= 30 X1 >= 4, X2 = 5 And the solution is X1 = 5 and X2 = 0 and profit 35. Since both subproblems have integer solutions we know we are at the end. The subproblem here with the highest profit gives the optimal solution. So X1 = 5 and X2 = 0 for profit =35.

14 Will the solution to the integer programming problem always include a zero value for one of the decision variables? Not always. Below I have a graph of the idea when we would have a solution that does not include a zero value for one of the decision variables. Noninteger solution Integer solution

15 In QM for Windows go to to integer programming module and put in the problem just like the LP problem. In the zero-one problem all of the decision variables must take on the values zero or one (meaning you either take it or not, 1 meaning you take it). In the financial investment example of page 466 we see an objective function and 4 explicit constraints. But, since there are 7 variables we really have 7 more constraints. For X1, for example, we have the constraint X1 <= 1. Similarly, we have the other 6. The value of the decision variable will only be 0 or 1. In QM for Windows you would have to include these addition constraints. In other words, you would have 11 constraints. Also remember when a variable has no explicit coefficient with it the coefficient value is 1 and when the variable does not appear the coefficient is zero.

16 Goal programming This is a technique used when we have more than one goal and all goals may not be achieved simultaneously. Let’s think about an example from my life. I have as a goal the diet idea of eating 1 Kiwi fruit a day. Plus I have the goal of not spending more than \$25 a week on groceries. When Kiwi is off season, I have to pay more and this really hits me in the budget. Often I do not get the Kiwi, because the budget is a higher priority item for me.

17 We will use as a frame of reference the Harrison Electric company. Say Harrison Electric problem Max profit = 7x1 + 6x2 Subject to 2X1 + 3X2 <= 12 (wiring) 6X1 + 5X2 <= 30 (assembly) Now we have Goals (during a transition period at the company) Have profit at least be 30 – the old objective of profit max is replaced. Fully utilize what is available in the wiring department. Avoid overtime in assembly. Make X2 at least 7.

18 One way that goal programming is different from LP is that the usual objective becomes one of the constraints. Here profit is one of the constraints. The constraints are below. 7X1 + 6X2 + d1 - - d1 + =30, where d1 - is the underachievement of profit and d1 + is the overachievement of profit. Because we have many goals we want to allow wiggle – a highly technical term – in all our constraints and so we include these d’s, or deviations from the stated goal so that we can get as close as we can to achieving all the goals. Our real objective will be to minimize the deviations, but more about that later. In wiring 2X1 + 3X2 + d2 - - d2 + =12, where d2 - is the underachievement of using wiring and d2 + is the overachievement of using wiring.

19 In assembly 6X1 + 5X2 + d3 - - d3 + =30, where d3 - is the underachievement of using assembly and d3 + is the overachievement of using assembly. In X2 production X2 + d4 - - d4 + =7, where d4 - is the underachievement of making the ceiling fan goal and d4 + is the overachievement. The objective in a goal programming problem is to minimize the deviations from each goal. Essentially we rule out getting close to one goal if it means we really miss the mark big time on another goal. So we would have Minimize d1 - + d1 + + d2 - + d2 + + d3 - + d3 + + d4 - + d4 + Now the objective is often more simple than this because some deviations are really of no concern to us – we had to include then in the constraints to allow for all the wiggle.

20 Now, When we look at the profit constraint we do not really care if profit is over 30, so d1 + is not an issue. When we see the phrase, “fully use wiring department hours available,” the interpretation is not that we worry about using too much, but too little. Thus d2 + is not an issue. We want to avoid overtime in assembly, so d3 - is not an issue. Since we want to produce at least 7 ceiling fans d4 + is not an issue. The real object function is thus Minimize d1 - + d2 - + d3 + + d4 -. Another detail. If different goals have different priority we can make one other modification to the objective.

21 If we can assume the goals I listed before are listed in highest priority to lowest priority, then we would change the objective to Minimize P1d1 - + P2d2 - + P3d3 + + P4 d4 -, where the Pi is just an indication of the priority. i = 1 is the highest priority and then P1 = 1, and so on.

22 Let’s now turn to the computer for the solution. In QM for Windows go to the goal programming module. Under file new you will have to put in the number of constraints (goals) and the number of decision variables in terms of the x’s. You then have an input screen with Wt’s and Prty’s with the plus d’s and minus d’s. Wt’s mean weight, which will be either 1 or 0. Prty’s means priority or rank, with 1 for highest priority (I listed as P1 above), 2 for next priority and so on. There can be ties in priority. Look at the object function again.

23 Minimize P1d1 - + P2d2 - + P3d3 + + P4 d4 - If a d (plus or minus) is in the objective function then in each corresponding constraint put a 1 in the Wt column, and a zero otherwise. Plus put the priority level under the Prty column, and leave as zero otherwise. Remember that a rank of 1 gets a one, a rank of 2 gets a 2, and so on. For example, the d1 - is from the first constraint. So, under the Wt(d + ) and Prty(d + ) columns put 0’s, but under the negative W put a 1 and under the negative P put a 1 since this is the highest priority. Follow the X’s and RHS as before. Leave the sign of the constraints as = sign. Note the input screen and output screen for this problem in the book on page 478.

24 On the input screen since we had negative d’s 1, 2, and 4 we have 1 under the Wt column and the associated priorities. Similarly we had positive d 3 we have 1 under the Wt column and priority 3. On the summary screen of the output we see x1=0 and x2 = 6. So we do 0 of X1 and 6 of X2. On the constraint analysis section of the summary we see on constraint 1 under RHS 30, under d + 6, and under d - 0. When we put X1 = 0 and X2 = 6 in the constraint we get 7(0) + 6(6) = 36. We wanted the value to be at least 30. The 30 is under the RHS. The 6 under the dplus column means we went to 30 + 6 or 36 on the profit.

25 In the second constraint we have under the dplus 6 so we know in wiring we used a total of 18 hours. IN the third constraint we have 0 under the d plus, so we have fully achieved that goal. In the 4 th constraint we have a 1 under the d minus column. This means we have underachieved this goal by 1.

26 10 point assignment 1) Do problem 11-18 page 488 – note that this is an interger programming problem with all variables of the 0-1 variety. 2) Look at Problem 11-24 page 489. Solve the problem using QM for Windows and tell if each goal is reached or how close the firm gets to reaching each goal. Hint: There are really 4 goals. The 3 rd one in the list is really 2 goals, where each has priority 3 (a tie in priority). Write up your results in a document and then just cut and paste into the message window of a WebCT mail to me. Attach the QM for windows files.

Download ppt "1 Chapter 11 Here we see cases where the basic LP model can not be used."

Similar presentations