0% found this document useful (0 votes)
16 views96 pages

Lec 02

Uploaded by

BoydeBoyde Minis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views96 pages

Lec 02

Uploaded by

BoydeBoyde Minis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 96

What is Optimization Modeling?

Waste neither time nor money, but make


the best use of both.

Benjamin Franklin
A Sheriff Goes to Jail for Not Using
Math Model
An Alabama sheriff spent time in jail for not feeding his prisoners
enough. From the CNN Report:
A federal judge ordered a north Alabama sheriff jailed this week, saying
the lawman intentionally served jail inmates “woefully insufficient” meals
in order to pocket more than $200,000.
Under the law, sheriffs are permitted to keep — as personal income —
money left over after purchasing food for inmates.
The state provides sheriffs with $1.75 per day per inmate for food,
according to the Alabama Attorney General’s Office. However, in a March
2008 opinion, the office affirmed that sheriffs may legally keep what is left
over.
A typical dinner was two hot dogs or meat patties; a slice of bread; and
mixed vegetables or baked beans, the judge wrote.
Of course, if Sheriff Bartlett had studied operations research, he would
have immediately recognized his issue as the well-known “diet problem”
in optimization.
The Diet Problem?
The goal of the diet problem is to find the cheapest combination of
foods that will satisfy all daily nutritional requirements.
The diet problem is one of the first optimization problems to be
studied back in the 1930's and 40's. It was motivated by the Army's
desire to meet the nutritional requirements of the field GI's .
One of the early researchers had a guess for the cost of an optimal
diet as $39.93 per year (1939 prices).
In the fall of 1947, Jack Laderman used 9 clerks using hand-
operated desk calculators 120 man days to solve for the optimal
solution of $39.69.
https://www.zweigmedia.com/RealWorld/dietProblem/diet.html
Diet Problem Mathematical Formulation
Optimization …
Many decision problems are about how to use limited
resources such as (Constraints):
Time
Money
Workers
Oil
Land
Space
Mathematical Progamming (MP) is a field of Management
Science that finds the optimal, or most efficient, way of using
limited resources to achieve the objectives of an individual of
a business; hence the name Optimization.
Characteristics of Optimization Problems
All optimization problems involve:
Decisions
Constraints
Objectives
Really, do companies use these math mess?
American Airlines Revolutionizes Pricing
Business Problem:
To compete effectively in a fierce market, the company needed to
“sell the right seats to the right customers at the right prices.”
Strategic Objectives:
Airline seats are a perishable commodity.
Their value varies – after the flight departs, they’re worthless.
The new system had to develop an approach to pricing that could
accommodate millions of bookings, cancellations, and
corrections.
American Airlines
Model Structure:
The team developed revenue management in 3 subcategories:
Overbooking
Discount allocation
Traffic management
American saved $1.4 billion from 1989 to 1992 (50% more than
its net profit)
Since then, yield management was adopted by other airlines, and
spread to hotels, car rentals, and cruises
NBC’s Optimization of Ad Sales
Business Problem:
NBC sales staff had to manually develop sales plans for advertisers
Strategic Objectives
Complete intricate sales plans while reducing labor cost and
maximizing income
Project Value:
In its first four years, the systems increased revenues by over $200
million, improved sales-force productivity, and improved
customer satisfaction.
More Examples
Hong Kong International Port Starbucks Operations
Busiest container terminal in the world Management
Thousands of trucks move containers in & out – product-stocking locations
of storage yard – Demand is highly seasonal and
Used DecisionSupportSystem to optimize erratic
operational decisions involving trucks, – Developed inventory system to
cranes & storage locations optimize stocking levels benefits:
Benefits:  Billions of dollars in reduced
35% reduction in container inventory
handling costs  Improved customer-service
50% increase in throughput levels
30% improvement in vessel
turnaround time
Is optimization used only for business problems?

