OR: Exercices Linear Programming N. Brauner Université Grenoble Alpes Exercice 1 : Wine Production (G. Finke) An American distillery produces 3 kinds of genuine German wines: Heidelberg sweet, Heidelberg regular and Deutschland extra dry. The basic products, the workforce and the profit per gallon are given in the following table. grapes - type A grapes - type B sugar workforce profit (bushel) (bushel) (kg) (hours) (=C) Heidelberg sweet 1 1 2 2 10 Heidelberg regular 2 0 1 3 12 Deutschl. extra dry 0 2 0 1 20 The distillery owns 150 bushel of grapes of type A, 150 bushel of grapes of type B, 80 kg of sugar and can provide 225 hours of work. What quantity of each wine should be produced to maximize profit? Question 1 Formulate this problem as a linear program. Exercice 2 : Advertising A company has an advertising budget of 4800 monetary units (mu) for launching a new product. Its advertising campaign will consist of television commercials and newspaper advertisements. Each minute of television will reach 100 000 new viewers and each page in the newspaper will be read by 80 000 new readers. One minute of television costs 800mu and a page in the newspaper costs 600mu. The direction wants to broadcast at least 3 minutes of commercials and print at least one page in a newspaper. Its objective is to maximize the target audience (viewers and readers). Question 1 Model this problem as a linear program Question 2 Represent the feasible region graphically. Question 3 What is the optimal solution if the budget is increased from 4800 to 6000? Question 4 What is the optimal decsion if there is no constraint on the television time? Exercice 3 : Air company (Hillier and Lieberman, Introduction to Operations Research) UNION AIRWAYS is adding more flights to and from its hub airport, and so it needs to hire additional customer service agents. However, it is not clear just how many more should be hired. Management recognizes the need for cost control while also consistently providing a satisfactory level of service to customers. Therefore, an OR team is studying how to schedule the agents to provide satisfactory service with the smallest personnel cost. Based on the new schedule of flights, an analysis has been made of the minimum number 1
of customer service agents that need to be on duty at different times of the day to provide a satisfactory level of service. The rightmost column of Table 1 shows the number of agents needed for the time periods given in the first column. The other entries in this table reflect one of the provisions in the company s current contract with the union that represents the customer service agents. The provision is that each agent works an 8-hour shift 5 days per week, and the authorized shifts are Time Periods Covered Minimum number Time period shift 1 shift 2 shift 3 shift 4 shift 5 of agents needed 6:00 a.m. - 8:00 a.m. x 48 8:00 a.m.-10:00 a.m. x x 79 10:00 a.m.- noon x x 65 noon -2:00 p.m. x x x 87 2:00 p.m.-4:00 p.m. x x 64 4:00 p.m.-6:00 p.m. x x 73 6:00 p.m.-8:00 p.m. x x 82 8:00 p.m.-10:00 p.m. x 43 10:00 p.m.- midnight x x 52 midnight-6:00 a.m. x 15 Daily cost per agent 170 =C 160 =C 175 =C 180 =C 195 =C Table 1: Data for the Union Airways personnel scheduling problem Shift 1: 6:00 a.m. to 2:00 p.m. Shift 2: 8:00 a.m. to 4:00 p.m. Shift 3: Noon to 8:00 p.m. Shift 4: 4:00 p.m. to midnight Shift 5: 10:00 p.m. to 6:00 a.m. Checkmarks in the main body of Table 1 show the hours covered by the respective shifts. Because some shifts are less desirable than others, the wages specified in the contract differ by shift. For each shift, the daily compensation (including benefits) for each agent is shown in the bottom row. The problem is to determine how many agents should be assigned to the respective shifts each day to minimize the total personnel cost for agents, based on this bottom row, while meeting (or surpassing) the service requirements given in the rightmost column. Question 1 Model this problem as a linear program. Find the redundant constraints. Exercice 4 : Olive oil production (J.-F. Hêche) A company produces 3 different qualities of olive oil. The maximal quantities that can be sold each month, together with the retail prices are given in the following table: Product maximal sale retail price (liters) (=C/liter) Oil A 3000 4 Oil B 3000 6 Oil C 2000 10 The company pays 1000=C per ton of olives. Each ton of olives provides either 300 liters 2
of Oil A or 200 liters of Oil B (the processing costs are not modeled). Each liter of Oil A can be refined to produce 6 dl of oil B and 3 dl of oil C. The cost of such a refinement is 0.5=C per liter. Likewise, each liter of oil B can be refined to obtain 8 dl of oil C. The cost of this refinement is 0.3=C per liter. Question 1 Write a linear program that helps the company establish a monthly production plan that maximizes its profit. Specify clearly the decision variables, the objective function and the constraints. Exercice 5 : Bergamot (J.-F. Hêche) A distillery produces bergamot essence for the perfume manufacturers in the region. The production of one liter of bergamot essence generates 0.4 liters of liquid waste pollutant. The distillery can either have the waste treated by a treatment plant before dumping it into the river, or dump it directly in the river. The wastewater treatment plant processes at most 8000 liters of waste per week. The treatment process is not perfect: 20% of the waste processed by the station and then released in the river is still pollutant. For each liter of waste transiting through the waste treatment plant, 5=C are charged to the distillery. The state charges a tax of 15=C per liter of polluting waste dumped into the river regardless of whether it has passed through the wastewater treatment plant or not. The law limits the number of liters of pollutant waste that can be dumped into the river every week to 2800. The retail price of one liter of bergamot essence is 110=C and the raw materials cost 20=C per liter. Question 1 The distillery wants to maximize its weekly profit. Assuming that the distillery always succeeds in selling its whole production, model this problem as a linear program. Exercice 6 : Linear and canonical forms (J.-F. Hêche) Question 1 Formulate the following linear programs in canonical and standard forms. 1. Maximize z = 2x 1 x 2 1 s.t. 3 x 1 + x 2 = 2 2x 1 + 5x 2 7 x 1 + x 2 4 x 1 0 x 2 R 2. Minimize z = 3x 1 + x 3 s.t. x 1 + 1 2 x 2 3x 3 2 4x 2 + x 3 = 5 x 1, x 3 0 x 2 0 3. Minimize z = 2x 1 3x 2 s.t. x 2 3 2x 1 x 2 = 2 x 1 + 3x 2 1 x 1 0 3
Exercice 7 : Linearization (J.-F. Hêche) Question 1 Formulate the following linear programs in canonical form. 1. Minimize z = max (2x 1 3x 2, x 1 2x 2 + 4x 3 ) s.t. 2x 1 + x 3 = 12 x 1 + 2x 2 5 x 1, x 2, x 3 0 2. Minimize z = x 1 2x 3 + x 1 + 3x 2 + x 3 s.t. x 1 4x 2 + x 3 = 5 5x 2 3x 3 6 x 1, x 2, x 3 0 3. Minimize z = x 1 10 + max (2x 2 4, 3x 1 4x 3 ) s.t. x 1 + x 2 1 max ( x 1 + x 2 + x 3, x 1 x 2 2x 3 ) 7 x 1, x 2, x 3 0 Exercice 8 : Graphical solution (J.-F. Hêche) Consider the following linear program: Question 1 Draw the feasible region R. Question 2 Solve this problem graphically. max z = 3x + 2y s.c. x y 2 2x + y 8 x + y 5 x 0 y 0 Exercice 9 : Bases (J.-F. Hêche) Consider the system of linear equations Ax = b with A = ( 1 1 1 0 1 2 0 1 ) and b = Question 1 Describe all the bases of matrix A. For each basis, indicate the associated basic solution and whether it is feasible. Question 2 Represent graphically the projections of the basic solutions and the projections of the two equations of the system in the x 1 and x 2 plane. ( 1 4 ) Exercice 10 : Bases (J.-F. Hêche) Consider the canonical linear program 4
Question 1 Draw its feasible domain. max z = 2x 1 + 5x 2 s.t. 2x 1 4x 2 1 3x 1 + 4x 2 24 x 2 4 x 1 5 x 1, x 2 0 Question 2 Identify on your graphic the point corresponding to the basic solution for each of the following bases. B1 = {x 3, x 4, x 5, x 6 } B2 = {x 1, x 2, x 3, x 5 } B3 = {x 2, x 3, x 5, x 6 } B4 = {x 1, x 2, x 5, x 6 } Remark. The variables x 3, x 4, x 5 and x 6 correspond to the slack variables introduced when passing to the standard form. Question 3 Using your picture, indicate the number of bases of the L.P., the number of feasible bases and the number of extreme points of its feasible domain. Question 4 Give all the optimal bases of the L.P. together with the optimal solutions and their values. Exercice 11 : Simplex (J.-F. Hêche) Question 1 Solve the following linear program using the simplex algorithm: max z = 3x 1 + 2x 2 s.c. 2x 1 + x 2 7 x 1 3 x 1 + x 2 5 x 1, x 2 0 Specify at each iteration the basic variables, the non-basic variables and the corresponding extreme point. Exercice 12 : Simplex The simplex methods ends with the following equations: z = 10 x 1 2x 6 x 4 = 3 2x 1 x 5 + x 6 x 2 = 9 x 1 2x 5 2x 6 x 3 = 7 + x 1 2x 5 x 6 Question 1 Describe the corresponding optimal solution. Question 2 Find a second optimal basic solution. Question 3 Describe another optimal solution which is not a basic solution. 5
Exercice 13 : The right form?(from Olivier Briant) For each of the following linear programs, indicate whether it is in the form of a step of the simplex algorithm as seen in the course and if possible, describe the associated basic solution. Is this basic solution feasible? Is it optimal? If the basic solution is feasible but not optimal, perform one simplex iteration. a) z = 12 + x 1 + 2x 4 x 1 = 3 + x 2 + 2x 3 + 2x 4 x 2 = 7 + 3x 3 + 5x 4 b) z = 3 + 2x 1 + x 4 x 3 = 11 5x 1 + 3x 2 x 4 x 5 = 2 + 3x 1 + x 2 c) z = 10 5x 1 + 2x 2 x 3 = 1 + x 1 + 7x 2 x 4 = 2 x 1 + 3x 2 d) z = 17 x 1 + 3x 2 x 3 = 6 + x 1 + 3x 2 x 4 = 2 x 1 7x 2 x 5 = 4 + 8x 1 + 2x 2 e) z = 12 2x 1 3x 5 x 4 = 0 + x 1 x 5 = 1 2x 1 x 2 x 3 = 4 x 1 + 3x 2 f) z = 3 + 3x 1 x 3 x 2 = 1 + x 1 2x 3 x 4 = 4 + 2x 1 5x 3 g) z = 13 + 5x 2 + x 3 x 4 x 1 = 1 2x 2 3x 4 x 3 = 4 + 8x 2 2x 4 6