<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to VirGIL</title><link>https://sourceforge.net/p/cosyma/wiki/VirGIL/</link><description>Recent changes to VirGIL</description><atom:link href="https://sourceforge.net/p/cosyma/wiki/VirGIL/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 08 May 2015 13:02:18 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cosyma/wiki/VirGIL/feed" rel="self" type="application/rss+xml"/><item><title>VirGIL modified by Anonymous</title><link>https://sourceforge.net/p/cosyma/wiki/VirGIL/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;The Virtual Grid Integration Laboratory (VirGIL) is a modular co-simulation platform designed to study interactions between demand response strategies, building comfort, communication networks, and power system operation. It couples power systems, buildings, communications, and control and optimization under a master algorithm. VirGIL uses a modular architecture, based on the Functional Mock-up Interface (FMI), where several different modules can be added, exchanged, and tested. It further integrates Quantized State System (QSS) methods for simulation. VirGIL couples a commercial power system simulation tool, trusted by power system operators, DigSILENT Powerfactory. The goal is to reduce the barriers to the industry for adopting, investigating, and subsequently deploying demand response strategies in their daily operation. The current use case uses the LBNL network and real consumption data. &lt;/p&gt;
&lt;h1 id="how-to-install-and-run-virgil"&gt;How to Install and Run VirGIL&lt;/h1&gt;
&lt;p&gt;Steps: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install Ptolemy (see instructions below) &lt;/li&gt;
&lt;li&gt;Install OMNET (see instructions below) &lt;/li&gt;
&lt;li&gt;Install PowerFMU_Server on Windows: go to VirGIL/Powerfactory-Windows/ and read the Install_PowerFMU.docx for instructions &lt;/li&gt;
&lt;li&gt;Get the IP Address of the Windows Machine and create the PowerFMU for Linux. Go to VirGIL/PowerFMU-Linux and read the instructions. &lt;/li&gt;
&lt;li&gt;Run Ptolemy &lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="simple-demo-of-the-building-and-the-pv-only"&gt;Simple Demo of the Building and the PV only&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open VirGIL-DEMO/BuildingFMU_2FMUs/VirGIL_Final_LoadSheddingPercent_2FMUs_ONLY_BuildingPV/ElectricalBuildingComm_Complex_New_Composite.xml &lt;/li&gt;
&lt;li&gt;Run it (press the triangle that looks like play) -- this demo is only for the buildings and the PV and does not require connection to the Windows Server for Powerfactory &lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="full-virgil-demo"&gt;Full VirGIL Demo&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Start the Windows Server for Powerfactory (see instructions in VirGIL/Powerfactory-Windows/Install_PowerFMU.docx) &lt;/li&gt;
&lt;li&gt;Make sure you have created the PowerFMU with the correct IP Address for your Windows Server and have replaced the powerfmulocal.fmu file inside VirGIL-DEMO/BuildingFMU_2FMUs/VirGIL_Final_LoadSheddingPercent_2FMUs_local/ (see instructions in VirGIL/PowerFMU-Linux) &lt;/li&gt;
&lt;li&gt;Only after replacing the correct FMU go to the next step. &lt;/li&gt;
&lt;li&gt;Open VirGIL-DEMO/BuildingFMU_2FMUs/VirGIL_Final_LoadSheddingPercent_2FMUs_local/ElectricalBuildingComm_Complex_New_Composite.xml &lt;/li&gt;
&lt;li&gt;Press Play &lt;/li&gt;
&lt;li&gt;The only reason this should not work is if Modelica FMUs are asking for the DYMOLA License Server. The only case this should happen is due to the Controller, i.e. VirGilControl_GridController_0SCH.fmu. We will fix that. &lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="linux-installation-of-ptolemy"&gt;Linux Installation of Ptolemy&lt;/h2&gt;
&lt;h3 id="get-the-necessary-packages"&gt;Get the necessary packages&lt;/h3&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;sudo apt-get install subversion 
sudo apt-get install default-jdk 
sudo apt-get install ant
&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="ptolemy-standard-berkeley-version"&gt;Ptolemy Standard Berkeley Version&lt;/h3&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;svn co https://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII/trunk ptII
cd ptII
export PTII=`pwd` 
./configure
ant
cd bin
make
./vergil
&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="if-you-have-build-errors-with-ant"&gt;If you have build errors with ant:&lt;/h3&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;sudo apt-get install eclipse-platform
eclipse
workbench
New Java Project
Name: ptII_qss
Location: the whole ptII folder
Allow output folders for source folders (this is a checkbox)
Then, create the project
Right click on the project name
Run As... --&amp;gt; Run Configurations... 
Java Application
Name: vergil
Main Class: ptolemy.vergil.VergilApplication
Run
&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="to-run-ptolemy"&gt;TO RUN PTOLEMY:&lt;/h3&gt;
&lt;p&gt;go to the folder ptII &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;cd ptII
export PTII=`pwd`
./bin/vergil
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="linux-installation-of-omnet-for-virgil"&gt;Linux Installation of OMNET++ for VirGIL&lt;/h2&gt;
&lt;p&gt;This is a quick “check-list” with the steps needed to install the commsFMU. &lt;/p&gt;
&lt;p&gt;Install all OMNeT++ dependencies. &lt;/p&gt;
&lt;p&gt;OMNeT++ requires that the Ubuntu machine where it is going to be run count with a number of installed libraries. To do so, run the following commands on a terminal window: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;sudo apt-get update
sudo apt-get upgrade
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Answer “yes” to the question in case there exist new updates. &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;sudo apt-get install build-essential gcc g++ bison flex perl tcl-dev tk-dev libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-1.0-0 openmpi-bin libopenmpi-dev libpcap-dev
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Install simulator libraries. In order for the FMU to work, it needs to access the simulator libraries. These libraries are placed at VirGIL//OMNeT/FMU_installation/simulator_libraries. Copy all .so files in the simulator_libraries folder into the file system. When shared libraries are used in Ubuntu, the operating system looks for libraries in the current path and in paths contained in the $LD_LIBRARY_PATH environment variable. For this reason, we need to include the folder where we copied the simulator libraries in this variable. The easiest (and permanent) way is to include this variable in the .bashrc script, which is run every time a user logs in. To do so, edit the file placed in ~/.bashrc with any text editor (notice it is a hidden file, so it won't be visible in the file explorer) and copy at the end of the file the following line: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;export LD_LIBRARY_PATH=absolute_path_to_the_simulator_libraries
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;where “absolute_path_to_the_simulator_libraries” is … the absolute path where you placed the simulator libraries. Save and close the file. For this change to take effect you need to re-log in the system. You can do so by typing: “su – your_user_name” in a terminal window. &lt;/p&gt;
&lt;p&gt;Now you should be able to work with the commsFMU. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 08 May 2015 13:02:18 -0000</pubDate><guid>https://sourceforge.net211b2b01cbbfc04e98ed3f84ba330316130d76af</guid></item></channel></rss>