Package for simulating hydro power systems with Prodrisk first followed by SHOP using cuts from Prodrisk.
Project description
Prodrisk-SHOP simulator
The Prodrisk-SHOP simulator is a optimization framework for hydropower systems. It combines the stochastic mid-term model Prodrisk and the short-term model SHOP to run detailed analysis for long time horizons. The simulator first runs the mid-term model to generate a strategy described with cuts, that are state dependen water value functions. The corresponding SHOP model is then optimized for a limited time horizon, typically 7 days, using the cuts from Prodrisk. The end state from one SHOP optimization is used as initial condition for the following SHOP optimization allowing serial simulation with SHOP for multiple weather scenarios. The simulator has been developed in FME HydroCen.
This work was funded by The Research Council of Norway through project no. 257588.
Prerequisites
The simulator uses Prodrisk and SHOP, together with their python APIs pyprodrisk and pyshop.
Installation
It is recommended using virtual environment in Python when using the simulator to ensure the required Python packages are not conflicting with existing installations. The simulator comes with a basic example included that should be executed to verify that the installation is successful. Please follow the steps below to get started:
- Install Python. This guide suggests using venv in Python for creating virtual enviroments, but other tools should work as well.
- Install the prodrisk-shop-simulator Python package:
pip install prodrisk-shop-simulator
- Create a virtual environment with the command
python -m venv .venv. This will create a folder inside the project called .venv which is the name of the virtual environment. - Activate the virtual environment. This will happen automatically if you restart the terminal, or you can do it with the command
source ./.venv/Scripts/activate. - Create a file
system_config.yamlin./examplesbased on the template./examples/system_config.yaml.tmp. Replace the values with the appropriate values for your system. See pyshop and pyprodrisk readme for details. - Open ./examples/basecase/script.py in VSCode. Make sure the path to the pyprodrisk and pyshop installations are set correct. See https://github.com/sintef-energy/pyprodrisk and https://github.com/sintef-energy/pyshop for detailed instructions.
- Execute the script.
[!important] Prodrisk and SHOP information The simulator requires valid licenses for both Prodrisk and SHOP. Ensure you have access to these tools before running any simulations. For more information on obtaining licenses, or Prodrisk or SHOP specific setup, please refer to the official documentation of Prodrisk and SHOP.
Results dashboard
The simulator has an integrated dashboard with various tables and plots. To launch the dashboard, please follow the steps below:
- Make sure the virtual environment is activated, if not run the command
source ./.venv/Scripts/activate - Install Streamlit with
pip install streamlit - Make sure the path to the file
simulator_config.yamlis set correctly indashboard/functions/functions.py. The path can also be set directly to the dashboard interface. - Launch the dashboard with
streamlit run dashboard/System_overview.py
The resume_week and resume_scen optional arguments in the function run_serial_simulation() can be used to resume the simulation from a given scenario and week number. If problems occur for resume_week=1, the resume week should be set to one of the last weeks of the previous scenario.
Note that currently the simulator does not support more than one market (of type day-ahead or spot).
The dashboard assumes that all models have corresponding Prodrisk modules.
Publications
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prodrisk_shop_simulator-1.1.2.tar.gz.
File metadata
- Download URL: prodrisk_shop_simulator-1.1.2.tar.gz
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.5 Linux/4.18.0-553.76.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e083657df23f51ff0bccc761dbce1d22e7c1e37b4c7b98ff7b3fe7a6bc3a0cd3
|
|
| MD5 |
2223290e53dbe129eaa0a6a5cdb8c339
|
|
| BLAKE2b-256 |
ed06318d68459937e63441762fc4ee9db898d01e06fc53eb0429192c43372492
|
File details
Details for the file prodrisk_shop_simulator-1.1.2-py3-none-any.whl.
File metadata
- Download URL: prodrisk_shop_simulator-1.1.2-py3-none-any.whl
- Upload date:
- Size: 41.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.5 Linux/4.18.0-553.76.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a831019ddfb350b2c0c3a0fcb556c3351d0cc97a19d8cc4c449386da31d3da0e
|
|
| MD5 |
73df727b69914b9ab747c59fc69a844f
|
|
| BLAKE2b-256 |
8851b913e04cd810fbe8ee0df13304eb179f635bcd383862162dda8d3507549b
|