Escolar Documentos
Profissional Documentos
Cultura Documentos
Chapter 14
Optimization Models
DECISION MAKING
DATA ANALYSIS AND
BUSINESS ANALYTICS:
Introduction
A wide variety of problems can be formulated as
linear programming models, but there are some that
cannot.
Some models require integer variables, or they are
nonlinear in the decision variables.
Once the models are formulated, Solver can be used to
solve them.
However, integer and nonlinear models are inherently
more difficult to solve.
Solver must use more complex algorithms and is not always
guaranteed to find the optimal solution.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Worker Scheduling Models
Many organizations use worker scheduling models
to schedule employees to provide adequate
service.
LP can be used to schedule employees on a daily
basis, as shown in the next example.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.1:
Worker Scheduling.xlsx (slide 1 of 2)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.1:
Worker Scheduling.xlsx (slide 2 of 2)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Modeling Issues
The postal employee scheduling example is called a static
scheduling model because we assume that the post office
faces the same situation each week.
In reality, demands change over time. A dynamic scheduling
model is necessary for such problems.
A scheduling model for a more complex organization has a
larger number of decision variables, and optimization
software such as Solver will have difficulty finding a solution.
Heuristic methods have been used to find solutions to these
problems.
The scheduling model can be expanded to handle part-time
employees, the use of overtime, and alternative objectives
such as maximizing the number of weekend days off.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Blending Models
In many situations, various inputs must be blended to produce desired
outputs.
In many of these situations, blending models can be used to find the
optimal combination of outputs as well as the mix of inputs used to produce
desired outputs.
Examples of blending problems:
A company using a blending model would run the model periodically (each
day, for example) and set production on the basis of current inventory of
inputs and the current forecasts of demands and prices.
Then the model would be run again to determine the next day’s production.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.2:
Blending Oil.xlsx (slide 1 of 2)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.2:
Blending Oil.xlsx (slide 2 of 2)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Logistics Models
In many situations a company produces products at
locations called origins and ships these products to
customer locations called destinations.
Each origin has a limited capacity that it can ship,
and each destination must receive a required
quantity of the product.
Logistic models can be used to determine the
minimum-cost shipping method for satisfying
customer demands.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Transportation Models
In a transportation problem, the only possible shipments
are those directly from an origin to a destination.
A typical transportation problem requires three sets of
numbers:
Capacities—indicate the most each plant can supply in a given
amount of time under current operating conditions.
Customer demands—are typically estimated from some type of
forecasting model.
Unit shipping costs—come from a transportation cost analysis.
The unit “shipping” cost can also include the unit production cost at
each plant.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.3:
Transportation 1.xlsx (slide 1 of 4)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.3:
Transportation 1.xlsx (slide 2 of 4)
The variables and constraints for the problem are listed below.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.3:
Transportation 1.xlsx (slide 4 of 4)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Modeling Issues
The customer demands in typical transportation problems can be
handled in one of two ways:
Think of forecasted demands as minimal requirements that must be sent to
the customers.
Consider demands as maximal sales quantities, the most each region can
sell.
If all the supplies and demands for a transportation problem are
integers, the optimal Solver solution automatically has integer-valued
shipments.
Explicit integer constraints are not required, so the “fast” simplex method
can be used.
Shipping costs are often nonlinear due to quantity discounts.
There is a streamlined version of the simplex method, called the
transportation simplex method, that is much more efficient than the
ordinary simplex method for transportation problems.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Other Logistics Models
(slide 1 of 2)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Other Logistics Models
(slide 2 of 2)
The best way to think of the node categories is in terms of net inflow
and net outflow.
Net inflow for any node is defined as total inflow minus total outflow for
that node.
Net outflow is the negative of this, total outflow minus total inflow.
An origin is a node with positive net outflow, a destination is a node with
positive net inflow, and a transshipment point is a node with net outflow
(and net inflow) equal to 0.
There are two types of constraints in logistics models:
Arc capacity constraints, which are simple upper bounds on the arc flows
Flow balance constraints, one for each node:
For an origin: Net Outflow = Capacity (or possibly Net Outflow ≤ Capacity)
For a destination: Net Inflow ≥ Demand (or possibly Net Inflow = Demand)
For a transshipment point: Net Inflow = 0 (equivalent to Net Outflow = 0)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.4:
RedBrand Logistics1.xlsx (slide 1 of 3)
The cost (in thousands of dollars) of shipping a ton of the product between
each pair of locations is listed in the table below, where a blank indicates
that RedBrand cannot ship along that arc.
The most that can be shipped between any two nodes is 200 tons. (This is
the common arc capacity.)
The variables and constraints for RedBrand’s model are listed below.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.4:
RedBrand Logistics1.xlsx (slide 3 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Modeling Issues
Solver uses the simplex method to solve logistics models,
but the network simplex method is much more efficient
and can solve large logistics problems.
If the given supplies and demands for the nodes are
integers and all arc capacities are integers, the logistics
model always has an optimal solution with all integer
flows.
This integer benefit is guaranteed only for the basic logistics
model.
When the model is modified in certain ways, such as by
adding a shrinkage factor, the optimal solution is no longer
guaranteed to be integer-valued.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Aggregate Planning Models
Models where we determine workforce levels and
production schedules for a multiperiod time horizon are
called aggregate planning models.
There are many variations, depending on the detailed
assumptions made.
A number of inputs are required for this type of problem:
Initial inventory, holding costs, and demands
Data on the current number of workers, regular hours per worker
per month, regular hourly wage rates, overtime hourly rate, and
maximum number of overtime hours per worker per month
Costs for hiring and firing a worker
Unit production cost, which is a combination of two inputs:
Raw material cost per unit
Labor hours per unit
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.5:
Aggregate Planning 1.xlsx (slide 1 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.5:
Aggregate Planning 1.xlsx (slide 2 of 3)
The variables and constraints for this aggregate planning model are
listed below.
The most difficult aspect of modeling this problem is knowing which
variables the company gets to choose—the decision variables—and
which variables are determined by these decisions.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.5:
Aggregate Planning 1.xlsx (slide 3 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
The Rolling Planning Horizon Approach
In reality, an aggregate planning model is usually
implemented via a rolling planning horizon.
To implement the SureStep model in the rolling planning
horizon context:
View the demands as forecasts and solve for a four-month
model with these forecasts.
Implement only the month 1 production and work scheduling
recommendation.
Next, observe month 1’s actual demand and replace the
demands in the Demand range with updated forecasts for
the next four months.
Rerun Solver and use the production levels and hiring and
firing recommendations in column B as the production level
and workforce policy for month 2.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Model with Backlogging Allowed
In many situations, backlogging of demand is allowed—
that is, customer demand can be met at a later date.
There are several modeling approaches to the
backlogging problem; the most natural approach for
the SureStep model is shown below.
This is a nonlinear model using IF functions.
However, you should avoid these nonsmooth functions in
optimization models if at all possible, because Solver often has
trouble handling them.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Financial Models
Optimization and other management science
methods have also been applied successfully in a
number of financial areas.
These include investment strategy and pension fund
management.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.6:
Investing.xlsx (slide 1 of 3)
Objective: To develop an LP model that relates investment decisions to total ending
cash, and to use Solver to find the strategy that maximizes ending cash and invests
no more than a given amount in any one investment.
Solution: At the beginning of year 1, Barney-Jones Investment Corporation has
$100,000 to invest for the next four years. It wants to limit the amount put into any
investment to $75,000.
There are five possible investments, labeled A through E.
Investment A: Invest at the beginning of year 1, and for every dollar invested,
receive returns of $0.50 and $1.00 at the beginnings of years 2 and 3.
Investment B: Invest at the beginning of year 2, receive returns of $0.50 and
$1.00 at the beginnings of years 3 and 4.
Investment C: Invest at the beginning of year 1, receive return of $1.20 at the
beginning of year 2.
Investment D: Invest at the beginning of year 4, receive return of $1.90 at the
beginning of year 5.
Investment E: Invest at the beginning of year 3, receive return of $1.50 at the
beginning of year 4.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.6:
Investing.xlsx (slide 2 of 3)
At the beginning of any year, Barney-Jones can invest only cash on hand, which
includes returns from previous investments.
Any cash not invested in any year can be put in a short-term money market account
that earns 3% annually.
The variables and constraints for this investment model are listed in the table below.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.6:
Investing.xlsx (slide 3 of 3)
The spreadsheet model for this investment problem is shown below.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.7:
Pension Fund Management.xlsx (slide 1 of 3)
Objective: To develop an LP model that relates initial allocation of money and bond
purchases to future cash availabilities, and to minimize the initial allocation of
money required to meet all future pension fund payments.
Solution: Armco Incorporated’s pension fund must be sufficient to make the
payments listed in the table below.
Each payment must be made on the first day of the year, and the payments will be
financed by purchasing bonds.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.7:
Pension Fund Management.xlsx (slide 2 of 3)
It is currently the beginning of year 1, and three bonds are available for immediate
purchase:
Bond 1 costs $980 and yields a $60 coupon in years 2 through 5 and a $1060
payment on maturity in year 6.
Bond 2 costs $970 and yields a $65 coupon in years 2 through 11 and a
$1065 payment on maturity in year 12.
Bond 3 costs $1050 and yields a $75 coupon in years 2 through 14 and a
$1075 payment on maturity in year 15.
Any excess cash on hand can earn an annual rate of 4% in a fixed-rate account.
The variables and constraints for this pension fund model are shown below.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.7:
Pension Fund Management.xlsx (slide 3 of 3)
The optimal solution for this pension fund model is shown below.
In this solution, the numbers of bonds purchased have been constrained to
integer values.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Integer Optimization Models
A 0-1 variable, or binary variable, is a variable that
must equal 0 or 1.
When the variable equals 0, the activity is not undertaken;
when it equals 1, the activity is undertaken.
Optimization models in which some or all of the
variables must be integers are known as integer
programming (IP) models.
Solver has a much harder time solving an IP problem than
an LP problem, because IP problems are inherently difficult.
However, your ability to model complex problems increases
tremendously when you are able to use IP, particularly with
0-1 variables.
Perhaps the simplest types of IP models are capital
budgeting models.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.8:
Capital Budgeting 1.xlsx (slide 1 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.8:
Capital Budgeting 1.xlsx (slide 3 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Modeling Issues
Capital budgeting models with multiple periods can also be handled. The
figure below shows one possibility.
Objective: To develop a linear model with binary variables that can be used to
maximize the company’s profit, correctly accounting for fixed costs and staying
within resource availabilities.
Solution: Great Threads Company is capable of manufacturing shirts, shorts, pants,
skirts, and jackets.
Each type of clothing requires Great Threads to acquire the appropriate type of
machinery.
The machinery needed to manufacture each type of clothing must be rented at the
weekly rates shown in the table below. This table also lists the amounts of cloth and
labor required per unit of clothing, as well as the selling price and the unit variable
cost for each type of clothing.
There are 4000 labor hours and 4500 square yards of cloth available in a given
week. The fixed costs are the given rental rates for the machinery.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.9:
Fixed Cost Manufacturing.xlsx (slide 2 of 3)
The variables and constraints for this model are listed in the table below.
The cost structure violates the proportionality assumption that is needed for a linear
model, so binary variables must be used to obtain a linear model.
The tricky part of the model is that if any of a given type of clothing is produced,
then its binary variable must equal 1.
Because Solver is unable to deal with IF functions predictably, the fixed-cost
constraints are modeled as follows:
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.9:
Fixed Cost Manufacturing.xlsx (slide 3 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Set-Covering Models
In a set-covering model, each member of a given
set (set 1) must be “covered” by an acceptable
number of another set (set 2).
The objective in a set-covering problem is to minimize
the number of members in set 2 necessary to cover all
the members in set 1.
Set-covering models have been applied to areas as
diverse as airline crew scheduling, truck dispatching,
political redistricting, and capital investment.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.10:
Locating Hubs1.xlsx (slide 1 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.10:
Locating Hubs1.xlsx (slide 2 of 3)
The variables and constraints for this set-covering model are listed in
the table below.
There is a binary variable for each city to indicate whether a hub is located
there.
Then the number of hubs that cover each city is constrained to be at least
one.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.10:
Locating Hubs1.xlsx (slide 3 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Nonlinear Optimization Models
In many optimization models, the objective and/or the constraints
are nonlinear functions of the decision variables.
Such an optimization model is called a nonlinear programming (NLP)
model.
When you solve an NLP model, it is very possible that Solver will
obtain a suboptimal solution.
This is because a nonlinear function can have local optimal solutions that
are not the global optimal solution.
A local optimal solution is one that is better than all nearby points.
The global optimum is the one that beats all points in the entire feasible
region.
There are mathematical conditions that guarantee that the Solver
solution is the global optimum, but these are difficult to understand.
A simpler way is to run Solver several times, each time with different
starting values in the changing cells.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.11:
Peak-Load Pricing.xlsx (slide 1 of 2)
Objective: To use a nonlinear model to determine prices and capacity when there
are two different daily usage patterns, peak-load and off-peak.
Solution: Florida Power and Light must determine the price per kilowatt hour (kwh)
to charge during both peak-load and off-peak periods.
The daily demand for power during each period (in kwh) is related to price as
follows:
Here, Dp and Pp are demand and price during peak-load times, and D0 and P0 are
demand and price during off-peak times.
Assume that it costs FPL $10 per day to maintain one kwh of capacity.
The variables and constraints for this model are shown below.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.11:
Peak-Load Pricing.xlsx (slide 2 of 2)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Portfolio Optimization Models
Portfolio optimization models are used to determine the
percentage of assets to invest in stocks, gold, and Treasury bills.
To do any work with investments, the following formulas must be
understood:
All investors want to choose portfolios with high return (measured by the
expected value in the first equation), but they also want portfolios with
low risk (usually measured by the variance in the second equation).
The second equation can be rewritten slightly by using covariances
instead of correlations, as shown below.
This makes calculating the portfolio variance very easy with Excel’s® matrix
function.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Matrix Functions in Excel
Two built-in Excel matrix functions, MMULT and TRANSPOSE, simplify the
calculation for the variance of portfolio return.
The matrix is a rectangular array of numbers.
A matrix is an i x j matrix if it consists of i rows and j columns.
An example of a 2 x 3 matrix is:
If matrix A has the same number of columns as matrix B has rows, it is possible to
calculate the matrix product of A and B, denoted AB.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
The Portfolio Selection Model
Most investors have two objectives in forming portfolios:
to obtain a large expected return and to obtain a small
variance (to minimize risk).
The problem is inherently nonlinear because the portfolio
variance is nonlinear in the investment amounts.
The most common way of handling this two-objective
problem is to specify a minimal required expected return
and then minimize the variance subject to the constraint on
the expected return.
Financial analysts typically estimate the required
means, standard deviations, and correlations for stock
returns from historical data.
However, there is no guarantee that these estimates are
relevant for future returns.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.12:
Portfolio Selection.xlsx (slide 1 of 3)
Objective: To use NLP to find the portfolio that minimizes the risk, measured by
portfolio variance, subject to achieving an expected return of at least 12%.
Solution: Perlman & Brothers intends to invest a given amount of money in three
stocks.
The means and standard deviations of annual returns have been estimated as shown
in the first table below.
The correlations between the annual returns on the stocks are listed in the second
table.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.12:
Portfolio Selection.xlsx (slide 2 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Example 14.12:
Portfolio Selection.xlsx (slide 3 of 3)
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Modeling Issues
Typical real-world portfolio selection problems involve
a large number of potential investments. However, the
basic model does not change at all.
If a company is allowed to short a stock, the fraction
invested in that stock is allowed to be negative.
To implement this, eliminate the nonnegativity constraints on
the changing cells.
An alternative objective might be to minimize the
probability that the portfolio loses money.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Keys to Solving Most
Optimization Problems
Determine the changing cells.
Set up the model so that you can easily calculate
what you wish to maximize or minimize.
Set up the model so that the relationships between
the cells in the spreadsheet and the constraints of
the problem are readily apparent.
Optimization models do not always fall into ready-
made categories.
A model might involve a combination of the ideas
discussed in the production scheduling, blending, and
aggregate planning examples.
© 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.