0% found this document useful (0 votes)
701 views

SMG - 3 - Modeling and Solving LP Problems in A Spreadsheet

Uploaded by

Test
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
701 views

SMG - 3 - Modeling and Solving LP Problems in A Spreadsheet

Uploaded by

Test
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

Spreadsheet Modeling and Decision Making

BAN230

Chapter 3
Modeling and Solving LP Problems
in a Spreadsheet

Yi-Chin Lin
[email protected]
Approaches to Solving LP Problems
• Graphical approach
• Spreadsheet approach (Chapter 3)

BAN230, Yi-Chin Lin, Hofstra University 2


Outline
• Steps of Solving LP Problems in a • Models
Spreadsheet • Product Mix
• Formulating a LP Model • Make vs. Buy Decisions
• Implementing an LP Model in a • Investment
Spreadsheet • Transportation
• Running spreadsheet Solvers • Blending
• Production and Inventory Planning
• Multiperiod Cash-Flow

BAN230, Yi-Chin Lin, Hofstra University 3


Solving LP Problems in a Spreadsheet
Formulating a LP Model
X1: # Aqua-Spa to make
X2: # Hydro-lux to make

MAX (Profit): 350X1 + 300X2


Subject to: 1X1 + 1X2 ≤ 200 (Pumps)
9X1 + 6X2 ≤ 1,566 (Labor)
12X1 + 16X2 ≤ 2,880 (Tubing)
1X1 ≥ 0
1X2 ≥ 0
BAN230, Yi-Chin Lin, Hofstra University 4
Solving LP Problems in a Spreadsheet
Implementing an LP Model in a Spreadsheet
• Reserve separate cells to represent each decision variable
• Organize all LHS coefficients and RHS values on the spreadsheet
• Create a formula in a cell that corresponds to the objective function
• For each constraint, create a formula in a separate cell that
corresponds to the LHS of the constraint
• Use formatting to identify cells representing decision variables,
constraints, and the objective function
• Principles
• Clear, self-explanatory, flexible (i.e. always use reference cells, if possible)

BAN230, Yi-Chin Lin, Hofstra University 5


Solving LP Problems in a Spreadsheet
Running Spreadsheet Solvers
• A spreadsheet optimization tool provided by all major spreadsheet
packages
• This chapter will illustrate how to use solver in Excel

BAN230, Yi-Chin Lin, Hofstra University 6


Implementing the LP Model for Hot Tubs
Problem in a Spreadsheet
Decision
Variables

Blue Ridge Hot Tubs Objective


Function
Aqua-Spas Hydro-Luxes
Number to Make 0 0 Total Profit
Unit Profits 350 300 0

Constraints Used (LHS) Available (RHS)


Pumps Req'd 1 1 0 200
Labor Req'd 9 6 0 1566 Constraints
Tubing Req'd 12 16 0 2880

BAN230, Yi-Chin Lin, Hofstra University 7


Solving the Spreadsheet Model for Hot Tubs
Problem
Variables
Cells

Blue Ridge Hot Tubs Objective


Aqua-Spas Hydro-Luxes
Number to Make 122 78 Total Profit
Unit Profits 350 300 66100

Constraints Used (LHS) Available (RHS)


Pumps Req'd 1 1 200 200
Labor Req'd 9 6 1566 1566
Tubing Req'd 12 16 2712 2880

BAN230, Yi-Chin Lin, Hofstra University Cell Reference Constraints 8


Make vs. Buy Decisions
The Electro-Poly Corporation is the world’s leading manufacturer of slip rings. A slip ring is an electronical
coupling device that allows current to pass through a spinning or rotating connection – such as a gun turret on a
ship, aircraft, or tank. The company recently received a $750,000 order for various quantities of three types of slip
rings. Each slip ring requires a certain amount of time to wire and harness, The table (left) summarizes the
requirements for the three models of slip rings.
Unfortunately, Electro-Poly does not have enough wiring and harnessing capacity to fill the order by its due date.
The company has only 10,000 hours of wiring capacity and 5,000 hours of harnessing capacity available to devote
to this order. However, the company can subcontract any portion of this order to one of its competitors. The unit
costs of producing each model in-house and buying the finished products from a competitor are summarized in
the table (right).
Electro-Poly wants to determine the number of slip rings to make and the number to buy in order to fill the
customer order at the least possible cost.
Model 1 Model 2 Model 3 Model 1 Model 2 Model 3
Number Ordered 3,000 2,000 900 Cost to Make $50 $83 $130
Hours of Wiring Required per Unit 2 1.5 3 Cost to Buy $61 $97 $145
Hours of Harnessing Required per Unit 1 2 1

