0% found this document useful (0 votes)
96 views7 pages

Zima 2009-02-09 Stochastic Programming Gas Example

Stochastic Programming is an optimization approach taking into account uncertainties in the system model. A simple example of an optimization of a covering gas demand is provided together with pointing out some fundamental properties of stochastic.
Copyright
© Attribution Non-Commercial (BY-NC)
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)
96 views7 pages

Zima 2009-02-09 Stochastic Programming Gas Example

Stochastic Programming is an optimization approach taking into account uncertainties in the system model. A simple example of an optimization of a covering gas demand is provided together with pointing out some fundamental properties of stochastic.
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 7

Tutorial Application of Stochastic Programming: Optimization of Covering Gas Demand

Marek Zima
ETH Zurich, EEH - Power Systems Laboratory Physikstrasse 3, 8092 Zurich, Switzerland http://www.eeh.ee.ethz.ch/psl/ [email protected]

10th February 2009

Stochastic programming is an optimization approach taking into account uncertainties in the system model. There are numerous possible applications of stochastic programming. The purpose of this short report is to introduce stochastic programming in simple, tutorial-like, terms. A simple example of an optimization of a covering gas demand is provided together with pointing out some fundamental properties of stochastic programming in an intuitive way.

Stochastic Programming

An easily available comprehensive material covering the subject of stochastic programming (frequently referred to also as stochastic optimization) with strong mathematical foundations is e.g. [1]. The purpose of this document is to introduce stochastic programming in simple terms, thus we rather adopt the approach of linking stochastic programming to dynamic programming [2] and structuring the stochastic programming problem in a straightforward way [3] for an easy implementation by commonly available linear programming solvers. The term dynamic programming refers to the optimization approach seeking an optimal sequence of control inputs for a system evolving in time over several stages, in which control inputs can be chosen knowing the system model and its response to control inputs. Stochastic programming is in principle a dynamic programming, which however considers a stochastic nature of the addressed system. This stochastic nature is represented by events, which may occur during the system evolution and whose occurrence can not be inuenced. However, their impact can be modeled by stochastic variables. The task of the stochastic programming is to compute a solution of the dynamic optimization

problem, taking into account possible stochastic disturbances. In a strictly mathematical sense this would mean expressing variables subjected to stochastic disturbances in form of a continuous distribution function depending on the stochastic variable. However, to make this problem solvable, this continuous distribution function is replaced by a discrete distribution function. Then assuming that a system evolves over a set of stages, between which a stochastic event occurs, a corrective control action (so called a recourse action) can be taken in the next stage. This is generally referred to as a multi-stage stochastic programming, which can be mathematically expressed as follows [3]: min c1 x1 +
t(2,...,T ) At

pA qt,A xt,A

A1 x1 = b1 At,A xt,A = bt,A t {2, ..., T }, A t Tt,B xt1,A + Wt,B xt,B = ht,B t {2, ..., T }, A t1 , B U (A) x1 0 xt,A 0 t {2, ..., T }, A t Where t is a set of all nodes within the stage t. A subtree of a node A t , describing a transition from the stage t for the node A to its children (adopting a terminilogy referring to the tree structure) at the stage t + 1, can be denoted as: U (A) = {B t+1 | B A}. The transition to each child occurs with an unconditional probability pA , in other words, a system may evolve only into one next node, no several nodes simultaneously. c1 and qt,A are weighting coecients and xt,A are control vectors, which are sought for the respective stages t. Matrices At,A , Tt,B and Wt,B and vectors bt,A and ht,B establish equality constraints valid for a corresponding stage t or linking two subsequent stages t and t + 1.

Gas Example - Problem Formulation

The example presented in this document is strongly inspired by the example [4], which has been expanded to three stages, parameters (i.e. nancial gures) have been modied and three control variables have been reduced to two control variables by lumping together purchase of gas for a direct use and purchase of gas for storage. The resulting problem can be described as follows. Please note, that all variables and parameters are presented without any particular unit (e.g. such as volume, or price), purely numerically. There is a gas distribution company supplying end-consumers with gas. Naturally, the consumption of end-consumers is dependent on the weather. If there is a cold winter, consumption of gas, whose portion is used for the space heating, is naturally higher than during a mild winter. A higher demand caused by harsher weather conditions drives 2

Weather normal cold very cold

Demand 100 150 180

Gas price 4 6 8

Storage price 0.5 0.5 0.5

Table 1: Input parameters.

2.5

Scenarios []

1.5

0.5

0.5

1.5 Time [years]

2.5

Figure 1: The scenario tree. Each branch corresponds to a transition from one year to another year with the probability of 1/3. prices high. The relationship between weather and gas demand and a price of one gas unit for this example is summarized in the table 1. The task is to supply the gas demand for the coming three years. Initially it is known that the rst year is going to be a normal weather. The forecast for the second and the third year is completely uncertain. The weather options for the second and the third year are normal, cold, or very cold weather, which can be expressed by means of the scenario tree shown in the gure 1. Control decisions can be made always only in the beginning of the year. Gas can be purchased and then either directly used to supply he gas demand, or it can be stored and used the next year(s). Of course, the storage of gas is charged. If the weather forecast already before the rst year would be perfect for the entire period of thee years, a deterministic optimization program could be formulated, which would take into account known demand, known price for purchase and storage. Such program would determine an optimal strategy combining gas purchase and storage for all three years. Such type of strategy can be referred to as an ideal strategy. 3

