Lecture 3: Common Business Applications and Excel...

17
OMIS2000 Lecture 3 Jessica Gahtan Page 1 of 17 Lecture 3: Common Business Applications and Excel Solver Common Business Applications Linear Programming (LP) can be used for many managerial decisions: - Product mix - Media selection - Marketing research - Portfolio selection - Shipping & transportation a) Formulate the LP model to Maximize the profit. b) Solve using Solver

Transcript of Lecture 3: Common Business Applications and Excel...

Page 1: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 1 of 17

Lecture 3: Common Business Applications and Excel Solver Common Business Applications

Linear  Programming  (LP)  can  be  used  for  many  managerial  decisions:  - Product mix - Media selection - Marketing research - Portfolio selection - Shipping & transportation - Multi-period scheduling

For  a  particular  application  we  begin  with  the  problem  scenario  and  data,  then:  1. Define the decision variables 2. Formulate the LP model using the decision variables

- Write the objective function equation - Write each of the constraint equations

3. Implement the model in Excel Solver 4. Solve

Common  Business  Applications  Product Mix

- Usually involve maximizing profit subject to: - Production resource constraints - Material Availability constraints - Standing orders - Quotas - Maximum or minimum proportions

Example  1  –  Product  Mix  Imagine that you are managing a factory that is building three products: TV sets, stereos and speakers. Each product is assembled from parts in inventory, and there are five types of parts: Chassis, picture tubes, speaker cones, power supplies and electronics units. Your goal is to produce the mix of products which will maximize profits, given the inventory of products on hand. Assume that you can sell TV sets for a gross profit of $75 each, stereos for a profit of $50 each, and speaker for $35 each. To assemble a TV set, you need 1 chassis, 1 picture tube, 2 speaker cones, 1 power supply and 2 sets of electronics. To make a stereo, you need 1 chassis, 2 speaker cones, 1 power supply and 1 set of electronics. And to build a speaker, all you need is 1 speaker cone and 1 set of electronics. The parts you have on hand are 450 chassis, 250 picture tubes, 800 speaker cones, 450 power supplies and 600 sets of electronics. You can build only a limited number of products from the parts on hand. a) Formulate the LP model to Maximize the profit. b) Solve using Solver

Page 2: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 2 of 17

Example  1  -­‐  Solution  Step 1: Def ine the ob ject ive

- Maximize the profit Step 2: Def ine the dec is ion var iab les

x1 = number of TV sets assembled x2 = the number of stereos assembled x3 = the number of speakers assembled

Step 3: Wr i te the mathemat ica l ob ject ive funct ion Maximize Z = 75 x1 + 50 x2 + 35 x3 Step 4: Formulate the constra in ts 1 x1 + 1 x2 ≤ 450 (Chassis) 1 x1 ≤ 250 (Picture tubes) 2 x1 + 2 x2 + 1 x3 ≤ 800 (Speaker cones) 1 x1 + 1 x2 ≤ 450 (Power supplies) 2 x1 + 1 x2 + 1 x3 ≤ 600 (Electronics) x1 , x2 , x3 ≥ 0 Step 5: F ina l Formulat ion Maximize Z = 75 x1 + 50 x2 + 35 x3 S.t: 1 x1 + 1 x2 ≤ 450 (Chassis) 1 x1 ≤ 250 (Picture tubes) 2 x1 + 2 x2 + 1 x3 ≤ 800 (Speaker cones) 1 x1 + 1 x2 ≤ 450 (Power supplies) 2 x1 + 1 x2 + 1 x3 ≤ 600 (Electronics) x1 , x2 , x3 ≥ 0

Some  helpful  notation  xi = # of units of product i produced

pi= profit per unit of product i rij = amount of resource j needed to produce one unit of product i Aj = amount of resource j available i= {1,2,3} and j={1,…,5}

Solver  Solution  

Page 3: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 3 of 17

Investment Portfolio – Usually involve maximizing return subject to

• Maximum risk constraints • Maximum or minimum proportions in various asset classes

– OR – Minimizing risk subject to

• Minimum return constraints • Maximum or minimum proportions in various asset classes

Example  2a  –  An  Investment  Example  Welte Mutual Funds, located in New York City, just obtained $100,000 by converting industrial bonds to cash and is now looking for other investment opportunities for these funds. Based on Welte’s current investments, the firm’s top financial analyst recommended that all new investments be made in the oil industry, steel industry or in government bonds. Specifically, the analyst indentified five investment opportunities and projected their annual rates of return. The investments and rates of return are listed below. Management of Welte imposed the following investment guidelines:

1. Neither industry (oil or steel) should receive more than $50,000 2. Government bonds should be at least 25% of the steel industry

investment. 3. The investment in Pacific Oil, the high-return

but high risk investment, cannot be more than 60% of the total oil industry investment.

