Linear Programming: Formulation and Applications Solution To Solved Problems

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30
At a glance
Powered by AI
The document discusses how to formulate and solve a linear programming problem to determine the optimal crop mix for a farm.

A linear programming problem to determine the optimal crop mix to maximize profit for a farm given constraints on available labor hours, fertilizer, and land.

The constraints of the problem are the limited resources of labor hours, fertilizer, and land available.

CHAPTER 3

LINEAR PROGRAMMING:
FORMULATION AND APPLICATIONS
SOLUTION TO SOLVED PROBLEMS

3.S1 Farm Management


Dwight and Hattie have run the family farm for over thirty years. They are currently planning
the mix of crops to plant on their 120-acre farm for the upcoming season. The table below
gives the labor hours and fertilizer required per acre, as well as the total expected profit per
acre for each of the potential crops under consideration. Dwight, Hattie, and their children
can work at most 6,500 total hours during the upcoming season. They have 200 tons of
fertilizer available. What mix of crops should be planted to maximize the family’s total profit.
a. Formulate and solve a linear programming model for this problem in a spreadsheet.

Labor Required Fertilizer Required Expected Profit


Crop (hours per acre) (tons per acre) (per acre)

Oats 50 1.5 $500

Wheat 60 2 $600

Corn 105 4 $950

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

1
This is a resource-allocation problem. The activities are the planting of the three crops and
the limited resources are land, labor, and fertilizer. We will therefore build a spreadsheet
following the template for resource-allocation problems in Figure 3.4. Start by entering the
data. The data for this problem are the labor required, fertilizer required, and expected
profit for each crop (per acre). Following the template, the data in the spreadsheet would
be entered as displayed below, where range names of ProfitPerAcre (C4:E4) and
TotalAvailable (H7:H9) are assigned to the corresponding data cells.

The decisions to be made in this problem are how many acres of each crop to plant.
Therefore, we add three changing cells in C12:E12 with range name AcresPlanted. The
values in AcresPlanted (C12:E12) will eventually be determined by the Solver. For now, an
arbitrary value of 1 is entered for each crop.

The goal is to maximize the family’s total profit. Thus, the objective cell should calculate the
total profit. In this case, the total profit will be
Total Profit = ($500)(acres of oats) + ($600)(acres of wheat) + ($950)(acres of corn)
or
Total Profit = SUMPRODUCT(ProfitPerAcre, AcresPlanted).

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

2
This formula is entered into cell H12. With 1 acre of each crop planted, the total cost would
be ($500)(1) + ($600)(1) + ($950)(1) = $2,050.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

3
The functional constraints in this problem involve the limited resources of land, labor, and
fertilizer. Given the AcresPlanted (the changing cells in C12:E12), we calculate the total
resources used in TotalUsed (cells F7:F9). For land, this will be =SUMPRODUCT(C7:E7,
AcresPlanted). Using a range name or an absolute reference for the acres planted, this
formula can be copied into cells F8:F9 to calculate the amount of labor and fertilizer used.
The total resources used must be <= TotalAvailable (H7:H9), as indicated by the <= in
G7:G9.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

4
The Solver information and solved spreadsheet are shown below.

Solver Parameters
Set Objective Cell: TotalProfit
To: Max
By Changing Variable Cells:
AcresPlanted
Subject to the Constraints:
Range Name Ce lls
TotalUsed <= TotalAvailable AcresPlanted C12:E12
Solver Options: ProfitPerAcre C4:E4
Make Variables Nonnegative TotalAvailable H7:H9
Solving Method: Simplex LP TotalProfit H12
TotalUsed F7:F9

Thus, oats should be planted on 80 acres and wheat on 40 acres, while not planting any
corn, with a resulting total profit of $64,000.

b. Formulate this same model algebraically.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

