Skip to main content

r2x-plexos

R2X plug-in for translating to and from PLEXOS XML databases.

PyPI License Python CI codecov Ruff Documentation Docstring Coverage

R2X PLEXOS plugin for parsing and exporting PLEXOS power system models.

Quick Start

Installation

uv add r2x-plexos

Parsing PLEXOS XML

from pathlib import Path
from r2x_core import (
    DataFile,
    DataStore,
    PluginContext,
    Rule,
    System,
    apply_rules_to_context,
)
from r2x_plexos import PLEXOSParser, PLEXOSConfig

xml_path = /path/to/xml
db = PlexosDB.from_xml(xml_path)
model_names = db.list_objects_by_class(ClassEnum.Model)
model_name = model_names[1] if model_names else "Base"

plexos_config = PLEXOSConfig(
    model_name=model_name,
    horizon_year=2012,
    models=("r2x_plexos.models", "r2x_sienna.models"),)
data_file = DataFile(name="xml_file", fpath=xml_path)
store = DataStore(path=folder_path)
store.add_data([data_file])

context = PluginContext(
    config=plexos_config,
    store=store
)
parser = PLEXOSParser.from_context(context)
plexos_sys_result = parser.run()
plexos_sys = plexos_sys_result.system
context.source_system = plexos_sys

Documentation Sections

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.

Download files

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

Source Distribution

r2x_plexos-0.3.2.tar.gz (114.2 kB view details)

Uploaded Source

Built Distribution

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

r2x_plexos-0.3.2-py3-none-any.whl (131.9 kB view details)

Uploaded Python 3

File details

Details for the file r2x_plexos-0.3.2.tar.gz.

File metadata

  • Download URL: r2x_plexos-0.3.2.tar.gz
  • Upload date:
  • Size: 114.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for r2x_plexos-0.3.2.tar.gz
Algorithm Hash digest
SHA256 ef45797f44703d275932d8fef19a59a62cdac8638608cbf4476805f3c1ddd611
MD5 d9c37e44ef47e652f119622e011a9200
BLAKE2b-256 9270c429322f126a4242b11a8132c51fc2df558b9873bf979dce1f58ab91edeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for r2x_plexos-0.3.2.tar.gz:

Publisher: release.yaml on NatLabRockies/r2x-plexos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file r2x_plexos-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: r2x_plexos-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 131.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for r2x_plexos-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bca269bb78f33ef19cf23274d1d446b205eb5be07926e869d11e8e3c000a7c2d
MD5 2cff2c71d262a7fb2ef55f44f1d19bd3
BLAKE2b-256 961e76f7c9eb2f43a0d1f226c078a1bf1c16fd97af5bf6b6ea5fb94fea98f799

See more details on using hashes here.

Provenance

The following attestation bundles were made for r2x_plexos-0.3.2-py3-none-any.whl:

Publisher: release.yaml on NatLabRockies/r2x-plexos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page