BAN230, Yi-Chin Lin, Hofstra University 9


Formulating the LP Model
Decision Variables: MIN:
M1 = #Model 1 to make 50M1+ 83M2+ 130M3+ 61B1+ 97B2+ 145B3
M2 = #Model 2 to make Subject to:
2M1+ 1.5M2+ 3M3 ≤ 10,000
M3 = #Model 3 to make
M1+ 2M2+ M3 ≤ 5,000
B1 = #Model 1 to buy
M1+ B1 = 3,000
B2 = #Model 2 to buy
M2+ B2 = 2,000
B3 = #Model 3 to buy
M3+ B3 = 900
M1, M2, M3, B1, B2, B3 ≥ 0
BAN230, Yi-Chin Lin, Hofstra University 10
Implementing the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 11


Solving the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 12


Alternatives
• Can I just have 3 decision variables for the making decisions?
• What is the new LP model?

BAN230, Yi-Chin Lin, Hofstra University 13


Formulating the LP Model - Alternative
Decision Variables: MIN:
M1 = #Model 1 to make 50M1+ 83M2+ 130M3+ 61B1+ 97B2+ 145B3
M2 = #Model 2 to make Subject to: Where:
M3 = #Model 3 to make 2M1+ 1.5M2+ 3M3 ≤ 10,000 B1= 3,000 – M1
M1+ 2M2+ M3 ≤ 5,000 B2= 2,000 – M2
M1, M2, M3, B1, B2, B3 ≥ 0 B3= 900 – M3

BAN230, Yi-Chin Lin, Hofstra University 14


LP Models

6 DVs 3 DVs

BAN230, Yi-Chin Lin, Hofstra University 15


Solving the Spreadsheet Model - Alternative

BAN230, Yi-Chin Lin, Hofstra University 16


Spreadsheet Models

6 DVs 3 DVs

BAN230, Yi-Chin Lin, Hofstra University 17


Alternatives
• Yes! But you need to have the following adjustments accordingly
• Modify your LP model
• Modify your spreadsheet model
• When reporting your optimal decisions, you also need to report the
corresponding buying amount
• The optimal solution still remains

BAN230, Yi-Chin Lin, Hofstra University 18


An Investment Problem
Company Return Type Rating
Brian Givens is a financial analyst for Retirement
Planning Services, Inc., who specializes in Acme Chemical 8.65% Long-term 1-Excellent
designing retirement income portfolios for DynaStar 9.50% Long-term 3-Good
retirees using corporate bonds. He has just Eagle Vision 10.00% Short-term 4-Fair
completed a consultation with a client who
expects to have $750,000 to invest when she MicroModeling 8.75% Long-term 1-Excellent
retires next month. Brian and his client agreed to OptiPro 9.25% Short-term 3-Good
consider upcoming bond issues from the six Sabre Systems 9.00% Long-term 2-Very Good
companies in the table.
To produce his client’s income, Brian and his client agreed that no more than
25% of her money should be invested in any one investment and at least half
of her money should be invested in long-term bonds. Also, no more than 35%
of the money should be invested in the bonds that have rating scores of 3 and
4.
Brian needs to determine how to allocate his client’s investments to maximize
her income while meeting their agreed upon investment restrictions.
BAN230, Yi-Chin Lin, Hofstra University 19
Formulating the LP Model
Decision Variables: MAX:
X1 = $, Acme Chemical .0865X1+ .095X2+ .1X3+ .0875X4+ .0925X5+ .
09X6
X2 = $, DynaStar
Subject to:
X3 = $, Eagle Vision
X1+ X2+ X3+ X4+ X5+ X6 = 750,000
X4 = $, MicroModeling
X1, X2, X3, X4, X5, X6 ≤ 25%*750,000
X5 = $, OptiPro
X1+ X2+ X4+ X6 ≥ 50%*750,000
X6 = $, Sabre Systems
X2+ X3+ X5 ≤ 35%*750,000
X1, X2, X3, X4, X5, X6 ≥ 0
BAN230, Yi-Chin Lin, Hofstra University 20
Implementing the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 21