5
To build an algebraic model for this problem, start by defining the decision variables. In
this case, the three decisions are how many acres of oats, wheat, and corn to plant. These
variables are defined below:
Let O = Acres of oats planted,
W = Acres of wheat planted,
C = Acres of corn planted.
Next determine the goal of the problem. In this case, the goal is to achieve the highest
possible total profit. Each acre of oats yields a profit of $500, each acre of wheat yields a
profit of $600, while each acre of corn yields a profit of $950. The objective function is
therefore
Maximize Total Profit = $500O + $600W + $950C.
There are three limited resources in this problem: 120 acres of land, 6500 hours of labor,
and 200 tons of fertilizer. Each acre of a given crop that is planted uses up one available
acre. The data for labor hours used and fertilizer used per acre planted can be used to
calculate the total resources used as a function of the decision variables. The total
resources used need to be less than or equal to the amount available. These constraints are
therefore as follows:
Land: O + W + C ≤ 120 acres,
Labor: 50O + 60W + 105C ≤ 6500 hours,
Fertilizer: 1.5O + 2W + 4C ≤ 200 tons
After adding nonnegativity constraints, the complete algebraic formulation is given below:
Let O = Acres of Oats planted,
W = Acres of Wheat planted,
C = Acres of Corn planted.
Maximize Total Profit = $500O + $600W + $950C.
subject to
Land: O + W + C ≤ 120 acres,
Labor: 50O + 60W + 105C ≤ 6500 hours,
Fertilizer: 1.5O + 2W + 4C ≤ 200 tons
and O ≥ 0, W ≥ 0, C ≥ 0.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

6
3.S2 Diet Problem
The kitchen manager for Sing Sing Prison is trying to decide what to feed its prisoners. She
would like to offer some combination of milk, beans, and oranges. The goal is to minimize
cost, subject to meeting the minimum nutritional requirements imposed by law. The cost and
nutritional content of each food, along with the minimum nutritional requirements, are
shown below. What diet should be fed to each prisoner?
a. Formulate and solve a linear programming model for this problem in a spreadsheet.

Navy Oranges Minimum


Milk Beans (large Calif. Daily
(gallons) (cups) Valencia) Requirement
Niacin (mg) 3.2 4.9 0.8 13.0
Thiamin (mg) 1.12 1.3 0.19 1.5
Vitamin C (mg) 32.0 0.0 93.0 45.0
Cost ($) 2.00 0.20 0.25

This is a cost-benefit-trade-off problem. The activities are the quantities of food to feed
each prisoner and the required benefits are the minimum nutritional requirements. We will
therefore build a spreadsheet following the template for cost-benefit-trade-off problems in
Figure 3.6. Start by entering the data. The data for this problem are the nutrient content of
each food, the minimum daily requirement for each nutrient, and the cost of each food.
Following the template, the data in the spreadsheet would be entered as displayed below,
where range names of UnitCost (C5:E5), NutritionalContents (C9:E11), and
MinimumRequirement (H9:H11) are assigned to the corresponding data cells.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

7
The decisions to be made in this problem are how much of each food type should be fed to
each prisoner. Therefore, we add three changing cells in C13:E13, with range name
Quantity. The values in Quantity (C13:E13) will eventually be determined by the Solver. For
now, an arbitrary value of 1 is entered for each food type.

The goal is to minimize the total cost per prisoner. Thus, the objective cell should calculate
this cost:
Total Cost = ($2)(gallons of milk) + ($0.20)(cups of beans) + ($0.25)(number of
oranges)
or
Total Cost = SUMPRODUCT(UnitCost, Quantity).
This formula is entered into cell H14.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

8
The functional constraints in this problem involve the minimum daily requirement of each
nutrient. Given the amount of food fed each prisoner (the changing cells in C13:E13), we
calculate the total resources used in F9:F11. For niacin, this will be =SUMPRODUCT(C9:E9,
$C$13:$E$13). Using an absolute reference for the acres planted, this formula can be copied
into cells F10-F11 to calculate the thiamin and vitamin C. The benefit achieved (total of
each nutrient) must be >= the minimum needed (H9:H11), as indicated by the >= in
G9:G11.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

9
The Solver information and solved spreadsheet are shown below.

Solver Parameters
Set Objective Cell: TotalCost
To: Min
By Changing Variable Cells:
Quantity
Subject to the Constraints: Range Name Ce lls
MinimumRequirement H9:H11
TotalNutrients >= MinimumRequirement
NutritionalContents C9:E11
Solver Options: Quantity C13:E13
Make Variables Nonnegative TotalCost H14
Solving Method: Simplex LP TotalNutrients F9:F11
UnitCost C5:E5

