Run a Case in HOPE
Using VS Code to Run a Case (Recommended)
Install Visual Studio Code: download VS Code and install it. A short video tutorial on how to install VS Code and add Julia to it can be found here.
(1) Open VS Code, click File -> Open Folder..., and navigate to your local HOPE repository directory.
(2) In the VS Code terminal, type julia and press Enter. Julia will open as below:
(3) Type ] to enter Julia package mode, then run activate . from the repository root. You should see the prompt change from (@v1.x) pkg> to (HOPE) pkg>, which means the HOPE project is activated successfully.
(4) Type instantiate at the (HOPE) pkg> prompt.
This installs the default HOPE environment and the bundled open-source solvers. It does not install commercial solver packages automatically.
(5) Type st to check that the dependencies have been installed. Type up if you want to update package versions. (This step may take some time when you install HOPE for the first time. After HOPE is installed successfully, you can usually skip it.)
(6) If there is no error in the above processes, the HOPE model has been installed successfully. Then press Backspace to return to the Julia prompt. To run an example case (for example, the default Maryland PCM case), type using HOPE, then run:
HOPE.run_hope("ModelCases/MD_PCM_Excel_case/")You will see HOPE start running:
The results will be saved in HOPE/ModelCases/MD_PCM_Excel_case/output.
Note:
HOPE.run_hope(...)accepts normalized case paths. For example, these are all valid:HOPE.run_hope("ModelCases/MD_PCM_Excel_case/")HOPE.run_hope("MD_PCM_Excel_case/")HOPE.run_hope("HOPE/ModelCases/MD_PCM_Excel_case/")
- Some older screenshots in this page still show the historical
HOPE/ModelCases/...style. The newer shorter form is recommended.
(7) For future runs, you can usually skip steps 4 and 5 and just follow steps 1, 2, 3, and 6.
Using System Terminal to Run a Case
You can use a system terminal either on Windows or macOS to run a test case. See details below.
Windows users
(1) Open Command Prompt from Windows Start and navigate to your local HOPE repository directory.
(2) Type julia. Julia will be opened as below:
(3) Type ] to enter Julia package mode, then run activate .. You should see the prompt change from (@v1.x) pkg> to (HOPE) pkg>, which means the HOPE project is activated successfully.
(4) Type instantiate in the (HOPE) pkg> prompt. (After HOPE is installed successfully, you can skip this step.)
This installs the default HOPE environment and the bundled open-source solvers. It does not install commercial solver packages automatically.
(5) Type st to check that the dependencies have been installed. Type up if you want to update package versions. (This step may take some time when you install HOPE for the first time. After HOPE is installed successfully, you can usually skip it.)
(6) If there is no error in the above processes, the HOPE model has been installed successfully. Then click Backspace to return to the Julia prompt. To run an example case (for example, the default Maryland PCM case), type using HOPE, then run:
HOPE.run_hope("ModelCases/MD_PCM_Excel_case/")You will see HOPE start running:
The results will be saved in HOPE/ModelCases/MD_PCM_Excel_case/output.
Note:
HOPE.run_hope(...)accepts normalized case paths. For example, these are all valid:HOPE.run_hope("ModelCases/MD_PCM_Excel_case/")HOPE.run_hope("MD_PCM_Excel_case/")HOPE.run_hope("HOPE/ModelCases/MD_PCM_Excel_case/")
- Some older screenshots in this page still show the historical
HOPE/ModelCases/...style. The newer shorter form is recommended.
(7) For future runs, you can usually skip steps 4 and 5 and just follow steps 1, 2, 3, and 6.
Reuse a Saved Baseline for EREC
For GTEP studies, you can ask HOPE to save a machine-readable baseline snapshot together with the normal run outputs. Add this line in Settings/HOPE_model_settings.yml:
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 detailsThen run the case normally:
using HOPE
res = HOPE.run_hope("ModelCases/my_case/")HOPE will save the snapshot under:
ModelCases/my_case/output/postprocess_snapshot/Later, you can calculate EREC from the saved output without re-solving the baseline expansion model:
using HOPE
erec = HOPE.calculate_erec_from_output("ModelCases/my_case/output")If you already have the solved results in memory from the current Julia session, you can also reuse them directly:
using HOPE
res = HOPE.run_hope("ModelCases/my_case/")
erec = HOPE.calculate_erec(res)See EREC Postprocessing for the recommended HOPE_erec_settings.yml workflow.
Holistic GTEP -> PCM Runs
HOPE supports a two-stage GTEP -> PCM workflow through two related entry points:
HOPE.run_hope_holistic(gtep_case, pcm_case)runs the paired cases directly in place.HOPE.run_hope_holistic_fresh(gtep_case, pcm_case)first creates fresh case clones, skips oldoutput/trees, and then runs the same two-stage workflow on those clones.
For most repeatable workflows, HOPE.run_hope_holistic_fresh(...) is the preferred option because it avoids stale outputs from earlier runs and preserves the original source cases as reusable baselines.
Example:
using HOPE
result = HOPE.run_hope_holistic_fresh(
"ModelCases/MD_GTEP_holistic_full8760_case_v20260406g",
"ModelCases/MD_PCM_holistic_full8760_case_v20260406g",
)Key requirements:
- The
GTEPandPCMcases must use the same topology. In practice that means the samezonedata.Zone_idset, the same transmission corridors inlinedata, and internally consistent zone labels acrosszonedata,gendata,storagedata, and the zonal time-series inputs. GTEPis the expansion stage andPCMis the dispatch stage. HOPE first solvesGTEP, then updates the pairedPCMsystem with theGTEPdecisions on new builds, retirements, storage additions, and transmission expansion before running chronological dispatch.
If the pair is not topology-matched, HOPE stops before the GTEP solve and reports the mismatch directly. This is preferable to an implicit zone remap because the holistic workflow is intended to dispatch the same system that the expansion model planned.
If you want to validate a pair before solving, you can also use the generic audit helper:
julia --project=. tools/repo_utils/audit_holistic_case_pair.jl <GTEP_case> <PCM_case>