Military
World War II : British military leaders asked scientists and engineers to analyze several
military problems
Deployment of radar
Management of convoy, bombing, antisubmarine, and mining operations.
The result was called Military Operations Research, later Operations Research
MIT was one of the birthplaces of OR
Operations Research Over the Years
1947
Project Scoop (Scientific Computation of Optimum Programs) with
George Dantzig and others. Developed the simplex method for linear
programs.
1950's
Lots of excitement, mathematical developments, queuing theory,
mathematical programming.
1980's
Widespread availability of personal computers. Increasingly easy access
to data. Widespread willingness of managers to use models.
Metaheuristic (a sufficiently good solution to an optimization problem)
approaches attracted the attention
1990's
Improved use of O.R. systems. Further inroads of O.R. technology, e.g.,
optimization and simulation add-ins to spreadsheets, modeling
languages, large scale optimization.
Operations Research Over the Years
What about 2000s?
More data
Much faster computers
Artificial Intelligence (AI)
AI-based optimization approaches
Late 1990s as the 3rd generation of optimization methods.
Idea is to use a limited number of design trials to construct a
machine-learning model between variables and objectives/constraints
May lead to algorithms learn efficiently and can consequently take
appropriate decisions before, during, or after the optimization
process.
Other application areas of optimization
Health care management
Organ transplantation
Blood collection and transportation
Vaccine distribution

Public administration

Sports

You can present one of these various applications ….


Methods: Sometimes Technology, Sometimes Pure Nature
Nature-Inspired Computing
Computing approaches inspired from nature
Constructed by using biological materials
Modeled on natural processes
Swarm Intelligence
Algorithms or distributed problem solving devices inspired
by the collective behavior of social insect colonies and
other animal societies (Bonabeau, Dorigo, Theraulaz, 1999)
Ant Colony Optimization
More Nature-Inspired Optimization Methods
Simulated annealing (1983)
Genetic algorithms (1960s)
Particle swarm optimization (1995)
Firefly algorithm (2008)
Cuckoo search (2009)
Bat algorithm (2010)
Flower pollination algorithm (2012)
Ant colony optimization (1992)
Bee colony (2005)
Differential evolution (1997)
Harmony search (2001)
More…
To summarize optimization…
No matter their industry, domain, or title, all managers/
administrators must make good decisions
Good decision making can be exceedingly difficult when
time and resources are scarce,
information is inexact
there are conflicting goals and agendas, and
decisions require the coordination and cooperation of multiple
people.
To make better and quicker decisions, always run after
More information
Better technology
Good benchmarks (like nature)
Spreadsheet Optimization
We will be doing spreadsheet optimization
We will first discuss linear programming (LP).
LP is used in many organizations, often on a daily basis, to
solve a variety of problems:
Labor scheduling,
Inventory management,
Selection of advertising media,
Bond trading, etc.
One step at a time
We will first discuss
The types of problems LP can solve,
How LP problems can be modeled in Excel,
How Excel’s powerful Solver add-on can be used to find optimal solutions.
Next,
Various LP applications
Integer programming
Non-linear programming (two important extensions of LP).
Introduction to optimization
(1 of 3)

All optimization models have several common elements:


Decision variables, the variable whose values the decision maker is
allowed to choose. The values of these variables determine such
outputs as total cost, revenue, and profit.
An objective function (objective, for short) to be optimized – minimized
or maximized.
Constraints that must be satisfied. They are usually physical, logical, or
economic restrictions, depending on the nature of the problem.
In searching for the values of the decision variables that
optimize the objective, only those values that satisfy all of the
constraints are allowed.
Introduction to optimization
(2 of 3)

Excel uses its own terminology for optimization:


Excel refers to the decision variables as the changing variable cells. These cells must
contain numbers that are allowed to change freely; they are not allowed to contain
formulas.
Excel refers to the objective as the objective cell.
There can be only one objective cell, which could contain profit, total cost, total
distance traveled, or others, and it must be related through formulas to the
changing cells.
When the changing cells change, the objective cell should change accordingly.
Introduction to optimization
(3 of 3)

Appropriate cells and cell formulas operationalize the constraints, which can come in a
variety of forms.
Nonnegativity constraint is very common. It states that changing cells must
have nonnegative (zero or positive) values. Nonnegativity constraints are usually
included for physical reasons. For example, it is impossible to produce a negative
number of automobiles.
There are two basic steps in solving an optimization problem:
Model development step
Optimization step
LP Model Formulation
A Maximization Example
Product mix problem – The Pottery Company
How many bowls and mugs should be produced to maximize profits given labor and
materials constraints?
Product resource requirements and unit profit:
Resource Requirements

Labor Clay Profit


Product
(Hr./Unit) (Lb./Unit) ($/Unit)

Bowl 1 4 40
Mug 2 3 50

Do you need any other info?


Pottery Company Example
Optimization Musts

Decision variables: e.g., x and y.


