a stochastic optimization model for natural gas sale companies m.t. vespucci (*), f. maggioni (*),...
TRANSCRIPT
A stochastic optimization model
for natural gas sale companies
M.T. Vespucci (*), F. Maggioni (*), E. Allevi (#), M. Bertocchi (*), M. Innorta (*)
(#) University of Brescia
(*) University of Bergamo
Structure of presentation
• description of some principles of gas market liberalization
• details of problem to be solved
• deterministic model
• stochastic model
1. unbundling of production and transportation activities both at national and local levels
national level: • shippers: production, import, re-gasification, wholesale commercialisation• national distributor: transport on national network and storage local level: • local distributors: transport on local networks• gas sellers: purchase gas from shippers and sell it to final consumers
2. protection of so called “small final consumers”realized by Regulatory Authority by setting a maximum price they may be required to pay
Basic principles of liberalized gas market
Small final consumersConsumers whose annual consumption does not exceed 8 · 106 MJoule
classes of consumption
annual consumption in MJoule
minimum maximum
1 1 20 000
2 20 001 35 000
3 35 001 100 000
4 100 001 160 000
5 160 001 800 000
6 800 001 8 000 000
7 8 000 001 80 000 000
8 80 000 001 800 000 000
9 800 000 001 8 000 000 000
10 8 000 000 001
domestic customers(cooking, cooking/heating)
commercial activities, crafts and small industries
medium and large industries
classes 1- 6 : high consumption proportion is for heating (depends on weather conditions)
industrial customers: consumption for production (independent on weather conditions)
Gas maximum price set (and periodically revised) by Regulatory Authority
on the basis of following splitting of cost
QE + QVI + QL + QT + QS + TD + QF + QVD
where
Maximum price for classes 1 - 6 set by Regulatory Authority
QE : raw material cost QVI : wholesale commercialization costQL : costs of rigassification of liquid gas
QT : trasportation costQS : storage cost
TD : distribution cost
QF : fixed retail commercialization costQVD : variable retail commercialization cost
shipper costs
national distributor costs
local distributor cost
gas seller costs
Gas seller purchases gas from shipper on the basis of a contract:
one contract for each citygate operated by gas seller for each thermal year (July 1st – June 30th)
In the contract are indicated
• gas volume required by gas seller for next thermal year (Va_citygate)
• gas volume required in particular in winter months (Vw_citygate)
• maximum daily consumption (capacity) requested by gas seller (Cg_citygate)
• purchase price fixed by shipper (P)
In the contract it is also specified how to compute penalties, which are due by gas seller if daily consumption exceeds daily capacity.
Shipper – gas seller interaction
Gas seller problem
Gas seller needs a model for determining optimal decisions about
1. number of final customers to supply in each consumption class
(so called citygate customer portfolio)
2. sell prices to apply to each consumption class
Different customer portfolios determine different citygate consumption patterns.
In a citygate where mainly industrial customers are served
• citygate consumption tends to be constant along the year,
since it is used more for production than for heating
• it is easier for gas seller to determine the citygate daily capacity to require
Shippers prefer a more constant citygate consumption along the year,
a lower purchase price for gas seller is set by shipper
In a citygate where mainly “small” customers are served
(consumption strongly dependent on weather conditions)
• citygate consumption may have big fluctuations in the year
• daily consumption may exceed daily capacity
a higher purchase price for gas seller is set by shipper
penalties are likely to be paid by gas seller
Revenue side:
gas seller can fix “freely” only prices for industrial consumers:
• these prices have to be set so as to maximize gas seller profits
• at the same time the price proposed to the industrial customer
does not have to result in the customer buying gas from another gas seller
Purchase price and citygate consumption profile
How does shipper fix price P paid by gas seller ?
• a mathematical relation is not known
• historical data show that better citygate consumption profiles correspond to lower prices P
Consumption profile indicators:
1. ratio among winter consumption and annual consumption
2. ratio of average daily gas consumption of gas seller and daily capacity Cg_citygate (citygate loading factor)
0.4eVa_citygat
eVw_citygatα_citygate constant consumption
in all months
eCg_citygat
eVa_citygateLF_citygat
365
0.70 _α : bad0.55 α_ :good citygatecitygate
• citygate consumption as constant as possible along the year
more than two thirds of gas consumptionconcentrated in winter months
0.40 : bad0.60 : good citygate_LFcitygate_LF
less than half of daily capacity used on average
• average daily use of “virtual pipeline” as high as possible
Shipper consumption preferences
Linear regression model of purchase price P onto LF_citygate:
P = QT + QS + intercept + slopeP · LF_citygate
Model based on both LF_citygate and _citygate not significant, _citygate and LF_citygate being highly correlated.
Computation of penalties
If daily consumption in month i exceeds daily capacity, penalties are applied by shipper to gas seller.
Percentages ik and unitary penalties ik (Euro/m3) for computing penalties are set in the contract.
Example: citygate Sotto il Monte (thermal year 2003 - ’04)
k 0 1 2
ik i = 5,…,9 10% 15% > 15%
ik i = 5, 6 0 3.54 3.94
ik i = 7, 8, 9 0 3.73 4.13
intervals with different unitary penalties are numbered from 0 to K
Gas seller commercial policies: sell prices
611 jsqvP jj'j
protected customers (classes 1 – 6):
maximum price, qvj , fixed by Regulatory Authority
with possible discount, sj, 0 sj < 1, fixed by gas seller
industrial customers (classes 7 – 10)
Pj” : fixed by gas seller, who relates selling price for class j to
• gas purchase price, P, paid to shipper
• consumption profile of customers of class j
Prices for industrial customers: customer consumption profiles
12
1
9
5
iij
iij
j
rVm_custome
rVm_customeα_customer
gas consumption from November to March
gas consumption of thermal year
On the basis of historical data of average monthly consumption
per customer of class j in month i (Vm_customerij)
2 indicators of consumption profiles of customer j are computed
1) average monthly consumption of customer j
2) average daily consumption of customer j
j
iij
j peak
rVm_customerLF_custome
365
12
1
n° of days in month i
γi
ij
ij days
rVm_customemaxpeak
||||||
|||||
> 1 coefficient set byRegulatory Authority
month 1 2 3 4 5 6 7
1 July 8.34 10.35 19.26 38.29 175.49 1 064.43 117 250.75
2 Aug. 8.37 10.57 19.75 39.07 75.18 435.14 40 801.00
3 Sept. 10.24 24.44 50.19 87.79 311.58 2 174.89 156 927.50
4 Oct. 14.19 53.65 114.34 216.33 593.79 2 037.68 154 460.25
5 Nov. 26.51 96.79 209.04 373.70 1 010.40 4 643.43 134 459.25
6 Dec. 34.56 127.01 275.41 528.49 1 302.36 5 674.78 135 771.75
7 Jan. 24.83 147.72 287.28 602.93 1 469.27 6 696.33 153 813.00
8 Feb. 23.50 112.58 265.67 518.42 1 259.50 5 523.37 172 910.60
9 Mar. 19.03 89.46 192.96 375.39 813.40 4 393.51 166 755.40
10 Apr. 24.50 42.54 81.70 214.90 718.95 3 129.60 138 427.75
11 May 10.76 28.29 58.66 108.15 248.84 1 351.53 140 747.00
12 June 9.01 15.32 30.17 37.13 223.48 988.28 138 472.75
Example: citygate Sotto il Monte - thermal year 2003-’04
Vm_customerij : average monthly consumption per customer of class j in month i
Example: ratio and loading factor per consumer class in citygate Sotto il Monte (thermal year 2003-04)
consumption class 1 2 3 4 5 6 7
_customerj 0.601 0.759 0.767 0.764 0.714 0.707 0.463
LF_customerj 0.404 0.340 0.356 0.340 0.365 0.372 0.628
First 6 consumption classes:• their consumption behaviours have a negative impact on citygate
consumption profile• therefore gas seller would tend to apply high price to counterbalance
the high purchase price due to bad citygate profile • but regulations protect these customers by setting a price cap
irVm_customej
ij in demand citygate 10
1
monthnceVm_citygat ji
Citygate gas demand depends on gas demand of each consumption classweigthed by the number of customers in each class (ncj)
j
j
j
j
recharge
_customercoeff
rLF_customecoeff
PP
α2
11
"
_citygate
eLF_citygat
α
Last 4 consumption classes:
• their consumption behaviours have a positive impact on citygate consumption profile
• gas seller should determine a sell price Pj” that attracts these customers,
in order to pay a lesser purchase price P to shipper
and therefore increase profits, in particular from first 6 classes
positive term subtracted if LF_customerj > LF_citygate (better than)
e.g.: coeff1 = 2.126, coeff2 = 2.554, rechargej = 1.1
positive term subtracted if _customerj < _citygate
(better than)
Data of deterministic model
• Vm_customerij : average monthly consumption per customer of class j
in month i of previous thermal year (historical data)
• : maximum number of customers available belonging to class j
• QT, QS, , qvj for 1 j 6 : set by Regulatory Authority
• intercept, slopeP : determined by regression on historical data
• sj for 1 j 6, rechargej for 7 j 10, coeff1 and coeff2 : set by gas seller
• ik and ik (widths of intervals from 0 to K–1 for computing penalties)
jnc
Assumption:average monthly consumption of each class may be estimated by previous year consumption
Therefore, following estimates are used for next thermal year:
• annual consumption of customer of class j
Consumption estimates
12
1iijj customer_Vmcustomer_Va
• peak consumption of customer of class j (for penalty computation)
γi
ijij days
customer_Vmpeak
The deterministic optimization model
Find values of
• number of customers per class
ncj , 1 j 10 (integer)
• contract parameters
Vm_citygatei , 1 i 12
Va_citygate, Vw_citygate and Cg_citygate
• variables related to penalties computation
surplusik , 5 i 9 and 0 k 2
that maximize gas seller profits
9
5 0
10
7
6
1
π
365
α2365
11
365
1
i
K
kik
jj
jj
j
jjjj
slopePerceptintQSQT
customer_Vaeargrech
_customercoeffrLF_custome
coeff
slopePerceptintQSQT
customer_Vasqvprofit
ik
j
j
surplus
eVa_citygateCg_citygat
eVa_citygat
nc
eVa_citygat
eVw_citygateCg_citygat
eVa_citygat
eCg_citygat
eVa_citygat
nc
Objective function: gas seller profits
revenues from classes 1 – 6
reve
nues
fro
m c
lass
es 7
– 1
0
penalties
costs
9
5
12
1
10
1
i
i
jijrVm_custome
i
i
ji
eVm_citygateVw_citygat
eVm_citygateVa_citygat
nceVm_citygat
(citygate annual demand)
(citygate winter demand)
(citygate demand in month i)
subject to
• constraints defining monthly, winter and annual citygate consumption
• constraints for computing penalties
• lower and upper bounds on number of customers per class, restricted to be integer
1 0and95ω
952
0
10
1
Kki
ipeak
ik
kjij
eCg_citygatsurplus
surpluseCg_citygatnc
ik
ikj
0
allfor integers and0
iki
j
surpluse,Cg_citygat e,Vw_citygat e,Va_citygateVm_citygat
nc
,
jnc j
The gas seller citygate model is a
nonlinear mixed integer model with linear constraints
nonlinearities, coming from definitions of LF_citygate and _citygate,
appear only in the objective function.
Simulation framework: based on
ACCESS 97, for database management
MATLAB, release 12, for data visualization
GAMS, release 21.5, for optimisation
Optimization solver: DICOPT (in GAMS framework) solves a sequence
of NLP subproblems, by CONOPT2,
and MIP subproblems, by CPLEX
citygate Sotto il Monte
recharge7 = 0 €cent/m3
recharge7 = 1.1 €cent/m3
nc7 not accepted accepted
profit 103 717 110 303 €
P 20.277 19.920 €cent/m3
24.727 24.727 €cent/m3
18.448 19.799 €cent/m3
Va_citygate 2.33 · 106 3.77 · 106 m3
Vw_citygate 1.76 · 106 2.42 · 106 m3
Cg_citygate 20 588 25 664 m3
_citygate 0.755 0.642
LF_citygate 0.310 0.402
1. analyse the impact on overall citygate management of industrial consumer
(_customer7 = 0.463 and LF_customer7 = 0.628)
Model validation
recharge7 = 1.1
class ncj
marginal
profit
1 278 8.16
2 256 22.97
3 618 74.29
4 139 72.91
5 49 646.96
6 2 1 679.60
7 1 11075.00
marginal profits give indications about
possible further reduction of price
for first 6 classes through parameter sj
61 j,P'j
"P7
2. investigate commercial policies towards customers of consumption class 6
(whose annual consumption is 73% of total annual consumption of first 6 classes)
Model validation
citygate Sotto il Monte
recharge7 = 1.1 s6 = 18.5 %
recharge7 = 1.1 s6 = 18.7 %
nc6 accepted not accepted
nc7 accepted not accepted
profit 106 984 100 366 €
P 19.920 20.282 €cent/m3
20.153 20.103 €cent/m3
19.799 19.550 €cent/m3
Va_citygate 3.77 · 106 2.26 · 106 m3
Vw_citygate 2.42 · 106 1.71 · 106 m3
Cg_citygate 25 664 20 037 m3
_citygate 0.642 0.758
LF_citygate 0.402 0.309
"P7
"P6
Dependence on temperature of consumption of classes 1 – 6
Gas consumption of first 6 classes strongly depends
on temperature variations along months
Investigate impact of weather conditions on optimal gas seller decisions
• build scenarios of future temperatures
• stochastic version of the model
• numerical experiments
Building scenarios of future temperatures
Data:
minimum and maximum daily temperature (degree Celsius) measured in Bergamo from 1.1.1994 to 30.11.2005
and maxt
mint TT
2 : day of raturemean tempe Compute
maxt
mint
t
TTTt
Observing historical data:temperature is a mean reverting process, reverting to some cyclical function
t
Tt
Histogram of daily temperature differences
temperature differences
between 2 subsequent days
approximate a normal distribution
temperature process to be modeled as a Brownian Motion
ttt
tttt dWdtdt
dTadT σ
at : speed of mean reversion
Tt : process to be modelled
mean value, which the process reverts to
:t t : processvolatility
dWt : Wienerprocess
Deterministic model of temperature
365
2πtsinCBtAt
it models cyclic
behaviourin the year
(phase angle): max and min temperaturesdo not necessarily occurat January 1st and July 1st
global warming trendassumed to be linear
365
2π
365
2π
4321
tcossinC
tsincosCtBA
aaaat
By using addition formulas for sin function,
a linear model in unknown parameters a1, a2, a3 and a4 is obtained
Values of a1, a2, a3 and a4 that
correspond to following parameter values in model of temperature
t
tt Ta,a,a,amin 24321
A = 13.33
B = 6.8891 · 10-5
C = 10.366
= – 1.7302
Estimation of volatility t
We only need a value of volatility for each month
t is taken as a piece-wise function, constant during each month
1
month of days allfor 1
σ1
1
21
2
iii
daysinit
initkkk
it
daysinittinit
itTTdays
ii
i
initi : number of the day in the year at which month i begins
mean of squared differencesbetween temperature values of two subsequent days
month Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec
1.65 1.54 1.75 1.85 1.81 1.99 1.76 1.63 1.48 1.38 1.51 1.49tσ
Estimation of speed of reversion at
Efficient estimator of at is
1: month of days allfor
σ
σlogˆ
1
1121
11
1
21
11
iii
daysinit
initkkk
k
kk
daysinit
initkkk
k
kk
t
daysinittinit it
TT
TT
aii
i
ii
i
(Bibby and Sorensen, 1995)
ttttttttt ˆTaaT εσ1 11111
Process simulation
ttt
tttt dWdtdt
dTadT σ
From the differential equation
we obtain the approximation scheme
t, 1 t 365, independent standard normally distributedrandom variables by which nscen temperature scenarios
for 365 days ahead are built
st
T st
scenario of day in
Celsius) degree(in etemperatur
Scenarios are then expressed in Heating Degree Days
Tts max {18° – Tt
s , 0}
si
i
daysinit
initk
st
Tmdays
Tii
i
1
si
nscen
s
si
Tmnscen
Tm
1 expected value of random variable Tmi
s
over scenarios
mean temperature in month i,as available consumption data refer to months
si
si
si TmTmD deviation of mean temperature in month i
from mean value over scenarios
Representation of scenarios
Representation of scenarios: for each month i
• interval between is divided into nint sub-intervals
with middle point Dir being the representative point of sub-interval
(r : sub-interval index, 1 r nint)
• to temperature difference Dir we associate
– monthly gas consumption
– probability PRir based on frequency
(n° of scenarios of month i belonging to sub-interval r)
si
s
si
sDmaxDmin and
slopeSij : consumption variation for unitary temperature variationin month i for class j
Monthly consumption, dependent on temperature, of first 6 classes
siijij
sij DslopeScustomer_Vmcustomer_Vm
irijijijr DslopeScustomer_Vmcustomer_VmR
randomvariable
9
5 0
10
7
6
1
π
365
α2365
11
365
1
i
K
kik
jj
jj
j
j
sjj
slopePerceptintQSQT
customer_Vaeargrech
_customercoeffrLF_custome
coeff
slopePerceptintQSQT
rVa_customesqvprofitj
s
ss
j
s
s
s
s
j
iksurplus
eVa_citygateCg_citygat
eVa_citygat
nc
eVa_citygat
eVw_citygateCg_citygat
eVa_citygat
eCg_citygat
eVa_citygat
nc revenues from classes 1 – 6
reve
nues
fro
m c
lass
es 7
– 1
0
penalties
costs
Objective function of stochastic modelExpected value of profits, given by
By computing the expected value of profits we obtain that
• terms representing expected values of revenues from classes 1 – 6 and 7 – 10: coincide with corresponding terms of deterministic model
• terms representing expected values of costs and of penalties: computed under the hypothesis that random variables Di
s and Djs , i j , are independent
Expected value of profits
9
5 0 1
12
1 1
12
1 1
2
π
2
365
12
21
2211
i
2
k
intn
ririk
iii,i
intn
rriri
i
intn
rir
PR
PRPRPR
slopePerceptintQSQT
ikr
ririir
surplusR
teVmR_citygateVmR_citygateVmR_cityga
eCg_citygateVa_citygat
jjir ncncteVmR_cityga
10
7
6
1
j
ijj
irijij customer_VmDslopeScustomer_Vmwhere
C
P
Model validation
• sensitivity of solution to generation of different numbers of scenarios
(a) 1000 scenarios
(b) 10000 scenarios
• given a number of scenarios, how solution changes as representations
of a given number of scenarios become more and more refined
i.e. number of sub-intervals increases: nint = 5, 10, 15, ……
Note:
both in (a) and in (b),
as scenario representation becomes more and more refined (nint increases),
optimal profit converges to a value between 151 700 and 151 710,
Such value is lower than the value (154 265) obtained in the deterministic case,
as expected, because cold scenarios have been taken into account
Solution of stochastic model: 1000 scenarios
5
Solution of stochastic model: 10000 scenarios
5
optimal values of deterministic model
profit 154 265 €
P 19.67 €cent/m3
Va_citygate 4 484 406 m3
Cg_citygate 26 399 m3
LF_citygate 0.4654
Computed solutions
Case study: citygate Sotto il Monte (thermal year 2004-05)
optimal values of stochastic model
profit 151 713 €
P 19.67 €cent/m3
Va_citygate 4 484 725 m3
Cg_citygate 26 319 m3
LF_citygate 0.4669
• in the deterministic solution no penalties are paid
• solution of stochastic model: by requiring in the contract 4 484 725 m3 gas
(expected value of annual volume), gas seller has an expected value of profit
lower than in the deterministic case, since the expected value of penalties is
positive. This solution, though, allows gas seller to have the same purchase price
of the deterministic case and therefore the same selling price for the industrial
customer.
Future work
1. As number of scenarios and number of sub-intervals increase,
complexity of the problem also increases (numerical difficulties)
devise a new algorithm that decouples computation of Cg_citygate
from all other decision variables, so that reduced problem is linear
2. Scenarios not represented on a monthly basis, but treated as vectors of 12
realizations scenario reduction techniques
3. There exists a relation between purchase price P and international price indeces,
since gas seller must choose the index of reference among a certain number of
admitted choises (e. g. oil price index, etc.)
Study the influence on P of future variations of these indices to help gas seller
in taking his decision.