How openego/ding0 works
DING0 generates synthetic medium- and low-voltage distribution grids from open or publicly available data. The principal workflow is to build network representations and grid topologies, then analyze or export the generated networks; grid reinforcement is an additional capability. The README documents the product purpose, while source-index references and excerpts expose some internal relationships. Several implementation details are unsampled, so uncertain links are omitted or marked unverified.
Main entry points: __init__.py Network orchestration · grids.py Grid objects · mv_routing.py MV grid routing · pypsa_io.py PyPSA export
Components 21
Inputs and configuration
- Configuration
ding0/tools/config.py - OSM load profiles
ding0/config/config_lv_grids_osm.py - Database interfaces
ding0/config/config_db_interfaces.py
Network model
- Grid regions
ding0/core/structure/regions.py - Network orchestration
ding0/core/__init__.py - Grid objects
ding0/core/network/grids.py - Stations and transformers
ding0/core/network/stations.py - Loads
ding0/core/network/loads.py
Grid synthesis
- MV grid routing
ding0/grid/mv_grid/mv_routing.py - Urban MV routing
ding0/grid/mv_grid/urban_mv_routing.py - MV connections
ding0/grid/mv_grid/mv_connect.py - LV grid building
ding0/grid/lv_grid/build_grid.py - OSM-way LV building
ding0/grid/lv_grid/build_grid_on_osm_ways.py
Analysis and output
- Technical constraints
ding0/flexopt/check_tech_constraints.py - Grid reinforcement
ding0/flexopt/reinforce_grid.py - Power flow
ding0/core/powerflow/__init__.py - PyPSA export
ding0/tools/pypsa_io.py - Results
ding0/tools/results.py - Grid evaluation
ding0/validation/statistics.py
Other components
- Grid planner
- Public data
Connections 19
- Grid planner → Network orchestration: generates grids
- Public data → Network orchestration: provides inputs
- Network orchestration → Grid regions: builds regions
ding0/core/__init__.py - Network orchestration → Grid objects: assembles network
ding0/core/__init__.py - Network orchestration → MV grid routing: builds MV grids
- Network orchestration → LV grid building: builds LV grids
- Network orchestration → OSM-way LV building: builds on OSM ways
- MV grid routing → MV connections: connects MV
- Urban MV routing → MV connections: connects urban MV
- OSM load profiles → OSM-way LV building: configures profiles
ding0/grid/lv_grid/build_grid_on_osm_ways.py - Configuration → Network orchestration: supplies settings
- Database interfaces → Network orchestration: supplies database access
ding0/core/__init__.py - Grid objects → Stations and transformers: contains station data
ding0/core/network/grids.py - Grid objects → Loads: contains load data
ding0/core/network/grids.py - Grid objects → Power flow: supports analysis
- Technical constraints → Grid reinforcement: informs reinforcement
ding0/flexopt/reinforce_grid.py - Network orchestration → PyPSA export: exports network
ding0/core/__init__.py - PyPSA export → Results: provides output
- Results → Grid evaluation: supports evaluation