optimization.ppt
TRANSCRIPT
-
7/28/2019 OPTIMIZATION.ppt
1/79
1
IE 312 Optimization
Siggi Olafsson
3018 [email protected]
-
7/28/2019 OPTIMIZATION.ppt
2/79
2
Optimization In this class you will learn to solve industrial
engineering problems by modeling them as
optimization problems You will understand common optimization
algorithms for solving such problems
You will learn the use of software for solvingcomplex problems, and you will work as partof a team to address complex ill-structuredproblems with multiple solutions
-
7/28/2019 OPTIMIZATION.ppt
3/79
3
-
7/28/2019 OPTIMIZATION.ppt
4/79
4
Optimization Formulation
integer
05.1580.520.455.335.375.215.2s.t.
max
appetizerofNumber
654321
6
1
i
i
i
i
x
xxxxxx
x
ix
Decision variables:
Integer programming problem:
This is a variant of what is calledthe knapsack problem
-
7/28/2019 OPTIMIZATION.ppt
5/79
5
How about the traveling
salesman?
What is the shortest route that visits each city exactly once?
-
7/28/2019 OPTIMIZATION.ppt
6/79
-
7/28/2019 OPTIMIZATION.ppt
7/797
Problem Formulation What is the objective function?
Maximize profit,
Minimize inventory, ...
What are the decision variables?
Capacity, routing, production and stock levels
What are the constraints? Capacity is limited by capital
Production is limited by capacity
-
7/28/2019 OPTIMIZATION.ppt
8/798
Mathematical ProgramsObjective/constraints
Linear Non-linear
Continuous
LinearProgramming (LP)
Non-linearProgramming(NLP)
Discrete
IntegerProgramming(IP), Mixed IP(MIP)
NLIP, NLMIP
-
7/28/2019 OPTIMIZATION.ppt
9/799
Analysis Optimization Algorithm
Computer Implementation
Excel (or other spreadsheet)
Optimization software (e.g., LINDO)
Modeling software (e.g., LINGO)
Increasing
Complexity
-
7/28/2019 OPTIMIZATION.ppt
10/7910
Optimization Algorithms Find an initial solution
Loop: Look at neighbors of current solution
Select one of those neighbors
Decide if to move to selected solution
Check stopping criterion
-
7/28/2019 OPTIMIZATION.ppt
11/7911
In This Class You Will
Learn problem formulation (modeling)
Learn selecting appropriate algorithms
Learn using those algorithms
-
7/28/2019 OPTIMIZATION.ppt
12/7912
Academic HonestyYou are expected to be honest in all of your actions and
communications in this class.
Students suspected of committing academic dishonesty will
be referred to the Dean of Students Office as per
University policy.
For more information regarding Academic Misconduct see
http://www.dso.iastate.edu/ja/academic/misconduct.html
http://www.dso.iastate.edu/ja/academic/misconduct.htmlhttp://www.dso.iastate.edu/ja/academic/misconduct.html -
7/28/2019 OPTIMIZATION.ppt
13/7913
Professionalism
You are expected to behave in a
professional manner during this class.
-
7/28/2019 OPTIMIZATION.ppt
14/79
14
The OR ProcessProblem (System)
Model
Conclusions
Problem Formulation
Analysis
-
7/28/2019 OPTIMIZATION.ppt
15/79
15
Problem Formulation Capture the essence of the system
Variables
Relationships
Ask ourselves:
What is the objective?
What are the decision variables?
What are the constraints?
-
7/28/2019 OPTIMIZATION.ppt
16/79
16
Mortimer Middleman Wholesale diamond business
sale price $900/carat
average order 55 carats/week
International market
purchase price $700/carat
minimum order 100 carats/trip
trip takes one week and costs $2000
-
7/28/2019 OPTIMIZATION.ppt
17/79
17
Inventory Problem Cost of keeping inventory
insurance
tied up capital
0.5% of wholesale value/week
Cost of not keeping inventory
lost sales (no backordering)
-
7/28/2019 OPTIMIZATION.ppt
18/79
18
The Current Situation Holding cost of $38,409 in past year
Unrealized profits of $31,600
Resupply travel cost $24,000
Total of $94,009
Can we do better? How do we start answering that question?
-
7/28/2019 OPTIMIZATION.ppt
19/79
19
Problem Formulation What are the decision variables?
When should we order?
Reorder point r(quantity that trigger order)
How much should we order?
Order quantity q
Note that this grossly simplifies the reality ofMortimers life!
-
7/28/2019 OPTIMIZATION.ppt
20/79
20
Problem Formulation What are the constraints?
What is the objective? Minimize cost
Holding cost Replenishment cost
Lost-sales cost
0
100
r
q
-
7/28/2019 OPTIMIZATION.ppt
21/79
21
Relationships
(System Dynamics)Assumptions
Constant-rate demand
Is this a strong or weak assumption?
Is this assumption realistic?
-
7/28/2019 OPTIMIZATION.ppt
22/79
22
System Dynamics
r
1 week
r
1 week
r
1 week
With safety stock No safety stock or lost sales With lost sales
Why might we get lost sales despite our planning?
Can we ignore this?
-
7/28/2019 OPTIMIZATION.ppt
23/79
23
No lost sales implies r55
Cycle length
Average inventory
Assuming No Lost Sales
55ratedemand
quantityorder q
2
)55(2
)55()55( qr
qrr
-
7/28/2019 OPTIMIZATION.ppt
24/79
24
Optimization Model
55
100
55/2000
2)55(50.3
cost/weekentReplenishmcost/weekHolding
r
q
qqr
Subject to
Minimize
-
7/28/2019 OPTIMIZATION.ppt
25/79
25
Solving the Problem (Analysis) Feasible solution
Any set of values that satisfies the constraints
Optimal solution A feasible solution that has the best possible
objective function value
Algorithms:
Find a feasible solution
Try to improve on it
-
7/28/2019 OPTIMIZATION.ppt
26/79
26
A Solution for Mortimer What are some feasible solutions?
The smallest feasible value ofris 55
What happens if we change it to 56?
Increased holding cost!
Clearly the optimal replenishment
point is 55* r
-
7/28/2019 OPTIMIZATION.ppt
27/79
27
New Optimization Problem
100
552000
2
50.3
cost/weekentReplenishmcost/weekHolding
qq
q
Subject to
Minimize
Differentiate the objective function and set equal to zero:
0552000
2
50.32
q
-
7/28/2019 OPTIMIZATION.ppt
28/79
28
Optimal Solution
7.2507.250
50.35520002
50.3
5520002
552000
2
50.3
*
2
2
q
q
q
Optimum
-
7/28/2019 OPTIMIZATION.ppt
29/79
29
Economic Order Quantity (EOQ)
ldr
h
fd
q
*
* 2
Classical result in inventory theory:
Lead time
(replenishment)
Weekly
demand
Holding cost
Cost of
replenishment
-
7/28/2019 OPTIMIZATION.ppt
30/79
30
Discussion Sensitivity Analysis
Exploring how the results change if parameters
change Why is this important?
Closed-Form Solutions
Final result a simple formula in terms of the input
variables Very fast computationally
Makes sensitivity analysis very easy
-
7/28/2019 OPTIMIZATION.ppt
31/79
31
Evaluating the Model Tractability of Model
Ease by which we can analyze the model
Validity
The degree by which inferences drawnfrom model also hold for actual system
Trade-Off!AGood Model is Tractable and Valid
-
7/28/2019 OPTIMIZATION.ppt
32/79
32
Model ValidityA model is valid for a specific purpose
It only has to answer the questions we ask
correctly!
Recipe for a Good Model
Start with a simple model
Evaluate assumptions Does adding complexity change the outcome?
Relax assumption/add constraint
-
7/28/2019 OPTIMIZATION.ppt
33/79
33
Validity of Our Model Customer demand (average 55)
0
20
40
60
80
100
120
1 3 5 7 911
13
15
17
19
21
23
25
27
29
31
33
35
37
39
41
43
45
47
49
51
Week
Demand
-
7/28/2019 OPTIMIZATION.ppt
34/79
34
Simulation Analysis Using the same conceptual model, we
can simulate the performance using the
historical data Check if Mortimer is due with a shipment
Check if a new trip is warranted
Reduce inventory by actual demand
Simulation of our policy q=251, r=55implies a cost of $108,621
-
7/28/2019 OPTIMIZATION.ppt
35/79
35
Evaluation of Cost Our predicted cost is
Mortimers current cost is $94,009
The simulated cost is $108,621
630,45$251552000
225150.3
cost/weekentReplenishmcost/weekHolding
-
7/28/2019 OPTIMIZATION.ppt
36/79
36
Simulation Validity Which model should we trust:
The simulation model that predicts a performance of
$108,621, or the EOQ model that predicts a performance of
$45,630?
Examine the assumptions made:
EOQ model: constant demand Simulation: future identical to past
In general, simulation models have a highdegree of validity
-
7/28/2019 OPTIMIZATION.ppt
37/79
37
Descriptive vs Prescriptive How about tractability?
What does the simulation tell us? How
easy is it to do sensitivity analysis?
Descriptive models
Only evaluate an alternative or solution
Prescriptive models
Suggest a good (or optimal) alternative
-
7/28/2019 OPTIMIZATION.ppt
38/79
38
Numerical Search We can use our descriptive simulation
model to look for a better solution
Algorithm: Start with an initial (good) solution
Checksimilar solution (neighbors)
Select one of the neighbors
Repeat until a stopping criterion is satisfied
-
7/28/2019 OPTIMIZATION.ppt
39/79
39
Search for Reorder Point
0
10
20
30
40
50
60
70
80
90
100
0 50 100 150 200 250 300
q
r
$64,242
$63,054
$63,254
$108,421
$108,621
-
7/28/2019 OPTIMIZATION.ppt
40/79
40
Search for Order Quantity
0
10
20
30
40
50
6070
80
90
100
240 245 250 255 260 265
q
r
$63,054 $95,193$72,781
Best Point Found
-
7/28/2019 OPTIMIZATION.ppt
41/79
41
Evaluation We have found a solution q=251, r=85
with cost $63,054
Better than current ($94,009) andpreviously obtained solution ($108,621)
Is this the best solution?
We don
t know! What if we started with a different
initial solution?
-
7/28/2019 OPTIMIZATION.ppt
42/79
42
A New Search
55
75
95
115
135
155
250 255 260 265 270 275
q
r
56,904
59,539
56,900
59,732
54,193 58,467
Initial
Solution
Best Point Found
-
7/28/2019 OPTIMIZATION.ppt
43/79
43
Heuristic vs Optimal Optimal Solution
Solution that is gives the best objective
function value Heuristic Solution
Agood feasible solution
Should we demand optimality? Inaccurate search vs approximation in
model
-
7/28/2019 OPTIMIZATION.ppt
44/79
44
Deterministic vs Stochastic
Models Our deterministic simulation model
assumed future identical to past
Not true! Demand is random Stochastic simulation fits a random
distribution to the historical data
The world is stochastic Why not always use stochastic models?
Tractability versus validity
-
7/28/2019 OPTIMIZATION.ppt
45/79
45
Mathematical Programming Deterministic models
Assume all data known with certainty
Validity Often produce valid results
Tractability
Easier than stochastic models Known as mathematical
programming
-
7/28/2019 OPTIMIZATION.ppt
46/79
46
Problem Formulation Decision variables
Constraints
Variable-type constraints
Main constraints
Objective function
-
7/28/2019 OPTIMIZATION.ppt
47/79
47
Two Crude Petroleum
Saudi Arabia
Venezuela
Refinery
Gasoline
Jet Fuel
Lubricants
$20
9000 barrels/day
$156000 barrels/day
2000
barrels
1500
barrels
500
barrels
-
7/28/2019 OPTIMIZATION.ppt
48/79
48
Oil Processing Data Barrel of Saudi Crude
0.3 barrels of gasoline
0.4 barrels of jet fuel 0.2 barrels of lubricant
Barrel of Venezuela Crude
0.4 barrels of gasoline 0.2 barrels of jet fuel
0.3 barrels of lubricant
-
7/28/2019 OPTIMIZATION.ppt
49/79
49
Decision Variables What can we control or decide upon?
How much of each crude
Thus, define
Clearly define what you mean!
nds)(in thousacrude/dayVenezuelanofbarrels
nds)(in thousacrude/daySaudiofbarrels
2
1
x
x
-
7/28/2019 OPTIMIZATION.ppt
50/79
50
ConstraintsVariable-type constraints
Domain of decision variables
(most often a range)
Very simple here:
0,21
xx
-
7/28/2019 OPTIMIZATION.ppt
51/79
51
Main Constraints (Dynamics) Must meet our volume for each type
Availability
s)(lubricant5.03.02.0
fuel)(jet5.12.04.0
(gasoline)0.24.03.0
21
21
requiredbarrelselyield/barr
21
xx
xx
xx
6
9
2
1
x
x
-
7/28/2019 OPTIMIZATION.ppt
52/79
52
Objective Function What are we going to use to evaluate a pair
of values for the decision variables?
Minimize total cost
Note that since sales and production are fixed
this maximizes profit
21 1520min xx
-
7/28/2019 OPTIMIZATION.ppt
53/79
53
Standard Model
2,
69
s)(lubricant5.03.02.0
fuel)(jet5.12.04.0
(gasoline)0.24.03.0s.t.
21
2
1
21
21
21
xx
xx
xx
xx
xx
21 1520min xx
-
7/28/2019 OPTIMIZATION.ppt
54/79
-
7/28/2019 OPTIMIZATION.ppt
55/79
-
7/28/2019 OPTIMIZATION.ppt
56/79
56
Next Constraint
1x 67.13.0
5.0,0
50.22.0
5.0,0
5.03.02.0
50.72.05.1,0
75.34.0
5.1,0
5.12.04.0
21
12
21
21
12
21
xx
xx
xx
xx
xx
xx2x
-
7/28/2019 OPTIMIZATION.ppt
57/79
-
7/28/2019 OPTIMIZATION.ppt
58/79
-
7/28/2019 OPTIMIZATION.ppt
59/79
59
Optimal Solution
1x
2x
5.925.315220
1520 21
xx
21 x
5.31 x
-
7/28/2019 OPTIMIZATION.ppt
60/79
60
Variant
1x
2x
21 x
5.31 x
Many Optimal Solutions!
-
7/28/2019 OPTIMIZATION.ppt
61/79
-
7/28/2019 OPTIMIZATION.ppt
62/79
62
Exercise
0,1..
3max
21
21
21
wwwwts
ww
0,1..
3max
21
21
21
wwwwts
ww
Q. Which of the above has and optimal solution
and which is unbounded?
-
7/28/2019 OPTIMIZATION.ppt
63/79
63
Last Time
Formulated Two Crude PetroleumProblem
Solved (Analyzed) the Model Graphed the constraints
Found the most desirable extreme point
Can this approach be generalized torealistic problem?
-
7/28/2019 OPTIMIZATION.ppt
64/79
64
Pi Hybrids
Actual application
Manufacturer of Corn Seed
l=20production facilities
m=25 hybrid varieties
n=30 sales regions
Want to look at the production and
distribution operations
-
7/28/2019 OPTIMIZATION.ppt
65/79
65
Constants
Cost per bag of each hybrid at each facility
Processing capacity of each facility (bushels)
Bushels of corns needed for a bag of hybrid
Bags of hybrid demanded by each region
Cost per bag of shipping each hybrid from
each facility to each customer region
-
7/28/2019 OPTIMIZATION.ppt
66/79
-
7/28/2019 OPTIMIZATION.ppt
67/79
67
Defining Cost
Define
Then the total production cost is
fhp hf facilityathybridproducingofbagpercost,
l
f
m
h
hfhf xp1 1
,,
Summing over
all facilities
Summing over
all hybrids
-
7/28/2019 OPTIMIZATION.ppt
68/79
-
7/28/2019 OPTIMIZATION.ppt
69/79
69
Objective Function
HaveTotal Cost = Production Cost + Shipping Cost
which implies an objective function
l
f
m
h
n
r
rhfrhf
l
f
m
h
hfhf ysxp1 1 1
,,,,
1 1
,,min
-
7/28/2019 OPTIMIZATION.ppt
70/79
70
Constraints
Capacity constraints
Demands must be met Balance between production and distribution
m
h
fhfh uxa1
bags
,
gbushels/ba
.,...,2,1 lf
-
7/28/2019 OPTIMIZATION.ppt
71/79
-
7/28/2019 OPTIMIZATION.ppt
72/79
72
Model Size
Variables
500 x-variables
1500 y-variables Constraints
l=20 capacity constraints
mn=750 demand constraints
lm= 500 balance constraints
lm + lmn= 15500 non-negativity constraints
-
7/28/2019 OPTIMIZATION.ppt
73/79
73
Tractability and Validity
Is this a tractable model?Yes, it is actually not very big at all!
Is this a valid model? Constant production cost
Reasonable for certain range of production
Deterministic demand Reasonable for known products/markets
Constant shipping cost Reasonable for certain range of shipped items
-
7/28/2019 OPTIMIZATION.ppt
74/79
-
7/28/2019 OPTIMIZATION.ppt
75/79
75
Linear versus Nonlinear
A function is linear if it is a weightedsum of the decision variables, otherwise
nonlinearAlinear program (LP) has a linear
objective function fand constraintfunctions g1,,gm
Anonlinear program has at least onenonlinear function
-
7/28/2019 OPTIMIZATION.ppt
76/79
76
Exercise
jy
yd
y
j
j
jj
,1
s.t.
)11(3ymin5
1
41
jy
yd
y
j
j
jj
,1
s.t.
)11(3ymin5
1
2
41
jy
yy
y
j
j
j
,1
100s.t.
min
21
5
1
(a)
(c)
(b)
Linear or nonlinear?
-
7/28/2019 OPTIMIZATION.ppt
77/79
-
7/28/2019 OPTIMIZATION.ppt
78/79
78
Classification Summary
Linear Program (LP) ILP
Nonlinear Program (NLP) INLP
Integer Program (IP)
Increased difficulty
-
7/28/2019 OPTIMIZATION.ppt
79/79