Presentation on theme: "1 Chapter 3 Applications of Linear and Integer Programming Models - 1."— Presentation transcript:
1 Chapter 3 Applications of Linear and Integer Programming Models - 1
2 3.1 The Evolution of Linear Programming Models in Business and Government Many examples are presented that demonstrate the successful application of linear and integer programming. Our goals are to: –Examine potential application areas –Develop good modeling skills –Illustrate the use of spreadsheets to generate results –Interpret properly and analyze spreadsheet results
3 Examples of Linear Programming Models in Business and Government An optimal portfolio Optimal scheduling of personnel An optimal blend of raw crude oils A minimized cost diet An operation and shipping pattern The optimal production levels
4 The optimal assignment of fleets to flights How to best expand a communication network An efficient air-pollution control system An agricultural resource allocation plan The set of public projects to select Examples of Linear Programming Models in Business and Government
5 Three important factors may affect the successful process of building good models: –Familiarity –Simplicity –Clarity 3.2 Building Good Linear and Integer Programming Models
6 Many times the use of summation variables (representing the sum of all or of part of the decision variables) along with the summation constraints associated with them, may simplify models formulation. See the following example. Summation Variables / Constraints
7 Example –Three television models are to be produced. –Each model uses 2, 3, and 4 pounds of plastic respectively. –7000 pounds of plastic are available. –No model should exceed 40% of the total quantity produced. –The profit per set is $23, $34, and $45 respectively. –Find the production plan that maximizes the profit.
8 Solution Max 23X X X 3 S.T. 2X 1 +3X 2 + 4X 3 Without summation variables X 1.4(X 1 + X 2 + X 3 ) X 2.4(X 1 + X 2 + X 3 ) X 3.4(X 1 + X 2 + X 3 ) X 1, X 2, X 3 With summation variables X 1 + X 2 + X 3 = X 4 X 1.4X 4 X 2.4X 4 X 3.4X 4 X 1, X 2, X 3, X 4 Summation Variables / Constraints
9 Summation variables/constraints – TV production spreadsheet =SUM(B2:D2) Total production Decision Variables Percentag e Constraint s Plastic Constraint
10 –Bring the expression to the form: (Expression) [Relation] (Constant) A checklist for building linear models A + 2B 2A + B A + B 10 –Formulate a relationship / function in words before formulating it in mathematical terms. (Expression) [Has some relation to] (Another expression or constant)
11 A checklist for building linear models –Keep the units on both sides of the expressions consistent –Use summation variables when appropriate –Indicate which variables are Non-negative or Free Integers Binary
12 The modeling of real problems is illustrated in this section. Examples include: –Production –Purchasing –Finance –Cash flow accounting 3.4 Applications of Linear Programming Models
13 The modeling of real problems is illustrated in this section. Examples include: –Production –Purchasing –Finance –Cash flow accounting Emphasis is given to: –Various application area, –Model development, –Spreadsheet design, –Analysis and interpretation of the output. 3.4 Applications of Linear Programming Models
14 These models can assist managers in making decision regarding the efficient utilization of scarce resource. Applications include: –Determining production levels –Scheduling shifts –Using overtime –The cost effectiveness of adding resources Production Scheduling Models
15 Galaxy Industries Expansion Plan Galaxy Industries is planning to increase its production and include two new products Data –Up to 3000 pounds of plastic will be available. –Regular time available will be 40 hours. –Overtime available will be 32 hours. –One hour of overtime costs $180 more than one hour of regular time.
16 Data - continued –Two new products will be introduced: Big Squirts Soakers –Marketing requirements: Space Rays should account for exactly 50% of total production. No other product should account for more than 40% of total production. Total production should increase to at least 1000 dozen per week. Galaxy Industries Expansion Plan The old products are: Space rays Zappers
17 Data - Continued PlasticProduction ProductProfit(lbs) Time (min) Space Rays $1623 Zappers $1514 Big Squirts $2035 Soakers $2246 PlasticProduction ProductProfit(lbs) Time (min) Space Rays $1623 Zappers $1514 Big Squirts $2035 Soakers $2246 Management wants to maximize the Net Weekly Profit. A weekly production schedule must be determined. Galaxy Industries Expansion Plan
18 Decision Variables. X 1 = number of dozen Space Rays, to be produced weekly X 2 = number of dozen Zapper, to be produced weekly X 3 = number of dozen Big Squirts, to be produced weekly X 4 = number of dozen Soakers, to be produced weekly X 5 = number of hours of overtime to be scheduled weekly Galaxy Industries Expansion Plan – Solution
19 Objective Function The total net weekly profit from the sale of products, less the extra cost of overtime, to be maximized. –One hour of overtime costs $180 more than one hour of regular time. Maximize 16X 1 +15X 2 +20X 3 +22X X 5 Galaxy Industries Expansion Plan – Solution
20 Constraints Galaxy Industries Expansion Plan – Solution
21 Introduce the summation Variable X 6, that helps in setting up the production mix constraints X6 = total weekly production (in dozens ), X6 = X1+X2+X3+X4, or X1+X2+X3+X4 -X6 =0 Galaxy Industries Expansion Plan – Solution
22 Galaxy Industries Expansion Plan
23 The Complete Mathematical Model Max 16X X X X 4 – 180X 5 S.T. 2X 1 + 1X 2 + 3X 3 + 4X 4 3X 1 + 4X 2 + 5X 3 + 6X 4 – 60X X X X 1 + X 2 +X 3 + X X 6 = 0 X 1 -.5X 6 =0 X 2 -.4X 6 =0 X 3 -.4X 6 = 0 X 4 -.4X 6 =0 X X j are non-negative Galaxy Industries Expansion Plan
24 =SUM(B4:E4) Percentage Constraints SUMPRODUCT($B$4:$F$4,B6,F6) Drag to G7:G10 Galaxy Industries Expansion Plan
25 Galaxy Industries Expansion Plan D E F G H
26 Galaxy Industries Expansion Plan ModeloProdução (Dúzias)Lucro Bruto% Total Space Rays5659,04050 Zappers2003, Big Squirts3657, Soakers000 Total113019,340 $ Horas-extras5,760 Lucro Líquido13,580 Foram utilizados todos os minutos de hora regular (2,400) e hora extra (32) – Restrições binding; 2,425 das 3,000 libras disponíveis de plástico foram utilizadas – Restrição nonbinding; Total produzido (1130) excedeu o mínimo em 130 dúzias – Restrição nonbinding.
27 Galaxy Industries Expansion Plan Intervalos de Otimalidade ModeloLucro/DúziaLucro MínimoLucro Máximo Space Rays164 = = Zappers15Não há mínimo15.5 = Big Squirts = Não há Máximo Soakers22Não há mínimo24.5 =
28 Galaxy Industries Expansion Plan - Outras constatações Solução permanece ótima enquanto custo H-E < $270 (H11); Para produzir Soakers seu lucro deverá aumentar de $2.5 (E10); Horas Regulares adicionais melhoram o lucro total em $4.5/min ou $270/h (E21), sem passar de 920 minutos ou 15 1/3 h (G21); Horas-Extras adicionais (ou a menos) acima ou abaixo de 32 melhoram (ou pioram) o lucro total de $90 (E22), se total de H-E ficar no intervalo de 23 1/3 = 32 – 8 2/3 (H22) e 47 1/3 = /3 (G22); Cada dúzia de Zapper adicional ao contrato, até 280 dúzias (G23), subtrai $0.5 (E23) do lucro total. Reduções no contrato melhoram o lucro total em $0.5/dúzia desde que não excedam dúzias (H23); Cada Dúzia de Space Rays que seja permitido produzir acima de 50% do total produzido melhora o lucro total em $5 (E19), até 486 2/3 dúzias a mais que 50% (G19).
29 Galaxy Industries Expansion Plan Recomendações ao Gerente –Autorizar mais H-E; –Aumentar a % de Space Rays produzidos; –Reduzir o contrato dos Soakers ou melhorar o lucro unitário
Portfolio Models Portfolio models are usually designed to: –Maximized return on investment, –Minimize risk. Factors considered include: –Liquidity requirements, –Long and short term investment goals, –Funds available.
31 Jones Investment Charles Evaluation
32 Jones Investment Portfolio goals – Expected annual return of at least 7.5%. – At least 50% invested in A-Rated investments. – At least 40% invested in immediately liquid investments. – No more than $30,000 in savings accounts and certificates of deposit. Problem summary – Determine the amount to be placed in each investment. – Minimize total overall risk. – Invest all $100,000. – Meet the investor goals (diversify).
33 Variables X i = the amount allotted to each investment; The Mathematical Model Minimize 25X 3 +30X 4 +20X 5 +15X 6 +65X X 8 ST: X 1 + X 2 + X 3 + X 4 + X 5 + X 6 + X 7 + X 8 = 100,000.04X X X X X X X X X 1 + X 2 + X 5 + X 7 50,000 X 1 + X 3 + X 4 + X 7 40,000 X 1 +X 2 30,000 All the variables are non-negative Risk function Total investment Return A - Rate Liquid Savings/ Certificate Jones Investment – Solution
37 Jones Investment Restrições Binding: –Retorno médio anual de $7,500 –Aplicar mínimo de $40,000 em Investimentos com liquidez –Aplicar no máximo $30,000 em poupança e certificado de depósito bancário Restrição Nonbinding: –Aplicar no mínimo $50,000 em investimentos com ranking A
38 Jones Investment Recomendações: –Aplicar $17,333 em poupança –Aplicar $12,667 em Certificados de Depósito –Aplicar $22,667 em Arkansas REIT –Aplicar $47,333 em Bedrock Insurance Annuity –Risco total = 1,626,667 ou seja fator médio de risco de por dolar aplicado
39 Jones Investment Custos reduzidos –Para Atlantic ser incluída seu fator de risco deve baixar para = 25 – 4.67 –Para Nocal Mining ser incluída seu fator de risco deve baixar de 0.67 –Para Minicomp ser incluída seu fator de risco deve baixar de 1.67 –Para Antony Hotels ser incluída seu fator de risco deve baixar de 1.67 Intervalos de Otimalidade –Bedrock: 19.5 = 20 – 0.5 e = –Como fator de risco negativo não tem sentido, os limitantes mínimos para poupança e certificado de depósitos devem ser zero!
40 Jones Investment Preços Sombra –Para cada dolar extra aplicado acima de $100,000 o risco total melhora (cai) em 7.33; –Para cada dolar extra que aumente o retorno médio esperado mínimo o risco total aumenta em ; –Para cada dolar extra que tenha ter maior liquidez o risco total aumenta em 4; –Para cada dolar extra que se permita investir em poupança e certificado de depósito o risco total cai em 10; –Não há mudança no risco total se dolar adicional for aplicado em investimentos de ranking A.
41 Jones Investment Intervalos de Otimalidade –Indicam os intervalos para os quais os preços sombra não se alteram Para o retorno mínimo de $7,500: 7120 = 7500 – 380 e 8020 = Allowable Decrease de 1E+30 = infinito ( ) –Limitante inferior para o investimento em ranking A é -
42 Governments in the public sector are charged with distributing resources for the public good. The public good can be measured by –Traditional objectives (i.e. cost minimization), –Specific functions developed to measure the public satisfaction or preference. The constraints represent (among others) – Resource availability, –Social issues (diversity, equality) Public Sector Models
43 St. Joseph Inspection Problem St. Joseph Public Utility Commission needs to inspect and report utility problems in a flood area. Experts are assigned to inspect: Homes Offices Plants Three types of inspection will be conducted: Electrical Gas Insulation
44 Problem Summary –St. Joseph Public Utility Commission needs to determine the number of homes, office complexes, and plants to be inspected. –The objective is to maximize the total number of structures inspected, under certain requirements. St. Joseph Inspection Problem
45 Data –Requirements At least eight offices and eight plants must be inspected. At least 60% of the inspections should involve private homes. –Resources At most, 120 hours can be allocated for electrical inspections. At most 80 hours can be allocated for gas inspection. At most 100 consulting hours can be allocated for insulation inspection. St. Joseph Inspection Problem
46 Variables –X 1, X 2, X 3 = number of homes, office complexes, and industrial plants to be inspected, respectively. –X 4 = a summation variable: The total number of structures to be inspected. The Complete Mathematical Model Maximize X 4 ST:X 1 + X 2 + X 3 - X 4 = 0 (Summation) X 2 8 (Min. Office) X 3 8 (Min. Plants) X 1 -.6X 4 0 (At least 60% Homes) 2X 1 + 4X 2 + 6X (Electrical) 1X 1 + 3X 2 + 3X 3 80 (Gas) 3X 1 + 2X 2 + 1X3 100 (Insulation) X 1, X 2, X 3 0 St. Joseph Inspection Problem – Solution
47 St. Joseph Inspection Problem – Solution Estruturas inspecionadas Horas usadas
48 The problem is properly formulated, but there is no feasible solution to the problem. Here is why... Infeasible Solution St. Joseph Inspection Problem – Solution
49 Even when the smallest number allowed of offices and plants are inspected, the number of houses that can be inspected with the given resources is too small. Here is the reasoning. St. Joseph Inspection Problem spreadsheet
50 St. Joseph Inspection Problem – the infeasibility Recall that X 2 8 and X 3 8. Let X 2 = 8 (offices) and X 3 = 8 (plants). That is, take their minimum feasible value. Hours used on electrical inspection for offices and plants are 4(8) + 6(8) = 80. Hours left over to inspect houses are 120 – 80 = 40, thus at most 40/2 = 20 houses can be inspected. Total number of structures inspected is =36, of which houses are only 20/36 = 55.55% This is less than the 60% required.
51 The revised problem St. Joseph Inspection Problem – Solution Suppose the commission would accept 6 offices and 6 plants.
Purchasing Modeling These models can consider: –Demand –Budget –Cash flow –Advertising –Inventory restrictions. In solving purchasing problems, we attempt to balance customer satisfaction with resource utilization by the business enterprise.
53 Euromerica Liquor Purchasing Problem Euromerica Liquors purchases and distributes a number of wines to retailers. There are four different wines to be ordered. Requirements –Order at least 800 of each type. –Order at least twice as many domestic bottles as imported bottles.
54 Data: Management wishes to determine how many bottles of each type to order. The objective is to maximize the total profit from purchasing and distributing the wine bottles. Euromerica Liquor Purchasing Problem
55 Variables X 1 = bottles of Napa Gold purchased X 2 = bottles of Cayuga Lake purchased X 3 = bottles of Seine Soir purchased X 4 = bottles of Bella Bella purchased. Euromerica Liquor Purchasing Problem – Solution
56 The Mathematical Model Maximize 1.75X X 2 + 3X 3 + 2X 4 ST: X X X X X 1 + X 2 - 2X 3 - 2X 4 0 X 1, X 2, X 3, X 4 0 $ $2.50 = $1.75 [Domestic wines] [ Are at least] [ Twice the imported wines] Euromerica Liquor Purchasing Problem – Solution
57 Euromerica Liquor Purchasing Problem – Solution
58 An Unbounded solution Euromerica Liquor Purchasing Problem – Solution
59 The revised model: Given budget, limited supply, and limited demand Maximize 1.75X X 2 +3X 3 + 2X 4 ST: X X X X X 1 + X 2 -2X 3 - 2X X X 2 +5X 3 + 4X (Budget) X (Napa) X (Seine) X 1 + X 2 +X 3 + X (Total) X 1, X 2, X 3, X 4 0 Euromerica Liquor Purchasing Problem – Revised Solution
60 Euromerica Liquor Purchasing Problem – Solution
61 Solution Summary
Blending Models Blending models were successfully implemented first by the oil industry. Blending problems have the following characteristics: –Each of several products have certain specifications that must be met. –The products can be produced by blending various components, each with different properties of its own. –The problem is to find the least costly (most profitable) blends that meet the requirements and specifications of all the products.
63 United Oil Company United Oil blends two input streams of crude oil –Alkylate –Catalytic Cracked. The outputs of the blending process are –Regular gasoline. –Mid-Grade gasoline. –Premium gasoline.
64 Restrictions –Weekly supply of Crude oil is limited. –Contracted weekly demand for commercial gasoline has to be met. –To classify gasoline as Regular, Mid-Grade, or Premium, certain levels (specifications) of octane and vapor pressure must be met. Profit per barrel of each type of commercial gasoline depends on the blend it was made of. United Oil Company
65 Data Crude Oil Product Data Blended Gasoline Data United Oil Company
66 Problem Summary –Determine how many barrels of alkylate and catalytic cracked to blend into regular, mid – grade, and premium each week. –Maximize total weekly profit. –Remain within raw gas availability. –Meet contract requirements. –Produce gasoline blends that meet the octane and vapor pressure requirements. United Oil Company
67 Decision Variables X 1, X 2, X 3 = number of barrels of Alkylate blended each week into Regular, Mid-Grade, and Premium gas respectively. Y 1, Y 2, Y 3 = number of barrels of Catalytic Cracked blended each week into Regular Mid-Grade, and Premium respectively. R, M, P = barrels of Regular, Mid-Grade, Premium respectively, produced weekly (summation variables). United Oil Company – Solution
68 The Mathematical Model Max –1X 1 + 1X 2 + 4X 3 +2Y 1 +4Y 2 + 7Y 3 1X 1 +1X 2 +1X Y 1 +1Y 2 +1Y X 1 +1Y 1 -R=0 1X 2 +1Y 2 -M=0 1X 1 +1Y 1 -P=0 R M 7500 P X 1 +86Y 1 87R 0 98X Y 2 89M 0 98X 3 +86Y 3 92P 0 Click for more constraints 5x 1 + 9Y 1 –9R 0 5X 2 + 9Y 2 – 7M 0 5X 3 + 9Y 3 –6P 0 All the variables are non-negative 5x 1 + 9Y 1 –9R 0 5X 2 + 9Y 2 – 7M 0 5X 3 + 9Y 3 –6P 0 All the variables are non-negative United Oil Company – Solution
69 United Oil Company – Solution
70 Crude Availability Blended Requirements Total Profit Vapor Pr. Constraints (Hidden) Octane Constraints (Hidden) Decision Variables United Oil Company – Solution
71 These models cover a planning horizon of several periods. Linking constraints secure the proper transfer of quantities from one period to the next one. The form of these constraints is: Amount this period = Amount last period + Inflow for the period – Outflow for the period These models are useful for accounting analysis. Appendix 3.2 (CD): Cash Flow Models
72 Appendix 3.2 (CD): Cash Flow Models For example: Cash t = Cash t-1 + [Interest paid] t – [Loan repaid] t t-1 t = – 20
73 Data –There are $9 million available for short-term investments over a period of five months (it is now January 1). –There are three possible investments. –Interest earned on each investment is: 0.7% over two months for two month term account. 1.5% over three months for three months construction loan. 0.2% per one-month period for passbook saving account. –Funds invested in term account are not liquid before the term ends. –Interest earned on investment before it is matured is calculated proportionately to the term rate. The Powers Group Cash Flow Problem
74 Objective function – Maximize the book value at the end of May. Constraints –No more than $4 million should be invested in any one of the three short term investments. –Total investment each month in the liquid passbook account should be at least $2 million. –Cash available at the end of each month should be at least $3.5 million. –Cash available at the end of May should be at least $5 million. The Powers Group Cash Flow Problem
75 Decision variables –T j = the amount of funds invested in the 2 month term account at the beginning of month j = 1, 2,…, 6 (j=1, Jan.) –C j = the amount of funds invested in construction loan at the beginning of month j = 1, 2,…, 6 (j=1, Jan.) –P j = the amount of funds invested in passbook saving account at the beginning of month j = 1, 2,…, 6 (j=1, Jan.) –Summation variables: see next slide The Powers Group Cash Flow Problem – Solution
76 Summation variables TT j = TT j-1 –T j-2 + T j TC j = TC j-1 – C j-3 + C j TP j = P j The Powers Group Cash Flow Problem – Solution
77 Objective function Book value consists of cash, and proportionate interest paid on investments before maturity T T C C C P 5 Half of the full two months interest is considered at the end of May for a 2-month term investment made at the beginning of May May 1 June 1 The Powers Group Cash Flow Problem – Solution
78 Constraints –Not more than $4,000,000 can be invested in any investment TT j 4,000,000; TC j 4,000,000 TP j 4,000,000 –Total in Passbook Saving is at least $2,000,000 TP j 2,000,000 –Total investment at the beginning of each month = cash available for investment at the end of the previous month. T j + C j + P j = L j-1 Then, L j 3,500,000 for j=Feb, March, …) and L 1 = 9,000,000. Also L 5 5,000,000 The Powers Group Cash Flow Problem – Solution
79 The Powers Group Cash Flow Problem - spreadsheet =1.007*H *G *I8 Drag back to E9:H9 =H13+I6-G6 =H14+I&7-G7 =I8 Drag back to column E:H =1.007*H *I *G *H *I *I8 Drag back to E16:H16 =(I16 – E18)/E18*(12/5) =Sum(I6:I8) Drag back to E5:H5
80 Appendix 3.3 (CD): Data Envelopment Analysis Models Relative efficiency = In these models the relative efficiency of facilities with similar goals and objectives is studied. The relative efficiency is calculated as a ratio of outputs to inputs. Weighted sum of outputs Weighted sum of inputs
81 Sir Loin Restaurants - DEA KATTLECORP Inc. owns and operates four restaurants located in different states. The restaurants are of different size, personnel, and traffic density. KATTLECORP wishes to determine which restaurant operates efficiently.
82 Sir Loin Restaurants - DEA To calculate efficiency KATTLECORP needs to compare input to output in each restaurant Input –Capacity –# of employees –Population around Output –Gross revenue –% of returning customers –Food rating
83 Data Sir Loin Restaurants - DEA Population within 10 miles around the restaurant location Customer survey: 1. Would you return to this restaurant? 2. Rate the food on a scale of 0 – 10.
84 Decision variables –X 1, X 2, X 3 = relative input weight for capacity, number of employee, and service area respectively –Y 1, Y 2, Y 3 = relative input weight for gross revenue, repeat business, and food rating respectively Sir Loin Restaurants – Solution
85 Objective function Maximize the efficiency for the Columbia restaurant Max, which becomes Sir Loin Restaurants – Solution Y Y Y 3 152X X X 3 Since we maximize the ratio, the denominator can be selected as equal to 1, without loss of generality. Max Y Y Y 3 S.T. 152X X X 3 = 1, and other constraints shown next…
86 Constraints –We have already established that 152X X X 3 = 1 –In general, we require that the efficiency of each restaurant is not greater than 1. Output/input 1, or,Output Input –604000Y 1 +89Y Y 3 213X 1 +52X X 3 (Tampa) Y 1 +85Y Y 3 265X 1 + 5X X 3 (Atlanta) Y 1 +94Y Y 3 157X 1 +40X X 3 (Mobile) Y 1 +88Y Y 3 152X 2 +48X X 3 (Columbia) Sir Loin Restaurants – Solution All the variables are non-negative
87 Sir Loin Restaurants - Spreadsheet =SUMPRODUCT($F$4:$F$6,E4:E6) Drag back to B7:D7 =SUMPRODUCT($F$10:$F$12,E10:E12) Drag back to B13:D13
88 Copyright 2002 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that named in Section 117 of the United States Copyright Act without the express written consent of the copyright owner is unlawful. Requests for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. Adopters of the textbook are granted permission to make back-up copies for their own use only, to make copies for distribution to students of the course the textbook is used in, and to modify this material to best suit their instructional needs. Under no circumstances can copies be made for resale. The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein.