Presentation is loading. Please wait.

Presentation is loading. Please wait.

An introduction to stochastic programming H.I. Gassmann.

Similar presentations


Presentation on theme: "An introduction to stochastic programming H.I. Gassmann."— Presentation transcript:

1 An introduction to stochastic programming H.I. Gassmann

2 © 2006 H.I. Gassmann Overview Introduction A taxonomy of stochastic programming problems Algorithms Instance representations An XML format for stochastic programs Conclusions

3 © 2006 H.I. Gassmann Stochastic programming Decision making under uncertainty Very general class of problems: –How to create and manage a portfolio Optimal investment sequences, given –Historic distribution of returns and covariances –Horizon, financial goals, regulatory constraints, etc. –How to harvest a forest Optimal harvest sequence, given –Random incidence of forest fires, pest, etc. –How to generate power Random data on demand, rates, parameters –etc.

4 © 2006 H.I. Gassmann Common characteristics Large-scale optimization models Some problem parameters unknown Assume distribution of parameters known (Otherwise: Optimization under risk)

5 © 2006 H.I. Gassmann Multistage stochastic linear program Any data item with nonzero subscript may be random (including dimensions where mathematically sensible) ~ stands for arbitrary relation ( , =,  ) “ ”

6 © 2006 H.I. Gassmann Constraints involving random elements  means ~ with probability 1 or with probability at least  or with expected violation at most v or …

7 © 2006 H.I. Gassmann Problem classes Recourse problems –All constraints hold with probability 1 –Minimize expected objective value Chance-constrained problems –Typically single stage Hybrid problems –Recourse problems including probabilistic constraints (VaR) or integrated chance constraints (CVaR) –Regulatory necessity –Often modelled using integer variables and/or linking constraints Distribution problems –Determine distribution of optimum objective and/or decisions

8 © 2006 H.I. Gassmann Taxonomy of stochastic programming problems

9 © 2006 H.I. Gassmann Event trees for finite distributions Display evolution of information

10 © 2006 H.I. Gassmann Algorithms for recourse problems Direct solution of the deterministic equivalent –“Curse of dimensionality” Decomposition –Recognize structure –Repeated calls to solver with different data –Configuration and sequencing of subproblems

11 © 2006 H.I. Gassmann Benders Decomposition Decompose event tree into nodal problems: In sequence solve each problem repeatedly Pass primal information to successors Pass dual information to ancestors (cuts)

12 © 2006 H.I. Gassmann Algorithm variants Different decomposition schemes –Path by path –Several stages at once –etc. Stochastic decomposition –Sequential sampling of subproblems –Suitable for continuous distributions –Convergence in probability

13 © 2006 H.I. Gassmann Numerical results Problem 1: WATSON –Ten-stage financial investment problem –Various numbers of scenarios –Largest DE: around 700,000 variables Problem 2: STOCHFOR –Stochastic forestry problem –Varying number of time stages –Largest DE: around 500,000 variables

14 © 2006 H.I. Gassmann Problem characteristics StochForWatson stages 78910 scenarios 7292,1876,56119,683161287682,688 nodes 1,0933,2809,84129,5241115111,5345,363 nrows 19,67259,038177,136531,4304,68426,748102,132357,376 ncols 17,48752,479157,455472,3838,40149,153191,994671,861 nelem (DE) 76,467229,557688,8272,066,63721,368128,648526,0781,841,028

15 © 2006 H.I. Gassmann Watson problem – CPU time scenarios configuration161287682688 cplex0.251.869.1964.52 cplex-b0.192.517.590.09 nodes0.594.218.3374.78 path3.9116.5844.59191.02 3-ply1.4112.5550.59N.C.

16 © 2006 H.I. Gassmann Watson problem - complexity

17 © 2006 H.I. Gassmann StochFor problem – CPU time Periods configuration78910 cplex1.678.61101.97530.89 cplex-b1.275.8133.03298.64 nodes2.033.3911.6438.56 path2.427.0920.72129.28 3-ply16.6927.52202.02549.72

18 © 2006 H.I. Gassmann StochFor problem - complexity

19 © 2006 H.I. Gassmann Modelling support Often O(10 6 ) variables and constraints Need computer support –Algebraic modelling language (AML) How to express random entities? How to work with random entities? –Databases How to link to AMLs? –Visualization How to present solution and other problem components?

20 © 2006 H.I. Gassmann What is an instance? Role and number of constraints, objectives, parameters and variables must be known Every parameter’s value must be known Continuous entities vs. discretization –Decision variables –Objective and constraints –Distribution of random variables –Time domain

21 © 2006 H.I. Gassmann What is a stage? Stages form a subset of the time structure Stages comprise both decisions and events Events must either precede all decisions or follow all decisions Should a stage be decision – event or event – decision ?

22 © 2006 H.I. Gassmann Why is there a problem? AMPL-like declarations: set time ordered; param demand{t in time} random; Production_balance {t in time}: Inv[t-1] + product[t] >= demand[t] + Inv[t]; Is the constraint well-posed? At least two possible interpretations –Inv[t] set after demand[t] known: recourse form, well-posed –Inv[t] set before demand[t] known: undeclared chance constraint

23 © 2006 H.I. Gassmann Instance representation SMPS format Algebraic modelling languages Internal representations XML format

24 © 2006 H.I. Gassmann Example (Birge) … S0 S2S2 S1 I = 2, T = 3, B = 55, R = 80,  t1 = {1.25, 1.06},  t2 = {1.14, 1.12}

