openBuildNet is a co-simulation platform that provides a framework for large-scale distributed control and simulation of complex multi-agent system. The platform is capable of coupling and synchronising different external computation agents, which can include simulation and control software processes running on separate processors, as well as hardware components, allowing parallel computations and hardware in the loop integration. A supervisor maintains a global clock to manage the progress of all agents and ensures the correctness of the co-simulation.

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.
Major features of openBuildNet are:
  1. 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.
  2. 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.
  3. 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.
  4. openBuildNet is open: the platform relies on open-source software and open standards. Its design and code will be published and open-source.

Summary of Progress

openBuildNet is currently under development as a part of the BuildNet project. The first version of the software was released and demonstrated in 2017. 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 published and 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.
  • May 2017: a paper on controlling buildings for demand response with Gaussian Processes was published and presented at the American Control Conference 2017 in Seattle, USA. The case study simulation was implemented in openBuildNet.
  • August 2017: a journal paper on openBuildNet is in preparation.



Note: publicly shared openBuildNet documents may not be up-to-date.

Public openBuildNet documents

openBuildNet concept design


The code of openBuildNet is publicly available at 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:


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 [1].

Topology of 47-bus grid network.
The buses were configured with the following loads:
  • 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.
The system was simulated for one day with openBuildNet. Following are figures illustrating several results obtained from the simulation.

The price signal sent to the MPCs.

Temperature, power demand, and disturbance time-series for a small-size office building.
Temperature, power demand, and disturbance time-series for a medium-size office building.
Voltage magnitudes on different buses over time.