Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

2 4

Recap of Last Lecture Excel Solver


• Utility theory
▫ Monetary values are first replaced with the appropriate utility values. Then, decision
analysis is performed as usual. • Summary of steps to prepare the spreadsheet
• LP models are useful for deterministic decision making. ▫ Enter the problem data (blue)
• Properties and assumptions for LP problems
▫ Maximize or minimize one objective function; one or more constraints; ➢ the coefficients of the objective function and the constraints, the right-
▫ Alternative courses of action to choose from; hand-side value for each of the constraint
▫ The objective function and constraints are linear; ▫ Assign specific cells (yellow) for the values of the decision
▫ All parameters are certain; non-negative decision variables
• Formulate LP problems → state managerial problems mathematically variables
▫ Identify the objective and constraints; define decision variables; use decision ▫ Write a formula to calculate the value of the objective function
variables to mathematically express the objective function and constraints
▫ Example: product mix problem (red)
• Find LP solutions ➢ Use the coefficients of the objective function & decision variables
▫ Graphical solution method for LP problems with two decision variables
➢ Always find the feasible region first! ▫ Write a formula to calculate the value of the left-hand-side of
➢ Isoprofit line solution method each constraint (orange)
➢ Corner point solution method
➢ Slack (≤) and surplus (≥) → binding vs. non-binding constraint ➢ Use the coefficients of the constraints & decision variables
➢ Sensitivity analysis
▫ Excel Solver
3
Excel Solver
• You can solve almost all your LP problems in Excel!
Chapter 03 ▫ It is typically faster to get solutions than graphing.
▫ Excel can solve LPs with more than 2 decision variables.
Linear Programming Models • Step 1: Setup the framework and enter the data in Excel.
IIMT3636 • Step 2: Write the formulas for the objective function and
Faculty of Business and Economics the constraints.
The University of Hong Kong
Instructor: Dr. Yipu DENG
6 8
Is it worth to spend $500/week hiring a carpenter who can work 20 hrs/week?
How about he can work 80 hrs/week? No; Yes
Sensitivity Report Four Special Cases in LP
Coefficient may change by these amounts
Units Produced and the optimal solution will not change. • Infeasibility
→ No feasible region that satisfies all constraints
▫ This might occur if the problem was formulated with conflicting
constraints → check the correctness of constraints
X1 + 2X2 ≤ 6
Resource may 2X1 + X2 ≤ 8
change by these
amounts and the
X1 ≥ 7
shadow price will
not change.
If we add one more unit to the resource,
Hours Used
the marginal impact on the optimal profit
5 7
Software solves LP with the same logic. The standard
method is called the simplex method. Computer
finds a corner point first and check the optimality. If
Excel Solver optimal, stop; otherwise, move along the edge that
increases the profit the most to the next corner point.
Four Special Cases in LP
• Step 3: Using Solver. • Four special cases and difficulties arise at times when
▫ Set Objective: the red cell using the graphical approach to solve LP problems.
▫ Click Max or Min for the problem.
▫ By Changing Variable Cells: the yellow cells ▫ Infeasibility → no feasible region
▫ Click Add to add the constraints.
In the Cell Reference box, input the orange cells. ▫ Unboundedness
Select <= or other appropriate relationships.
In the Constraint box, input the cells on the right-hand side. ▫ Redundancy
▫ Check the box for Make Unconstrained Variables Non-Negative.
▫ Click Select a Solving Method and select Simplex LP. ▫ Multiple optimal solutions
▫ Click Solve. In the Solver Results dialog box, select the reports
you need and click OK.
10 12
Four Special Cases in LP In-class Exercises
• Redundancy of constraints, which can cause no major • Suppose the following constraints are for one LP
difficulties in graphically solving LP problems problem. Which of the following constraints is/are
▫ The feasible region will not change if the constraint is dropped. redundant?
▫ The available resource corresponding to a redundant constraint Y
10
has zero shadow price.
(1) 2𝑋 + 𝑌 ≤ 10
(2) 3𝑋 + 7𝑌 ≤ 42
6 Constraint 2&3
(3) 𝑋 ≤ 6
4 𝑌≤4 4
5 𝑋, 𝑌 ≥ 0
X
5 6 14
9 11
Four Special Cases in LP Four Special Cases in LP
• Unboundedness → no finite solution • Multiple optimal solutions
▫ Example: in a maximization problem, one or more decision variables ▫ The Isoprofit line runs perfectly parallel to one of the constraint lines.
and the profit can be infinitely large without violating any constraints.
▫ Open-ended feasible region → check the choice of minimization or
maximization Max X + X
1 2
Any point along the line between A
and B provides an optimal solution.
14 16
In-class Exercises In-class Exercises
• Corner point solution method
50𝑋1 + 20𝑋2
13 15
In-class Exercises In-class Exercises
• A warehouse company needs to determine how many • Solve the following LP formulation graphically, using the
storage rooms of each size to build. Its objective and isocost line approach:
constraints follow:
• Maximize monthly earnings = 50𝑋1 + 20𝑋2
• Minimize costs =24𝑋1 + 28𝑋2
• Subject to
(advertising budget) 20𝑋1 + 40𝑋2 ≤ 4,000 • Subject to
(square footage) 100𝑋1 + 50𝑋2 ≤ 8,000 5𝑋1 + 4𝑋2 ≤ 2,000
(rental limit) 𝑋1 ≤ 60 𝑋1 ≥ 80
𝑋1, 𝑋2 ≥ 0 𝑋1 + 𝑋2 ≥ 300
where 𝑋1(𝑋2) = number of large (small) spaces developed 𝑋2 ≥ 100
• Please find the optimal solution using the corner point 𝑋1, 𝑋2 ≥ 0
solution method.
18 20
Linear Programming Applications Media Selection
• Real-world problems that can be modeled using LP • The Win Big Gambling Club promotes gambling junkets to casinos
▫ Media selection in the Bahamas.
▫ Marketing research
▫ Labor scheduling • The club has $8,000 per week for local advertising, which is to be
▫ Financial portfolio selection allocated among four promotional media (i.e., TV spots, newspaper
ads, and two types of radio ads).
▫ Transportation
▫ Production planning
• Win Big’s goal is to reach the largest possible high-potential
▫ …
audience through the various media.
• We will solve them using Excel Solver. • Win Big’s contractual arrangements require that at least five radio
spots be placed each week. To ensure a broad-scoped promotional
• Although some models might be numerically small, the principles campaign, management also insists that no more than $1,800 be
developed here can be applied to larger problems. spent on radio advertising every week.
19
Media Selection
• LP models have been used in the advertising field as a decision aid
Chapter 03 in selecting an effective media mix (e.g., radio or television
commercials, newspaper ads, direct mailings, social media, etc.).
Linear Programming Applications • Objective
IIMT3636 ▫ Maximize audience exposure
▫ Or minimize advertising cost
Faculty of Business and Economics
The University of Hong Kong • Constraints
Instructor: Dr. Yipu DENG ▫ Contract requirements
▫ Limited media availability
▫ Company policy
▫ …
22 24
Media Selection Marketing Research
• Management Sciences Associates (MSA) handles consumer surveys.
Maximize audience exposure • In a survey for the national press service, MSA determines that it
= 5,000X1 + 8,500X2 + 2,400X3 + 2,800X4 must fulfill several requirements in order to draw statistically valid
Subject to conclusions on the sensitive issue of U.S. laws:
X1 ≤ 12 (max TV spots/wk) ▫ Survey at least 2,300 U.S. citizens in total.
X2 ≤5 (max newspaper ads/wk) ▫ 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.
X3 ≤ 25 (max 30-sec radio spots ads/wk)
▫ Ensure that at least 15% of those surveyed are female
X4 ≤ 20 (max newspaper ads/wk)
▫ Ensure that among those surveyed who are 51 years of age or over, no
800X1 + 925X2 + 290X3 + 380X4 ≤ $8,000 (weekly advertising budget) more than 20% of them are female
X3 + X4 ≥ 5 (min radio spots contracted)
COST PER PERSON SURVEYED($)
290X3 + 380X4 ≤ $1,800 (max dollars spent on radio)
Gender AGE≤30 AGE 31-50 AGE≥51
X1, X2, X3, X4 ≥ 0
Female 7.50 6.80 5.50
Male 6.90 7.25 6.10
21 23
Media Selection 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
Daily newspaper (full-page ad) 8,500 925 5 𝑋2
Radio spot (30 sec., prime time) 2,400 290 25 𝑋3
Radio spot (1 minute, afternoon) 2,800 380 20 𝑋4
26 28
Marketing Research 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
25 27
Marketing Research Worker Scheduling
• A post office requires different numbers of full-time employees on
Minimize total interview costs = 7.5 X1 + 6.8 X2 + 5.5 X3 + 6.9 X4 + 7.25 X5 + 6.1 X6 different days of the week.
• Union rules state that each full-time employee must work five
Subject to consecutive days and then receive two days off.
X1 + X2 + X3 + X4 + X5 + X6 ≥ 2,300 (total citizens) • The post office wants to meet its daily requirements using only full-
X1 + X4 ≥ 1,000 (citizens age 30 or younger) time employees, while minimizing the total number of full-time
X2 + X5 ≥ 600 (citizens are 31-50) employees on its payroll.
X1 + X2 + X3 ≥ 0.15(X1 + X2 + X3 + X4 + X5 + X6 ) (female) Day of Week Minimum Number of Employees Required
X3 ≤ 0.2(X3 + X6 ) (limit on citizens age 51 and older that are female) Monday 17
Tuesday 13
X1, X2, X3, X4 , X5 , X6 ≥0
Wednesday 15
Thursday 19
Friday 14
Saturday 16
Sunday 11
30 32
Worker Scheduling Portfolio Selection
Maximize 5.3% x1 + 6.8%𝑥2 + 4.9%𝑥3 + 8.4%𝑥4 + 11.8%𝑥5
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 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , 𝒙𝟒 , 𝒙𝟓 ≥0
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
• To get integer solutions
▫ Round the solutions to the nearest integers
▫ Add integer constraints
29 31
Worker Scheduling Portfolio Selection
• Constraints: • The International City Trust (ICT) is instructed by a
• Monday constraint: 𝑋1 + 𝑋4 + 𝑋5 + 𝑋6 + 𝑋7 ≥ 17 client to invest $250,000, with guidelines:
• Tuesday constraint: 𝑋1 + 𝑋2 + 𝑋5 + 𝑋6 + 𝑋7 ≥ 13 ▫ Municipal bonds should constitute at least 20% of the investment
▫ At least 40% of the investment should be placed in a combination
• Wednesday constraint: 𝑋1 + 𝑋2 + 𝑋3 + 𝑋6 + 𝑋7 ≥ 15
of electronic firms, aerospace firms, and drug manufacturers
• Thursday constraint: 𝑋1 + 𝑋2 + 𝑋3 + 𝑋4 + 𝑋7 ≥ 19 ▫ No more than 50% of the amount invested in municipal bonds
• Friday constraint: 𝑋1 + 𝑋2 + 𝑋3 + 𝑋4 + 𝑋5 ≥ 14 should be placed in a high-risk, high-yield nursing home stock
• Saturday constraint: 𝑋2 + 𝑋3 + 𝑋4 + 𝑋5 + 𝑋6 ≥ 16 • The goal is to maximize the expected return.
• Sunday constraint: 𝑋3 + 𝑋4 + 𝑋5 + 𝑋6 + 𝑋7 ≥ 11 Los Angeles Thompson United Happy Days
municipal Electronics, Aerospace Palmer Nursing
• Non-negativity: 𝑋1 , 𝑋2 , 𝑋3 , 𝑋4 , 𝑋5 , 𝑋6 , 𝑋7 ≥ 0 Investment bonds Inc. Corp. Drugs Homes
Projected
Return (%) 5.3 6.8 4.9 8.4 11.8
34 36
Transportation Problem In-Class Exercise
• Transportation problems deal with the distribution of goods
• The following table shows the sensitivity analysis of the
from several origins to several destinations.
transportation problem. If you can expand the supply by
• The Executive Furniture Corporation is faced with the
100, which plant would you choose?
following transportation problem and is trying to minimize
the daily transportation cost. Constraints
Final Shadow Constraint Allowable Allowable
Daily Supply Source Destination Daily Demand
Cell Name Value Price R.H. Side Increase Decrease
$5 $C$7 Supply Sum Des Moines 100 -4 100 200 0
100 Des Moines Albuquerque 300
(Plant 1) (Market 1) $D$7 Supply Sum Evansville 300 -2 300 100 0
$3 $4 $E$7 Supply Sum Fort Lauderdale 300 0 300 1E+30 0
Evansville
$8 Boston $F$4 Albuquerque Demand Sum 300 9 300 0 200
300 $4 200
(Plant 2) $3 (Market 2) $F$5 Boston Demand Sum 200 6 200 0 100
$9 $F$6 Cleveland Demand Sum 200 5 200 0 100
Fort $7 Cleveland
300 Lauderdale 200
$5 (Market 3)
(Plant 3)
33 35
Portfolio Selection: Sensitivity Report Transportation Problem
• In general, for a transportation problem with A sources and B
Question: What is the marginal return rate?
destinations, the number of decision variables is A×B, and the number
of constraints (except the non-negativity constraint) is A + B.
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.
• There are three types of decisions to make:
▫ Monthly number of workers hired or fired
▫ Monthly hours of overtime Production capacity
▫ Actual monthly production quantity
• 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
37 39
The decisions in different months
will affect each other through the
Production Planning Production Planning balance equations.
• During the next four months, the SureStep Company must meet the • Inventory Balance Equation:
following demand for pair of shoes on time: 3000 in month 1; 5000 Ending inventory of last month
in month 2; 2000 in month 3; and 3800 in month 4. + Production quantity of this month
• At the beginning of month 1, 1500 pairs of shoes are on hand. – Demand of this month
• At the beginning of month 1, the company has 100 workers. At the = Ending inventory of this month ≥ 0 → satisfy the demand
beginning of each month, workers can be hired or fired. Each hiring
costs $1600 and each firing costs $2000. • Worker Balance Equation:
• A worker is paid $1200 per month. Each worker can work up to 160 Workers available last month
hours a month before he or she has to work overtime. A worker can + Workers hired this month
work up to 20 hours of overtime a month and is paid $12 per hour – Workers fired this month
for overtime. = Workers available this month
• It takes 4 hours of labor and $15 of raw material to produce a pair of
shoes. • Monthly Production Capacity = Total Available Hours / 4
• At the end of each month, each pair of unsold shoes incurs a = (Number of workers available * 160 + Monthly overtime) / 4
holding cost of $3.
▫ Factors to consider: product demand, inventory, labor capacity, storage costs… • Monthly overtime <= Number of workers available * 20

You might also like