Thus, each prisoner should be fed a daily average of 2.574 cups of beans and 0.484 oranges
for a total cost of $0.64.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

10
b. Formulate this same model algebraically.
To build an algebraic model for this problem, start by defining the decision variables. In
this case, the three decisions are how many gallons of milk, cups of beans, and how many
oranges to feed each prisoner. These variables are defined below:
Let M = gallons of milk fed to each prisoner,
B = cups of beans fed to each prisoner,
O = number of oranges fed to each prisoner.
Next determine the goal of the problem. In this case, the goal is to meet the nutritional
requirements at the lowest possible cost. Each gallon of milk costs $2, each cup of beans
costs $0.20, and each orange costs $0.25. The objective function is therefore
Minimize Total Cost = $2.00M + $0.20B + $0.25O.
The nutritional requirements include minimum requirements for niacin, thiamin, and
vitamin C. The data for the nutritional contents of each type of food can be used to calculate
the total level of each nutrient achieved as a function of the decision variables. The total
nutrients need to be greater than or equal to the minimum requirement. These constraints
are therefore as follows:
Niacin: 3.2M + 4.9B + 0.8O ≥ 13mg,
Thiamin: 1.12M + 1.3B + 0.19O ≥ 1.5mg,
Vitamin C: 32M + 93O ≥ 45mg.
After adding nonnegativity constraints, the complete algebraic formulation is given below:
Let M = gallons of milk fed to each prisoner,
B = cups of beans fed to each prisoner,
O = number of oranges fed to each prisoner.
Minimize Total Cost = $2.00M + $0.20B + $0.25O.
subject to
Niacin: 3.2M + 4.9B + 0.8O ≥ 13mg,
Thiamin: 1.12M + 1.3B + 0.19O ≥ 1.5mg,
Vitamin C: 32M + 93O ≥ 45mg.
and M ≥ 0, B ≥ 0, O ≥ 0.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

11
3.S3 Cutting Stock Problem
Decora Accessories manufactures a variety of bathroom accessories, including decorative
towel rods and shower curtain rods. Each of the accessories includes a rod made out of
stainless steel. However, many different lengths are needed: 12”, 18”, 24”, 40”, and 60”. Decora
purchases 60” rods from an outside supplier and then cuts the rods as needed for their
products. Each 60” rod can be used to make a number of smaller rods. For example, a 60” rod
could be used to make a 40” and an 18” rod (with 2” of waste), or 5 12” rods (with no waste).
For the next production period, Decora needs 25 12” rods, 52 18” rods, 45 24” rods, 30 40”
rods, and 12 60” rods. What is the fewest number of 60” rods that can be purchased to meet
their production needs? Formulate and solve an integer programming model in a
spreadsheet.
This is a cost-benefit-trade-off problem. For each length of rod, the required benefit is
obtaining the minimum number needed of those rods. Each possible way of cutting a 60”
rod will represent an activity. For example, a 60” rod can be cut into 5 12” rods, or 3 12”
rods and an 18” rod (with 6” scrap), or 3 12” rods and a 24” rod, etc. We will build a
spreadsheet following the template for cost-benefit-trade-off problems in Figure 3.6. Start
by entering the data. The data for this problem are the total length of the uncut rods, the
minimum number of each rod length required and, for each possible pattern of cutting a
60” rod, the number of each length rod created. There are 11 possible patterns of cutting a
60” rod that either leave no scrap or an unusable piece of scrap (i.e., less than 12”).
Following the template, the data in the spreadsheet would be entered as displayed, where
range names of UncutRodLength (F3), MinimumRequirement (P7:P11), and Waste
(C12:M12) are assigned to the corresponding data cells.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

12
The decisions to be made in this problem are how many rods should be cut into each of the
possible patterns. Therefore, we add 11 changing cells in C14:M14, with range name
PatternQuantity. The values in PatternQuantity (C14:M14) will eventually be determined
by the Solver. For now, an arbitrary value of 1 is entered for each pattern.

