Skip to main content

PLEXOS-to-PyPSA Converter

Project description

PLEXOS-to-PyPSA converter

A Python tool for converting PLEXOS input XML files and their associated data to create equivalent PyPSA networks.

Milestones chart

Installation

# Clone the repository
git clone https://github.com/open-energy-transition/plexos-to-pypsa-converter.git
cd plexos-to-pypsa-converter

# Install the package
pip install -e .

System Dependencies

Some models use RAR archives and require the unrar or unar command-line tool to be installed:

macOS:

brew install rar

Note: This is only required for models that use RAR archives (e.g., plexos-world-spatial). If you only work with ZIP-based models, this dependency is not needed.

Converted Features

The converter ports the following PLEXOS components to PyPSA:

Core Network Components

  • Buses/Nodes - Network topology and zonal structure
  • Snapshots - Time index for optimization periods
  • Carriers - Energy types (electricity, gas, hydrogen, etc.)
  • Loads - Demand assignment with flexible strategies

Generation Assets

  • Conventional Generators - Thermal, nuclear, hydro plants
    • Capacity ratings and availability
    • Efficiency curves and heat rates
    • Capital and marginal costs
    • Fuel constraints and emissions
  • Renewable Generators - Solar, wind, other VRE
    • Capacity factors from VRE profiles
    • Technology-specific parameters

Network Infrastructure

  • Transmission Lines - AC lines with flow limits
  • Links - DC connections and cross-sector links
  • Transformers - Voltage level connections

Storage Systems

  • Battery Storage - Electrochemical storage
  • Pumped Hydro Storage - Pumped storage plants
  • Generic Storage - Other storage technologies
    • Charging/discharging efficiencies
    • Energy and power constraints

Multi-Sector Components

  • Gas Network - Gas buses, pipelines, and storage
  • Hydrogen Systems - H2 production, storage, and demand
  • Transport Sector - Electric vehicle integration

System Constraints

  • Generation Constraints - Unit commitment constraints
  • Transmission Constraints - Flow and capacity limits
  • Policy Constraints - Renewable targets, emissions limits

Supported PLEXOS Models

The following table lists PLEXOS XML models that are being converted or will be converted to PyPSA networks:

Model Name Source Status Download
AEMO 2024 ISP - Green Energy Exports AEMO 🔴 Not yet converted Download
AEMO 2024 ISP - Progressive Change AEMO 🟡 In-progress Download
AEMO 2024 ISP - Step Change AEMO 🔴 Not yet converted Download
CAISO IRP 2023 Stochastic (25 MMT) CAISO 🟡 In-progress Download
CAISO 2025 Summer Assessment CAISO 🔴 Not yet converted Download
NREL Extended IEEE 118-bus NREL 🔴 Not yet converted Download
SEM 2024-2032 Validation Model SEM 🟡 In-progress Download
European Power & Gas Model UCC 🟡 In-progress Download
PLEXOS-World 2015 Gold V1.1 UCC 🔴 Not yet converted Download
PLEXOS-World Spatial Resolution UCC 🔴 Not yet converted Download
MESSAGEix-GLOBIOM-EN-NPi2020-500-Soft-Link UCC 🟡 In-progress Download

Status Legend:

  • 🟢 Converted - Model successfully converted to PyPSA network
  • 🟡 In-progress - Conversion currently underway
  • 🔴 Not yet converted - Planned for future conversion

Model × Feature Coverage Matrix

Model Coverage Heatmap

The heatmap above shows the conversion status of different features across all models. Each cell represents the implementation status for a specific model-feature combination.

Input Files & Data Structure

Required Files

PLEXOS XML File

  • Main model structure containing system topology, generators, buses, lines
  • Contains object definitions and property mappings

CSV Data Files

Different data sources provide input CSV files in various formats, so we have built this converter to try and detect as many possible types/formats as possible, but note some customization might be needed.

The converter supports multiple CSV formats for time-series data:

Demand Data

  1. Directory Format (AEMO-style):

    demand/
    ├── Bus_001.csv
    ├── Bus_002.csv
    └── Bus_003.csv
    

    Each file contains time-series demand for one bus.

  2. Single CSV Format (CAISO/SEM-style):

    demand.csv:
    Datetime,1,2,3,Iteration
    2024-01-01 00:00,100,150,200,1
    2024-01-01 01:00,110,160,210,1
    

    Single file with columns for each zone/bus, supports iterations for stochastic modeling.

VRE Profiles

vre_profiles/
├── solar_zone1.csv
├── wind_zone1.csv
└── wind_offshore.csv

Renewable generation capacity factors (0-1) by technology and location.

Timeslice Data

timeslice.csv:
Timeslice,Property,Value
1,Peak_Hour,1
2,Off_Peak,0.8

Maps time-dependent properties for generators and other assets.

Quick Start

Basic XML Conversion

from src.network.electricity_sector import create_model_from_xml

# Convert a PLEXOS model with automatic data discovery
network = create_model_from_xml(
    xml_file_path="path/to/your/model.xml",
    demand_assignment_strategy="per_node"  # or "target_node", "aggregate_node"
)

# Save the PyPSA network
network.export_to_netcdf("output_model.nc")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plexos_to_pypsa_converter-0.0.9.tar.gz (583.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plexos_to_pypsa_converter-0.0.9-py3-none-any.whl (168.1 kB view details)

Uploaded Python 3

File details

Details for the file plexos_to_pypsa_converter-0.0.9.tar.gz.

File metadata

File hashes

Hashes for plexos_to_pypsa_converter-0.0.9.tar.gz
Algorithm Hash digest
SHA256 b1b0ece79d103638c3fc8843b0b925cf783c004c5f2d22a1a5865f53898ce333
MD5 07699ed2eacfe07024f07ff176d27b68
BLAKE2b-256 7e7454fd0c83895f9404bced1b62af8e047cfd5bbef7f146c98ace0fd82f23e8

See more details on using hashes here.

File details

Details for the file plexos_to_pypsa_converter-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for plexos_to_pypsa_converter-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2e370368319be4244b3c610f03c6880b52a11ca1b189ff7740d8d91bf0758b35
MD5 ef35bd866735bcaa24649fdce615c0c6
BLAKE2b-256 a9a5aa71e37f126861d0667ad1662d2f83c35033f1adb780aa19e82e9f910e67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page