390 likes | 564 Views
Variability and Uncertainty. Introduction Stochastic Programming Robust Programming Multiparametric Programming Dynamic Programming. Supply Chain. Efficiency Profitability. Coordination of resources. Introduction: PSE Chemical Supply Chain. Enterprise management. design planning
E N D
Variability and Uncertainty Introduction Stochastic Programming Robust Programming Multiparametric Programming Dynamic Programming
Supply Chain Efficiency Profitability Coordination of resources Introduction: PSE Chemical Supply Chain Enterprise management design planning scheduling
Modeling system Introduction: Modeling systems in PSE input information technology changes environmental conditions uncertainty variable market trends reliable decisions
Introduction: Uncertainty • The model will include a series of uncertain parameters • There is not a unique solution… • There is not an optimal solution… • In spite of this, a decision should be made • (before the uncertainty is revealed) • Solution based on average values (or nominal values) does not need to be the best • It could be even unfeasible • Decision making implies a risk • Typically, there will be a trade-off among expected efficiency and assumed risk • Prediction is very difficult… specially about the future Niels Bohr
Decision making Execution How When input information Where Executed schedule Predictive schedule t Infeasible schedule Poor efficiency Opportunity losses Data ambiguous outdated incomplete Dynamic & uncertain environment Introduction: Scheduling under uncertainty
ABDEC mk: 101 TU wt: 0 TU ABDEC mk: 104 TU wt: 19 TU Predictive schedule (nominal) Executed schedule wait times ADEBC mk: 103 TU wt: 0 TU Is it worth spending effort to obtain a predictive schedule optimal for nominal conditions that will eventually change at execution time due to disruptions and changes in the operation environment? Predictive schedule Introduction: Motivating example (Balasubramanian & Grossmann, 2002)
uncertainty realization Uncertainty t Introduction: Management of the uncertainty Ability to achieve robust schedule execution despite the occurrence of unexpected events.
Sources of Uncertainty What will customers order? How many products should remain in stock? Will resources be available during production? Will suppliers deliver the materials on time? • Unexpected events • Ambiguous and/or incomplete information
Formal aspects There are different ways to face these problems. The most convenient way depends on aspects like: • The way how the model relates the decission variables with the uncertain information • Decoupling these two types of variables makes the problem much more easy ! • The way to express the probabiloity distribution of uncertain varaibles • Continuous distributions vs. Discrete distributions. • The size of the problem • The characteristics of the mathematical model (convex, continuous, …) • Including the characteristics introduced by the probability functions to be applied (the probability functions are not convex (nor concave) transformations, disretizations, etc.)
Decision making under Uncertainty • Something has to be deceided “here and now” in spite of the fact that decision results only will be known in the future, once uncertainty is revealed
Sampling techniques • Numerical or analytic techniques Continuous probability distribution Discrete distribution (scenario based) Typical decision making with a probabilistic representation of uncertainty
Optimization under uncertainty • Stochastic optimization • Objective: Mathematic hope related to an efficiency measurement • Variability is not taken into account • Optimización robusta • Compromise between “hope and variability ( Risc)
1.- Stochastic Programming • Combines the power of mathematical programming with statistical advanced techniques: • Convexity analysis, development of dual problems, … problem decomposition • Constraints management • The solution procedures are driven by the formalization of the probability model. • For example: When the number of scenarios to be contemplated is discrete Deterministic equivalent problem (the size of the problem will be basically a function of the number of scenarios to be considered)
General Methods of stochastic programming • Multi-step methods(multistage stochastic programming): • Penalization (“recourse problems”): The potential losses caused by uncertainty are “a posteriori” compensated solving another optimization problem. • This second problem depend on the decisions already made (“first step”) and on the uncertainty finally revealed. • The variable associated to this new optimization is the “resource” required to compensate the uncertainty effects. • During the first step decision making, the eventual (uncertain) values of the second stage variables are explicitly considered • Limitations: • Not applicable if the decisions (and states) affect the probability distribution • The costs associated to the “resource decisions” should be known in advance. • Chance-constrained programming: some constraints do not need to be maintained in a limited number of cases.
Equivalent deterministic problem (finite number of scenarios): Min c'x + p1d1'y1 + p2d2'y2 + p3d3'y3 s.t. Ax = b Tx + Wy1 = h1 Tx + Wy2 = h2 Tx + Wy3 = h3 x, yi ≥ 0 (x: 1st stage variables (yi: 2nd stage variables (pi: probability of scenario “i”
Stochastic Programming: Example Management of a local gas distribution company (http://wiki.mcs.anl.gov/NEOS/index.php/Stochastic_Programming): • Data: Gas demand for the current period (100 units), buying price (1 €/unit) and selling price for the current period (2 €/unit). Storage cost (0.05 €/unit) • Uncertain data: Gas demand for the next period, and buying/selling prices • Uncertainty model: 3 equiprobable scenarios: • Decision: How much gas should be bought “here and now” the the global operators (taking into account that gas can be stored and consumed during the next period) • Solution alternatives: • Solve the problem for each scenario • Solve the problem for the average scenario • Stochastic programming
Equivalent deterministic problem (finite number of scenarios): Min c'x + p1d1'y1 + p2d2'y2 + p3d3'y3 s.t. Ax = b Tx + Wy1 = h1 Tx + Wy2 = h2 Tx + Wy3 = h3 x, yi ≥ 0 x: gas to be bought (and/or store) yi: gas to be bought during the second year (for each scenario) di: price of the gas to be bought during the second year (for each scenario) b: demand (in the first year) T, A y c’: parameters to ensure that the extra quantity bought during the 1st year will be stored (cost!) and will be used to cover the 2nd year demand (or part of it) hi: demand for the second year (for each scenario) pi: probability of scenario “i”
Mathematical formulation One unique scenario Minimize (sum Price[t] * Buy[t]) + (sum Store[t] * StorageCost) subject to: Buy[t] + Use_stored[t] >= Demand[t], t in (1,2) Store[t] = Store[t-1] + Buy[t] - Demand[t], t in (1,2) Use_stored[t] <= Store[t-1], t in (1,2) “n” scenarios Minimize (Price[1][1] * Buy[1][1] + sum Store[1][1] * StorageCost) + + sum Scen Prob[Scen] * (Price[2][Scen] * Buy[2][Scen] + Store[2][Scen] * StorageCost) First-period constraints Buy[1][1] + Use_stored[1][1] >= Demand[1][1] Store[1] = Store[0] + Buy[1] - Demand[1] Use_stored[1] <= Store[0] Second-period constraints Buy[2][Scen] + Use_stored[2][Scen] >= Demand[2][Scen] Store[2][Scen] = Store[1][1] + Buy[2][Scen] - Demand[1][Scen] Use_stored[2][Scen] <= Store[1][1]
“Chance constrained” programming Equivalent to stochastic programming, including a new constraint to limit the probability of not matching a certain constraint to a certain maximum value. Examples: Same problem • including a constraint to limit the probability of having to buy more than 30 units in the second period • Accepting solutions no covering the 10% of the second year demand in a 5% of the eventual situations • Helps to assess the “parameters” probability distribution
2.- Robust programming The model includes a series of “i” unknow parameters (si); although their value is unknown, they should be among a specific set of specific values (Si) • Optimization = To look for the best solution which meets all constraints (feasibility) for any parameters value combination • Worst Case Analysis for any eventual decision • (The set of scenarions is, actually,i irrelevant “S”: Set of “s” = uncertain parameters (preferably: continuous and convex) Variation: To look for the best solution which meets all constraints (feasibility) which a probability less than “alfa” to get a result worst than “zmin” (“downside risk”)
Robust programming example Management of a local gas distribution company (http://wiki.mcs.anl.gov/NEOS/index.php/Stochastic_Programming): • Data: Gas demand for the current period (100 units), buying price (1 €/unit) and selling price for the current period (2 €/unit). Storage cost (0.05 €/unit) • Uncertain data: Gas demand for the next period, and buying/selling prices • Uncertainty model: 3 equiprobable scenarios: • Decision: How much gas should be bought “here and now” the the global operators (taking into account that gas can be stored and consumed during the next period) • Solution alternatives: • Solve the problem for each scenario • Solve the problem for the average scenario • Stochastic programming Management of a local gas distribution company (http://wiki.mcs.anl.gov/NEOS/index.php/Stochastic_Programming): • Data: Gas demand for the current period (100 units), buying price (1 €/unit) and selling price for the current period (2 €/unit). Storage cost (0.05 €/unit) • Uncertain data: Gas demand for the next period, and buying/selling prices • Uncertainty model: 3 equiprobable scenarios: • Decision: How much gas should be bought “here and now” the global operators (taking into account that gas can be stored and consumed during the next period) • Solution alternatives • Only one: To determine the optimum gas quantity to be bought in the first period • Objective: maximize retrofit benefit in the worst of the uncertain scenarios ( buy 270 Maximum cost of 1595 in the “very cold” scenario. The expected (average) cost is 1575) • Optimization of the expected cost implies buying 200 units and a expected cost of 1400, but this cost can lead to a cost of 1700 in the very cold scenario
3.- Multiparametric programming(Origin: Sensibility analysis) The model (F.Obj. + Constraints) includes a series of bounded parameters (they can vary among certain limits) Objective To obtain explicit (exact or approximate) analytical expressions for the F.Obj. and other characteristric variables as a function of the uncertain parameters (and, eventualy, the range of applicability of such expressions) • The determination of the applicability ranges is a major problem • Note 1: Multiparametric programming offers “the” exact mathematic solution • Note 2: Is not usefull for decission making (“previous” to uncertainty is revealed) • Very complex mathematical problem (the numerical solution is not valid….) • Multiparametric Linear and Quadratic Programming • Multiparametric Nonlinear Programming • Multiparametric Mixed-Integer Linear Programming • Multiparametric Mixed-Integer Quadratic and Nonlinear Programming • Parametric Global Optimization • Bilevel and Multilevel Programming
Example (AICHE Journal, 53,12, pg. 3183, 2007 // I&EChR, 37, pg 4341, 1998):Li & Ierapetritou Scheduling with uncertain demand
Ejemplo(AICHE Journal, 53,12, pg. 3183, 2007 // I&EChR, 37, pg 4341, 1998):Li & Ierapetritou Scheduling with uncertain demand While DS4 < 50, produce just a batch of S4 and produce as much as possible of S3 (until the end) 90 80 70 60 50 40 30 20 10 While DS3 < 36, produce as much as possible of S4 (65) (36 of S3 is the maximum) If DS3 < 10 this schedule allows to produce the maximum of S4 (74, if DS3 is 0: reducing the batch size of the second S3 batch allows to advance the second batch of s4, and it is possible to produce more S4 (againts S3) If DS3 >36, this sequence allows to produce the maximum of S3, if DS4 is less than DS3
4.- Dynamic Stochastic Programming Transformation of problems under uncertainty in dynamic programming problems Dynamic programming problem characteristics: • The problem can be divided in single decision “steps” • Each step has a number of associate states. • Decision in a certain step transforms one step into another in the next step. • In a certain state, the optimum decision for the next steps does not depend on the previous decision (the system is like an “state function”) • There exist a recursive function to obtain the optimum solution at step j, if step j+1 is already solved. • Final step solution is obvious. Optimality principle (Bellman): • “Any subset of decisions sequence from the optimal decision sequence is an optimum solution of the corresponding subproblem
Dynamic programming example: • Knapsack problem: n=3 C=15 (b1,b2,b3)=(38,40,24) (p1,p2,p3)=(9,6,5) • Strategy: • Take first the maximum benefit per unit of weight. • Obtained solution: (x1,x2,x3)=(0,1,1), 64 • Optimum solution: (x1,x2,x3)=(1,1,0), 78 • (because of the integer nature of the problem)
Dynamic programming: Introduction R. Bellman: Dynamic Programming, Princeton University Press, 1957. • Se emplea típicamente para resolver problemas de optimización. • Permite resolver problemas mediante una secuencia de decisiones. Como el esquema voraz • A diferencia del esquema voraz, se producen varias secuencias de decisiones (d1, d2, …, dn) y solo al final se sabe cuál es la mejor de ellas. • Si hay «o» opciones posibles para cada una de las decisiones, una técnica de fuerza bruta exploraría un total de on secuencias posibles de decisiones (explosión combinatoria). • La programación dinámica evita explorar todas las secuencias posibles por medio de la resolución de subproblemas de tamaño creciente y almacenamiento en una tabla de las soluciones óptimas de esos subproblemas para facilitar la solución de los problemas más grandes.
Dynamic programming methods • Problema: ¿ineficiencia ? • Un problema de tamaño N (número de objetos disponibles) se reduce a dos subproblemas de tamaño (N-1). • Cada uno de los dos subproblemas se reduce a otros dos… Por tanto, se obtiene un algoritmo exponencial. • Sin embargo, el número total de sub-problemas a resolver no es tan grande: Sólo hay NxC problemas diferentes: • Decidir si el objeto n va a la mochila ( N) en un momento determinado • El momento (C =peso ya obtenido por decisiones anteriores) • Por tanto, la solución recursiva está generando y resolviendo el mismo problema muchas veces Para evitar la repetición de cálculos, las soluciones de los subproblemas se pueden almacenan en una tabla. • Problema de la mochila: • n=3 C=15 • (b1,b2,b3)=(38,40,24) • (p1,p2,p3)=(9,6,5)
tiempo espacio número de tiempo prog . dinámica prog . dinámica vértices fuerza bruta 2 n n n n ! n 2 n 2 5 120 800 160 10 3628800 102400 10240 12 1 , 31 10 15 7372800 491520 18 2 , 43 10 20 419430400 20971520 Dynamic Programming example • TSP Problem
Dynamic stochastic programming • The gas company should now cover the demand in 3 different locations, in competence with other local suppliers. • They have bought 300 units of gas previously (at a very good price) • They will get a benefit of 2.00 €/unit BUT • If they do not sell it, they should have to sell it to the competence, so the benefit will be reduced to 0.50 €/unit. • If more gas is required, they can buy it to the competence, without benefit. • The selling probabilities for the next period are estimated as follows: • Objective: Assign gas to cities to obtain the maximum expected benefit
Dynamic stochastic programming • Transformation to dynamic programming: The expected benefit to send 100 units to location A is: 0.60 * ( 50*2.0 + 50*0.5 + 00*0.0) + 0.00 * (100*2.0 + 00*0.5 + 00*0.0) + 0.40 * (100*2.0 + 50*0.0 + 50*0.0) = 155 € • In a similar way: • Now we have a deterministic problem, which can be solved by dynamic programming
217.5 150 150 0 0 0 210 162.5 100 200 200 217.5 50 50 100 0 300 155 162.5 100 170 250 250 217.5 100 100 100 162.5 0 217.5 0 300 300 150 150 Availability to A+B+C 217.5 Availability to B+C Availability to C Decissions to be made (and costs) 150 to B 0 to C 150 to A 50 to C 0 300 100 to C 150 to C 0 to A Availability for A+B+C 150 to B Availability for B+C Availability for C
150 0 200 50 250 100 300 150 Procedure • 1 step per location • 3rd step: to serve “no more” than 0, 50, 100 or 150 units to C • Depending on how much is served to A and B, availability to C will be limited • 2nd step: to serve “no more” than 150, 200, 250 o 300 units to B and C • Depending on how much is served to “A” availability to B and C will be limited • 1st step: to serve 300 units to A, B y C. 150 a B 0 a C 150 a A 50 a C 0 300 100 a C 150 a C 0 a A Availability to A+B+C 150 a B Availability to B+C Availability to C
217.5 150 150 0 0 0 210 162.5 100 200 200 217.5 50 50 100 0 300 155 162.5 100 170 250 250 217.5 100 100 100 162.5 0 217.5 0 300 300 150 150 Unid A+B+C 217.5 Unid B+C Unid C Procedure Firststep: thereisonlyonewaytoserve C, dependingonavailability 150 a B 0 a C 150 a A 50 a C 0 300 100 a C 150 a C 0 a A Disponibilidad para A+B+C 150 a B Disponibilidad restante para B+C Disponibilidad restante para C
217.5+0 = 217.5 150 150 0 0 0 210 162.5+100 = 262.5 200 200 217.5 50 50 100 0 300 155 162.5 100 100+170=270 170 217.5 250 250 100 100 100 162.5 0+217.5=217.5 217.5 0 300 300 150 150 Availability to A+B+C 217.5 Availability to B+C Availability to C Procedure 150 a B Second step: there are different alternatives take the best for each origin 0 a C 150 a A 50 a C 0 300 100 a C 150 a C 0 a A Availability to A+B+C Unid B+C 150 a B Availability to B+C Availability to C
150 150 0 0 100+170=270 210 200 200 50 50 0 300 155 162.5+170=332.5 170 250 250 100 100 100 217.5+170=387.5 0 300 300 150 150 217.5 217.5+217.5=435 Procedure 150 a B Second step: there are different alternatives take the best for each origin 0 a C 150 a A 50 a C 0 300 100 a C 150 a C 0 a A Unid B+C Unid C 150 a B
217.5 150 150 0 0 0 210 162.5 480 100 270 200 200 217.5 50 50 100 0 300 155 162.5 0 100 300 487.5 170 332.5 250 250 217.5 100 100 170 100 487.5 162.5 0 217.5 387.5 217.5 0 300 300 150 150 435 217.5 435 Procedure There are 2 equivalent optima: 50 to A, 150 to B and 100 to C. 487.5 €. 100 to A, 100 to B and 100 to C. 487.5 €. Thirs step: there are different alternatives take the best for each origin Unid B+C
Limitations: what else ? • Uncertainty modeling • Fuzzy sets ? Fuzzy programming ? (principle of “difficulty conservation”?) • Generalization of methodologies (modeling and solution) • Multiple sources of uncertainty • Multiple objectives ( “trade off”) • Computing efficiency (industrial problem) • Uncertainty of uncertainty