The goal is to minimize the total number of 60” (uncut) rods needed. This is just the sum of
the changing cells:
Total Uncut Rods needed = SUM(PatternQuantity).
This formula is entered into cell P14.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

13
The functional constraints in this problem require that the number of cut rods of each
length must be at least the minimum number needed. Given PatternQuantity (the changing
cells in C14:M14), we calculate the total number of each rod length produced in
TotalProduced (N7:N11). For 12” rods, this will be =SUMPRODUCT(C7:M7,
PatternQuantity). Using a range name or absolute reference for the quantity of each
pattern, this formula can be copied into cells N8:N11 to calculate the total number of other
lengths created. For each rod length, the benefit achieved (the total number of that rod
length cut) must be >= MinimumRequirement (P7:P11), as indicated by the >= in O7:O11.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

14
Also, an integer number of each pattern must be cut. Therefore, we constrain the changing
cells to be integer. The Solver information and solved spreadsheet are shown below.

Solver Parameters
Set Objective Cell: TotalRodsNeeded
To: Min
By Changing Variable Cells:
PatternQuantity
Subject to the Constraints:
PatternQuantity = integer Range Name Ce lls
MinimumNeeded P7:P11
TotalProduced >= MinimumNeeded
PatternQuantity C14:M14
Solver Options: TotalProduced N7:N11
Make Variables Nonnegative TotalRodsNeeded P14
Solving Method: Simplex LP UncutRodLength F3
Waste C12:M12

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

15
Thus, PatternQuantity (C14:M14) show the number of rods that should be cut into the
respective patterns. TotalRodsNeeded (P14) indicates that a total of 72 uncut rods are
needed.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

16
3.S4 Producing and Distributing AEDs at Heart Start
Heart Start produces automated external defibrillators (AEDs) in each of two different plants
(A and B). The unit production costs and monthly production capacity of the two plants are
indicated in the table below. The AEDs are sold through three wholesalers. The shipping cost
from each plant to the warehouse of each wholesaler along with the monthly demand from
each wholesaler are also indicated in the table. How many AEDs should be produced in each
plant, and how should they be distributed to each of the three wholesaler warehouses so as to
minimize the combined cost of production and shipping? Formulate and solve a linear
programming model in a spreadsheet.
Unit Shipping Cost Unit Monthly

Warehouse Warehouse Warehouse Production Production


1 2 3 Cost Capacity

Plant A $22 $14 $30 $600 100

Plant B $16 $20 $24 $625 120

Monthly Demand 80 60 70

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

17
This is a transportation problem as described in Section 3.5 of the text. Start by entering
the data. The data for this problem are the unit shipping cost, the unit production cost and
monthly production capacity at each plant, and the monthly demand at each warehouse.
The data are shown below, where range names of UnitProductionCost (H5:H6),
MonthlyCapacity (H11:H12), and MonthlyDemand (C15:E15) are assigned to the
corresponding data cells. Note that space has been reserved in the middle of the
spreadsheet (C11:E12) for the changing cells.

The decisions to be made in this problem are how many units to ship from each plant to
each warehouse. Therefore, we add a table of changing cells with range name UnitsShipped
(C11:E12). The values in UnitsShipped (C11:E12) will eventually be determined by the
Solver. For now, zeroes are entered.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

18
The goal is to minimize the total cost, including production costs and shipping costs. The
total production costs and the total shipping costs are calculated as follows.
Total Production Cost = SUMPRODUCT(UnitProductionCost, UnitsShipped),
Total Shipping Cost = SUMPRODUCT(ShippingCost, UnitsShipped).
These formulas are entered into H16 and H17, with the overall total cost calculated by
summing these two costs in H18, as shown in the spreadsheet below.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

19
The functional constraints in this problem are that each plant can’t ship out more than its
monthly capacity, and each warehouse needs to receive its monthly demand. The units
shipped out of each plant are calculated by summing each row of changing cells, while the
units shipped to each warehouse are caculated by summing each column of changing cells.
These constraints are shown in the spreadsheet below.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

20
The Solver information and solved spreadsheet are shown below.

