Skip to content

Generic energy system model for validation of gateway algorithms

License

Notifications You must be signed in to change notification settings

JonasPfeiffer123/EnSySim

 
 

Repository files navigation

EnSySim

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.

Getting started

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

  1. Download and install vs code and vs code buildtools from here and here. Also install the Marketplace extension for Python/Jupyter notebooks.
  2. Git Clone the repository to your hard drive
  3. install miniconda from here
  4. 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).
  5. 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}"
  6. Download and install rustup from here
  7. Change to nightly build with shell command rustup default nightly (needed for pyo3-python connection)
  8. 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.
  9. 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.

Debugging:

[https://daveceddia.com/debug-electron-native-rust-with-vscode/]

About

Generic energy system model for validation of gateway algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 58.1%
  • Rust 41.7%
  • Batchfile 0.2%