What portfolio recommendations - investments and amounts, should be made with the available $100,000?

Example  2a  –  Solution  Step 1: Def ine the ob ject ive

• Maximize the return Step 2: Def ine the dec is ion var iab les A - Dollars invested in Atlantic Oil P - Dollars invested in Pacific Oil M - Dollars invested in Midwest Steel H - Dollars invested in Huber Steel G - Dollars invested in Government Bonds Step 3: Wr i te the mathemat ica l ob ject ive funct ion Maximize Z = 0.073A+0.103P+0.064M+0.075H+0.045G Step 4: Formulate the constraints

1. Welte just obtained $100,000 by converting industrial bonds to cash and is now looking for other investment opportunities for these funds.

A+P+M+H+G=100,000 2. Neither industry (oil or steel) should receive more than $50,000

A + P ≤ 50,000 M + H ≤ 50,000

3. Government bonds should be at least 25% of the steel industry investment.

4. The investment in Pacific Oil, the high return but high-risk investment, cannot be more than 60% of the total oil industry investment.

Page 4: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 4 of 17

Step 5: F ina l Formulat ion

Solver  Solution  

Diet Problems – Usually involve minimizing cost of diet subject to

• Minimum and maximum nutritional requirements

Example  3  –  Diet  Problem  Lifegym, a health and fitness center, operates a morning fitness program for senior citizens. The program includes aerobic exercise, either swimming or step exercise, followed by a health breakfast in the dining room. Lifegym’ dietitian wants to develop a breakfast that will be high in calories , calcium, protein and fiber, which are especially important to seniors, but low in fat and cholesterol. She also wants to minimize cost. She has selected the following possible food items, whose individual nutrient contributions and cost from which to develop a standard breakfast menu are shown in the slide.

Page 5: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 5 of 17

Diet Problem – Decis ion Var iab les x1 = cups of bran cereal x2 = cups of dry cereal x3 = cups of oatmeal x4 = cups of oat bran x5 = eggs x6 = slices of bacon x7 = oranges x8 = cups of milk x9 = cups of orange juice x10 = slices of wheat toast

Diet Problem – Formulat ion

Formulat ion - Excel

Page 6: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 6 of 17

Diet Problem – Solut ion

Blending Problems – May be similar to diet problems in that we may minimize the cost of formulating

subject to • Minimum and maximum component requirements

– Alternatively we could be maximizing margin or profit earned

Example  4a  -­‐  A  Blend  Example  

Formulat ion

• Since we have the selling price we will maximize profit. • Note that the selling price was given in liters, whereas the input costs were in barrels • Second, we have variables for each input used in each product

Page 7: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 7 of 17

Decis ion Var iab les LS = Light Sweet Crude used in Standard Oil LP = Light Sweet Crude used in Premium Oil LG = Light Sweet Crude used in Green Oil MS = Med Alta Crude used in Standard Oil MP = Med Alta Crude used in Premium Oil MG = Med Alta Crude used in Green Oil RS = Recycled Oil used in Standard Oil RP = Recycled Oil used in Premium Oil RG = Recycled Oil used in Green Oil Object ive Funct ion

Constra in ts

Page 8: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 8 of 17

Formulat ion

Page 9: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 9 of 17

Example  5  -­‐  A  Blending  Problem:  The  Agri-­‐Pro  Company  

Def in ing the Decis ion Var iab les X1 = pounds of feed 1 to use in the mix X2 = pounds of feed 2 to use in the mix X3 = pounds of feed 3 to use in the mix X4 = pounds of feed 4 to use in the mix Def in ing the Object ive Funct ion Minimize the total cost of filling the order. MIN: Z=0.25X1 + 0.30X2 + 0.32X3 + 0.15X4 Def in ing the Constra in ts

- Produce 8,000 pounds of feed X1 + X2 + X3 + X4 = 8,000

- Mix consists of at least 20% corn (0.3X1 + 0.05X2 + 0.2X3 + 0.1X4)/8000 ≥ 0.2

- Mix consists of at least 15% grain (0.1X1 + 0.03X2 + 0.15X3 + 0.1X4)/8000 ≥ 0.15

- Mix consists of at least 15% minerals (0.2X1 + 0.2X2 + 0.2X3 + 0.3X4)/8000 ≥ 0.15

- Non-negativity conditions X1, X2, X3, X4 ≥ 0

A Comment About Scaling • Notice the coefficient for X2 in the ‘corn’ constraint is 0.05/8000 = 0.00000625 • As Solver runs, intermediate calculations are made that make coefficients larger or

smaller. • Storage problems may force the computer to use approximations of the actual numbers. • Such ‘scaling’ problems sometimes prevents Solver from being able to solve the problem

accurately. • Most problems can be formulated in a way to minimize scaling errors...

