Skip to main content

A Rolling Optimisation Model of the UK Natural Gas Market


Daily gas demand in the UK is variable. This is partly due to weather patterns and the changing nature of electricity markets, where intermittent wind energy levels lead to variations in the demand for gas needed to produce electricity. This uncertainty makes it difficult for traders in the market to analyse the market. As a result, there is an increasing need for models of the UK natural gas market that include stochastic demand. In this paper, a Rolling Optimisation Model (ROM) of the UK natural gas market is introduced. It takes as an input stochastically generated scenarios of demand. The outputs of ROM are the flows of gas, i.e., how the different sources of supply meet demand, as well as how gas flows in to and out of gas storage facilities. The outputs also include the daily System Average Price of gas in the UK. The model was found to fit reasonably well to historic data (from the UK National Grid) for the years starting on the 1st of April for both 2010 and 2011. These results allow ROM to be used to predict future flows and prices of gas and to investigate various stress-test scenarios in the UK natural gas market.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22


  1. Ofgem (Office of the Gas and Electricity Markets) regulates the gas and electricity markets in the UK. See:,

  2. The UK National Grid is the owner and operator of national transmission system throughout Great Britain.

  3. See:,

  4. When simulating stochastic demand for the first day of this process, the error from the previous day is assumed to be zero.

  5. See:,

  6. While none of the c p change with the level of production, it should be noted that in Sections 3.2, 3.3 and 4 the different sources of supply in the UK are broken up into multiple tranches, each with a different cost of production. This implicitly allows the cost of each source of supply to change as the level of production changes.

  7. The outputs of ROM include all Lagrange multipliers. However, only those associated with demand constraints are analysed in any detail.

  8. For the first roll of the model, the initial amount of gas in storage is a parameter typically determined using actual storage data.

  9. The Holford MRS facility only became operational in 2012.

  10. See:,

  11. See:,

  12. sSee:,

  13. See:,

  14. The parameters in Table 6 were not obtained from simulated annealing as they were obtained from either the UK National Grid or the UK’s Department of Energy and Climate Change.

  15. The values for UKCS exclude gas that is injected to storage.

  16. The Mean Absolute Percentage Error for source l is \(MAPE^{l}= \sum\limits ^{R}_{r=1}\frac {|Actual^{l}_{r} -Simulated^{l}_{r}|}{\frac {1}{R}\sum\limits ^{R}_{r=1}\sum\limits ^{L}_{l=1} Actual^{l}_{r}. }\).

  17. The MAPE associated with Figs. 68 is \(MAPE=\sum\limits ^{R}_{r=1}\frac {|Actual_{r} -Simulated_{r}|}{\frac {1}{R}\sum\limits ^{R}_{r=1} Actual_{r}. }\)

  18. The MAPEs in Table 13 were calculated in the same way as Table 9.

  19. The MAPE used in Figures 1113 is the same as the one used in Figures 68.

  20. Also see:


Download references


This work is funded by Science Foundation Ireland under programmes MACSI 06/MI/005 and 09/SRC/E1780. The authors would also like to thank Bord Gáis Energy for their contributions, in particular Gavin Hurley.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Mel T. Devine.

Appendix A: Analysis of Karush-Kuhn-Tucker conditions

Appendix A: Analysis of Karush-Kuhn-Tucker conditions

In this section, a small algebraic example illustrates the fact that changing the production costs of ROM, without altering the merit order, does not affect the volumes but does change the marginal supply cost. Consider the following problem:

$$ \min \>\>c_{1}Q_{1}+c_{2}Q_{2}, $$

subject to:

$$\begin{array}{@{}rcl@{}} Q_{1} &\leq& Q^{max}_{1}, \>\>\>\> (\lambda_{1}) , \end{array} $$
$$\begin{array}{@{}rcl@{}} Q_{2} &\leq& Q^{max}_{2}, \>\>\>\> (\lambda_{2}), \end{array} $$
$$\begin{array}{@{}rcl@{}} Q_{1}+Q_{2} &=& Demand, \>\>\>\> (\lambda_{D}), \end{array} $$

where \(Q_{1,2}\) represent production levels, \(c_{1,2}\) represent the costs associated with them and represent \(Q^{max}_{1,2}\) represent maximum production levels. The variables in the parentheses, alongside constraints (19)–(21), represent the Lagrange multipliers associated with that constraint. The Karush-Kuhn-Tucker conditions for optimality (Bazaraa et al. 1993) associated with this problem are:

$$\begin{array}{@{}rcl@{}} c_{1}+\lambda_{1}+\lambda_{D} &=& 0, \end{array} $$
$$\begin{array}{@{}rcl@{}} c_{2}+\lambda_{2}+\lambda_{D} &=& 0, \end{array} $$
$$\begin{array}{@{}rcl@{}} \lambda_{1}(Q_{1}-Q^{max}_{1}) &=&0, \end{array} $$
$$\begin{array}{@{}rcl@{}} \lambda_{2}(Q_{2}-Q^{max}_{2}) &=&0, \end{array} $$
$$\begin{array}{@{}rcl@{}} \lambda_{1} &\geq& 0, \end{array} $$
$$\begin{array}{@{}rcl@{}} \lambda_{1} &\geq& 0, \\ \lambda_{2} &\geq& 0, \end{array} $$

as well as constraints (19)–(21). These conditions show that the optimal production levels depend on the production capacities and the demand whereas the price associated with meeting demand (\(\lambda _{D}\)) depends on costs.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Devine, M.T., Gleeson, J.P., Kinsella, J. et al. A Rolling Optimisation Model of the UK Natural Gas Market. Netw Spat Econ 14, 209–244 (2014).

Download citation

  • Published:

  • Issue Date:

  • DOI:


  • Rolling optimisation
  • UK natural gas market
  • Stochastic demand scenarios