Skip to content

Network

The network parameters are the following:

network:
  name: "case24_ieee_rts" # Name of the power grid network (without extension)
  source: "pglib" # Data source for the grid; options: pglib, file
  network_dir: "scripts/grids" # if using source "file", this is the directory containing the network file (relative to the project root)

Networks can be loaded from two different sources, specified in `source:

e.g.

network:
  source: "pglib"
  name: "case24_ieee_rts"   # Name of the power grid network **without the pglib prefix**

Where downloaded cases are stored

A PGLib case is downloaded the first time it is used and then cached on disk, so later runs need no network access. The cache holds both the file published by PGLib and the PowerModels-corrected copy used for solving.

By default it lives in the platform user cache directory, which is ~/.cache/gridfm-datakit/grids on Linux, ~/Library/Caches/gridfm-datakit/grids on macOS and the local app data directory on Windows. Nothing is written inside the installed package, so gridfm-datakit works from a read-only installation.

Set GRIDFM_DATAKIT_CACHE_DIR to move the cache elsewhere, which is useful for a shared cache on a cluster or a warm cache in CI.

export GRIDFM_DATAKIT_CACHE_DIR=/scratch/gridfm-cache

Local MATPOWER files

e.g.

network:
  source: "file"
  name: "Texas2k_case1_2016summerpeak"  # Name of the power grid network **without .m extension**
  network_dir: "scripts/grids"          # Directory containing the network files

Choosing the reader

reader controls how the file is parsed, independently of source (which controls where it comes from):

  • native (default): the built-in MATPOWER reader.
  • powsybl: parsed by pypowsybl, which additionally supports XIIDM, CGMES, PSS/E (.raw), UCTE (.uct) and MATPOWER binary (.mat). Requires pip install 'gridfm-datakit[powsybl]'. See PowSyBl.

With reader: powsybl and source: file, the optional file key points directly at the network file (extension included) and takes precedence over network_dir + name:

network:
  name: "IEEE14"
  reader: "powsybl"
  source: "file"
  file: "grids/IEEE14.iidm"

reader: powsybl is required for dynamic simulation.

Generator costs are defaulted under reader: powsybl

pypowsybl does not carry generator cost functions in any format it reads, so networks loaded this way get neutral defaults (c2=0, c1=1, c0=0).