Re-Defining the Decision Variables X1 = thousands of pounds of feed 1 to use in the mix X2 = thousands of pounds of feed 2 to use in the mix X3 = thousands of pounds of feed 3 to use in the mix X4 = thousands of pounds of feed 4 to use in the mix

Page 10: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 10 of 17

Re-Defining the Objective Function Minimize the total cost of filling the order. MIN: 250X1 + 300X2 + 320X3 + 150X4

Re-Defining the Constraints • Produce 8,000 pounds of feed

X1 + X2 + X3 + X4 = 8 • Mix consists of at least 20% corn

(0.3X1 + 0.05X2 + 0.2X3 + 0.1X4)/8 >= 0.2 • Mix consists of at least 15% grain

(0.1X1 + 0.3X2 + 0.15X3 + 0.1X4)/8 >= 0.15 • Mix consists of at least 15% minerals

(0.2X1 + 0.2X2 + 0.2X3 + 0.3X4)/8 >= 0.15 • Non-negativity conditions

X1, X2, X3, X4 >= 0

Scaling: Before and After • Before:

– Largest constraint coefficient was 8,000 – Smallest constraint coefficient was: 0.05/8000 = 0.00000625.

• After: – Largest constraint coefficient is 8 – Smallest constraint coefficient is: 0.05/8 = 0.00625.

• The problem is now more evenly scaled!

Implementing the Model See file Agri-Pro

Time Related Models • Up until now all the LP examples have been static, or one-period, models. • Linear programming can also be used to determine optimal decisions in multi-period, or

dynamic, models.

Multi-Period Scheduling • These applications optimize the scheduling of resources through time

– Minimizing cost • Examples

– Aggregate Planning – Production Scheduling – Workforce Scheduling – Cash Budgeting – Inventory Planning

Page 11: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 11 of 17

Def in ing the Decis ion Var iab les Pi = number of units to produce in month i, i=1 to 6 Bi = beginning inventory month i, i=1 to 6 Def in ing the Object ive Funct ion

Page 12: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 12 of 17

Implementing the Model UPTON MANUFACTURING Note:

• only the Pi are variables in the Excel model • flow balance constraints are not listed as constraints in Solver (they are handled directly

by the spreadsheet)

More Examples

Page 13: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 13 of 17

Example 2b – Solution Step 1: Def ine the ob ject ive

• Maximize the return Step 2: Def ine the dec is ion var iab les x1 = amount invested in municipal bonds ($) x2 = amount invested in certificates of deposit ($) x3 = amount invested in treasury bills ($) x4 = amount invested in growth stock fund($) Step 3: Wr i te the mathemat ica l ob ject ive funct ion Maximize Z = 0.085x1 + 0.05x2 + 0.065 x3+ 0.130x4 Step 4: Formulate the constra in ts

Page 14: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 14 of 17

Step 5: F ina l Formulat ion Maximize Z = 0.085x1 + 0.05x2 + 0.065 x3+ 0.130x4 S.t:

Solver Solution

Page 15: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 15 of 17

A Blend Example A Petroleum company produced three grades of motor oil – Super, Premium and Extra. From three components. The company wants to determine the optimal mix of the three components in each grade of motor oil that will maximize profit. The maximum quantities available of each component and their cost per barrel are as follows: To ensure the appropriate blend, each grade has certain general specifications. Each grade must have minimum amount of component 1 plus combination of other components, as follows: The company wants to produce at least 3000 barrels of each grade of motor oil.

Solution Step 1: Define the objective

• Maximize Profit Step 2: Define the decision variables xij = barrels of component i used in motor oil grade j per day, where i = 1, 2, 3 and j = s (super), p (premium), and e (extra). Step 3: Write the mathematical objective function Maximize Z = $23(x1s+x2s+x3s)+ 20(x1p+x2p +x3p) +18(x1e+x2e+x3e) – 12(x1s+x1p+x1e) - 10(x2s+x2p +x2e) – 14(x3s+x3p +x3e)

Page 16: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 16 of 17

Step 4: Formulate the constraints 1. The first set of constraints reflects the limited amount of each component available on daily basis: Step 4: Formulate the constraints 2. The next set of constraints is for blend specifications for each grade of motor oil. Super – contain at least 50% of component 1:

Step 4: Formulate the constraints Super – not more then 30% of component 2:

3. The two blend specifications for premium motor oil is (use the same technique):

4. The two blend specifications for Extra motor oil is (use the same technique):

5. The last set of constraints reflects the requirement that at least 3,000 barrels of each grade be produced.

Page 17: Lecture 3: Common Business Applications and Excel Solvers3.amazonaws.com/prealliance_oneclass_sample/lz68wDbqAX.pdf · Lecture 3: Common Business Applications and Excel Solver ...

OMIS2000 Lecture 3 Jessica Gahtan

Page 17 of 17

Solution

Step  5:  Final  Formulation  

Example 4 – Solution