Professional Documents
Culture Documents
IIMT3636 Lecture 6 With Notes
IIMT3636 Lecture 6 With Notes
IIMT3636 Lecture 6 With Notes
Excel Solver
• You can solve almost all your LP problems in Excel!
▫ It is typically faster to get solutions than graphing.
▫ Excel can solve LPs with more than 2 decision variables.
• Step 1: Setup the framework and enter the data in Excel.
• Step 2: Write the formulas for the objective function and
the constraints.
4
Excel Solver
• Summary of steps to prepare the spreadsheet
▫ Enter the problem data (blue)
➢ the coefficients of the objective function and the constraints, the right-
hand-side value for each of the constraint
▫ Assign specific cells (yellow) for the values of the decision
variables
▫ Write a formula to calculate the value of the objective function
(red)
➢ Use the coefficients of the objective function & decision variables
▫ Write a formula to calculate the value of the left-hand-side of
each constraint (orange)
➢ Use the coefficients of the constraints & decision variables
5
Sensitivity Report
Coefficient may change by these amounts
Units Produced and the optimal solution will not change.
Resource may
change by these
amounts and the
shadow price will
not change.
▫ Unboundedness
▫ Redundancy
In-class Exercises
• Suppose the following constraints are for one LP
problem. Which of the following constraints is/are
redundant?
Y
10
(1) 2𝑋 + 𝑌 ≤ 10
(2) 3𝑋 + 7𝑌 ≤ 42
6 Constraint 2&3
(3) 𝑋 ≤ 6
4 𝑌≤4 4
5 𝑋, 𝑌 ≥ 0
X
5 6 14
13
In-class Exercises
• A warehouse company needs to determine how many
storage rooms of each size to build. Its objective and
constraints follow:
• Maximize monthly earnings = 50𝑋1 + 20𝑋2
• Subject to
(advertising budget) 20𝑋1 + 40𝑋2 ≤ 4,000
(square footage) 100𝑋1 + 50𝑋2 ≤ 8,000
(rental limit) 𝑋1 ≤ 60
𝑋1, 𝑋2 ≥ 0
where 𝑋1(𝑋2) = number of large (small) spaces developed
• Please find the optimal solution using the corner point
solution method.
14
In-class Exercises
• Corner point solution method
50𝑋1 + 20𝑋2
15
In-class Exercises
• Solve the following LP formulation graphically, using the
isocost line approach:
In-class Exercises
Chapter 03
Linear Programming Applications
IIMT3636
Faculty of Business and Economics
The University of Hong Kong
Instructor: Dr. Yipu DENG
18
Media Selection
• LP models have been used in the advertising field as a decision aid
in selecting an effective media mix (e.g., radio or television
commercials, newspaper ads, direct mailings, social media, etc.).
• Objective
▫ Maximize audience exposure
▫ Or minimize advertising cost
• Constraints
▫ Contract requirements
▫ Limited media availability
▫ Company policy
▫ …
20
Media Selection
• The Win Big Gambling Club promotes gambling junkets to casinos
in the Bahamas.
• The club has $8,000 per week for local advertising, which is to be
allocated among four promotional media (i.e., TV spots, newspaper
ads, and two types of radio ads).
Media Selection
Budget = $8,000
AUDIENCE COST MAX ADS NUMBER
REACHED PER AD PER TAKEN
MEDIUM PER AD ($) WEEK PER WEEK
TV spot (1 minute) 5,000 800 12 𝑋1
Media Selection
Maximize audience exposure
= 5,000X1 + 8,500X2 + 2,400X3 + 2,800X4
Subject to
X1 ≤ 12 (max TV spots/wk)
X2 ≤5 (max newspaper ads/wk)
X3 ≤ 25 (max 30-sec radio spots ads/wk)
X4 ≤ 20 (max newspaper ads/wk)
800X1 + 925X2 + 290X3 + 380X4 ≤ $8,000 (weekly advertising budget)
X3 + X4 ≥ 5 (min radio spots contracted)
290X3 + 380X4 ≤ $1,800 (max dollars spent on radio)
X1, X2, X3, X4 ≥ 0
23
Media Selection
24
Marketing Research
• Management Sciences Associates (MSA) handles consumer surveys.
• In a survey for the national press service, MSA determines that it
must fulfill several requirements in order to draw statistically valid
conclusions on the sensitive issue of U.S. laws:
▫ Survey at least 2,300 U.S. citizens in total.
▫ Survey at least 1,000 citizens who are 30 years of age or younger.
▫ Survey at least 600 citizens who are between 31 and 50 years of age.
▫ Ensure that at least 15% of those surveyed are female
▫ Ensure that among those surveyed who are 51 years of age or over, no
more than 20% of them are female
COST PER PERSON SURVEYED($)
Gender AGE≤30 AGE 31-50 AGE≥51
Female 7.50 6.80 5.50
Marketing Research
Minimize total interview costs = 7.5 X1 + 6.8 X2 + 5.5 X3 + 6.9 X4 + 7.25 X5 + 6.1 X6
Subject to
X1 + X2 + X3 + X4 + X5 + X6 ≥ 2,300 (total citizens)
X1 + X4 ≥ 1,000 (citizens age 30 or younger)
X2 + X5 ≥ 600 (citizens are 31-50)
X1 + X2 + X3 ≥ 0.15(X1 + X2 + X3 + X4 + X5 + X6 ) (female)
X3 ≤ 0.2(X3 + X6 ) (limit on citizens age 51 and older that are female)
X1, X2, X3, X4 , X5 , X6 ≥0
26
Marketing Research
27
Worker Scheduling
• A post office requires different numbers of full-time employees on
different days of the week.
• Union rules state that each full-time employee must work five
consecutive days and then receive two days off.
• The post office wants to meet its daily requirements using only full-
time employees, while minimizing the total number of full-time
employees on its payroll.
Day of Week Minimum Number of Employees Required
Monday 17
Tuesday 13
Wednesday 15
Thursday 19
Friday 14
Saturday 16
Sunday 11
28
Worker Scheduling
• Decision variables:
▫ 𝑋1 : the number of employees whose first working day is Monday
▫ 𝑋2 : the number of employees whose first working day is Tuesday
▫ 𝑋3 : the number of employees whose first working day is Wednesday
▫ 𝑋4 : the number of employees whose first working day is Thursday
▫ 𝑋5 : the number of employees whose first working day is Friday
▫ 𝑋6 : the number of employees whose first working day is Saturday
▫ 𝑋7 : the number of employees whose first working day is Sunday
• Objective:
▫ Minimize: 𝑋1 + 𝑋2 + 𝑋3 + 𝑋4 + 𝑋5 + 𝑋6 + 𝑋7
29
Worker Scheduling
• Constraints:
• Monday constraint: 𝑋1 + 𝑋4 + 𝑋5 + 𝑋6 + 𝑋7 ≥ 17
• Tuesday constraint: 𝑋1 + 𝑋2 + 𝑋5 + 𝑋6 + 𝑋7 ≥ 13
• Wednesday constraint: 𝑋1 + 𝑋2 + 𝑋3 + 𝑋6 + 𝑋7 ≥ 15
• Thursday constraint: 𝑋1 + 𝑋2 + 𝑋3 + 𝑋4 + 𝑋7 ≥ 19
• Friday constraint: 𝑋1 + 𝑋2 + 𝑋3 + 𝑋4 + 𝑋5 ≥ 14
• Saturday constraint: 𝑋2 + 𝑋3 + 𝑋4 + 𝑋5 + 𝑋6 ≥ 16
• Sunday constraint: 𝑋3 + 𝑋4 + 𝑋5 + 𝑋6 + 𝑋7 ≥ 11
• Non-negativity: 𝑋1 , 𝑋2 , 𝑋3 , 𝑋4 , 𝑋5 , 𝑋6 , 𝑋7 ≥ 0
30
Worker Scheduling
Worker Scheduling Model
Decision Variables Monday Tuesday Wednesday Thursday Friday Saturday Sunday Total No. of FT Employees
No. of FT Employees: 6.333333333 3.333333333 2 7.333333333 0 3.333333333 0 22.33333
Constraints RHS
Monday 1 1 1 1 1 17 >= 17
Tuesday 1 1 1 1 1 13 >= 13
Wednesday 1 1 1 1 1 15 >= 15
Thursday 1 1 1 1 1 19 >= 19
Friday 1 1 1 1 1 19 >= 14
Saturday 1 1 1 1 1 16 >= 16
Sunday 1 1 1 1 1 12.66667 >= 11
Portfolio Selection
• The International City Trust (ICT) is instructed by a
client to invest $250,000, with guidelines:
▫ Municipal bonds should constitute at least 20% of the investment
▫ At least 40% of the investment should be placed in a combination
of electronic firms, aerospace firms, and drug manufacturers
▫ No more than 50% of the amount invested in municipal bonds
should be placed in a high-risk, high-yield nursing home stock
• The goal is to maximize the expected return.
Los Angeles Thompson United Happy Days
municipal Electronics, Aerospace Palmer Nursing
Investment bonds Inc. Corp. Drugs Homes
Projected
Return (%) 5.3 6.8 4.9 8.4 11.8
32
Portfolio Selection
Maximize 5.3% x1 + 6.8%𝑥2 + 4.9%𝑥3 + 8.4%𝑥4 + 11.8%𝑥5
𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓 ≤ 𝟐𝟓𝟎, 𝟎𝟎𝟎
𝒙𝟏 ≥ 𝟎. 𝟐 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓
𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 ≥ 𝟎. 𝟒 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓
𝒙𝟓 ≤ 𝟎. 𝟓𝒙𝟏
𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , 𝒙𝟒 , 𝒙𝟓 ≥0
33
Transportation Problem
• Transportation problems deal with the distribution of goods
from several origins to several destinations.
• The Executive Furniture Corporation is faced with the
following transportation problem and is trying to minimize
the daily transportation cost.
Daily Supply Source Destination Daily Demand
Fort $9 $7
300 Cleveland 200
Lauderdale
$5 (Market 3)
(Plant 3)
35
Transportation Problem
In-Class Exercise
• The following table shows the sensitivity analysis of the
transportation problem. If you can expand the supply by
100, which plant would you choose?
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$C$7 Supply Sum Des Moines 100 -4 100 200 0
$D$7 Supply Sum Evansville 300 -2 300 100 0
$E$7 Supply Sum Fort Lauderdale 300 0 300 1E+30 0
$F$4 Albuquerque Demand Sum 300 9 300 0 200
$F$5 Boston Demand Sum 200 6 200 0 100
$F$6 Cleveland Demand Sum 200 5 200 0 100
37
Production Planning
• During the next four months, the SureStep Company must meet the
following demand for pair of shoes on time: 3000 in month 1; 5000
in month 2; 2000 in month 3; and 3800 in month 4.
• At the beginning of month 1, 1500 pairs of shoes are on hand.
• At the beginning of month 1, the company has 100 workers. At the
beginning of each month, workers can be hired or fired. Each hiring
costs $1600 and each firing costs $2000.
• A worker is paid $1200 per month. Each worker can work up to 160
hours a month before he or she has to work overtime. A worker can
work up to 20 hours of overtime a month and is paid $12 per hour
for overtime.
• It takes 4 hours of labor and $15 of raw material to produce a pair of
shoes.
• At the end of each month, each pair of unsold shoes incurs a
holding cost of $3.
▫ Factors to consider: product demand, inventory, labor capacity, storage costs…
38
Production Planning
• SureStep wants to find the minimum-cost solution that meets
forecasted demand on time (i.e., all demand should be satisfied).
▫ How costs are calculated; how labor hours are calculated; how demand is met
with both production and inventory on hand.
• Constraints:
▫ Monthly overtime limit: a worker can only work up to 20 hours of overtime.
▫ Actual monthly production quantity ≤ Monthly production capacity
▫ Actual monthly production quantity + monthly inventory ≥ Monthly demand
39