Generic, statistics based energy system modell for testing and validation of control algorithms for smart grids. While the model set up is implemented in python the performance critical model components are written in rust.
Since compiled files are not beeing synced for this repository, you'll have to build them on your own. Here's how: At this point I'm explaining the toolchain used by us. Of course you are free to use different IDEs and compilers, also there´s no need to use the interactive jupyter notebooks
- Download and install vs code and vs code buildtools from here and here. Also install the Marketplace extension for Python/Jupyter notebooks.
- Git Clone the repository to your hard drive
- install miniconda from here
- Create a new conda environment and install the packages listed in requirements.txt using the forge channel (
conda config --env --add channels conda-forge
). For this you can use the configure_conda.cmd executed in an Anaconda Prompt (see start menu). - For using jupyter notebooks and interactive plotly visualization directly in visual studio code install the python extension (settings -> extensions -> python). For the test cases to work create a settings.json file under .vscode folder and add following line in curly brackets:
"jupyter.notebookFileRoot": "${workspaceFolder}"
- Download and install rustup from here
- Change to nightly build with shell command
rustup default nightly
(needed for pyo3-python connection) - build with
cargo +nightly build --release
, make sure to rename the compiled .dll to .pyd and move it to the \SystemComponentsFast folder. For this you can use the ReleaseExample.cmd, rename it to Release.cmd and replace the placeholders concerning the path to activate.bat (in your conda installation path under Scripts/) and conda environment name. For building you can use Ctrl+Shift+P -> Run Task -> SCfast release. - Try to execute the different scenarios under Tests/ to see if everything works. This should be done using the jupyter cell commands (Run Cell / Run Below). Make sure default interpreter is set to your appropriate conda environment.
[https://daveceddia.com/debug-electron-native-rust-with-vscode/]