Skip to content

IEC-scheduling (or DER-scheduling) is a specific form of scheduling with a lot of properties that should not be confused with any generic scheduling such also as in IT

License

Notifications You must be signed in to change notification settings

fledge-power/fledgepower-der-scheduler

Repository files navigation

fledgepower-der-scheduler

IEC-scheduling (or DER-scheduling) is a specific form of scheduling with a lot of properties that should not be confused with any generic scheduling such also as in IT

This project implements an IEC 61850 server/north plugin for fledgepower. Its main purpose is to implement a DER scheduler.

Building and running

Manually building libiec61850

To install the dependencies you can run the requirements.sh script.

If you want to install them manually :

To build IEC61850 C/C++ North plugin, you need to download libiec61850 at: https://github.com/mz-automation/libiec61850

$ git clone https://github.com/mz-automation/libiec61850.git
$ cd libiec61850
$ export LIB_IEC61850=`pwd`

As shown above, you need a $LIB_IEC61850 env var set to the source tree of the library.

Then, you can build libiec61850 with:

$ cd libiec61850
$ cmake -DBUILD_TESTS=NO -DBUILD_EXAMPLES=NO ..
$ make
$ sudo make install
$ sudo ldconfig

If you want scheduling support also, you can add the der-scheduling library as follows:

$ mkdir -p dependencies
$ cd dependencies
$ echo Fetching iec61850 scheduler library
$ git clone -b develop_mz [email protected]:alliander-opensource/der-scheduling.git
$ mv alliander-ise-iec-61850-scheduler der-scheduling
$ cd der-scheduling

Build

To build the iec61850 plugin, once you are in the plugin source tree you need to run:

To build a release:

$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make

To build with unit tests and code coverage:

$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Coverage ..
$ make
  • By default the Fledge develop package header files and libraries are expected to be located in /usr/include/fledge and /usr/lib/fledge
  • If FLEDGE_ROOT env var is set and no -D options are set, the header files and libraries paths are pulled from the ones under the FLEDGE_ROOT directory. Please note that you must first run 'make' in the FLEDGE_ROOT directory.

You may also pass one or more of the following options to cmake to override this default behaviour:

  • FLEDGE_SRC sets the path of a Fledge source tree
  • FLEDGE_INCLUDE sets the path to Fledge header files
  • FLEDGE_LIB sets the path to Fledge libraries
  • FLEDGE_INSTALL sets the installation path of Random plugin

NOTE:

  • The FLEDGE_INCLUDE option should point to a location where all the Fledge header files have been installed in a single directory.
  • The FLEDGE_LIB option should point to a location where all the Fledge libraries have been installed in a single directory.
  • 'make install' target is defined only when FLEDGE_INSTALL is set

Examples:

  • no options

    $ cmake ..

  • no options and FLEDGE_ROOT set

    $ export FLEDGE_ROOT=/some_fledge_setup

    $ cmake ..

  • set FLEDGE_SRC

    $ cmake -DFLEDGE_SRC=/home/source/develop/Fledge ..

  • set FLEDGE_INCLUDE

    $ cmake -DFLEDGE_INCLUDE=/dev-package/include ..

  • set FLEDGE_LIB

    $ cmake -DFLEDGE_LIB=/home/dev/package/lib ..

  • set FLEDGE_INSTALL

    $ cmake -DFLEDGE_INSTALL=/home/source/develop/Fledge ..

    $ cmake -DFLEDGE_INSTALL=/usr/local/fledge ..

Using the plugin

First you have to copy the plugin shared-object file (libiec61850.so) into the fledgepower installation in the folder plugins/north/iec61850. If this folder doesn't exist you have to create it first.

As described in the Fledge documentation, you can use the plugin by adding a service from a terminal, or from the web API.

  1. Add the service from a terminal:

$ curl -sX POST http://localhost:8081/fledge/scheduled/task -d '{"name": "iec61850","plugin": "iec61850","type": "north","schedule_type": 3,"schedule_day": 0,"schedule_time": 0,"schedule_repeat": 30,"schedule_enabled": true}' ; echo

Or

  1. Add the service from the web GUI:
  • On the web GUI, go to the North tab
  • Click on "Add +"
  • Select iec61850 and give it a name, then click on "Next"
  • Change the default settings to your settings, then click on "Next"
  • Let the "Enabled" option checked, then click on "Done"

About

IEC-scheduling (or DER-scheduling) is a specific form of scheduling with a lot of properties that should not be confused with any generic scheduling such also as in IT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published