Week 4
Week 4
2 variable
3 variable
Multiple variable
Multiple variable
Multiple variable
Symbol Operation
+ (plus sign) Addition
- (minus sign) Subtraction
* (asterisk) Multiplication
/ (forward slash) Division
% (percent sign) Percent (divide by 100)
^ (caret) Exponentiation
Parts of a LP Problem
There are three main parts of a linear programming problem:
The objective function: The quantity to be maximized or minimized (for example, profit or cost).
The constraints: The restrictions on the resources needed for the objective (for example, budgets or time limits).
The decision variables: The unknowns that the manager has control over to bring about the objective (for example, number o
The objective function and the constraints can be expressed mathematically in terms of the decision variables. For a linear prog
Example
For example, consider the following scenario.
A tailor has 14 square meters of wool and 12 square meters of silk in his shop. He wants to use this fabric to make formal trous
The objective function is the total revenue, which the tailor wants to maximize.
The constraints come from the amount of material available: he can use no more than 14 square meters of wool and 12 square
The decision variables are the number of pairs of trousers and the number of jackets that he will make.
The first constraint is that the amount of wool used can be no more than 14 square meters.
Each pair of trousers requires 2.25 square meters of wool and each jacket requires 3.75 square meters of wool. The total amoun
The other constraint is that the amount of silk used can be no more than 12 square meters.
Each pair of trousers requires 2 square meters of silk and each jacket requires 3.25 square meters of silk. Thus, this constraint c
2.25𝑡+3.75𝑗≤142𝑡+3.25𝑗≤122.25t+3.75j2t+3.25j≤14≤12
Note that there are two additional implied constraints: 𝑡≥0t≥0 and 𝑗≥0j≥0. It does not make sense to make a negative number
Now that you know how to identify the parts of a linear programming problem, it’s time to start solving them in Excel. Go on t
Please visit this page to find up-to-date instructions for how to load the Solver add-in in Excel: Load the Solver Add-in i
After you add Solver successfully, you should see the Solver button on the Data tab in Excel.
Now, you will be ready to move onto our first linear programming example: go to the next reading in the course to begin.
ts or time limits).
on variables. For a linear programming problem, they must be expressed as linear equations or inequalities. This means that no variable ca
is fabric to make formal trousers and jackets to get the highest possible revenue. A pair of trousers sells for $175 and requires 2.25 square m
ters of wool. The total amount of wool used is then 2.25𝑡+3.75𝑗2.25t+3.75j. Since the tailor can use at most 14 square meters of wool,
of silk. Thus, this constraint can be expressed as the linear inequality 2𝑡+3.25𝑗≤122t+3.25j≤12.
olving them in Excel. Go on to the next reading to make sure that you have the necessary set-up in Excel.
Excel
available when you install Excel or Microsoft Office, but to use it you need to load it in
175 and requires 2.25 square meters of wool and 2 square meters of silk to make. A jacket sells for $295 and requires 3.75 square meters of
most 14 square meters of wool, this constraint is expressed as the linear inequality 2.25𝑡+3.75𝑗≤142.25t+3.75j≤14.
requires 3.75 square meters of wool and 3.25 square meters of silk.
3.75j≤14.
Campaign Marketing
In this lesson, we will use linear programming to help determine how to best allocate limited resources to maximize or minimi
Then, watch the next video in the course to see a solution.
Scenario
A candidate for mayor has allocated $40,000 for last minute advertising in the days preceding the election. Two types of ads w
estimated 7000 people. The campaigning mayor would like to reach as many people as possible, but she has stipulated that a
Campaign Marketing
Setup
vertising in the days preceding the election. Two types of ads will be used: radio and television. Each radio ad costs $200 and reaches an e
each as many people as possible, but she has stipulated that at least 10 ads of each type be used. Also, the number of radio ads must be a
formula LHS
=SUMPRODUCT($B$8:$C$8,B14:C14)
=SUMPRODUCT($B$8:$C$8,B15:C15)
=SUMPRODUCT($B$8:$C$8,B16:C16)
=SUMPRODUCT($B$8:$C$8,B17:C17)
problem below carefully. If you’d like, take notes and start setting up a spreadsheet model of your own.
dio ad costs $200 and reaches an estimated 3000 people. Each television ad costs $500 and reaches an
the number of radio ads must be at least as great as the number of television ads.
X Y
Variables Units 30 60
profit 7 6
The company wants to maximize profit, 5𝑋+6𝑌5X+6Y, subject to the following constraints:
2𝑋+𝑌≤1202𝑋+3𝑌≤2402X+Y2X+3Y≤120≤240
Scenario
The PC Tech company assembles and then tests two models of computers, Basic and XP. For the coming month, the company
computers are in inventory from the previous month, and because these models are going to be changed after this month, the
most it can sell this month are 600 Basics and 1200 XPs. Each Basic sells for $300 and each XP sells for $450. The cost of comp
and testing. There are at most 10,000 assembly hours and 3,000 testing hours available. Each labor hour for assembling costs
assembling and one hour for testing. Each XP requires six hours for assembling and two hours for testing. PC Tech wants to kn
net profit, but it cannot use more labor hours that are available, and it does not want to produce more than it can sell.
Basic XP
Variabels 560 1200 Revenue 708000
Price 300 450 708000 cost 508400
Cost 150 225 354000 Profit 199600
assembling Hrs 5 6 110000
Testing hrs 1 2 44400
Sale 600 1200
ing month, the company wants to decide how many of each model to assemble and then test. No
ged after this month, the company doesn’t want to hold any inventory after this month. It believes the
r $450. The cost of component parts for a Basic is $150; for an XP it is $225. Labor is required for assembly
hour for assembling costs $11 and each labor hour for testing costs $15. Each Basic requires five hours for
ting. PC Tech wants to know how many of each model it should produce (assemble and test) to maximize its
e than it can sell.
b t
Variable 260 35
labor force 4 6
teak 9 36
profit $ 12.00 $ 20.00
The firm has two main resources: its carpenters (labor force) and a supply of teak for use in th
During the next production cycle, 1,250 hours of labor are available under a union agreement
also has a stock of 3,600 board feet of teak lumber. Each bench that Tectona produces require
hours and 9 board feet of teak; each picnic table takes 6 labor hours and 36 board feet of teak
benches will yield a profit of $12 each, and tables will result in a profit of $20 each.
As a consultant for Tectona Furniture Corporation, you are tasked with creating a spreadshee
help the company obtain the maximum profit during the next production cycle.
Their two main products are benches and
Scenario
A brokerage firm has been instructed by a client to invest $250,000. The client requests the firm select whatever stocks and bo
No more than 50% of the amount invested in municipal bonds should be high risk.
The table below lists the rate of return for five different investment options.
varibables x1 x2 x3 x4 x5
50000 0 0 175000 25000
5.30% 6.80% 4.90% 8.40% 11.80%
objective
max return ROI 20300
firm select whatever stocks and bonds they believe are well-rated, but with the following guidelines:
RHS
250,000
50000
100000
0
g up a spreadsheet
The Battery Park Stable feeds and houses the horses used to pull tourist-filled carriages through the streets of Charleston’s his
time, he would like to keep the overall daily cost of feed to a minimum.
The feed mixes available for the horses’ diet are an oat product, a highly enriched grain, and a mineral product. Each of these
requirements, units of each ingredient per pound of feed mix, and costs for the three mixes.
Diet Requirement (Ingredients) Oat Product (units/lb) Enriched Grain (units/lb) Mineral Product (units/lb)
A 3 4 2
B 0.5 1 1
C 4 2 6
D 1 1.5 2
E 0.5 1.5 0.5
Cost/lb 0.09 0.12 0.18
toatl cost 0.5625
Constraints
Feed 1 1 1
A 3 4 2
B 0.5 1 1
C 4 2 6
D 1 1.5 2
E 0.5 1.5 0.5
he streets of Charleston’s historic waterfront area. The stable owner, an ex-racehorse trainer, recognizes the need to set a nutritional diet
neral product. Each of these mixes contains a certain amount of five ingredients needed daily to keep the average horse healthy. The tabl
Distance to Distance to
Distance to Kyoko Devon HS (in Manny HS (in Number of
Sector HS (in Sector B) Sector C) Sector E) Students
A 5 8 6 700
B 0 4 12 500
C 4 0 7 100
D 7 2 5 800
E 12 7 0 400
Variables AB AC AE BB BC BE CB
400 0 300 500 0 0 0
5 8 6 0 4 12 4
constraints
900B 1 1 1
900C 1 1
900E 1 1
700A 1 1 1
500B 1 1 1
100C 1
800D
400E
anny HS. Each high school has a capacity of
igh schools. Busses will be provided to
ity has been partitioned into five
S is in sector E. If a student lives in a sector
et a bus. All students must be assigned a
e the total student miles travelled by bus.
CC CE DB DC DE EB EC EE
100 0 0 800 0 0 0 400
0 7 7 2 5 12 7 0
LHS Sign
1 1 900 <=
1 1 1 900 <=
1 1 1 700 <=
700 =
500 =
1 1 100 =
1 1 1 800 =
1 1 1 400 =
RHS
900
900
900
700
500
100
800
400
Y1 Y1 Y2 Y2 Y3 Y3 Y4
H F H F H F H
10 0 20 0 0 0 15
Avl drivers 50
Year 1 60 1 -1
Year 2 70 1 -1
Year 3 50 1 -1
Year 4 65 1
Year 5 75
Y4 Y5 Y5
F H F
0 25 0
75