Solver Parameters
Set Objective Cell: OverallCost
To: Min Range Name Ce lls
By Changing Variable Cells: MonthlyCapacity H11:H12
UnitsShipped MonthlyDemand C15:E15
Subject to the Constraints: OverallCost H18
TotalShippedOut <= MonthlyCapacity UnitShippingCost C5:E6
TotalProductionCost H16
TotalToWarehouse = MonthlyDemand
TotalShippedOut F11:F12
Solver Options: TotalShippingCost H17
Make Variables Nonnegative TotalToWarehouse C13:E13
Solving Method: Simplex LP UnitProductionCost H5:H6
UnitsShipped C11:E12

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

21
Thus, from Plant A they should ship 40 to Warehouse 1 and 60 units to Warehouse 2, from
Plant B they should ship 40 units to Warehouse 1 and 70 units to Warehouse 3, giving an
overall total cost of $132,790.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

22
3.S5 Bidding for Classes
In the MBA program at a prestigious university in the Pacific Northwest, students bid for
electives in the second year of their program. Each student has 100 points to bid (total) and
must take two electives. There are four electives available: Management Science, Finance,
Operations Management, and Marketing. Each class is limited to 5 students. The bids
submitted for each of the 10 students are shown in the table below.

Management Operations
Student Science Finance Management Marketing
George 60 10 10 20
Fred 20 20 40 20
Ann 45 45 5 5
Eric 50 20 5 25
Susan 30 30 30 10
Liz 50 50 0 0
Ed 70 20 10 0
David 25 25 35 15
Tony 35 15 35 15
Jennifer 60 10 10 20

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

23
a. Formulate and solve a spreadsheet model to determine an assignment of students to classes
so as to maximize the total bid points of the assignments.
This is a special kind of assignment problem. The assignees are the students and the tasks
are the classes. Each student is assigned to take two classes. Each class has a limit of five
students. Start by entering the data. The data for this problem are the bid points for each
student for each class, where the corresponding data cells are assigned a range name of
Points (C5:F14).

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

24
The decisions to be made in this problem are whether or not to assign each student to each
class. Therefore, a table of changing cells is created for each student and class combination
in C18:F27, and given a range name of Assignment. The values in Assignment (C18:F27)
will eventually be determined by the Solver. For now, arbitrary values of 0 and 1 are
entered.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

25
The goal is to maximize the total bid points of the assignments.
Total Bid Points = SUMPRODUCT(Points, Assignment).
This formula is entered into cell I29.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

26
The functional constraints in this problem are that each student must be assigned to two
classes, each class is limited to five students, and each student can take each class at most
once. The number of classes a student is assigned to is just the sum of the row of changing
cells for each student. For example, for George it is =SUM(C18:F18). This formula is copied
into G18:G27. The number of students assigned to a class is the sum of the column of
changing cells for each class. For example, for Management Science it is =SUM(C18:C27).
This formula is copied into C28:F28.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

27
Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution
without the prior written consent of McGraw-Hill Education

28
The Solver information and solved spreadsheet are shown below.

Solver Parameters
Set Objective Cell: TotalPoints
To: Max
By Changing Variable Cells:
Assignment
Subject to the Constraints: Range Name Ce lls
Assignment <= 1 Assignment C18:F27
TotalClasses = ClassesToTake Capacity C30:F30
TotalInClass <= Capacity ClassesToTake I18:I27
Points C5:F14
Solver Options: StudentPoints K18:K27
Make Variables Nonnegative TotalClasses G18:G27
Solving Method: Simplex LP TotalInClass C28:F28
TotalPoints I29

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

29
Thus, the 1’s in Assignment (C18:F27) show the assignments that should be made,
achieving a total of 705 points.

b. Does the resulting solution seem like a fair assignment?


No. For example, Eric did not get into Management Science despite bidding 50 points, while
Ann got in with only 45 points. Also, Eric got into classes worth only 45 total bid points to
him while Liz got classes worth 100 bid points to her.
c. Which alternative objectives might lead to a fairer assignment?
Perhaps maximizing the minimum total number of bid points achieved by each student.

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution


without the prior written consent of McGraw-Hill Education

30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy