Skip to main content

Plexos Models, Parser and Exporter

Project description

r2x-plexos

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

image image image 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.

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

r2x_plexos-0.3.0.tar.gz (113.5 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.0-py3-none-any.whl (131.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: r2x_plexos-0.3.0.tar.gz
  • Upload date:
  • Size: 113.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for r2x_plexos-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1eb4ddb6d26d0571fa461479b73c81960d0b2ceec9665cf07f1591d5cf3f8f6a
MD5 4cdee83b9e3dfa3901db59b7ba8d846f
BLAKE2b-256 1820948ca0c429a49c1a9c2ebbf2819197747d11723ca37eba24c0515cf72372

See more details on using hashes here.

Provenance

The following attestation bundles were made for r2x_plexos-0.3.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: r2x_plexos-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 131.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for r2x_plexos-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5f04efcd4abc391d0a5d0157cae77525b1c41198a2ddeb152ed39114d0ae0b0
MD5 b6a153b92a6b70b79db49fc2c545129c
BLAKE2b-256 a26bd363871d843e1c47ccdc26f5cf59bb826e10c19ef79a85ca0d6f74b96089

See more details on using hashes here.

Provenance

The following attestation bundles were made for r2x_plexos-0.3.0-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.

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