Skip to content

NREL/r2x-core

Repository files navigation

r2x-core

Extensible framework for power system model translation

image image image CI codecov Ruff Documentation Docstring Coverage

R2X Core is a model-agnostic framework for building power system model translators. It provides the core infrastructure, data models, plugin architecture, and APIs that enable translation between different power system modeling platforms like ReEDS, PLEXOS, SWITCH, Sienna, and more.

Features

  • Plugin-based architecture with automatic discovery and registration
  • Support for multiple file formats: CSV, HDF5, Parquet, JSON, and XML
  • Standardized power system component models via infrasys
  • Abstract base classes (BaseParser, BaseExporter) for implementing model translators
  • Type-safe configuration management with Pydantic models
  • Built-in data transformations, filters, and validations
  • Flexible data store with automatic format detection
  • System modifiers for applying transformations to power system models

Quick Start

pip install r2x-core
from r2x_core import PluginManager, BaseParser

# Register your model plugin
PluginManager.register_model_plugin(
    name="my_model",
    config=MyModelConfig,
    parser=MyModelParser,
    exporter=MyModelExporter,
)

# Use it
manager = PluginManager()
parser = manager.load_parser("my_model")
system = parser(config, data_store).build_system()

👉 See the full tutorial for a complete example.

Documentation

Roadmap

If you're curious about what we're working on, check out the roadmap:

  • Active issues: Issues that we are actively working on.
  • Prioritized backlog: Issues we'll be working on next.
  • Nice-to-have: Nice to have features or Issues to fix. Anyone can start working on (please let us know before you do).
  • Ideas: Future work or ideas for R2X Core.

About

R2X framework core package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

Languages