diff --git a/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/double_loop_integrated_ultrasupercritical_power_plant.ipynb b/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/double_loop_integrated_ultrasupercritical_power_plant.ipynb index 3d4f9b1c..1f58f382 100644 --- a/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/double_loop_integrated_ultrasupercritical_power_plant.ipynb +++ b/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/double_loop_integrated_ultrasupercritical_power_plant.ipynb @@ -81,8 +81,7 @@ "from prescient.simulator import Prescient\n", "\n", "# Import integrated ultra-supercritical power plant with energy storage model\n", - "from dispatches.case_studies.fossil_case.ultra_supercritical_plant.storage.multiperiod_double_loop_usc import MultiPeriodUsc\n", - "from dispatches_sample_data import rts_gmlc" + "from dispatches.case_studies.fossil_case.ultra_supercritical_plant.storage.multiperiod_double_loop_usc import MultiPeriodUsc" ] }, { @@ -1713,7 +1712,7 @@ "metadata": {}, "source": [ "**IMPORTANT** Before proceeding with the rest of the notebook:\n", - "1. Install the `dispatches-sample-data` package by running `pip install dispatches-sample-data` in the working conda environment\n", + "1. Install the `rts_gmlc` data package by running `pip install dispatches-rts-gmlc-data` in the working conda environment\n", "\n", "OR\n", "\n", @@ -1728,11 +1727,12 @@ "metadata": {}, "outputs": [], "source": [ - "# If installing the dispatches-sample-data\n", - "rts_gmlc_data_dir = str(rts_gmlc.source_data_path)\n", + "# If installing the `rts_gmlc` data package\n", + "from dispatches_data.api import path\n", + "rts_gmlc_data_dir = str(path(\"rts_gmlc\") / \"SourceData\")\n", "\n", "# If downloading the data to the local machine use the following option with appropriate path\n", - "# rts_gmlc_data_dir = \"/projects/gmihybridsys/dguittet/data/RTS-GMLC/RTS_Data/SourceData\"\n" + "# rts_gmlc_data_dir = \"/projects/gmihybridsys/dguittet/data/RTS-GMLC/RTS_Data/SourceData\"" ] }, { diff --git a/dispatches/case_studies/nuclear_case/nuclear_flowsheet_double_loop.ipynb b/dispatches/case_studies/nuclear_case/nuclear_flowsheet_double_loop.ipynb index 184f4a22..05018eb9 100644 --- a/dispatches/case_studies/nuclear_case/nuclear_flowsheet_double_loop.ipynb +++ b/dispatches/case_studies/nuclear_case/nuclear_flowsheet_double_loop.ipynb @@ -58,9 +58,8 @@ "from idaes.core.solvers import get_solver\n", "from idaes.apps.grid_integration.model_data import ThermalGeneratorModelData\n", "\n", - "# Import Prescient and the RTS-GMLC dataset\n", + "# Import Prescient\n", "from prescient.simulator import Prescient\n", - "from dispatches_sample_data import rts_gmlc\n", "\n", "# Import nuclear flowsheet\n", "from dispatches.case_studies.nuclear_case.nuclear_flowsheet_multiperiod_class import MultiPeriodNuclear" @@ -540,12 +539,12 @@ "\n", "**IMPORTANT** Before proceeding with the rest of the notebook:\n", "\n", - "1. Install the `dispatches-sample-data` package by running `pip install dispatches-sample-data` in the terminal\n", + "1. Install the `rts_gmlc` data package by running `pip install dispatches-rts-gmlc-data` in the working conda environment\n", "\n", "OR\n", "\n", - "1. Download the RTS-GMLC dataset from [this repository](https://github.com/GridMod/RTS-GMLC) (or directly as a zipfile [here](https://github.com/GridMod/RTS-GMLC/archive/refs/heads/master.zip)) to your local machine\n", - "2. Update the value of the `rst_gmlc_data_dir` variable in the cell below to the appropriate location of the `RTS_Data/SourceData` subfolder on your local machine." + "1. Download the RTS-GMLC dataset from [https://github.com/GridMod/RTS-GMLC] (or directly as a zipfile here) to your local machine\n", + "2. Update the value of the `rst_gmlc_data_dir` variable in the cell below to the appropriate location of the `RTS_Data/SourceData` subfolder on your local machine" ] }, { @@ -9869,8 +9868,9 @@ } ], "source": [ + "from dispatches_data.api import path\n", "# Folder containing the RTS - GMLC data\n", - "rts_gmlc_data_dir = str(rts_gmlc.source_data_path)\n", + "rts_gmlc_data_dir = str(path(\"rts_gmlc\") / \"SourceData\")\n", "\n", "# Set Prescient options\n", "options = {\n", @@ -10042,7 +10042,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.7.10 ('hybrid')", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/dispatches/case_studies/renewables_case/DoubleLoopOptimization.ipynb b/dispatches/case_studies/renewables_case/DoubleLoopOptimization.ipynb index a9eef975..8a4b650a 100644 --- a/dispatches/case_studies/renewables_case/DoubleLoopOptimization.ipynb +++ b/dispatches/case_studies/renewables_case/DoubleLoopOptimization.ipynb @@ -16,7 +16,7 @@ "import pyomo.environ as pyo\n", "import idaes\n", "\n", - "from dispatches_sample_data import rts_gmlc\n", + "from dispatches_data.api import path\n", "from dispatches.case_studies.renewables_case.wind_battery_double_loop import MultiPeriodWindBattery\n", "from dispatches.case_studies.renewables_case.double_loop_utils import *\n", "\n", @@ -76,6 +76,7 @@ "import os\n", "\n", "TESTING_MODE = bool(os.environ.get(\"DISPATCHES_TESTING_MODE\", None))\n", + "rts_gmlc_source_data_path = path(\"rts_gmlc\") / \"SourceData\"\n", "\n", "sim_days = 7 if not TESTING_MODE else 1\n", "start_date = \"01-02-2020\"\n", @@ -88,7 +89,7 @@ "wind_generator = f\"{wind_bus}_WIND_1\"\n", "\n", "prescient_options = {\n", - " \"data_path\": rts_gmlc.source_data_path,\n", + " \"data_path\": str(rts_gmlc_source_data_path),\n", " \"input_format\": \"rts-gmlc\",\n", " \"simulate_out_of_sample\": True,\n", " \"run_sced_with_persistent_forecast_errors\": True,\n", @@ -1866,7 +1867,7 @@ "pd.set_option('display.max_rows', None)\n", "plt.style.use('seaborn')\n", "\n", - "df = double_loop_outputs_for_gen(output_dir, rts_gmlc.source_data_path)\n", + "df = double_loop_outputs_for_gen(output_dir, rts_gmlc_source_data_path)\n", "prescient_df = df[df['Model'] == \"Prescient\"].copy()\n", "da_bidder_df = df[df['Model'] == \"DA Bidder\"].copy()\n", "rt_bidder_df = df[df['Model'] == \"RT Bidder\"].copy()\n", diff --git a/dispatches/case_studies/renewables_case/run_double_loop.py b/dispatches/case_studies/renewables_case/run_double_loop.py index b82abc96..eda35185 100644 --- a/dispatches/case_studies/renewables_case/run_double_loop.py +++ b/dispatches/case_studies/renewables_case/run_double_loop.py @@ -32,7 +32,7 @@ from pyomo.common.fileutils import this_file_dir import pandas as pd from pathlib import Path -from dispatches_sample_data import rts_gmlc +from dispatches_data.api import path this_file_path = Path(this_file_dir()) @@ -130,7 +130,7 @@ gen_capacity_factor = prescient_outputs_df[f"{wind_generator}-RTCF"].values.tolist() # NOTE: `rts_gmlc_data_dir` should point to a directory containing RTS-GMLC scenarios -rts_gmlc_data_dir = rts_gmlc.source_data_path +rts_gmlc_data_dir = path("rts_gmlc") / "SourceData" output_dir = Path(f"sim_{sim_id}_results") solver = pyo.SolverFactory("xpress_direct") diff --git a/setup.py b/setup.py index 77353f50..32567e6f 100644 --- a/setup.py +++ b/setup.py @@ -121,6 +121,7 @@ class SpecialDependencies: "gridx-prescient>=2.2.2", "nrel-pysam>=3.0.1", "dispatches-data-packages >= 23.3.19", + "dispatches-rts-gmlc-data @ git+https://github.com/gmlc-dispatches/rts-gmlc-data@main", *SPECIAL_DEPENDENCIES ], extras_require={