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

Week 4

Uploaded by

hemant.kumar3
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views

Week 4

Uploaded by

hemant.kumar3
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Linear programming (LP)- optimization problems- maximizing or minimizing

1 Campaign Marketing Solver sumproduct


2 Assignment 1 Solver sumproduct
3 PC Tech Company LP and net profit Solver
4 Furniture Company Solver sumproduct
5 Investment Allocation Solver sumproduct
6 Feed Mix Solver sumproduct
7 Busing Problem Solver sumproduct
8 Bus Company Solver sumproduct
Assignment 2 Solver sumproduct
sumproduct

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

Identifying the Parts of the Problem


In this problem,

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.

Formulating the Problem Mathematically


Let 𝑡t represent the number of pairs of trousers and let 𝑗j represent the number of pairs of jackets.

First, let’s translate the objective into a mathematical expression.


Each pair of trousers generates $175 revenue and each jacket generates $295. Thus the objective function (total revenue) can be

Next, let’s write the constraints as inequalities.

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

The complete problem can now be expressed mathematically as:

Maximize revenue = 175𝑡+295𝑗175t+295j

subject to the constraints

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

Adding Solver to Excel


To solve linear programming problems with Excel in the rest of this course, we will use an add-in program called Solver. Solver is available when you install Excel or Micr
Excel.

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).

ective (for example, number of units to produce or number of hours to schedule).

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

meters of wool and 12 square meters of silk.


function (total revenue) can be written as the linear expression 175𝑡+295𝑗175t+295j.

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.

nse to make a negative number of trousers or jackets.

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

Excel: Load the Solver Add-in in Excel (Microsoft Support)

on the Data tab in Excel.

the next reading in the course to begin.


This means that no variable can be squared, cubed, or raised to any higher power.

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

How many ads of each type should be used?

How many people will be reached?

Campaign Marketing
Setup

Radio ads Tv ads


veriables 175 10
3000 7000
reach 525000 70000 595000

Constaints radio television LHS Sign RHS


Budget 200.00 500.00 40000 <= 40000
at lead 10 radio 1 175 >= 10
at least 10 tv 1 10 >= 10
1 -1 165 >= 0
e how to best allocate limited resources to maximize or minimize a quantity (like profit or cost). Read the problem below carefully. If you’d

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

Profit 5X+6Y 570

Constraints LHS sign RHS


2X+Y 2 1 120 <= 120
2X+3Y ​ 2 3 240 <= 240
company sells two products, X and Y. The profit per unit of X is $5 and the profit per unit of Y is $6.

The company wants to maximize profit, 5𝑋+6𝑌5X+6Y, subject to the following constraints:

2𝑋+𝑌≤1202𝑋+3𝑌≤2402X+Y2X+3Y≤120≤240 ​ ​

In addition, the variables X and Y should be nonnegative.


PC Tech Company
In the rest of this module, we will explore variations on the basic linear programming model. In this lesson, we will combine lin
Read the problem below carefully. If you’d like, take notes and start setting up a spreadsheet model of your own. Then, watch

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

assembly hours 10,000


Testing hours 3,000
assembling costs 11 11
Testing cost 15 15

Constrents LHS RHS


Basic 1 0 560 <= 600
xp 0 1 1200 <= 1200
assembling Hrs 5 6 10000 <= 10,000
Testing hrs 1 2 2960 <= 3,000
sson, we will combine linear programming with our previous work on modeling revenue, cost, and profit.
of your own. Then, watch the next video in the course to see a solution.

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

Total profit 3820

labor force 1,250 hours


teak 3,600 board feet

Constrents LHS RHS


labor force 4 6 1250 <= 1,250
teak 9 36 3600 <= 3,600
Scenario
Tectona Furniture Corporation manufactures outdoor furniture. Their two main products are
tables, both made of teak wood.

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

nd a supply of teak for use in the furniture.


able under a union agreement. The firm
that Tectona produces requires 4 labor
ours and 36 board feet of teak. Completed
profit of $20 each.

ed with creating a spreadsheet model to


roduction cycle.
Investment Allocation
In this problem, we will use linear programming and Solver to explore a scenario with a greater number of decision variables.
model of your own. Then, watch the next video in the course to see a solution.

Scenario
A brokerage firm has been instructed by a client to invest $250,000. The client requests the firm select whatever stocks and bo

Municipal bonds constitute at least 20% of investment.

At least 40% of the investment is placed in tech stocks.

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.

Investment Rate of Return (%)


L.A. Municipal Bond 5.3
Thompson Electronics, Inc. 6.8
United Aerospace Corp. 4.9
Palmer Technologies 8.4
HDN Stock (high risk) 11.8

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

Constraints LHS sign


budget 1 1 1 1 1 250000 <=
muni 20 perc 1 50000 >=
tech 40 perc 1 1 1 175000 >=
no more 50 perc high risk -50% 1 0 <=
ter number of decision variables. Read the problem below carefully. If you’d like, take notes and start setting up a spreadsheet

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

Oat Product (units/lb) Enriched Grain (units/lb) Mineral Product (units/lb)


variables 0.25 4.5 0

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

Minimum Daily Requirement (units)


5
2
10
7
6

LHS Sign RHS


4.75 <= 6
18.75 >= 5
4.625 >= 2
10 >= 10
7 >= 7
6.875 >= 6
ed to set a nutritional diet for the horses in his care. At the same

e horse healthy. The table below shows these minimum


Scenario
Johns Hopkins is setting up three Charter schools in Baltimore City: Kyoko HS, Devon HS, and Manny HS. Each high school has
900 students. The Mayor hires your company to assign accepted students to these three new high schools. Busses will be pro
students who live more than walking distance (defined as 1.5 miles) to the schools. Baltimore City has been partitioned into fiv
neighborhoods: A, B, C, D and E. Kyoko HS is in sector B, Devon HS is in sector C, and Manny HS is in sector E. If a student lives
and is assigned to the high school in that sector, the student can walk to school and does not get a bus. All students must be a
school. The table below shows the distance (in miles) from each sector to each school. Minimize the total student miles travel

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

OBJECTIVE MIN THE BUS HRS 5400

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

Hiring cost $ 4,000


Firing cost $ 2,000
salary $ 10,000
Total Hiring cost $ 280,000
Total Firing cost $ -
Salary Yearly 60 70 50 65
Total Salary $ 4,350,000 60
Total cost $ 4,630,000
50 60 80 80 95 120

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

LHS Sign RHS


60 >= 60
70 >= 70
50 >= 50
-1 65 >= 65
1 -1 75 >= 75
Scenario
A Nike factory in Hanover, MD, makes soccer balls and basketballs. A soccer ball takes 1.5 hours of machine time
and 3 hours of a worker's time in its making while a basketball takes 3 hours of machine time and 1 hour of a
worker's time. In a day, the factory can produce no more than 42 hours of machine time and 24 hours of
worker's time. The profit on a soccer ball is $20 and the profit on a basketball is $10. The manager wants to
maximize the daily profit.

soccer balls basketballs


4 12
machine 1.5 3
Labor 3 1
profit $ 20.00 $ 10.00
total profit $ 200.00

Constraints LHS Sign RHS


Labor 1.5 3 42 <= 42
profit 3 1 24 <= 24

You might also like