This document is work in progress.
It is recommended to start with a linux platform such as Ubuntu and a ‘gridappsd’ user created. The bootstrap scripts should be run as root.
apt install -y git (you may need to run apt update first) git clone https://github.com/GRIDAPPSD/Bootstrap.git cd Bootstrap chmod a+x *.sh ./bootstrap.sh
If the bootstrap doesn’t work, or you wish to install manually you will need the following prerequisites.
apt upgrade -y (as root user)
GridAPPS-D Dependencies - Use apt install for the following dependencies
apt install -y vim git mysql-server automake default-jdk g++ gcc python python-pip libtool apache2 gradle nodejs-legacy npm curl
- Mysql-server (I set the root pw as gridappsd1234)
- Python (v 2.x)
Then apply the following pip installs
pip install –upgrade pip
pip install stomp.py pip install pyyaml
- pip install –upgrade pip
- pip install stomp.py
- pip install pyyaml
As well as the following npm packages
- npm install -g express
- npm install -g ejs
- npm install -g typescript
- npm install -g typings
- npm install -g webpack
The following structure should be set up to enable the run scripts to execute correctly.
You will also need to install FNCS and GridLAB-D
## Overview FNCS is the co-simulation engine used by GridAPP-D’s simulation manager class to facilitating real-time synchonization and message passing between the GridLAB-D simulation and the GOSS message bus.
## Source Code FNCS is maintained by PNNL. The repository is located at https://github.com/FNCS/fncs. GridAPPS-D is using the latest release of FNCS which is v2.3.2.
## FNCS Documentation The documentation for FNCS is located at https://github.com/FNCS/fncs/wiki.
## Building and Installing the Source ### Linux #### Prerequisites FNCS requires both the ZeroMQ and CZMQ libraries. For the purposes of the tutorial FNCS and it’s prerequisites will be installed a custom location refered to by $FNCS_INSTALL. All source code is downloaded to the $HOME directory.
# unpack zeromq, change to its directory :~$ tar -xzf zeromq-3.2.4.tar.gz :~$ cd zeromq-3.2.4
# configure, make, and make install :~/zeromq-3.2.4$ ./configure –prefix=$FNCS_INSTALL :~/zeromq-3.2.4$ make :~/zeromq-3.2.4$ make install
# download and install CZMQ :~/zeromq-3.2.4$ cd $HOME
# unpack czmq, change to its directory :~$ tar -xzf czmq-3.0.0-rc1.tar.gz :~$ cd czmq-3.0.0
#### Building FNCS In this tutorial FNCS source code will be downloaded using git to the $HOME directory. The code will be installed at t/FNCShe loacation $FNCS_INSTALL. ```bash # download FNCS :~$ git clone https://github.com/FNCS/fncs.git
# change to FNCS directory :~$ cd fncs
#### Environment Setup In order for GridAPPS-D to be able to run FNCS and for GridLAB-D to be built with FNCS The following environment variables need to be setup: * $PATH must contain $FNCS_INSTALL/bin * $LD_LIBRARY_PATH must contain $FNCS_INSTALL/lib
GridLAB-D is a steady-state Distribution System simulation tool. It solves full three phase unbalanced network power flows and provides highly detailed enduse load models. It is part of GridAPPS-D’s Simulation Engine. It serves for providing the real world distribution system environment for third party GridAPPS-D applications to monitor and control in real time.
## Source Code GridLAB-D is maintained by Pacific Northwest National Laboratories in GitHub. The repository is located at https://github.com/gridlab-d/gridlab-d. GridAPPS-D uses the 4.0 release which is in release candidate currently and located on branch release/RC4.0.
## GridLAB-D Documentation GridLAB-D’s Documentation is located at http://gridlab-d.shoutwiki.com/wiki/Main_Page
## Building and Installing the Source
The following packages are needed in order to build GridLAB-D.
:~$ sudo apt-get install \
For GridAPPS-D GridLAB-D will need to be compiled with the FNCS shared Library so FNCS will need to be installed. For instructions on building and installing FNCS, please go [here](). For the purposes of this document the location of where you installed FNCS will be known as $FNCS_INSTALL.
#### Building GridLAB-D
For the purposes of this instruction set, the location to where you download the repository will be known as $GLD_INSTALL.
#download the release/RC4.0 branch repository
:$GLD_INSTALL$ git clone https://github.com/gridlab-d/gridlab-d.git -b release/RC4.0 --single-branch
#build and install xerces located in the third_party folder of the repository
:$GLD_INSTALL$ cd gridlab-d/third_party
:$GLD_INSTALL/gridlab-d/third_party$ tar -xzf xerces-c-3.1.1.tar.gz
:$GLD_INSTALL/gridlab-d/third_party$ cd xerces-c-3.1.1
:$GLD_INSTALL/gridlab-d/third_party/xerces-c-3.1.1$ sudo make
:$GLD_INSTALL/gridlab-d/third_party/xerces-c-3.1.1$ sudo make install
#build and install GridLAB-D with FNCS
:$GLD_INSTALL/gridlab-d/third_party/xerces-c-3.1.1$ cd ../../
:$GLD_INSTALL/gridlab-d$ autoreconf -if
:$GLD_INSTALL/gridlab-d$ ./configure --prefix=$GLD_INSTALL/install --with-fncs=$FNCS_INSTALL --enable-silent-rules 'CFLAGS=-g -O0 -w' 'CXXFLAGS=-g -O0 -w' 'LDFLAGS=-g -O0 -w'
#before performing make. Make sure the envirionment variable $LD_LIBRARY_PATH contains the path $FNCS_INSTALL/lib if it doesn't then it will need to be added to $LD_LIBRARY_PATH
#### Environment Setup In order for GridAPPS-D to be able to run GridLAB-D The following environment variables need to be setup: * $PATH must contain $GLD_INSTALL/install/bin and $FNCS_INSTALL/bin * $GLPATH must contain $GLD_INSTALL/install/lib/gridlabd and $GLD_INSTALL/install/share/gridlabd * $CXXFLAGS must contain $GLD_INSTALL/install/share/gridlabd * $LD_LIBRARY_PATH must contain $FNCS_INSTALL/lib
You will need to clone the GOSS-GridAPPS-D and viz repositories and build each
- git clone https://github.com/GRIDAPPSD/GOSS-GridAPPS-D.git
- cd GOSS-GridAPPS-D
- mkdir -p $GRIDAPPSD_INSTALL/builds/log
- git clone https://github.com/GRIDAPPSD/viz.git
- cd viz
- npm install
- wget https://downloads.sourceforge.net/project/bigdata/bigdata/2.1.1/blazegraph.jar -O $GRIDAPPSD_INSTALL/builds/lib/blazegraph.jar
You will need to populate the mysql database with the ieee8500 model
mysql -u root -p < gridappsd_mysql_dump.sql
- To populate Blazegraph with the ieee8500 model
- Download https://github.com/GRIDAPPSD/Powergrid-Models/blob/master/CIM/ieee8500.xml
- java -Dbigdata.propertyFile=$GRIDAPPSD_INSTALL/builds/lib/conf/rwstore.properties -jar $GRIDAPPSD_INSTALL/builds/lib/blazegraph.jar >> $GRIDAPPSD_INSTALL/builds/log/blazegraph.log 2>&1 &
- Go to http://localhost:9999
- Click on the Update tab
- Choose the ieee8500 model file and change the format to RDF/XML
- Click Update
To start the platform, open two terminal windows:
- To start GridAPPS-D, this should also start the web visualization
- cd gridappsd_project/sources/GOSS-GridAPPS-D
- In a browser go to http://localhost:8082/ieee8500
Testing information will be added later