Solving the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 22


A Transportation Problem
Tropicsun is a leading grower and distributor of fresh citrus products with three large citrus groves
scattered around central Florida in the cities of Mt. Dora, Eustis, and Clermont. Tropicsun currently has
275,000 bushels of citrus at the grove in Mt. Dora, 400,000 bushels at the grove in Eustis, and 300,000
bushels at the grove in Clermont. The company has citrus processing plants in Ocala, Orlando, and
Leesburg with processing capacities to handle 200,000, 600,000, and 225,000 bushels, respectively.
Tropicsun contracts with a local trucking company to transport its fruit from the groves to the processing
plants. The trucking company charges a flat rate for every mile that each bushel of fruit must be
transported. Each mile a bushel of fruit travels is known as a bushel-mile. The following table summarizes
the distances (in miles) between the groves and processing plants.
Tropicsun wants to determine how many bushels to ship from each grove to each processing plant in
order to process all the fruit whileDistance (in miles)
minimizing Between
the total Groves
number and Plants the fruit must be shipped.
of bushel-miles
Grove Ocala Orlando Leesburg
Mt. Dora 21 50 40
Eustis 35 30 22
Clermont 55 20 25
BAN230, Yi-Chin Lin, Hofstra University 23
Formulating the LP Model
DV: Xij = the bushels of fruits being shipped from i to j
MIN:
Mt. Dora X14 Ocala
1 4 21X14+ 50X15+ 40X16+ 35X24+ 30X25+ 22X26+ 55X34+
X15 20X35+ 25X36
X16 Subject to: Can I use <=?
X24 X14+ X15+ X16 = 275,000
Eustis X25 Orlando
2 5 X24+ X25+ X26 = 400,000
X26 X34+ X35+ X36 = 300,000
X34
X14+ X24+ X34 ≤ 200,000
X35
Clermont Leesburg X15+ X25+ X35 ≤ 600,000
3 X36 6 X16+ X26+ X36 ≤ 225,000
X14, X15, X16, X24, X25, X26, X34, X35, X36 ≥ 0

BAN230, Yi-Chin Lin, Hofstra University 24


Implementing the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 25


Solving the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 26


A Blending Problem
Agri-Pro is a company that sells agricultural products to farmers in a number of states. One service it provides to
customers is custom feed mixing, whereby a farmer can order a specific amount of livestock feed and specify the
amount of corn, grain, and minerals the feed should contain. This is an important service because the proper feed
for various farm animals changes regularly depending on the weather, pasture condition, and so on.
Agri-Pro stocks bulk amounts of four types of feeds that it can mix to meet a given customer’s specifications. The
following table summarizes the four feeds.
On average, U.S. citizens consume almost 70 pounds of poultry per person per year. To remain competitive, chicken
growers must ensure that they feed the required nutrients to their flocks in the most cost-effective manner. Agri-
Pro has just received an order from a local chicken farmer for 8,000 pounds of feed. The farmer wants this feed to
contain at least 20% corn, 15% grain, and 15% minerals. What should Agri-Pro do to fill this order at minimum cost?
Percent of Nutrient in
Nutrient Feed 1 Feed 2 Feed 3 Feed 4
Corn 30% 5% 20% 10%
Grain 10% 30% 15% 10%
Minerals 20% 20% 20% 30%
Cost per Pound $0.25 $0.30 $0.32 $0.15
BAN230, Yi-Chin Lin, Hofstra University 27
Formulating the LP Model
Decision Variables: MIN:
X1 = Pounds of Feed 1 to .25X1+ .3X2+ .32X3+ .15X4
be used for the order Subject to:
X2 = Pounds of Feed 2… X1+ X2+ X3+ X4 = 8,000
X3 = Pounds of Feed 3… .3X1+ .05X2+ .2X3+ .1X4 ≥ 20%*8,000
X4 = Pounds of Feed 4… .1X1+ .3 X2+ .15X3+ .1X4 ≥ 15%*8,000
.2X1+ .2 X2+ .2 X3+ .3X4 ≥ 15%*8,000
X1, X2, X3, X4 ≥ 0

