a library of gas network instances

Mathematical Optimization and Gas Networks

Natural gas is one of the most important energy resources worldwide. In Europe it accounts for about 25% of the primary energy consumption and is distributed through a pipeline network with a total length of more than 100,000 km. The reliable and efficient operation of these pipeline networks is a permanent challenge for the gas transmission operators.

Indeed, the liberalization of the European and German gas market poses novel and difficult planning problems for gas transmission network operators. They are obliged to offer as much freely allocable capacity as possible. Freely allocable capacities enable gas shippers (usually gas traders or bulk consumers) to feed in or withdraw gas at their entries and exits without having to care where the gas is withdrawn or fed in, respectively.

When offering transmission capacities, the transmission system operator has to ensure free allocability, which means that all gas flow situations that may result from nominating these capacities can be realized by the given gas transmission network. This requirement can hardly be verified with existing simulation-based planning methods. This observation led to the implementation of a research project Technical Capacities of Gas Networks, funded by the Federal Ministry of Economics and Technology. One main goal of this project has been to develop and implement mathematical optimization-based methods for checking realizability of stationary gas flow situations.

GasLib is a collection of technical gas network descriptions as well as contract-based nomination data (gas flow and pressure specifications at entries and exits). This collection is based on real-world network data from the gas transport company Open Grid Europe GmbH. The data are distorted in order to yield a realistic gas network that is significantly different from the original.

The goal of GasLib is to promote research on gas networks by providing a set of large and realistic benchmark instances.


GasLib includes the following data:

  • network description files (.net) containing the topology of the network and the technical data of all network elements except for compressor stations;
  • compressor station description files (.cs) containing the complete and detailed description of all compressor stations that are specified in the corresponding network description file;
  • nomination files (.scn) that describe a concrete and balanced inflow-outflow-situation together with pressure bounds or fixations. Since GasLib is currently oriented towards stationary gas network optimization, these files represent stationary nominations;
  • combined decision files (.cdf) that model the technical relationship of active network devices.

All data are represented via XML, and every XML file type listed above has its own XSD schema, see the documentation for more details.

GasLib uses and provides data for the following different technical elements:

  • pipes to transport the gas through the network;
  • compressor stations to increase the gas pressure;
  • control valve stations to decrease the gas pressure;
  • resistors to model pressure drop for which no other data or models are available;
  • valves to control the flow situation in the network;
  • short pipes used for modeling purposes, e.g., to handle complicated contract situations at single entry points.

The Networks

Currently, GasLib contains the following networks:
Name #nodes #sources #sinks #pipes #compressor stations #control valves #resistors #valves #short pipes
GasLib-4197 4197 11 1009 3537 12 120 28 426 343
GasLib-582 582 31 129 278 5 23 8 26 269
GasLib-134 134 3 45 86 1 1 0 0 45

The data are available here:

Test Data

Additional data for test purposes, with no means of being realistic:

Name #nodes #sources #sinks #pipes #compressor stations #control valves #resistors #valves #short pipes
GasLib-135 135 6 99 141 29 0 0 0 0
GasLib-40 40 3 29 39 6 0 0 0 0
GasLib-39 39 2 5 28 2 4 0 7 0
GasLib-24 24 3 5 19 3 1 1 0 1
GasLib-11 11 3 3 8 2 0 0 1 0

The data are available here:


Mixed-integer nonlinear models; implemented in GAMS. The MINLP model is described in Geißler et al. (2015).

Some of these GAMS MINLP models are also part of the MINLP Library 2.

PyNet (Python Network Visualization Tool)

PyNet is a visualization tool for gas networks using XML data, mapping of different states based on the network topology, and extracting statistics of diverse data fields.

Pynet is used for visualization of the GasLib network datasets.

It is available at https://git.zib.de/energy-public/PyNet


If you use the data from GasLib, please cite the paper (bibtex):

GasLib - A Library of Gas Network Instances,
Martin Schmidt, Denis Aßmann, Robert Burlacu, Jesco Humpola, Imke Joormann, Nikolaos Kanelakis, Thorsten Koch, Djamal Oucherif, Marc E. Pfetsch, Lars Schewe, Robert Schwarz, Mathias Sirvent
Data 2, No. 4, article 40 (2017)

There is also a technical report, which will be updated continuously (bibtex):

GasLib - A Library of Gas Network Instances
Martin Schmidt, Denis Aßmann, Robert Burlacu, Jesco Humpola, Imke Joormann, Nikolaos Kanelakis, Thorsten Koch, Djamal Oucherif, Marc E. Pfetsch, Lars Schewe, Robert Schwarz, Mathias Sirvent
Report at Optimization Online.


April 2, 2024 reference to Python Network Visualization Tool - PyNet added
November 19, 2023 first version of the new GasLib-39 instance
June 29, 2022 introduced filename versioning schema for all instances
generated new visualization of all GasLib instances by visualization tool PyNet
created legend of gas network elements
added source and sink counts of all instances in data tables
corrected hyperlink of publication "GasLib - A Library of Gas Network Instances"
corrected schema location of all instances to resolve xml validation issues
corrected unit attribute of length and height at GasLib-24 and GasLib-134-v2
added new attributes to scenario xsd schema file
updated logos of cooperation partners
October 26, 2018 updated version of GasLib-134 (minor corrections)
December 1, 2017 GasLib journal article published in Data
October 26, 2017 first version of the new GasLib-4197 instance
October 19, 2017 first version of the new GasLib-11 instance
September 3, 2017 first version of the new GasLib-24 instance
August 2, 2017 first version of the new GasLib-134 instance
June 16, 2017 improved coefficients of the energy consumption function for the GasLib-582 instance
March 3, 2016 bug fix in units of node heights for all GasLib networks
November 25, 2015 first version of GAMS MINLP instances for all GasLib networks
GasLib report at Optimization Online
February 25, 2014 version 2 of GasLib-582; more realistic length of pipes
September 5, 2013 added new category 'testData' with two data sets, GasLib-40 and GasLib-135
September 5, 2013added copyright information to data
August 30, 2013changed names for all namespaces in xsd and data.
June 21, 2013first instance: GasLib-582.
June 21, 2013first version online.


The following publications give an overview about the mathematical models and solution techniques that were developed within the projects ForNe and Technical Capacities of Gas Networks.

General Contact

GasLib is one of the outcomes of the research project Technical Capacities of Gas Networks, which involves the following groups:

If you have any questions concerning GasLib, any improvement suggestions or bug reports, please send an E-Mail to Thorsten Koch (ZIB).


This website was created by Imke Joormann, Marc Pfetsch, Robert Schwarz, Bernhard Willert, and Martin Schmidt.

The project Technical Capacities of Gas Networks has been funded by the Federal Ministry of Economics and Technology.

We thank the Federal Ministry of Economics and Technology and Open Grid Europe GmbH for their support.

Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 Unported License.