In general, there are quantities you can control to improve your
objective which should completely describe the set of decisions
to be made.

Constraints: e.g., 5x + 8y  24 , x  0 , y  0
Limitations on the values of the decision variables.
Objective Function. e.g., 3x + 4y
Value measure used to rank alternatives
Seek to maximize or minimize this objective
examples: maximize NPV, minimize cost
5 Steps In Formulating LP Models:

1. Understand the problem.


2. Identify the decision variables.
X1=number of bowls to produce per day
X2=number of mugs to produce per day
3.State the objective function as a linear combination of the decision variables.
MAX: Z=$40x1 + $50x2
Where Z = profit per day
5 Steps In Formulating LP Models
(continued)
4. State the constraints as linear combinations of the decision variables.
1x1 + 2x2  40 } hours of labor
4x1 + 3x2  120 } pounds of clay

5. Identify any upper or lower bounds on the decision variables.


X1 >= 0
X2 >= 0
Pottery Company Example

Complete Linear Programming Model:

Maximize Z = $40x1 + $50x2

subject to: 1x1 + 2x2  40


4x2 + 3x2  120
x1, x2  0
Linear Programming Assumptions
Maximize Z = $40x1 + $50x2
1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0

….
Proportionality Assumption Contribution from x1 is proportional to
x1
Additivity Assumption Contribution to objective function from x1 is
independent of x2.
Divisibility Assumption Each variable is allowed to assume
fractional values.
Certainty Assumption. Each linear coefficient of the objective
function and constraints is known (and is not a random
variable).
Do you have Excel Solver ?
In Excel 2003: Menu Tools → Solver
In Excel 2007: Data toolbar → Solver
If Solver is not available in Excel, it needs to be enabled:
In Excel 2003: Menu Tools → Add-Ins → Enable Solver Add-
in
In Excel 2007: Main Menu → Excel Options → Add-Ins →
Go → Enable Solver Add-in
If critical errors occur, disabling and enabling the Solver may
help.
Excel Solver wants…
Objective
function cell

Decision
variable cells
Cells indicating
constraints

If some cells are non-


negative; choose
Choose linear
Excel Solver wants…
Target cell - the cell that represents the objective function
Changing cells - the cells representing the decision variables
Constraints – each constraint is defined by the LHS formula,
the sign (<=, =, or >=), and the RHS value
For LP models, go to Options and select “Assume Linear
Model”
Pottery Example
Excel Spreadsheet – Data Screen (1 of 6)
Spreadsheet Design Guidelines - I

Organize the data, then build the model around the data (for
data-oriented models).
Do not embed numeric constants in formulas.
Things which are logically related should be physically related.
Use formulas that can be copied.
To fix some cells, use F4 key: B3 → $B$3 → B$3 → $B3 →
back to B3
=SUMPRODUCT(coefficients, variables),
Spreadsheet Design Guidelines - II
Use color, shading, and borders to distinguish changeable
parameters from other model elements.
Use text boxes and cell notes to document various elements of
the model.
Limits of the Solver
You may have at most 200 decision variables and 100 constraints!
• For any decision variables or constraints above these limits will disable solver!
• You can download and use OpenSolver (opensolver.org) for large models.
• It has a very similar structure but more capabilities.
Some terminology: Feasible Solutions
A feasible solution does not violate any of the constraints:

Example: x1 = 5 bowls
x2 = 10 mugs
Z = $40x1 + $50x2 = $700

Labor constraint check: 1(5) + 2(10) = 25 < 40 hours


Clay constraint check: 4(5) + 3(10) = 70 < 120 pounds
Infeasible Solutions

An infeasible solution violates at least one of the constraints:

Example: x1 = 10 bowls
x2 = 20 mugs
Z = $40x1 + $50x2 = $1400

Labor constraint check: 1(10) + 2(20) = 50 > 40 hours


Solving LP Problems: A Graphical Approach
Graphical solution is limited to linear programming models containing only two
decision variables (can be used with three variables but only with great difficulty).

Graphical methods provide visualization of how a solution for a linear programming


problem is obtained.
Coordinate Axes

X2 is mugs