BAN230, Yi-Chin Lin, Hofstra University 28


Implementing the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 29


Solving the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 30


Alternatives
• Can I model the problem differently? Can I define my decision
variables as %?
• What is the new LP model?

BAN230, Yi-Chin Lin, Hofstra University 31


Formulating the LP Model
Decision Variables: MIN:
X1 = Proportion of Feed 1 (.25X1+ .3X2+ .32X3+ .15X4)*8000
to be used for the order Subject to:
X2 = Proportion of Feed X1+ X2+ X3+ X4 = 1
2…
.3X1+ .05X2+ .2X3+ .1X4 ≥ 20%
X3 = Proportion of Feed
3… .1X1+ .3 X2+ .15X3+ .1X4 ≥ 15%
X4 = Proportion of Feed .2X1+ .2 X2+ .2 X3+ .3X4 ≥ 15%
4… X1, X2, X3, X4 ≥ 0

BAN230, Yi-Chin Lin, Hofstra University 32


A Production and Inventory Planning
Problem
The Upton Corporation manufactures heavy-duty air compressors for the home and light industrial markets. Upton is
presently trying to plan its production and inventory levels for the next six months. Because of seasonal fluctuations in
utility and raw material costs, the per unit cost of producing air compressors varies from month to month – as does the
demand for air compressors. Production capacity also varies from month to month due to differences in the number of
working days, vacations, and scheduled maintenance and training. The following table summarizes the monthly
production costs, demands, and production capacity that Upton’s management expects to face over the next six months.
Given the size of Upton’s warehouse, a maximum of 6,000 units can be held in inventory at the end of any month. The
owner of the company likes to keep at least 1,500 units in inventory at the end of any month as safety stock to meet
unexpected demand contingencies. To maintain a stable workforce, the company wants to produce no less than one half
of its maximum production capacity each month. Upton’s controller estimates that the cost of carrying a unit in any given
month is approximately equal to 1.5% of the unit production cost in the same month. Upton estimates the number of
units carried in inventory each month by averaging the beginning and ending inventory for each month.
Currently, 2,750 units are in inventory. Upton wants to identify the production and inventory plan for the next six months
that will meet the expected demand each month while minimizing production and inventory costs.
Month
1 2 3 4 5 6
Unit Production Cost $240 $250 $265 $285 $280 $260
Units Demanded 1,000 4,500 6,000 5,500 3,500 4,000
Maximum Production 4,000 3,500 4,000 4,500 4,000 3,500
BAN230, Yi-Chin Lin, Hofstra University 33
Month
1 2 3 4 5 6
Unit Production Cost $240 $250 $265 $285 $280 $260
Units Demanded 1,000 4,500 6,000 5,500 3,500 4,000
Maximum Production 4,000 3,500 4,000 4,500 Yi-Chin Lin,
BAN230, 4,000 3,500
Hofstra University 34
Formulating the LP Model
MIN:
2,750 B1 B2 B3 B4 B5 B6 240P1+ 250P2+ 265P3+ 285P4 + 280P5+ 260P6 +
P1 P2 P3 P4 P5 P6 3.6 *(2,750+B1)/2 + 3.75*(B1+B2)/2 + 3.975*(B2+B3)/2 +
4.275*( B3+B4)/2 + 4.2 *(B4+B5)/2 + 3.9 *(B5+B6)/2
Decision Variables: Subject to: Where:
P1 = #Units to produce in month 1 1,500 ≤ B1, B2, B3, B4, B5, B6 ≤ 6,000 B1 = 2,750 + P1 - 1,000
P2 = #Units to produce in month 2 2,000 ≤ P1 ≤ 4,000 B2 = B1 + P2 - 4,500
P3 = #Units to produce in month 3 1,750 ≤ P2 ≤ 3,500 B3 = B2 + P3 - 6,000
P4 = #Units to produce in month 4 2,000 ≤ P3 ≤ 4,000 B4 = B3 + P4 - 5,500
P5 = #Units to produce in month 5 2,250 ≤ P4 ≤ 4,500 B5 = B4 + P5 - 3,500
P6 = #Units to produce in month 6 2,000 ≤ P5 ≤ 4,000 B6 = B5 + P6 - 4,000
1,750 ≤ P6 ≤ 3,500
BAN230, Yi-Chin Lin, Hofstra University 35
Implementing the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 36


