Translate ReEDS to Sienna
See the ReEDS translation comparison for side-by-side component mappings, time-series treatment, and modeling limitations.
Parse the source model, translate its components, and export the target model.
Translation source · Configuration
Mapping Overview
Section titled “Mapping Overview”ReEDS technologies are translated into Sienna component families. Several ReEDS classes intentionally map to the same Sienna class, while demand and storage classes use dedicated target types.
flowchart LR R["ReEDS system"] --> N["Buses, areas + loads"] R --> G["Generation + storage"] N --> S["Sienna system"] G --> S T["Time series + emissions"] -. "attach derived data" .-> S class R source class N,G process class S target class T data classDef source fill:#d9effa,stroke:#0079c2,color:#003a69,stroke-width:2px classDef process fill:#f4f7f9,stroke:#7890a0,color:#293d4d classDef target fill:#003a69,stroke:#003a69,color:#ffffff,stroke-width:2px classDef data fill:#fff7e6,stroke:#c58625,color:#684716
Demand and Storage
Section titled “Demand and Storage”The demand-specific classes (ReEDSElectrolyzerDemand,
ReEDSSteamMethaneReformingDemand, ReEDSDataCenterDemand, and
ReEDSConsumingTechnology) become StandardLoad. Their time series and
annual demand information are attached by the translation helpers.
For field-by-field mappings, see ReEDS to Sienna property mappings.
Use Python 3.11–3.13 and uv. From this repository checkout, replace the editable package paths below with your local parser and exporter checkouts. These commands update the workspace environment and lockfile:
First, install the dependencies pinned by this checkout:
uv syncAdd your source parser checkout so the script can read the native input model:
uv add --editable /path/to/r2x-reedsAdd the target parser/exporter checkout, then verify that the command completes before running the Python example:
uv add --editable /path/to/r2x-siennaExample script
Section titled “Example script”Replace the model paths and years with your input data. A successful run writes
the target model and time-series files to the configured results directory.
run() executes the plugin lifecycle and raises an error if a hook fails.
from pathlib import Pathfrom typing import cast
from r2x_reeds import ReEDSConfig, ReEDSParserfrom r2x_reeds_to_sienna.plugin_config import ReEDSToSiennaConfigfrom r2x_reeds_to_sienna.translation import reeds_to_siennafrom r2x_sienna.exporter import SiennaExporterfrom r2x_sienna.plugin_config import SiennaConfig
from r2x_core import DataStore, PluginContextfrom r2x_core.logger import setup_logging
setup_logging(verbosity=2)
case_name = "reeds_run_folder_name"base_path = "/path/to/reeds/runs"run_path = Path(base_path) / case_name
# ReEDS PARSERsolve_year = 2035weather_year = 2012scenario = "base"reeds_config = ReEDSConfig( solve_year=solve_year, weather_year=weather_year, case_name=case_name, scenario=scenario, models=("r2x_reeds.models", "r2x_sienna.models"),)
store = DataStore.from_plugin_config(reeds_config, path=run_path)context = PluginContext(config=reeds_config, store=store)
parser = cast(ReEDSParser, ReEDSParser.from_context(context))reeds_sys = parser.run()reeds_sys = reeds_sys.systemsienna_sys = reeds_to_sienna(reeds_sys, ReEDSToSiennaConfig())
# Sienna Exporterresults_dir = Path(base_path) / f"{case_name}_results"results_dir.mkdir(exist_ok=True)
exported_system = f"{case_name}.json"output_file = results_dir / exported_systemsienna_config = SiennaConfig( model_year=solve_year, system_name=exported_system, output_path=str(output_file), system_base_power=100.0, scenario=scenario,)
exporter_context = PluginContext( config=sienna_config, system=sienna_sys,)exporter = SiennaExporter.from_context(exporter_context)exporter.run()