Upload
yeo-joonming
View
221
Download
0
Embed Size (px)
Citation preview
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
1/82
Models and Algorithms for Stochastic
Programming
Jeff Linderoth
Dept. of Industrial and Systems EngineeringUniv. of Wisconsin-Madison
Enterprise-Wide Optimization MeetingCarnegie-Mellon University
March 10th, 2009
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 1 / 82
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
2/82
Mission Impossible
ExplainingStochastic
Programming in90 mins
I will try to givean overview please interrupt
with questions!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 2 / 82
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
3/82
What Ill Ramble On
Models
How to deal with uncertainty
Why modeling uncertainty is important
Who has used stochastic programming?
Why more people dont use stochastic programming
Algorithms
Extensive Form
Benders Decomposition (2-stage)
Sampling
Nested Benders Decomposition (multistage)
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 3 / 82
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
4/82
Dealing with Uncertainty Definition of Stochastic Programming
Etymology
program:
(3) An ordered list of events to take place or procedures to be followed; ascheduleLate Latin programma, public notice, from Greek programma, programmat-, from
prographein, to write publicly
stochastic:
(1b) Involving chance or probabilityGreek stokhastikos, from stokhasts, diviner, from stokhazesthai, to guess at, from
stokhos, aim, goal.
Source: The American Heritage Dictionary of the English Language, Fourth
Edition.
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 4 / 82
D li i h U i S f U i
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
5/82
Dealing with Uncertainty Sources of Uncertainty
Sources of Uncertainty
Houston, we have uncertainty!
What we anticipate seldom occurs; what we least expected
generally happens.Benjamin Disraeli (1804 - 1881)
FinancialMarket price movementsDefaults by a business partner
Operational
Customer demands,
Travel timesTechnology related
Will a new technology beready in time
Market Related
Shifts in tastes
Competition
What will your competitorsstrategy be next year?
Acts of God: Jeffs travelexperience yesterday!!!
WeatherEquipment failureBirds flying into planes
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 5 / 82
D li ith U t i t S f U t i t
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
6/82
Dealing with Uncertainty Sources of Uncertainty
Stochastic Programming
A tool used in planning under uncertainty
More specifically: Mathematical Programming, or Optimization, inwhich some of the parameters defining a problem instance arerandom, or uncertain
Optimization
minxX
f(x)
x: Variables you control
Stochastic Optimization
minxX()
F(x, )
: Variables you dont control
Stochastic Optimization is UNDEFINED
You cant possibly choose an x that optimizes for all
More specifiation is required
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 6 / 82
Dealing with Uncertainty Sources of Uncertainty
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
7/82
Dealing with Uncertainty Sources of Uncertainty
Jeffs Stochastic Programming Assumptions
In stochastic programming, we assume that a probability distribution
for the uncertainty is known or can be approximated.We also assume that probabilities are independent of the decisionsthat are taken.
Decision-dependent uncertainty
Decisions influence probabilitydistributions
Decisions influence knowledgediscovery
Want to know about stochasticprogramming withdecision-dependent uncertainty?
Talk to Ignacio!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 7 / 82
Dealing with Uncertainty Sources of Uncertainty
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
8/82
Dealing with Uncertainty Sources of Uncertainty
Probability Theory(?)
This notion of having to know a probability distribution for therandomness is troubling, since in reality, very few people exactly knowthat
Their customer demands follow a log-normal distribution with mean
17.26 and variance 2.88726Their plant will have forced shutdowns following a Weibull distributionwith parameters (100.25, 73.7916)
Instead, you might be able to
Estimate distributions from historial data (be careful!)
Have qualitative probability measures (low/medium/high)Create your own scenarios of interest
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 8 / 82
Dealing with Uncertainty Sources of Uncertainty
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
9/82
Dealing with Uncertainty Sources of Uncertainty
The Journey is the Reward?
Business process people can argue/discuss amongst themselves whatthe various scenarios might be and the outcomes of those scenarios.
This process by itself can be very useful
There is a good amount of frightening-looking mathematical theoryand computational evidence that solutions obtained from stochasticprograms are often quite stable with respect to changes in theinput probability distribution
The Upshot
It doesnt matter too much if your numbers arent quite right
The insights you gain from considering the uncertainty can still bevaluable
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 9 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
10/82
Dealing with Uncertainty Related Decision Making Technologies
A Concrete Example: An Uncertain LP
min cx
s.t. Ax b
T()x h()
x 0
T() and h() are uncertain: X() = {x | Ax b, T()x h()}We must choose x despite this uncertaintyExamples:
Decide production quantities before knowing demandsConstraint data includes imprecise measurements
Three Approaches
1 Robust optimization
2 Chance-constrained programming
3 Recourse-based stochastic programming
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 10 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
11/82
g y g g
Robust Optimization
Uncertain data is assumed to lie in an uncertainty set
(T(), h()) U
Guarantee that constraints be satisfied for all possible realizations
min cx
s.t. Ax b
Tx h (T, h) U
x 0
Tractability depends on structure of U
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 11 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
12/82
g y g g
Robust Optimization
To control conservatism, uncertainty set can be parameterized by abudget of uncertainty
Example 1: Tij() [lij, uij] (Bertsimas and Sim)
At most K of the components in each row can differ from the nominalvalueNature can choose which K will differK large
highly conservative (Soyster)
K = 0
No robustness
Can formulate this problem as a linear program
Example 2: U is ellipsoidal (Ben-Tal and Nemirovski)
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 12 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
13/82
g y g g
Robust Optimization
Advantages:
Computationally tractable
Can yield extremely reliable solutions
Does not require stochastic model
Disadvantages:
Does not use a stochastic model
Although conservatism can be controlled, the control parameterdoesnt have meaning to decision makers
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 13 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
14/82
Stochastic Programming
Assume uncertain data are random variables with known distributionsTwo approaches to uncertain constraints:
1 Require constraint to be satisfied with high probability
min{cx : x
X, P{T()x
h()}
1 }
is a parameter, e.g. = 0.05 or = 0.01Linear program with probabilistic (chance) constraints
2 Penalize violations of constraints
min
cx + E[(h() T()x)+] : x X
Special case of a Two stage stochastic program
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 14 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
15/82
Linear Programs with Probabilistic Constraints
Individual constraints:
min
cx : x X, P{T()ix h()i} 1 i i
Joint constraints:min{cx : x X, P{T()x h()} 1 }
Bad news: calculating probability is hard
Worse news: probabilistic constraints are generally non-convex!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 15 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
16/82
Non-convexity of the feasible region
Consider: P{x1 1, x2 2} 0.6
Each dot: a realization of which occurs with probability 1/10
x2
x1
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 16 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
17/82
Two Stage Stochastic Programming
(SP) mincx + E[(h() T()x)+] : x XChoose x Observe (T(), h()) Pay penalty
Good news: (SP) is convex
Bad news: Calculating expectation is hard
Successful Approach: Sample Average Approximation
Generate (T()1, h()1), . . . , (T()N, h()N) and solve
(SPN) mincx +Ni=1
1
N (h()i
T()i
x)+
: x XxN is a often a good approximation to true optimal solution
Well see (a lot) more later!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 17 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
18/82
Stochastic Programming vs. Simulation
Simulation(Pro): Very flexibleSystem need not be mathematically defined(Pro): Fast(Con): If I run 100 what-ifs and get 100 different solutions, howdoes simulation help me plan for the future?
Stochastic Programming(Con): More challenging to build and solve models(Pro): SP helps you optimize over your what-ifs.
The Upshot!
Use simulation to generate scenarios. Input the scenarios to a stochas-tic program to show how to decide how to best hedge against thisuncertainty
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 18 / 82
Dealing with Uncertainty Related Decision Making Technologies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
19/82
Multistage Decision Making
1
x1
2
x2
3
xT1
T
xT
Random vectors
1 Rn1 , 2 Rn2 , . . . , T R
nT
Make sequence ofdecisions x1 X1, x2
X2, . . . , xT XT.The evolution of information is of fundamental importance to thedecision-making progress.
We make a decision now (x1)
Nature makes a random decision 2: (stuff happens)
We make a second period decision x2 that attempts to repair thehavoc wrought by nature in (recourse).
Repeat as necessary...
We make decisions in stages, in between which uncertainty is revealed
to usJeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 19 / 82
Why use Stochastic Programming The Newsvendor
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
20/82
Hot Off the Presses
A paperboy (newsvendor) needs to decide how many papers to buy inorder to maximize his profit.
He doesnt know at the beginning of the day how many papers he cansell (his demand).
Each newspaper costs c.
He can sell each newspaper for a price of q.He can return each unsold newspaper at the end of the day for r.(Obviously r < c < q).
The Newsvendor Problem
Given only knowledge of the probability distribution F of demand,how may papers should the newsvendor buy?
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 20 / 82
Why use Stochastic Programming The Newsvendor
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
21/82
Newsvendor Problem
Suppose that the newsvendors goal is to maximize the profits in thelong run. (In expectation)...
Intuitively, it seems that the newsvendors best strategy is to everypurchase the average demand
Take Away Message!
The optimal solution is NOT to use the mean demand.
In fact, the two solution can be far apart. (Depending on thedistribution, and parameters r,c,q
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 21 / 82
Why use Stochastic Programming The Newsvendor
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
22/82
ExampleThe Newsvendor
c = 50,q = 70,r = 5
Demand: (Truncated) Normal distributed. = 100, = 50
Mean Value Solution
Buy 100. (Duh!)Expect to profit: 2000
TRUE long run profit 650Stochastic Solution
Buy 75.Expect to profit: 1500TRUE long run profit 880
The difference between the two solutions (880 650) is called thevalue of the stochastic solution.
How much is it worth to you to plan using full uncertainty informationas opposed to mean-values for the uncertain parameters
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 22 / 82
Why use Stochastic Programming The Newsvendor
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
23/82
A Take Away Message
The Flaw of AveragesThe flaw of averages occurs when uncertainties are replaced bysingle average numbers planning.
Did you hear the one about the statistician who drowned fording ariver with an average depth of three feet.
Point Estimates
If you are planning with point estimates for demands, then you areplanning sub-optimally
It doesnt matter how carefully you choose the point estimate itis impossible to hedge against future uncertainty by consideringone realization of the uncertainty in your planning process
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 23 / 82
Stochastic Programming Success Stories Financial Optimization
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
24/82
Russell-Yasuda Kasai
Yasuda Kasai: Seventh largest (worldwide) property and casualtyinsurer.
Assets of > 3.47 trillion
Liability structure is complex, but want a tool that will allow them tomaximize the revenue from these assets in the face of assetmanagement restrictions
Frank Russell Company hired to develop Asset-Liability ManagementModel based on (multistage) stochastic programming
Carino, Myers, Ziemba, Second place in Edelman prize competition ofINFORMS.
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 24 / 82
Stochastic Programming Success Stories Financial Optimization
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
25/82
Asset Allocation Model
Decisions:Investment amounts for various assets
Random Events:Return on investment for each asset.Liability payouts
Constraints:
Asset Allocation Constraints (Complex)Loan ModelLiability Model
Compared to a performance benchmark established at YasudaKasai at the beginning of the Fiscal Year to measure the value
added by their use of the model, the new model increased annual
income by9.5 billion.
Mr. Kunihiko Sasamoto, Director and Deputy President, Yasuda Kasai.Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 25 / 82
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
26/82
Stochastic Programming Success Stories Financial Optimization
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
27/82
Product Portfolio Planning
Decisions:
Invest in various projects (All or nothing investment).Complicated project prerequisite structure
Random Events: (HUGE impact)Design-win from customersTechnology failures
Market forcesConstraints:
ResourcesHire-fire costs
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 27 / 82
Stochastic Programming Success Stories Financial Optimization
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
28/82
Product Portfolio Management at Agere
We implemented a decision support tool for Agere
1 Optimization Model
2 Simulator of future conditions (random events were correlated!)
The muckety-mucks loved it!
They like the ability to talk about the different scenarios.
Focuses discussion in business planning meetings
Gives unbiased simulator view of potential outcomes of decisions
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 28 / 82
Stochastic Programming Success Stories Logistics
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
29/82
SP in the Supply Chain
Decisions:
Regular supply chain decision: How much? where? and when?
Random Elements:
Demands, prices, resource capacity.Supply chains going global imply that companies are now more exposedto risky factors such as exchange rates and reliability of transferchannels.
Constraints:
Regular supply chain constraints: Flow balance, material availability,etc.
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 29 / 82
Stochastic Programming Success Stories Logistics
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
30/82
A Case Study
T. Santoso, S. Ahmed, M. Goetschalckx, and A. Shapiro. A Stochastic ProgrammingApproach for Supply Chain Network Design under Uncertainty, European Journal of Operational Research, vol.167, pp.96-115, 2005.
Two real supply chains
One Domestic (Cardboard packages to breweries and soft drink
manufacturers...)One global
Sizes: Around 100 facilities. Around 100 customers,
In general, the (sampled) stochastic model was roughly 5% better
than using the mean value of demand, translating into millions ofdollars in potential savings.
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 30 / 82
Stochastic Programming Success Stories Logistics
S C
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
31/82
Supply Chain Projects
Bulk Gas Production and DistributionUncertainty in customer demands,competitor drainBuilt (prototype) optimization modeland simulator.
They are now(?) doing a realimplementation
Lesson Learned
Having a (static) simulation of the production-disribution process is akey component to the project
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 31 / 82
Stochastic Programming Success Stories Other Industries
O h I d i l A li i f SP
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
32/82
Other Industrial Applications of SP
Energy Industry
Unit Commitment Problem: Schedule production from powergeneration units
Telecommunication
Capacity/bandwidth planning: Invest in capacity for the network before
you know the true bandwidth demandsMilitary
Network Interdiction Problem: Where to place agent on a network tointerrupt evil-doers
It aint that rosy
As far as I know, mot implementations are built on a case-by-case basisand are fairly ad-hoc.
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 32 / 82
Why More People Dont Use SP
S h i P i Obj i Ri k P fil
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
33/82
Stochastic Programming ObjectivesRisk Profile
What is your goal?
1
I want to do well on averageExpected Value
2 I want to limit my exposure in the worst case or cases
Value at Risk/Conditional Value at Risk
3 I want the probability that I achieve a goal to be sufficiently high?
Chance constraints
4 I want to achieve a steady return?
Dispersion-based objectives
Each of these imply a different notion of risk, and lead to differentstochastic optimization problems
Stochastic Programming isnt about getting a number, its aboutgetting a distribution that looks good to you
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 33 / 82
Why More People Dont Use SP
S SP Obj ti
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
34/82
Some SP Objectives
min F(x, ) Mean-Value Problem
minEF(x, ) Risk Neutral
minEF(x, ) (F(x, )) Risk Measures
(F(x, )) = VarF(x, ) Markowitz(F(x, )) = E [(EF(x, ) F(x, ))+] Semideviation
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 34 / 82
Why More People Dont Use SP
Thi P l W t
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
35/82
Things People Want
Arbit
rary Distri
butio
ns
(Conditional)Value atRisk
Netw
orkPro
blems
Scenario Trees
StochasticDynamic Programming
Robust O
ptimization
(Joint)
Chan
ceCons
traints
Stochastic
Dominance
Stochastic Control
JointDistributions
Nonlinear problems
Intege
r prob
lems
Free Beer
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 35 / 82
Why More People Dont Use SP
S ti St h sti P s
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
36/82
Supporting Stochastic Programs
I point out all these different flavors of SP to highlight what I thinkhas been one of the hinderances of having a modeling laguage for SP.
I dont know the key to success, but the key to failure is trying to
please everybody.
Bill Cosby (1937 - )
I believe the fact that a stochastic program is not a well-definedconcept is one of the fundamental reasons why more people dont use
stochastic programmingOther reasons people dont use stochastic programming?
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 36 / 82
Why More People Dont Use SP
Why Dont More People Use Stochastic Programming
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
37/82
Why Don t More People Use Stochastic Programming
They dont start their training early enough!
Jacob Linderoth, age 4 months, reading Introduction to StochasticProgramming
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 37 / 82
Why More People Dont Use SP Barriers to Stochastic Programming
Why Dont More People Use Stochastic Programming
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
38/82
Why Don t More People Use Stochastic Programming
Because they dont know the probability distribution?
Even crude approximations can help
Because they cant solve them?
Linderoth and Wright solve a 10-million scenario problem
Recent theory suggests that you dont need to include many scenariosto get an accurate solution to the true problem
Because they cant model them?
Modeling tools are on the way (more later)
Because it is hard to verify that the solution is better
The same could be said of Deterministic OptimizationUse simulation to verify that the solution is better
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 38 / 82
Why More People Dont Use SP Barriers to Stochastic Programming
Probability Management
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
39/82
Probability Management
A true believer is Sam Savage (consulting professor at at Stanford).
He believes companies should have a comprehensive probabilitymanagement plan.
Probability Management
Simulations to generate distributionsInformation systems to hold distributions of key uncertain inputs
A Chief probability officer responsible for signing off on thedistributions
You can start small...
1 What are your scenarios and distributions?
2 Do you have models that can use this information?
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 39 / 82
Algorithms
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
40/82
ALGORITHMS
I focus almost exclusively on two-stage recourse problems
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 40 / 82
Algorithms Two-Stage Stochastic Programs with Recourse
Stochastic Programming
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
41/82
Stochastic Programming
A Stochastic Program
minxX{EF(x, )}
2 Stage Stochastic LP w/Recourse
F(x, )def= cTx + Q(x, )
cTx: Pay me now
Q(x, ): Pay me later
The Recourse Problem
Q(x, )def= minqTy
Wy = h() T()x
y 0
Expected Recourse Function:
Q(x)def= E[Q(x, )]
Two-Stage Stochastic LP
min cTx xJeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 41 / 82 Algorithms Extensive Form
Extensive Form
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
42/82
Extensive Form
Assume = {1, 2, . . . S} Rr,
P( = s) = ps, s = 1 , 2 , . . . , S
Ts T(s), hs = h(s)Then can write extensive form:
cTx + p1qTy1 + p2q
Ty2 + + psqTys
s.t.Ax = b
T1x + Wy1 = h1T2x + Wy2 = h2
... +. . .
...TSx + Wys = hs
x X y1 Y y2 Y ys Y
The Upshot!
This is just a larger linear program
It is a larger linear program that also has special structure
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 42 / 82
Algorithms Extensive Form
Best-Known Solution Procedure
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
43/82
Best Known Solution Procedure
M
E
T
H O D
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 43 / 82
Algorithms Extensive Form
Small SPs are Easy!
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
44/82
Small SP s are Easy!
0 50 100 150 200 250 3000
10
20
30
40
50
60
70
number of scenarios
Time
Cplex/Extensive Form
Lshaped
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 44 / 82
Algorithms The LShaped Method
Two-Stage Stochastic Linear Programming
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
45/82
Two Stage Stochastic Linear Programming
We assume that the P has finite support, so has a finite number ofpossible realizations (scenarios):
Q(x) =
N
i=1piQ(x, i)
For a partition of the N scenarios into sets N1,N2, . . .Nt, let Q[j](x)be the contribution of the jth set to Q(x):
Q[j](x)def= iNjpiQ(x, i)
so then Q(x) =t
j=1Q[j]
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 45 / 82
Algorithms The LShaped Method
Important (and well-known) Facts
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
46/82
p ( )
Q(x, i), Q[](x), and Q(x) are piecewise linear convex functions of x.
If i is an optimal dual solution to the linear program correspondingto Q(x, i), then TTi i Q(x, i)
gj(x)def=
iNjpiT
Ti i Q[j](x).
Key IdeaRepresent Q[j](x) by an artificial variable j and find supportingplanes for j
j Q[j](xk) + gj(x
k)T(x xk) ()
Point of Decomposition
Evaluation of Q(x) is separable
We can solve linear programs corresponding to each Q(x, i)independently in parallel!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 46 / 82
Algorithms The LShaped Method
Worth 1000 Words?
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
47/82
x
Q(x)
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 47 / 82
Algorithms The LShaped Method
Worth 1000 Words
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
48/82
x
Q(x)
xk
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 48 / 82
Algorithms The LShaped Method
Worth 1000 Words
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
49/82
x
Q(x)
x1x2
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 49 / 82
Algorithms The LShaped Method
(Multicut) L-shaped method
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
50/82
( )
M
s1 s2 s3 s4 s5
M
s1 s2 s3 s4 s5
1 Solve the masterproblem M with thecurrent approximation toQ(x) for xk.
2 Solve the subproblems,
(sj) evaluating Q(xk
) andobtaining subgradient(s)to update masterapproximation M
3 k = k+1. Goto 1.
Lets Get Parallel!
Of course, solution of sj can be carried out independently.
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 50 / 82
Algorithms The LShaped Method
Warning!
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
51/82
If Q(x) is not convex, then this algorithm doesnt work
If you have a integer recourse variables y Zp
Rnp
, the problembecomes significantly more difficult.
Your Options
Give your favorite solver the full extensive form (and pray)
Weak relaxation
Decomposition method: Care and Schultz, Sen
Spatial branch and bound:
Want to know about stochasticinteger programming/spatial branchand bound?
Talk to Nick!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 51 / 82
Algorithms The LShaped Method
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
52/82
Does it Work? The Worlds Largest LP
Linderoth and Wright built a fancy decomposition-based solvercapable of running on the grid
Storm A stochastic cargo-flight scheduling problem (Mulvey andRuszczynski)
We aim to solve an instance with 10,000,000 scenarios
x R121, yk R1259
The deterministic equivalent LP is of size
A R985,032,88912,590,000,121
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 52 / 82
Algorithms The LShaped Method
The Super Storm Computer
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
53/82
Number Type Location184 Intel/Linux Argonne
254 Intel/Linux New Mexico
36 Intel/Linux NCSA
265 Intel/Linux Wisconsin88 Intel/Solaris Wisconsin
239 Sun/Solaris Wisconsin124 Intel/Linux Georgia Tech90 Intel/Solaris Georgia Tech13 Sun/Solaris Georgia Tech
9 Intel/Linux Columbia U.10 Sun/Solaris Columbia U.
33 Intel/Linux Italy (INFN)
1345
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 53 / 82
Algorithms The LShaped Method
TA-DA!!!!!
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
54/82
Wall clock time 31:53:37CPU time 1.03 Years
Avg. # machines 433
Max # machines 556Parallel Efficiency 67%
Master iterations 199CPU Time solving the master problem 1:54:37
Maximum number of rows in master problem 39647
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 54 / 82
Algorithms The LShaped Method
Number of Workers
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
55/82
0
100
200
300
400
500
600
0 20000 40000 60000 80000 100000 120000 140000
#workers
Sec.
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 55 / 82
Sampling
Why Sampling is Necessary
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
56/82
ys y(s) is the recourse action to take if scenario s occurs.
Pro: Its a linear program.
Con: Its a BIG linear program.
Imagine the following (real) problem. A Telecom company wants toexpand its network in a way in which to meet an unknown (random)
demand.
There are 86 unknown demands. Each demand is independent andmay take on one of five values.
S = || = 86k=1(5) = 586 = 4.77 1072
The number of subatomic particles in the universe.How do we solve a problem that has more variables and moreconstraints than the number of subatomic particles in the universe?
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 56 / 82
Sampling
But Its Even Worse!
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
57/82
The answer is we cant!If is not a countable set say if it is made up of continuous-valuedrandom variables, our deterministic equivalent would have variables and constraints. :-)
We solve an approximating problem obtained through sampling.
The Very Good News
Using Monte-Carlo methods (Sample Average Approximation), wecan obtain high-quality solutions
Even Better: Can obtain (statistical) bounds on the quality of thesolution
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 57 / 82
Sampling
Sample Average Approximation(SAA)
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
58/82
The StorySolving two-stage SP exactly is often impossible
Solving two-stage SP approximately is often easy: Sample AverageApproximation (SAA)
I view SAA as the Jeff Linderoth of solution methods
It aint smartIt aint sexyBut it generally does work!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 58 / 82
Sampling
SAA for Dummies
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
59/82
Let v be the optimal solution to the true problem:
v
def= minxXf(x) def= EF(x, )
Take a sample (1,...,N) of N realizations of the vector , andform the sample average function
fN(x) def= N1Nj=1
F(x, j)
For Stochastic LP w/recourse, evaluate fN(x)
solve one LP for each
of N scenarios
Optimize sample average function:
vNdef= min
xX
fN(x)
def= N1
Nj=1
F(x, j)
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 59 / 82
Sampling
SAA for Dummies, Cont.
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
60/82
Note that vN is a random variable, as it depends on the (random)sample of size N
From this information, we can get bounds on the optimal solution
valuev
All Good Talks Contain...
Thm. E(vN
) v f(x) x
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 60 / 82
Sampling
Making SAA Work
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
61/82
Take a solution x from a SAA instanceWe are mostly interested in estimating the quality of a given solution
x. This is f(x) v.
1 Get upper bound on v from f(x). Estimate f(x) by solving N
(completely independent) linear programsrecourse LPs with x fixed.
fN(x) def= (N)1Nj=1
F(x, j)
2 Get a lower bound on v from E(vN). Estimate E(vN) by solving Mindependent stochastic LPs, giving optimal values v1N, v
2N, . . . v
MN
E(vN)def= M1
Mj=1
vjN
Independent no synchronization good for the GridJeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 61 / 82
Sampling
More Theory
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
62/82
A very interesting result of Shapiro and Homem-de-Mello says thefollowing:
Suppose that x is the unique optimal solution to the true problemLet xN be the solution to the sampled approximating problemUnder certain conditions, the event (xN = x
) happens withprobability 1 for N large enough.The probability of this event approaches 1 exponentially fast asN !!There exists a constant such that
limN
N1 log[1 P(x = x)] .
This is a qualitative result indicating that it might not be necessary tohave a large sample size in order to solve the true problem exactly.For a problem with 51000 scenarios a sample of size N 400 isrequired in order to find the true optimal solution with probability95%!!!
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 62 / 82
Sampling
Does SAA Work on Real Problems?
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
63/82
M = 10 times Solve a stochastic sampled approximation of size N.
Compute confidence interval on lower bound estimate E(vN)
Choose one x from solution to M SAA instances and computeconfidence interval on upper bound estimate fN(x), with N = 10000
Test InstancesName Application ||LandS HydroPower Planning 106
gbd Aircraft Allocation 6.46 105
storm Cargo Flight Scheduling 6 1081
20term Vehicle Assignment 1.1 1012
ssn Telecom. Network Design 1070
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 63 / 82
Sampling
20term Convergence
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
64/82
251500
252000
252500
253000
253500
254000
254500
255000
255500
10 100 1000 10000
Value
N
Lower BoundUpper Bound
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 64 / 82
Sampling
ssn Convergence
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
65/82
2
4
6
8
10
12
14
16
18
10 100 1000 10000
Value
N
Lower BoundUpper Bound
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 65 / 82
Sampling
storm Convergence
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
66/82
1.544e+06
1.545e+06
1.546e+06
1.547e+06
1.548e+06
1.549e+06
1.55e+06
1.551e+06
1.552e+06
1.553e+06
1.554e+06
1.555e+06
10 100 1000 10000
Value
N
Lower BoundUpper Bound
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 66 / 82
Sampling
gbd Convergence
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
67/82
1500
1550
1600
1650
1700
1750
1800
10 100 1000 10000
Value
N
Lower Bound
Upper Bound
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 67 / 82
Multistage SPs
Multistage Stochastic LP
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
68/82
1
x1
2
x2
3
xT1
T
xT
Random vectors1
Rn1 , 2
Rn2 , . . . , T RnT
Make sequence ofdecisions x1 X1, x2 X2, . . . , xT XT.
Risk Neutral: We always aim to optimize the expected value of ourcurrent decision xt
Linear: Assume Xt are polyhedra
Discrete: Assume t are drawn from a discrete distribution.
The Hard Part
Decisions made at period t (xt) must only depend on events and decisionsup to period t
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 68 / 82
Multistage SPs
The Stickler. My Favorite Eight Syllable Word.
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
69/82
We need to enforce nonanticipativity.
Other eight-syllable words...autosuggestibility, incommensurability, electroencephalogram,unidirectionality
At any point in time, different scenarios look the same
We cant allow different decisions for these scenarios.We are not allowed to anticipate the outcome of future random eventswhen making our decision now.
How to do it?
1 Use Tree Structure (Nested Decomposition)
2 Create (extra) variables for all possible scenarios, and enfroceequality between decisions that should be nonanticipative(Progressive Hedging)
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 69 / 82
Multistage SPs
Scenario Tree
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
70/82
xnx(n)
x01
2
N: Set of nodes in the tree
(n): Unique predecessor of noden in the tree
S(n): Set of successor nodes of n
qn: Probability that the sequence
of events leading to node n occurs
xn: Decision taken at node n
Warning!
Scenario Trees can get bigThere are some tools that try and prune the tree while keepingsimilar statistical properties in the stochastic process
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 70 / 82
Multistage SPs
Multistage Stochastic Programming
E i F
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
71/82
Entensive Form
zSP = minnN
qncTnxn Tnx(n) + Wnxn = hn n NValue Function of node n
Qn(x(n))def= min
xn
cTnxn +
mS(n)
qmnQm(xn) | Wnxn = hn Tnx(n)
qmn: conditional probability of node n given node m
Tree structure encodes nonanticipativity
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 71 / 82
Multistage SPs Algorithm
Nested Decomposition
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
72/82
0: Root node of the scenario tree
x0: Initial state of the system
Recursive Formulation
zSP = Q0(x0)
Cost to go: Gn(x)def=
mS(n) qmnQm(x)
Mkn(x): Lower bound on Gn(x) in iteration k
Qn(x(n)) minxn
cTnxn + M
kn(xn)
Wnxn = hn Tnx(n)
((MLPn))
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 72 / 82
Multistage SPs Algorithm
Building Mkn(x)
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
73/82
Create a partition (or clustering Cn) of S(n)
A lower bound mkn[j]
for each element of the partition (each cluster)is created independently
Mkn(x)def= jCn m
kn[j](x)
mkn[j](x)def= inf
j
je Fkn[j]x + fkn[j]
Fk
n[j], fn[j] obtained from dual solutions (to form subgradients) oflinear programs of nodes within cluster [j]
Mkn(x)
Gn(x
)
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 73 / 82
Multistage SPs Algorithm
Action Pictures
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
74/82
x0
1
x0Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 74 / 82 Multistage SPs Algorithm
A small Multistage Telecom Problem
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
75/82
A
B C D
E F
Set of stages T
Set J of links
Sets It of demands
Random demand dt() R|It|
Budget each period
Install capacity on links eachperiod to minimize the total
expected unserved demand
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 75 / 82
Multistage SPs Algorithm
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
76/82
Some (Limited) Computational Results
T = 5
K: Realizations/Period
N: Number of scenarios
DE: Size of deterministicequivalent
K N DE Size
30 0.81M 18M * 31M50 6.25M 140M * 236M60 12.9M 290M * 488M
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 76 / 82
Multistage SPs Algorithm
Computational Results
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
77/82
It: Number of iterations (Times MLP0 was solved)
E: Parallel efficiency.
Time machines solving MLPn
Time machines available
K It Avg Workers Wall Time CPU Time E30 9 62 2:34:21 6:15:15:10 6750 7 75 1:12:49:27 85:20:24:15 77
60 11 162 3:16:51:00 431:12:15:37 73
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 77 / 82
Multistage SPs Modeling Tools
Existing Modeling Tools
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
78/82
Many stochastic programming implementations Im aware of have
been built from scratch
But there are some modeling tools on the way
Name Author(s) CommentAIMMS AIMMS Team CommercialGams Gams Team CommercialMPL Kristjensen Commercial
XPRESS-SP Verma, Dash Opt. Commercial, BetaSPiNE Valente, CARISMA
STRUMS Fourer and Lopes Prototype(?)
SUTIL Czyzyk and Linderoth C++ classesSLPLib Felt, Sarich, Ariyawansa Open Source C Routines
COIN-Smi, SP/OSL COIN, IBM C++ methods
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 78 / 82
Multistage SPs Modeling Tools
Existing Solution Tools
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
79/82
Most stochastic programming implementations of which Im aware,merely form and solve extensive form
Other software:
Name Author(s) CommentAIMMS AIMMS Team Commercial, LShaped method
SLP-IOR Kall, Mayer LShaped, Stochastic Decomposition, othersMSLiP Gassmann Nested LShapedSPInE Valente, CARISMA Commercial, LShaped method, may not exist anymoreBNBS Altenstedt Nested LShaped method, Open source
ATR Linderoth, Wright Design to run in parallel. Not simple to build and run
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 79 / 82
Multistage SPs Modeling Tools
Conclusions
Stochastic Programming
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
80/82
Stochastic Programming
A tool for decision making under uncertainty
Considers the impact of recourse decisionsIt may not be the answer, but it does help you hedge againstupcoming uncertaintyMore importantly, it gets people talking about the impact ofuncertainty in the decision making process
Planning with mean-value estimates will not lead to an optimalpolicy
Used with some success in industry
Financial Services (Many successes)Logistics and Supply Chain (Fewer successes, but coming!)
Tools and algorithms are on the way
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 80 / 82
Multistage SPs Modeling Tools
We Want YOU!
8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
81/82
To consider using StochasticProgramming as a decisionsupport tool to help managein turbulent times!
Thanks!I am happy to help. email: [email protected]
http://www.stoprog.org/
Jeff Linderoth (UW-Madison) Models & Algs. for SP CMU-EWO 81 / 82 Multistage SPs Modeling Tools
Some Take Away Quotes
http://www.stoprog.org/http://www.stoprog.org/8/4/2019 Models and Algorithms for Stochastic Programming, Financial Optimization
82/82
If a man will begin with certainty, he shall end in doubts, but if
he will be content to beign with doubts, he shall end incertainties
Francis Bacon
It is a good thing for the
uneducated person to read
books of quotations
Winston Churchill
Jeff Linderoth (UW-Madison) Models & Algs for SP CMU-EWO 82 / 82