Solving the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 37


A Multiperiod Cash-Flow Problem
Taco-Viva is a small but growing restaurant chain specializing in Mexican fast food. The management
of the company has decided to build a new store, and wants to establish a construction fund to pay
for the new facility. Construction of the restaurant is expected to take six months. Taco-Viva’s
contract with the construction company requires it to make payments of $250,000 at the end of the
second and fourth months, and a final payment of $300,000 at the end of the sixth month. The
company can use four investment opportunities to establish the construction fund, as summarized in
the following table.
The table indicates that investment A will be available at the beginning of each of the next six
months, and funds invested in this manner mature in one month with a yield of 1.8%.
The management of Taco-Viva needs to determine the investment plan that allows them to meet the
required schedule of payments while placing the least amount of money in the construction fund.
Investment Available in Month Months to Maturity Yield at Maturity
A 1, 2, 3, 4, 5, 6 1 1.8%
B 1, 3, 5 2 3.5%
C 1, 4 3 5.8%
D 1 6 11.0%
BAN230, Yi-Chin Lin, Hofstra University 38
Investment Available in Month Months to Maturity Yield at Maturity
A 1, 2, 3, 4, 5, 6 1 1.8%
B 1, 3, 5 2 3.5%
C 1, 4 3 5.8%
D 1 6 11.0%

BAN230, Yi-Chin Lin, Hofstra University 39


A Multiperiod Cash-Flow Problem
Cash Inflow/Outflow at the Beginning of Month
Investment 1 2 3 4 5 6 7
A1 -1 1.018
B1 -1 <_____> 1.035
C1 -1 <_____> <_____> 1.058
D1 -1 <_____> <_____> <_____> <_____> <_____> 1.11
A2 -1 1.018
A3 -1 1.018
B3 -1 <_____> 1.035
A4 -1 1.018
C4 -1 <_____> <_____> 1.058
A5 -1 1.018
B5 -1 <_____> 1.035
A6 -1 1.018
© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or

Payments $0 $0 $250 $0 $250 $0 $300


posted to a publicly accessible website, in whole or in part.
Formulating the LP Model
Decision Variables: MIN:
Ai = amount placed in investment A at A1 + B1 + C1 + D1
the beginning of month i=1, 2, 3, 4, 5, 6 Subject to:
Bi = amount placed in investment B at 1.018A1 – 1A2 = 0 (month 2)
the beginning of month i=1, 3, 5 1.035B1 + 1.018A2 – 1A3 – 1B3 = 250,000 (month 3)
Ci = amount placed in investment C at 1.058C1 + 1.018A3 – 1A4 – 1C4 = 0 (month 4)
the beginning of month i=1, 4 1.035B3 + 1.018A4 – 1A5 – 1B5 = 250,000 (month 5)
Di = amount placed in investment D at 1.018A5 –1A6 = 0 (month 6)
the beginning of month i=1 1.11D1 + 1.058C4 + 1.035B5 + 1.018A6 = 300,000 (month 7)
Ai, Bi, Ci, Di >= 0, for all i

BAN230, Yi-Chin Lin, Hofstra University 41


Implementing the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 42


Solving the Spreadsheet Model

BAN230, Yi-Chin Lin, Hofstra University 43

You might also like