EREC Postprocessing
HOPE supports Equivalent Reliability Enhancement Capability (EREC) as a postprocessing workflow for GTEP cases.
The intended baseline setup for EREC calculation is:
planning_reserve_mode: 0- a sufficiently high
VOLLin the baseline energy-only run - user-selected settings for chronology,
UC, transmission, aggregation, and other model options
How to Use EREC
For a normal GTEP study, the recommended baseline setup is:
planning_reserve_mode: 0Then choose one of the three workflows below:
- use
calculate_erec(case_path)if you want HOPE to solve the baseline and calculateERECin one step - use
calculate_erec(results)if you already ranrun_hope()in the same Julia session - use
calculate_erec_from_output(output_path)if you solved the baseline earlier and saved the HOPE output
Recommended default HOPE_erec_settings.yml:
enabled: 1
voll_override: null
resource_types:
- generator
- storage
resource_scope: built_only
write_outputs: 1
write_cc_to_tables: 0
output_dir_name: output_erecRecommended interpretation:
voll_override: nullpreserve theVOLLalready used by the baseline case or solved output; this is the recommended default, especially forcalculate_erec(results)andcalculate_erec_from_output(...)resource_types: [generator, storage]run generators and storage together by defaultresource_scope: built_onlyreportERECfor the solved fleet: existing resources plus any newly built candidate resources- use
resource_scope: allif you also want unbuilt candidates
Important note on voll_override:
ERECis sensitive to theVOLLused in the baseline energy-limited redispatch.- When you reuse a solved case with
calculate_erec(results)orcalculate_erec_from_output(output_path), the safest default is to keep the sameVOLLused in the original solved baseline. - HOPE now preserves that baseline
VOLLby default whenvoll_overrideis omitted or set tonull. - If you explicitly set
voll_overrideto a different value, HOPE warns because the resultingERECvalues may no longer be directly comparable to the original solved case.
Main Functions
1. One-step workflow
Use this when you want HOPE to solve the baseline case and then calculate EREC in one call.
using HOPE
res = HOPE.calculate_erec("ModelCases/my_case")2. Reuse an in-memory solved case
Use this when you already ran run_hope() in the same Julia session and do not want to solve the baseline again.
using HOPE
r = HOPE.run_hope("ModelCases/my_case")
erec = HOPE.calculate_erec(r)run_hope() returns the solved model together with the loaded inputs, resolved settings, case path, and output path, so calculate_erec(r) can reuse that solved baseline directly.
3. Reuse a saved output later
Use this when the baseline run was completed earlier and saved to disk.
using HOPE
erec = HOPE.calculate_erec_from_output("ModelCases/my_case/output")This workflow uses the machine-readable snapshot saved under:
output/postprocess_snapshot/and does not re-solve the baseline expansion model.
Snapshot Saving
Add this line to HOPE_model_settings.yml when you want run_hope() to save a reusable baseline snapshot:
save_postprocess_snapshot: 1 #Int, 0 do not save; 1 save minimal snapshot for later postprocessing such as EREC; 2 save full snapshot with additional solved-run detailsRecommended meaning:
0: do not save a postprocess snapshot1: save the minimal snapshot needed for later EREC/postprocessing2: save the minimal snapshot plus extra solved-run details for debugging/reproducibility
Typical delayed workflow:
using HOPE
res = HOPE.run_hope("ModelCases/my_case")
erec = HOPE.calculate_erec_from_output("ModelCases/my_case/output")EREC Settings File
EREC uses a separate optional settings file:
Settings/HOPE_erec_settings.ymlThe optional EREC settings file is read from:
Settings/HOPE_erec_settings.ymlRecommended defaults for normal studies are:
enabled: 1
voll_override: null
resource_types:
- generator
- storage
resource_scope: built_only
write_outputs: 1
write_cc_to_tables: 0
output_dir_name: output_erecIf you want unbuilt candidates as well, use:
resource_scope: allOutput Files
Typical EREC outputs are:
output/output_erec/erec_results.csv
output/output_erec/erec_summary.csvIf write_cc_to_tables: 1, HOPE also writes:
output/output_erec/gendata_with_erec_cc.csv
output/output_erec/storagedata_with_erec_cc.csvThe returned EREC result dictionary also includes the baseline EUE, the detailed erec_table, and any exported input tables written during the workflow.
Suggested Workflow
For larger research studies, the recommended pattern is:
- run the baseline model once with
run_hope() - save
output/postprocess_snapshot/ - later run
calculate_erec_from_output(output_path)as needed
This avoids repeating the expensive baseline expansion solve.