Strategy Ideal

Normal-normal-normal 1200

Normal-cold-cold 1825

Normal-very cold-very cold 2110

Table 2: Ideal strategy if the future evolution would be perfectly known in advance. To demonstrate properties of stochastic programming, lets assume, there are three possible strategies to cover the gas demand. First, a conservative strategy can be applied, preparing for the worst case scenario, in other words for the sequence of years featuring weather: normal, very cold, very cold. A liberal strategy would be very opened to taking a risk by purchasing gas always only at the beginning of each year and using it for a direct supply of the gas demand. This way any storage fees can be avoided. The third strategy is based on stochastic optimization, giving all weather evolutions the same probability 1/3 and considering all possible scenarios.

Gas Example - Results and Discussion

The number of scenarios, which may occur, can be determined by a simple consideration. There are three options for two stages where the weather is uncertain, thus: 32 = 9. To compare results for the dierent strategies, we choose three representative scenarios of weather evolutions, explicitly the sequences of years: 1. Normal - normal - normal 2. Normal - cold - cold 3. Normal - very cold - very cold The reference for other strategies set by the ideal strategy is shown in the table 2, which lists optimal costs for covering gas demand for every respective scenario. The application of the conservative strategy naturally leads to the purchase of the gas in the rst year for the entire period, storing it and later withdrawing from the storage, as shown in gure 2. Thus the cost of this strategy is the same regardless of the scenario. If the weather is milder, there is a gas, which remains in the storage even after the third year. The purchase and storage of this unused gas represents nancial losses. The milder the weather and thus more diering from the worst case scenario, the more suboptimal the conservative strategy gets. The liberal, risk taking strategy directly follows the demand pattern, as depicted in the gure 3. Intuitively, if demand and thus prices rise, so does the suboptimality of this strategy. The results for the stochastic programming approach is shown in the gure 4. The comparison of all three strategies is presented in the tables 3 and 4. The stochastic programming delivers a suboptimal solution for every scenario. On the other hand, 4

Demand []

400 200 0

0.5

1.5 Time [years]

2.5

Purchase []

400 200 0

0.5

1.5 Time [years]

2.5

Storage []

400 200 0

0.5

1.5 Time [years]

2.5

Figure 2: Three selected scenarios addressed by the conservative strategy. Blue curves refer to the sequence normal-normal-normal weather, green curves to the sequence normalcold-cold weather and red curves to the sequence normal-very cold-very cold weather.

Demand []

400 200 0

0.5

1.5 Time [years]

2.5

Purchase []

400 200 0

0.5

1.5 Time [years]

2.5

Storage []

400 200 0

0.5

1.5 Time [years]

2.5

Figure 3: Three selected scenarios addressed by the liberal strategy. Blue curves refer to the sequence normal-normal-normal weather, green curves to the sequence normalcold-cold weather and red curves to the sequence normal-very cold-very cold weather.

Demand []

400 200 0

0.5

1.5 Time [years]

2.5

Purchase []

400 200 0

0.5

1.5 Time [years]

2.5

Storage []

400 200 0

0.5

1.5 Time [years]

2.5

Figure 4: Three selected scenarios addressed by the stochastic optimization strategy. Blue curves refer to the sequence normal-normal-normal weather, green curves to the sequence normal-cold-cold weather and red curves to the sequence normal-very cold-very cold weather.

Strategy Conservative Liberal Stochastic opt.

Normal-normal-normal 2110 1200 1790

Normal-cold-cold 2110 2200 2065

Normal-very cold-very cold 2110 3280 2375

Table 3: Cost of covering gas demand if dierent strategies are applied and the conditions develop according to three scenarios of weather sequence.

Strategy Conservative Liberal Stochastic opt.

Normal-normal-normal 910 0 590

Normal-cold-cold 285 375 240

Normal-very cold-very cold 0 1170 550

Table 4: Dierence from ideal strategy in cost of covering gas demand if dierent strategies are applied and the conditions develop according to three scenarios of weather sequence.

the solutions of the stochastic programming are robust, in other words, they bring less risk of larger deviations from the ideal strategy results. In other words, if stochastic programming is applied, potential losses are minimized if the actual conditions evolution (here weather) dier from the conditions mostly expected in the planning stage.

References
[1] Peter Kall and Stein W. Wallace. Stochastic Programming. John Wiley & Sons, 1994. [2] E. Messina and G. Mitra. Modelling and analysis of multistage stochastic programming problems: A software environment. European Journal of Operational Research, 101, 1997. [3] Robert Fourer and Leo Lopes. A management system for decompositions in stochastic programming. Annals of Operations Research, 2009. to appear. [4] Optimization Technology Center. Stochastic programming. Available online: http://www-fp.mcs.anl.gov/otc/Guide/OptWeb/continuous/constrained/stochastic/.

You might also like