Skip to content

kdheepak/openmod-2019-helics-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openmod-2019-helics-tutorial badge

Click the following link to get started.

https://beta.mybinder.org/v2/gh/kdheepak/openmod-2019-helics-tutorial/master?urlpath=lab/tree/notebooks/notebooks/cosimulation-introduction.ipynb

This is a online remote demonstration. So there's no installation required.

The tutorial has 3 parts:

  1. An introduction to jupyter notebooks
  2. A simple value exchange that sends pi (i.e. 3.14...) back and forth between two federates. To run it start both the notebooks in that folder simultaneously and go back and forth.
  3. An example transmission-distribution exchange between PyPower and OpenDSS via OpenDSSDirect. Similar to piexchange, this requires starting two notebooks simultaneously that each setup a federate and then interact via HELICS.

Notes:

  • In these examples the HELICS broker is setup by one of the federates programmatically. It is also possible (and perhaps more common for large co-simulations) to start the broker directly using the executable provided by HELICS and then have federates attach.
  • Similarly these examples illustrate configuring the federates and their data exchange programmatically. It is also possible to put this configuration information in a file and have HELICS read it in, which can make it easy to use the same federate code to be re-used as multiple different federates.
  • For larger co-simulations, the helics-cli helps manage the process of configuring and starting a large number of federates.

If you are interested in running this demonstration on your computer, you can follow the installation steps below.

Tutorial Installation (optional)

git clone https://github.com/kdheepak/openmod-2019-helics-tutorial
cd openmod-2019-helics-tutorial
conda install jupyter
conda install nb_conda
conda env create
conda init bash # use your appropriate shell here
conda activate helics-environment
jupyter notebook

You can check if everything has been installed correctly by running the following to start Python:

conda activate helics-environment
python

When Python has started you can run the following:

>>> import helics as h
>>> h.helicsGetVersion()

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 94.5%
  • Python 5.5%