X1 is bowls
Labor Constraint

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0
Labor Constraint Area

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0
Clay Constraint Area

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0
Both Constraints

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0
Some More terminology: Feasible Region
Any Solution = $800 (Not necessarily optimal)
Alternative Objective Function Solution Lines
Optimal Solution
Optimal Solution Coordinates
Calculating the Optimal Solution
The optimal solution occurs where the “labor” and “clay” constraints intersect.
This occurs where:
X1 + 2X2 = 40 (1)
and 4X1 + 3X2 = 120 (2)
From (1) we have, X2 = 20 -X1/2 (3)
Substituting (3) for X2 in (2) we have,
5X1 = 120
which reduces to X1 = 24
So the optimal solution is,
X1=24, X2=20-24/2=8
Total Profit = $40*24 + $50*8 = $1360
Extreme (Corner) Point Solutions

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0

For an LP problem, the optimal


is always an extreme (corner)
solution
Optimal Solution for New Objective Function

Maximize Z = $70x1 + $20x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0
Some More Terminology
At an optimal solution:
Of all the inequality constraints, some are satisfied exactly and
others are not.
An inequality constraint is binding if the solution makes it an
equality.
Otherwise, it is nonbinding.
In our example, at optimal solution X1=24, X2=8, both
constraints are binding
The positive difference between the two sides of the constraint is
called the slack.
In our example, at optimal solution, both slacks=0, as both
resources are totally used (binding)
Slack Variables
A slack variable typically represents an unused resource.
A slack variable contributes nothing to the objective function
value.
Pottery Example
You can get by selecting “Answer Report” on Solver
Before Excel, how were people solving optimization problems?

What about Excel Solver?


Simplex Method

 George Dantzig
 Born 8.11.1914, Portland
 Invented "Simplex Method of
Optimisation" in 1947
The Essence of Simplex Method
Simplex method is an algebraic procedure
However, its underlying concepts are geometric
Remember “Corner Point” solution rule for LP
X2
(0,9)

Optimality test in the Simplex


Method:
(0,6) (2,6) (4,6)

If a Corner Point Feasible (CPF)


solution has no adjacent
(4,3)
solutions that are better, then it
must be an optimal solution

(0,0) (4,0) (6,0)

X1
The Simplex Method in a Nutshell

An iterative Initialization
procedure (Find initial CPF solution)

Is the current Yes


CPF solution Stop
optimal?

No

Move to a better
adjacent CPF solution
Sensitivity Analysis
Pottery Example
Sensitivity Analysis (1 of 4)
Sensitivity analysis determines the effect on the optimal
solution of changes in parameter values of the objective
function and constraint equations.

Changes may be reactions to anticipated uncertainties in the


parameters or to new or changed information concerning the
model.
Pottery Example (Original)
Sensitivity Analysis (2 of 4)

Maximize Z = $40x1 + $50x2


subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0
Pottery Example
(New Objective: $100x1 + $50x2) (3 of 4)

Maximize Z = $100x1 + $50x2


subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

When objective
coefficient of x1
increases from 40 to 100
Optimal switches from B
to C
Pottery Example
(New Objective: $40x1 + $100x2)(4 of 4)

Maximize Z = $40x1 + $100x2


subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

When objective
coefficient of x2
increases from 50 to 100
Optimal switches from B
to A
Objective Function Coefficient
Sensitivity Range (1 of 2)
The sensitivity range for an objective function
coefficient is the range of values over which the
current optimal solution point will remain optimal.

The sensitivity range for the xi coefficient is designated


as ci.
Objective Function Coefficient
Sensitivity Range for c1 and c2 (2 of 2)
For constant c2=50, play with For constant c1=40, play with
c1 to keep optimal at B c2 to keep optimal at B

25  c1  66.67 30  c2  80
Objective Function Coefficient Ranges
Excel “Solver” Results Screen (1 of 2)
Objective Function Coefficient Ranges
Pottery Example Sensitivity Report (2 of 2)

Objective coefficient
sensitivity

Here C1 range:
40+26.67=66.67
40-15=25

Here C2 range:
50+30=80
50-20=30
Changes in Constraint Quantity Values
Sensitivity Range (1 of 4)
The sensitivity range for a right-hand-side value is the range of
values over which the quantity’s value can change without
changing the solution variable mix, including the slack
variables.

***Please note that, here


The solution will change
BUT, solution mix will not change (where each variable is
zero or not)
Changes in Constraint Quantity Values
Increasing the Labor Constraint (2 of 4)

Maximize Z = $40x1 + $50x2


