Coder Social home page Coder Social logo

gmlc-tdc / helics-tutorial Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 7.0 8.91 MB

Tutorial of running a HELICS Co-Simulation

Home Page: http://gmlc-tdc.github.io/HELICS-Tutorial

License: BSD 3-Clause "New" or "Revised" License

MATLAB 17.03% Python 82.97%

helics-tutorial's People

Contributors

afisher1 avatar esilksel avatar kdheepak avatar nightlark avatar phlptp avatar rookscody avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

helics-tutorial's Issues

Tutorial 1: error message (class 'helics_msg' is not known)

Hello All,

I'm trying to install HELICS with Gridlab-d on UBUNTU (18.04.5 LTS) but I keep getting this error message (class 'helics_msg' is not known) when I run the following command:

gridlabd DistributionSim_B2_G_1.glm

I followed these steps to install HELICS:

git clone https://github.com/GMLC-TDC/HELICS
cd HELICS
mkdir build
cd build
cmake ../
sudo make -D BUILD_SHARED_LIBS=ON
sudo make install

I tested helics_player and got:

2.6.1-develop-gfc268778 (2020-11-07)

And the following steps to install Gridlab-D with HELICS:

gridlab-d version:

GridLAB-D 4.1.0-0 (Lugo [:]) 64-bit LINUX RELEASE

'autoreconf -if'

./configure --prefix=/path/to/gridlabd/install --with-helics=/path/to/helics/install --enable-silent-rules "CFLAGS=-g -O0 -w" "CXXFLAGS=-g -O0 -w -std=c++14" "LDFLAGS=-g -O0 -w"

I also checked /usr/local/lib directory, it contains the following:

  1. libhelicsSharedLib.so.2
    2.libhelicsSharedLib.so
    3.libhelicsSharedLib.so.2.6.1
    4.libhelics-shared.so
  2. libhelics-shared.so.2
    6.libhelics-shared.so.2.6.1

Something is worth noting is that I can't find config.log in HELICS directory. Maybe it's something wrong I did during HELICS setup

Any ideas? Thanks

Adopt git-flow style development?

Should we adopt a git-flow style for the tutorial? I would vote yes.

Would it be practical to then also have the first two version numbers (e.g. 1.0) match HELICS-src for clarity? The 3rd digit would then be free to capture updates from the src and tutorial independantly.

Can't do Tutorial 1 with HELICS 2/develop

  • line 21 of federate1.py says "helicsFederateInfoCreate", but it should be "helicsCreateFederateInfo". Fixing that...

  • "helicsFederateInfoSetFederateName" is not found in helics.py. I tried changing to "SetCoreName" and then commenting that out, but either way, the next assertion fails on line 29.

  • in the last federate, GridLAB-D exits because "ERROR [INIT] : helics_msg::init(): There is not object with property"

  • the first federate, HELICS broker, started properly, registered one federate, and issued several "broker tick"s before I stopped it

It seems that something's out of synch, but I did not have build errors and GridLAB-D autotests were successful

Docker-based Tutorial

I'm working my way through these tutorials, and rather than dirty up my machine or use a VM I'm attempting to create Docker images for each of the relevant portions of the tutorials and a Docker Compose file to run them. Once I do I'll contribute everything back to this repo.

I'm having some trouble containerizing a few of the components so far, which I thought I would track here.

If anyone here can help me jump start the above two issues I'd appreciate it.

Tutorial 2 not working with HELICS v2

Tutorial 2 is not working with HELICS v2.

A previous pull request was submitted to update Tutorial 1 to work with HELICS v2, but nothing further than this. I suspect it means that tutorials 3-5 are also not working on v2, but this has not been checked.

By altering tutorial 2 to correspond to tutorial 1 (i.e. changing the non-working HELICS commands within federate1.py) allows the code to be run using the following commands:

$ helics_broker -f 2 --loglevel=3 --name=mainbroker
$ helics run --path config.json

The tutorial suggests that the only command needed to set the simulation running is

$ helics run --path config.json

I suspect this is how the example is supposed to work, but I am not sure. So maybe this means there is another issue in there, where the config.json file is not creating a broker correctly. Help on this would be appreciated.

I have made the changes previous made to tutorial 1, to tutorial 2, and could create a new branch for this. Do I need any special permission to do this?

Update tutorial README

Currently the README information in each tutorials subfolder is the bare minimal to run an example. It should be updated with more information about or at least linked to a corresponding slide from the presentation.

Tutorial 1 not working with GridLAB-D

GridLAB-D now returns a complex data type instead of a real, imaginary tuple which federate1.py is expecting. The example should be updated to handle the new output from GridLAB-D.

GridLAB-D version: feature/730
HELICS version: v3.3.0

l.89 in federate1.py
is: rValue, iValue = h.helicsInputGetComplex(subid)
should be: cValue = h.helicsInputGetComplex(subid)

Restructure to be approachable by non-developers

Seems the tutorial repo should jump out as a series of examples. Right now these are buried in the scripts folder, which may make sense for developers but will likely be confusing to use-case users. Would proposes a directory structure that has the series of examples as folders at the top level as in:

  • Tutorial-1_Manual-HELICS_Distribution
  • Tutorial-2_HELICS-Runner_Transmission-Distribution

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.