The openBuildNet framework consists of two parts:
- Specifications: this part specifies the communication and the interface of agents to participate in the co-simulation, the protocol of how an agent should behave, and the evolution algorithm of the global computation and simulation (managed by the global clock). The specifications are platform- and language-independent.
- Implementation: openBuildNet provides comprehensive and easy-to-use APIs and libraries in various programming languages and scientific computation platforms to facilitate the development of openBuildNet agents by researchers and engineers. Currently C++ and Matlab are fully supported, with a Python library being developed. In addition, a customized version of the building energy simulation software EnergyPlus has been developed to fully support openBuildNet.
- openBuildNet is distributed and scalable: agents can be software processes running on separate processors and hardware components connected to a local network or even over the Internet. The platform can manage as many agents as the communication network and the operating system allow.
- openBuildNet is portable: APIs for developing agents are provided for C++ (completed), Matlab (completed), and Python (in development). They allow agents to be implemented on not only PCs but also any computing platform that has a C++ compiler or a Python interpreter, e.g. the BeagleBone and RaspberryPi embedded boards. These languages are popular among researchers and engineers in the fields of control, optimization, and building and energy research.
- openBuildNet is extensible: the co-simulation configuration, performed by the supervisor, is programmable with a scripting language called Chaiscript. Complex systems with many similar agents can be programmed (or parameterized) in a few lines of scripting code. More importantly, custom libraries for specific purposes can be developed to extend openBuildNet. Domain-specific libraries for distributed optimization and power network models are being developed.
- openBuildNet is open: the platform relies on open-source software and open standards. Its design and code will be published and open-source.
openBuildNet is currently under development as a part of the BuildNet project. The first version of the software was released and demonstrated internally, with the first public release planned in the first quarter of 2016. Following is a summary of the development progress.
- November 21, 2014: the concept design of openBuildNet was completed (link or see below).
- December 2, 2014: first version of the detailed design of openBuildNet was completed. Development of openBuildNet was started.
- May 11, 2015: second version of the detailed design of openBuildNet was completed.
- June 10, 2015: alpha version of openBuildNet was released internally and demonstrated.
- December 2015: first fully working version of openBuildNet was released internally.
- January 2016: a distributed simulation demonstration of model-predictive control of multiple buildings (in Matlab and EnergyPlus) on a 47-bus distribution grid was developed and demonstrated.
- June 2016: a paper describing openBuildNet was accepted to and will be presented at the International Conference on Control, Automation, Robotics and Vision (ICARCV) 2016.
- August 2016: Docker deployment of openBuildNet was completed.
- October 2016: a large-scale simulation experiment of the 47-bus distributed grid with 43 EnergyPlus buildings, 4 building models in Python, and 4 MPC controllers in Julia was successfully conducted on a cluster of 22 computers.
The code of openBuildNet is publicly available at https://github.com/LA-EPFL/openBuildNet. However, compiling and using this code are not yet straightforward. Instead, users are recommended to use the openBuildNet-Docker distribution, which is easy and quick to set up and use. One can follow a short tutorial on openBuildNet and openBuildNet-Docker at this link, and download and try the tutorial code at this link (ZIP file).
The following components of openBuildNet have been developed:
- openBuildNet server: this program contains the global clock. It reads a server script, written in the openBuildNet Server Scripting (OSS) language, which constructs and configures the entire simulation network. It then runs the simulation by coordinating all the agents (nodes) in the network and ensuring proper progress of the simulation. This program is written in C++ and supports both the Yarp and MQTT messaging protocols.
- node.C++: a C++ library for developing openBuildNet nodes (or agents).
- node.Matlab: a Matlab toolbox for developing openBuildNet nodes running in Matlab. The toolbox has full support for interactive development and debugging in Matlab.
- node.Python: a Python interface for openBuildNet nodes.
- node.Julia: a Julia interface for openBuildNet nodes.
- node.script: a lightweight, stand-alone interpreter for the openBuildNet Node Scripting (ONS) language, which is a customized version of Chaiscript for developing openBuildNet nodes. This is intended for quickly creating simple nodes with basic I/O, math and linear algebra capabilities.
- applications.powernet: a collection of ready-to-use openBuildNet nodes for simulating electrical grids, including various bus node types, a Matlab-based grid node and a Python-based grid node that can solve (Optimal) Power Flow problems.
- node.energyplus: a customized version of the building energy simulation software EnergyPlus that turns the simulator into an openBuildNet node and allows co-simulation between EnergyPlus and other nodes. Its code is publicly available on github: https://github.com/nxtruong/EnergyPlus.
openBuildNet was demonstrated in a large-scale distributed simulation of a distribution grid of 47 buses. The topology of the grid is illustrated below, adapted from .
- 4 small-size office buildings and 2 medium-size office buildings. Each building model consisted of a thermal sub-model (obtained from OpenBuild) and a nonlinear HVAC equipment sub-model. Each building was implemented in Matlab as a node in the openBuildNet simulation network.
- 6 model predictive controllers (MPCs), one for each of the above buildings. Each MPC was implemented in Matlab as a separate node. The MPCs receive a time-varying price signal and aim to minimize their respective electricity costs.
- 6 buildings modeled in EnergyPlus, including 2 medium-size office buildings, 1 large hospital building, 1 large hotel building, 1 midrise apartment building and 1 supermarket. All models were obtained from the U.S. DoE's list of commercial reference buildings (link). Each building model runs as a node in an EnergyPlus instance.
- The remaining buses were populated with fixed static load profiles.