subject to: x1 + 2x2 + s1 = 40
4x1 + 3x2 + s2 = 120
x1, x2  0
Changes in Constraint Quantity Values
Sensitivity Range for Labor Constraint (3 of 4)
Sensitivity Range for Labor Constraint
So, the original labor limit of 40, can change
Up to 80
Down to 30
So that within this range both bowls and mugs will have positive values at
optimality
Changes in Constraint Quantity Values
Sensitivity Range for Clay Constraint (4 of 4)
Sensitivity Range for Clay Constraint
So, the original labor limit of 120, can change
Up to 160
Down to 60
So that within this range both bowls and mugs will have positive values at
optimality
Constraint Quantity Value Ranges by Computer
Excel Sensitivity Range for Constraints

Constraint quantity
sensitivity

Here Labor range:


40+40=80
40-10=30

Here Clay range:


120+40=160
120-60=60
Another Sens. Results:
Shadow Prices (Dual Variable Values)
Defined as the marginal value of one additional unit of
resource.

OR the change in the optimal value of the objective when


the constraint changes by one unit.

The sensitivity range for a constraint quantity value is also


the range over which the shadow price is valid.
Excel Sensitivity Report for Beaver Creek Pottery
Shadow Prices Example (1 of 2)
Maximize Z = $40x1 + $50x2 subject to:
x1 + 2x2  40 hr of labor
4x1 + 3x2  120 lb of clay
x1, x2  0

Here for Labor: Here for Clay:


Within the given range, Within the given range,
each additional labor hr each additional lb of clay
will increase profit by 16$ will increase profit by 6$
Excel Sensitivity Report for Pottery
Solution Screen (2 of 2)

for Labor:
Additional value (80-40)*16=640
Original Objective= $ 1360 + $ 640 = $2000
Another Sensitivity Result: Reduced Cost
The reduced cost for any decision variable with value 0 or at its upper bound
indicates
“how much the objective coefficient of the variable should be changed” before that
variable becomes positive or reduces from upper bound

The reduced cost for any variable between 0 and upper bound is “0”, i.e. irrelevant.
Excel Sensitivity Report for Pottery
Reduced costs

Objective coefficient
sensitivity

Here Bowl reduced cost=0:


Because at optimality
Bowls >0
Here Mug reduced cost=0:
Because at optimality
Mugs >0
Irregular Types of Linear Programming Problems

For some linear programming models, the general rules do


not apply.

Special types of problems include those with:


Multiple optimal solutions
Infeasible solutions
Unbounded solutions
Multiple Optimal Solutions- Pottery
The objective function is
parallel to a constraint line.
Maximize Z=$40x1 + 30x2
subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0
Where:
x1 = number of bowls
x2 = number of mugs

So, there are “infinite number


of alternative solutions”
An Infeasible Problem

Every possible solution


violates at least one constraint:
Maximize Z = 5x1 + 3x2
subject to: 4x1 + 2x2  8
x1  4
x2  6
x1, x2  0

So,
“NO feasible region”
AND “NO feasible solution”
at all
An Unbounded Problem

Value of the objective


function increases indefinitely:
Maximize Z = 4x1 + 2x2
subject to: x1  4
x2  2
x1, x2  0

So,
“NO bounded feasible region”
AND “NO solution” to be
defined
Product Mix Problem
….
A Larger product mix model
The company makes eight computer models.
They need to decide how many of each of its computer models to
assemble and test
Testing can be done on either of two lines, and these two lines
have different characteristics.
1st line is faster but labor costs are higher
INPUTS:
Hourly labor cost for assembly and testing
Required labor hours for assembly and testing
Component costs for each model
Selling price for each model
Max. sales for each model
Labor availabilities
A decision support system
Decision support system (DSS) can help the users solve problems without having to
worry about technical details.
There are many platforms for developing DSS, but a spreadsheet-based DSS contains
a spreadsheet-based model of a problem, as shown in this chapter’s examples.
The front end allows you to select input values for your particular problem.
The user interface for this front end can include several features, such as buttons, dialog boxes,
toolbars, and menus – the things you are used to seeing in Windows applications.
The back end will then produce a report that explains the solution in nontechnical terms.
Summary of key terms (1 of 4)
Summary of key terms (2 of 4)
Summary of key terms (3 of 4)
Summary of key terms (4 of 4)
Take-Aways
Discussed
how to develop basic LP spreadsheet models,
how to use Solver to find their optimal solutions,
how to perform sensitivity analyses with Solver’s sensitivity reports.

You might also like