Linear Programming
Linear Programming
LINEAR OPTIMIZATION
MODELS
INTRODUCTION
Optimization problems:
Can be used to support and improve managerial
decision making
Maximize or minimize some function, called the
objective function, and have a set of
restrictions known as constraints
Can be linear or nonlinear
2
INTRODUCTION
Typical applications:
A manufacturer wants to develop a production schedule
and an inventory policy that will satisfy demand in future
periods and at the same time minimize the total
production and inventory costs
A financial analyst would like to establish an investment
portfolio from a variety of stock and bond investment
alternatives that maximizes the return on investment
A marketing manager wants to determine how best to
allocate a fixed advertising budget among alternative
advertising media such as web, radio, television,
newspaper, and magazine that maximizes advertising
effectiveness
A company had warehouses in a number of locations. Given
specific customer demands, the company would like to
determine how much each warehouse should ship to each
customer so that total transportation costs are minimized
3
INTRODUCTION
Linear optimization models are also known
as linear programming
Linear programming:
A problem-solving approach developed to help
managers make better decisions
Numerous applications in today’s competitive
business environment
For instance, GE Capital uses linear
programming to help determine optimal lease
structuring
4
Problem Formulation
Mathematical Model for the Par, Inc. Problem
A SIMPLE MAXIMIZATION
PROBLEM
A SIMPLE MAXIMIZATION PROBLEM
Illustration:
Par, Inc. is a small manufacturer of golf
equipment and supplies whose management
has decided to move into the market for
medium- and high-priced golf bags. Par’s
distributor is enthusiastic about the new
product line and has agreed to buy all the golf
bags Par produces over the next three months
6
A SIMPLE MAXIMIZATION
PROBLEM
Operations involved in manufacturing a golf
bag:
Cutting and dyeing the material
Sewing
Finishing (inserting umbrella holder, club
separators, etc.)
Inspection and packaging
7
A SIMPLE MAXIMIZATION
PROBLEM
Table 7.1: Production Requirements Per Golf
Bag
8
A SIMPLE MAXIMIZATION PROBLEM
9
A SIMPLE MAXIMIZATION
PROBLEM
Develop a mathematical model of the Par,
Inc. problem to determine the number of
standard bags and the number of deluxe
bags to produce to maximize total profit
contribution
Problem Formulation
Problem formulation or modeling:
Process of translating the verbal
statement of a problem into a
mathematical statement (or model)
10
A SIMPLE MAXIMIZATION
PROBLEM
General guidelines for problem
formulation:
Understand the problem thoroughly
Describe the objective
Describe each constraint
Define the decision variables
Write the objective in terms of the decision
variables
Write the constraints in terms of the
decision variables
A SIMPLE MAXIMIZATION PROBLEM
Describe each constraint
Constraint Constraint
12
A SIMPLE MAXIMIZATION
PROBLEM
Define the decision variables
S = number of standard bags
D = number of deluxe bags
Write the objective in terms of the decision
variables
If Par makes $10 for every standard and $9 for
every deluxe bag,
Total profit contribution = 10S + 9D = Objective
function
Objective: Max 10S + 9D
13
A SIMPLE MAXIMIZATION
PROBLEM
Write the constraints in terms of the
decision variables
Constraint 1:
≤
S + 1D ≤ 630
Constraint 2:
≤
S + D ≤ 600
14
A SIMPLE MAXIMIZATION PROBLEM
Constraint 3:
≤
1S + D ≤ 708
Constraint 4:
≤
S + D ≤ 135
Nonnegativity constraints—based on the fact
that the number of standard or deluxe bags
produced cannot be negative
S ≥ 0 and D ≥ 0 or S, D ≥ 0
15
A SIMPLE MAXIMIZATION PROBLEM
Mathematical Model for the Par, Inc.
Problem
Mathematical model: a set of mathematical
relationships
Max 10S + 9D
subject to(s.t)
S + 1D ≤ 630 Cutting and dyeing
S + D ≤ 600 Sewing
1S + D ≤ 708 Finishing
17
The Geometry of the Par, Inc. Problem
Solving Linear Programs with Excel Solver
21
THE OPTIMAL SOLUTION TO
THE PAR, INC. PROBLEM
• To solve the Par, Inc. problem, we must find
the point in the feasible region that results in
the highest possible objective function value.
• An objective function contour is a set of
points that yield a fixed value of the
objective function.
• By choosing a fixed value of the objective
function, we may plot contour lines of the
objective function over the feasible region.
• As we move away from the origin we see
higher values of the objective function.
FIGURE 7.2: THE OPTIMAL SOLUTION
TO THE PAR, INC. PROBLEM
23
SOLVING THE PAR, INC. PROBLEM
Based on the geometry of Figure 7.2, to solve a
linear optimization problem we only have to
search the extreme points of the feasible
region to find the optimal solution
Extreme points are found where constraints
intersect on the boundary of the feasible region
SOLVING THE PAR, INC. PROBLEM
Solving Linear Programs with Excel Solver
The first step is to construct the relevant what-if
model
A what-if model for optimization allows the user
to try different values of the decision variables
and see:
Whether that trial solution is feasible
The value of the objective function for that
trial solution
Convey to Excel Solver the structure of the linear
optimization model
25
FIGURE 7.3: WHAT-IF SPREADSHEET
MODEL FOR PAR, INC.
26
FIGURE 7.4: SOLVER DIALOG BOX AND
SOLUTION TO THE PAR, INC. PROBLEM
27
SOLVING THE PAR, INC. PROBLEM
The optimal solution:
To make 540 Standard bags and 252
Deluxe bags for a profit of $7,668
Using all the cutting and dyeing time as
well as all finishing time, from cells
B19:B22 compared to C19:C22
The results are consistent with the results
obtained in Figures 7.1 and 7.2
28
FIGURE 7.5: THE SOLVER ANSWER
REPORT FOR THE PAR, INC. PROBLEM
29
SOLVING THE PAR, INC. PROBLEM
A binding constraint is one that holds as an
equality at the optimal solution
The slack value for each less-than-or-equal-
to constraint indicates the difference
between the left-hand and right-hand values
for a constraint
By adding a nonnegative slack variable, we
can make the constraint equality
Problem Formulation
Solution for the M&D Chemicals Problem
A SIMPLE MINIMIZATION
PROBLEM
A SIMPLE MINIMIZATION PROBLEM
Illustration:
Production requirements for M&D
Chemicals:
The combined production for products A and
B must total at least 350 gallons
Separately a major customer’s order for 125
gallons of product A must also be satisfied
Processing time:
Product A: 2 hours/gallon
Product B: 1 hour/gallon
For the coming month, 600 hours of
processing time are available
32
A SIMPLE MINIMIZATION PROBLEM
Production cost: Product A: $2/gallon;
Product B: $3/gallon
Objective: Minimizing the total production
cost
Problem Formulation
To find the minimum-cost production
schedule:
Define the decision variables and the
objective function
Let A = number of gallons of product A
B = number of gallons of product B
Objective function = 2A + 3B
33
A SIMPLE MINIMIZATION PROBLEM
34
FIGURE 7.6: SOLVER DIALOG BOX AND
SOLUTION TO THE M&D CHEMICAL
PROBLEM
35
FIGURE 7.7: THE SOLVER ANSWER REPORT
FOR THE M&D CHEMICALS PROBLEM
36
Alternative Optimal Solutions
Infeasibility
Unbounded
38
SPECIAL CASES OF LINEAR
PROGRAM OUTCOMES
Illustration using the Par, Inc. problem
39
FIGURE 7.8: PAR, INC. PROBLEM WITH
AN OBJECTIVE FUNCTION OF 6.3S + 9D
(ALTERNATIVE OPTIMAL SOLUTIONS)
40
SPECIAL CASES OF LINEAR
PROGRAM OUTCOMES
Infeasibility
Means no solution to the linear
programming problem
No points satisfy all the constraints and the
nonnegativity conditions simultaneously
Graphically, a feasible region does not exist
Infeasibility occurs because:
Management’s expectations are too high
Too many restrictions have been placed on the
problem
41
FIGURE 7.9: NO FEASIBLE REGION FOR THE
PAR, INC. PROBLEM WITH MINIMUM
PRODUCTION REQUIREMENTS OF 500
STANDARD AND 360 DELUXE BAGS
42
SPECIAL CASES OF LINEAR
PROGRAM OUTCOMES
Interpretation of Infeasibility for the Par,
Inc. problem
Let the management know that the
resources available are not sufficient to
make 500 standard bags and 360 deluxe bags
Provide details to the management on:
Minimum amounts of resources that must be
available
The amounts currently available
Additional amounts that would be required to
accomplish this level of production
43
TABLE 7.2: RESOURCES NEEDED TO
MANUFACTURE 500 STANDARD BAGS AND 360
DELUXE BAGS
44
SPECIAL CASES OF LINEAR
PROGRAM OUTCOMES
An infeasible problem when solved in Excel
Solver:
Will return a message indicating that no feasible
solutions exists—indicating no solution to the
linear programming problem will satisfy all
constraints
Careful inspection is necessary to identify why the
problem is infeasible
One of the approaches is to drop one or more
constraints and re-solve the problem
If we find an optimal solution for this revised
problem, then the constraint(s) that were
omitted, in conjunction with the others, are
causing the problem to be infeasible
45
SPECIAL CASES OF LINEAR
PROGRAM OUTCOMES
Unbounded
The situation in which the value of the
solution
May be made infinitely large—for a
maximization linear programming
May be made infinitely small—for a
minimization linear programming
Without violating any of the constraints
46
SPECIAL CASES OF LINEAR
PROGRAM OUTCOMES
Illustration:
Consider the following linear program with
two decision variables,
X and Y:
Max 20X + 10Y
s.t.
1X ≥2
1Y ≤ 5
X, Y ≥ 0
47
FIGURE 7.10: EXAMPLE OF AN
UNBOUNDED PROBLEM
48
SPECIAL CASES OF LINEAR
PROGRAM OUTCOMES
Solving an unbounded problem using Excel
Solver:
Returns a message “Objective Cell
values do not converge”
In linear programming models of real
problems:
The occurrence of an unbounded
solution means that the problem has
been improperly formulated
49
Interpreting Excel Solver Sensitivity Report
SENSITIVITY ANALYSIS
SENSITIVITY ANALYSIS
Sensitivity analysis: The study of how the changes
in the input parameters of an optimization model
affect the optimal solution
It helps in answering the questions:
How will a change in a coefficient of the
objective function affect the optimal solution?
How will a change in the right-hand-side value
for a constraint affect the optimal solution?
The shadow price for a constraint is the change
in the optimal objective function value if the
right-hand side of that constraint is increased by
one
51
SENSITIVITY ANALYSIS
Interpreting Excel Solver Sensitivity Report
Consider the M&D chemicals problem:
A = number of gallons of product A
B = number of gallons of product B
Min 2A + 3B
s.t.
1A ≥ 125 Demand for
product A
1A + 1B ≥ 350 Total production
2A + 1B ≤ 600 Processing time
A, B ≥ 0
52
FIGURE 7.11: SOLVER SENSITIVITY REPORT
FOR THE M&D CHEMICALS PROBLEM
53
SENSITIVITY ANALYSIS
Classical sensitivity analysis:
Based on the assumption that only one piece
of input data has changed
It is assumed that all other parameters
remain as stated in the original problem
When interested in what would happen if
two or more pieces of input data are
changed simultaneously:
The easiest way to examine the effect of
simultaneous changes is to make the changes
and rerun the model
54
Investment Portfolio Selection
Transportation Planning
Advertising Campaign Planning
57
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Investment Portfolio Selection
Portfolio selection problems involve
situations in which a financial manager must
select specific investments—for example,
stocks and bonds—from a variety of
investment alternatives
Objective: Maximization of expected return
or minimization of risk
Constraints: Restrictions on the type of
permissible investments, state laws,
company policy, and so on
58
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
illustration
Welte Mutual Funds, Inc., located in New York City, is
looking for investment opportunities for $100,000
The firm’s top financial analyst identified five
investment opportunities and projected their annual
rates of return
59
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Welte investment guidelines:
Neither industry (oil or steel) should
receive more than $50,000
Amount invested in government bonds
should be at least 25 percent of the steel
industry investments
The investment in Pacific Oil, the high-
return but high-risk investment, cannot
be more than 60 percent of the total oil
industry investment
60
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Define the following decision variables:
= dollars invested in Atlantic Oil
= dollars invested in Pacific Oil
= dollars invested in Midwest Steel
= dollars invested in Huber Steel
= dollars invested in government bonds
Specify the objective: Maximizing return
Max 0.073 + 0.103 + 0.064 + 0.075 + 0.045
61
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Define the constraints:
Constraint 1: + + + + = 100,000
Constraint 2: + ≤ 50,000
+ ≤ 50,000
Constraint 3: + )
Constraint 4: + )
Nonnegativity constraints: , , , , 0
62
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Linear programming model for the Welte
Mutual Funds investment problem:
Max 0.073 + 0.103 + 0.064 + 0.075 + 0.045
s.t.
+ + + + = 100,000 Available funds
+ ≤ 50,000 Oil industry maximum
+ ≤ 50,000 Steel industry maximum
+) Government bonds minimum
+) Pacific Oil restriction
,,,, 0
63
FIGURE 7.12: THE SOLUTION FOR THE
WELTE MUTUAL FUNDS PROBLEM
64
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Transportation Planning
Transportation problem arises in planning
for the distribution of goods and services
from several supply locations to several
demand locations
Quantity of goods available at each supply
location (origin) is limited
Quantity of goods needed at each of several
demand locations (destinations) is known
Objective: Minimize the cost of shipping
goods from the origins to the destinations
65
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Illustration using Foster Generators problem
Involves the transportation of a product
from three plants to four distribution
centers
To determine how much of its production
should be shipped from each plant to each
distribution center
66
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Production capacities over the next three-month
planning period for one type of generator:
67
FIGURE 7.13: THE NETWORK
REPRESENTATION OF THE FOSTER
GENERATORS TRANSPORTATION PROBLEM
68
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Objective is to determine:
Routes to be used
Quantity to be shipped via each route
Minimum total transportation cost
Let xij = number of units shipped from origin
i to destination j
where i = 1, 2, . . . , m and j = 1, 2, . . . , n
69
TABLE 7.14: TRANSPORTATION COST PER
UNIT FOR THE FOSTER GENERATORS
TRANSPORTATION PROBLEM ($)
70
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Supply constraints
x11 + x12 + x13 + x14 ≤ 5000 Cleveland supply
x21 + x22 + x23 + x24 ≤ 6000 Bedford supply
x31 + x32 + x33 + x34 ≤ 2500 York supply
Demand constraints
x11 + x21 + x31 = 6000 Boston demand
x12 + x22 + x32 = 4000 Chicago demand
x13 + x23 + x33 = 2000 St. Louis demand
x14 + x24 + x34 = 1500 Lexington demand
71
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
A 12-variable, 7-constraint linear programming
formulation of the Foster Generators transportation
problem:
72
FIGURE 7.14: SPREADSHEET MODEL AND
SOLUTION FOR THE FOSTER GENERATOR
PROBLEM
73
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Advertising Campaign Planning:
Designed to help marketing managers
allocate a fixed advertising budget to
various advertising media
Objective: Maximize reach, frequency, and
quality of exposure
Restrictions: Company policy, contract
requirements, and media availability
74
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Illustration: Relax-and-Enjoy Lake
Development Corporation:
Developing a lakeside community at a
privately owned lake
Primary market includes all middle- and
upper-income families within approximately
100 miles of the development
Employed the advertising firm of Boone,
Phillips, and Jackson (BP&J) to design the
promotional campaign
75
TABLE 7.15: ADVERTISING MEDIA
ALTERNATIVES FOR THE RELAX-AND-ENJOY
LAKE DEVELOPMENT CORPORATION
76
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Problem Formulation:
Budget: $30,000
Restrictions imposed:
At least 10 television commercials must
be used
At least 50,000 potential customers must
be reached
No more than $18,000 may be spent on
television advertisements
The decision to be made is how many
times to use each medium
77
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Define the decision variables:
DTV = number of times daytime TV is used
ETV = number of times evening TV is used
DN = number of times daily newspaper is
used
SN = number of times Sunday newspaper is
used
R = number of times radio is used
Objective: Maximizing the total exposure
quality units for the overall
media selection plan
78
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Linear programming model for the Relax-and-
Enjoy advertising campaign planning problem:
Max 65DTV + 90ETV + 40DN + 60SN + 20R Exposure
quality
DTV ≤ 15
Availa-
ETV ≤ 10 bility
DN ≤ 25 of
SN ≤ 4 media
R ≤ 30
79
GENERAL LINEAR PROGRAMMING
NOTATION AND MORE EXAMPLES
Linear programming model for the Relax-
and-Enjoy advertising campaign planning
problem (contd.):
Televis
DTV + ETV ≥ 10 -ion
restric
1500DTV + 3000ETV ≤ 18,000
-tion
80
FIGURE 7.15: A SPREADSHEET MODEL
AND THE SOLUTION FOR THE RELAX-
AND-ENJOY LAKE DEVELOPMENT
CORPORATION PROBLEM
81
FIGURE 7.16: THE EXCEL SENSITIVITY
REPORT FOR THE RELAX-AND-ENJOY
LAKE DEVELOPMENT CORPORATION
PROBLEM
82
GENERATING AN ALTERNATIVE
OPTIMAL SOLUTION FOR A
LINEAR PROGRAM
GENERATING AN ALTERNATIVE
OPTIMAL SOLUTION FOR A LINEAR
PROGRAM
Illustration: Consider the Foster
Generators transportation problem
From Figure 7.14, the optimal solution:
x11 = 1000, x12 = 4000, x13 = 0, x14 = 0
x21 = 2500, x22 = 0, x23 = 2000, x24 = 1500
x31 = 2500, x32 = 0, x33 = 0, x34 = 0
Optimal cost: $39,500
For the revised model to be optimal, the
solution must give a total cost of $39,500
84
GENERATING AN ALTERNATIVE OPTIMAL
SOLUTION FOR A LINEAR PROGRAM
85
GENERATING AN ALTERNATIVE OPTIMAL
SOLUTION FOR A LINEAR PROGRAM
Revised model
86
TABLE 7.16: AN ALTERNATIVE OPTIMAL
SOLUTION TO THE FOSTER GENERATORS
TRANSPORTATION PROBLEM
87
GENERATING AN ALTERNATIVE
OPTIMAL SOLUTION FOR A LINEAR
PROGRAM
In the original solution (Figure 7.14):
Boston distribution center is sourced from all three plants,
whereas each of the other distribution centers is sourced by
one plant
Hence, the manager in the Boston distribution center has to
deal with three different plant managers, whereas each of
the other distribution center managers has only one plant
manager
The alternative solution (Table 7.6) provides a more
balanced solution
Managers in Boston and Chicago each deal with two plants,
and those in St. Louis and Lexington, which have lower
total volumes, deal with only one plant
Because the alternative solution seems to be more
equitable, it might be preferred
Both the solutions give a total cost of $39,500
88
GENERATING AN ALTERNATIVE
OPTIMAL SOLUTION FOR A LINEAR
PROGRAM
General approach to find an alternative optimal
solution to a linear program:
Step 1: Solve the linear program
Step 2: Make a new objective function to be
maximized; It is the sum of those variables that
were equal to zero in the solution from Step 1
Step 3: Keep all the constraints from the original
problem; add a constraint that forces the
original objective function to be equal to the
optimal objective function value from Step 1
Step 4: Solve the problem created in Steps 2 and
3; if the objective function value is positive, an
alternative optimal solution is found
89