25 © 2006 H.I. Gassmann SMPS format Three files based on MPS format –Core file for deterministic problem components –Time file for dynamic structure –Stoch file for stochastic structure Disadvantages –Old technology –Limited precision (12 digits, including sign) –Limited name space (8 characters) –Direction of optimization (min/max) ambiguous –Linear constraints, quadratic objective only

26 © 2006 H.I. Gassmann Example (Birge) Core file ROWS Budget0 Object Budget1 Budget2 Budget3 COLS X01 Budget0 1.0 X01 Budget1 1.25... RHS rhs1 Budget0 55. rhs1 Budget3 80. ENDATA Stoch file BLOCKS DISCRETE BL Block1 0.5 X01 Budget1 1.25 X02 Budget1 1.14 BL Block1 0.5 X01 Budget1 1.06 X02 Budget1 1.12 BL Block2 0.5 X11 Budget2 1.25 X12 Budget2 1.14... ENDATA

27 © 2006 H.I. Gassmann Algebraic modelling languages Characteristics –Similar to algebraic notation –Powerful indexing capability –Data verification possible Disadvantages –Discrete distributions only –Limited consistency checks for stochastic structure

28 © 2006 H.I. Gassmann AMPL model param T; param penalty; param budget; param target; set instruments; set scenarios; param prob{scenarios}; set slice{t in 0..T} within scenarios; param ancestor {t in 1..T, s in slice[t]}; var over {slice[T]}; var under{slice[T]}; param return {t in 1..T, i in instruments,s in slice[t]}; var invest {t in 0..T-1,i in instruments,s in slice[t]}; maximize net_profit: sum{s in scenarios} prob[s]*(over[s] - penalty*under[s]); subject to wealth{t in 0..T, s in slice[t]}: (if t < T then sum{i in instruments} invest[t,i,s]) = (if t = 0 then budget else sum {i in instruments} return[t,i,s]*invest[t-1,i,ancestor[t,s]]) + if t = T then (under[s] - over[s] + target);

29 © 2006 H.I. Gassmann Internal representations Seek most compact representation possible –Sparse matrix format is insufficient –Blocks corresponding to nodes in the event tree –Change blocks if problem dimensions are deterministic A stj = A st0 +  A stj (addition or replacement) –Exploit period-to-period independence

30 © 2006 H.I. Gassmann Storage requirements WatsonForest stages10 789 scenarios161287682,6887292,1876,56119,683 nodes1115111,5345,3631,0933,2809,84129,524 nrows4,68426,748102,132357,37619,67259,038177,136531,430 ncols8,40149,153191,994671,86117,48752,479157,455472,383 nelem (DE)21,368128,648526,0781,841,02876,467229,557688,8272,066,637 nelem (blk)21,368128,648526,0781,841,02843,887131,397393,8671,181,217 ch_blocks8,28345,695184,800638,69530,78392,049275,787826,941 indep 9271,0771,2271,377

31 © 2006 H.I. Gassmann OSiL – Optimization Services instance Language Written in XML –Easy to accommodate new features –Existing parsers to check syntax Easy to generate automatically Trade-off between verbosity and human readability

32 © 2006 H.I. Gassmann OSiL – Header information

33 © 2006 H.I. Gassmann OSiL – Header information <OSiL xmlns="os.optimizationservices.org“ xmlns:xsi=http://www.w3.org/2001/XMLSchemainstancehttp://www.w3.org/2001/XMLSchemainstance xsi:schemaLocation="OSiL.xsd"> FinancialPlan_JohnBirge max 0. 1 4 8...

34 © 2006 H.I. Gassmann OSiL – Deterministic information …

35 © 2006 H.I. Gassmann OSiL – Program data – Constraints and variables

36 © 2006 H.I. Gassmann OSiL – Core matrix (sparse matrix form) 0 2 4 6 8 10 12 13 1 -1.25 1 -1.14 1 -1.25 1 -1.14 1 -1.25 1 -1.14 1 0 1 0 1 2 1 2 3 2 3

37 © 2006 H.I. Gassmann Dynamic structure

38 © 2006 H.I. Gassmann OSiL – dynamic information

39 © 2006 H.I. Gassmann Explicit and implicit event trees

40 © 2006 H.I. Gassmann Scenario trees

41 © 2006 H.I. Gassmann OSiL – Stochastic information -1.06 -1.12 …

42 © 2006 H.I. Gassmann Distributions

43 © 2006 H.I. Gassmann Transformations

44 © 2006 H.I. Gassmann Penalties and probabilistic constraints

45 © 2006 H.I. Gassmann Node-by-node representation for stochastic problem dimensions

46 © 2006 H.I. Gassmann Capabilities Arbitrary nonlinear expressions Arbitrary distributions Scenario trees Stochastic problem dimensions Simple recourse Soft constraints with arbitrary penalties Probabilistic constraints Arbitrary moment constraints

47 © 2006 H.I. Gassmann Nonlinear expression – (x 0 – x 1 2 ) 2 + (1 – x 0 ) 2

48 © 2006 H.I. Gassmann Example – discrete random vector 0.5 -1.25 -1.14 0.5 -1.06 -1.12

49 © 2006 H.I. Gassmann Further work Readers Internal data structures Solver interfaces Library of problems Buy-in

50 © 2006 H.I. Gassmann Thank you! www.optimizationservices.org myweb.dal.ca/gassmann


Download ppt "An introduction to stochastic programming H.I. Gassmann."

Similar presentations


Ads by Google