Skip to content

Translate ReEDS with the CLI

Turn a completed ReEDS run into a Sienna model using three installed plugins. Start with the first CLI pipeline if you have not used pipeline files before.

You need a completed ReEDS run directory containing its inputs_case/ and outputs/ data. Use solve and weather years present in that run. The parser loads the datasets named by its installed file mapping. A ReEDS model and run data are external to this repository; this page’s list, resolved configuration, and dry-run commands were verified, but a complete ReEDS translation was not executed without those inputs.

Run these installation commands from your workspace using the same r2x executable that will execute the pipeline. First check its managed environment:

Terminal window
r2x python show

Install the ReEDS source parser. It reads the completed run directory and supplies reeds-parser; the translation step cannot read the source files on its own:

Terminal window
r2x install r2x-reeds

See the r2x-reeds reference documentation for parser configuration, input file mappings and supported ReEDS data.

Install the translation package, which maps parsed ReEDS components to Sienna:

Terminal window
r2x install r2x-reeds-to-sienna

Install the target package explicitly as well. It supplies the Sienna model classes and sienna-exporter used to write the native result:

Terminal window
r2x install r2x-sienna

Check each package’s registered entry points before writing the configuration. First, confirm reeds-parser is available:

Terminal window
r2x list r2x-reeds

Then confirm reeds-to-sienna:

Terminal window
r2x list r2x-reeds-to-sienna

Finally, confirm sienna-exporter:

Terminal window
r2x list r2x-sienna

Together, these lists should contain the three steps used below. Inspect the parser options to understand which settings locate and select your ReEDS data:

Terminal window
r2x run reeds-parser --help

Then inspect the translation options. This separates source-data settings from settings that control the target model:

Terminal window
r2x run reeds-to-sienna --help

The pipeline needs reeds-parser, reeds-to-sienna, and sienna-exporter. The parser requires solve_year and weather_year. The translation uses ReEDSToSiennaConfig.

Save this as reeds-pipeline.yaml. Replace the absolute run path, case name, and years with your completed model run:

variables:
run_dir: /path/to/ReEDS/runs/my-case
solve_year: 2035
weather_year: 2012
pipelines:
reeds-to-sienna:
- reeds-parser
- reeds-to-sienna
- sienna-exporter
config:
reeds-parser:
path: ${run_dir}
case_name: my-case
solve_year: ${solve_year}
weather_year: ${weather_year}
reeds-to-sienna: {}
sienna-exporter:
output_path: outputs/my-case.json
output_folder: outputs

path supplies the parser’s data store. The empty translation configuration uses the package defaults. The parser uses the solve year as its model year; the exporter writes to the configured output path. Keep the JSON export and its companion time-series file together.

From the directory containing the YAML file:

Terminal window
r2x run reeds-pipeline.yaml reeds-to-sienna --print

Check that the resolved path and both years match your run. Then preview the execution order:

Terminal window
r2x run reeds-pipeline.yaml reeds-to-sienna --dry-run

Expect reeds-parser → reeds-to-sienna → sienna-exporter. A successful dry run does not validate ReEDS datasets or target model values.

Create the directory that will hold the exported model and serialized system:

Terminal window
mkdir -p outputs

Now execute the checked pipeline. The --zip option saves the final transformed system for inspection; -o names that archive. Choose a fresh filename if it already exists:

Terminal window
r2x run reeds-pipeline.yaml reeds-to-sienna \
--zip \
-o outputs/my-case-system.zip

Success creates the Sienna JSON and companion time-series file under outputs/, plus my-case-system.zip for inspection. Check the generated files before loading them:

Terminal window
ls -lh outputs

Follow inspect a transformed system to read the archive with a tested script, list buses, inspect load fields and attached time series, and load the same result directly with Infrasys.

For missing datasets, unregistered plugins, execution failures after a dry run, or result-loading errors, follow troubleshooting. For unexpected target mappings, compare the property reference with the source components and pinned translation rules.

For Python integration and detailed mapping behavior, see ReEDS to Sienna.