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.
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
Metadata
Release files for prodrisk-shop-simulator 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| prodrisk_shop_simulator-1.1.2.tar.gz | 40.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prodrisk_shop_simulator-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.0 kB
Release files / prodrisk_shop_simulator-1.1.2.tar.gz
| Download URL | prodrisk_shop_simulator-1.1.2.tar.gz |
|---|---|
| Size | 40.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e083657df23f51ff0bccc761dbce1d22e7c1e37b4c7b98ff7b3fe7a6bc3a0cd3
|
|
BLAKE2b-256 checksum How to use checksums |
ed06318d68459937e63441762fc4ee9db898d01e06fc53eb0429192c43372492
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.5 Linux/4.18.0-553.76.1.el8_10.x86_64
|
Release files / prodrisk_shop_simulator-1.1.2-py3-none-any.whl
| Download URL | prodrisk_shop_simulator-1.1.2-py3-none-any.whl |
|---|---|
| Size | 41.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a831019ddfb350b2c0c3a0fcb556c3351d0cc97a19d8cc4c449386da31d3da0e
|
|
BLAKE2b-256 checksum How to use checksums |
8851b913e04cd810fbe8ee0df13304eb179f635bcd383862162dda8d3507549b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.5 Linux/4.18.0-553.76.1.el8_10.x86_64
|
Security for prodrisk-shop-simulator 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.