Most of the state-of-the-art building simulation programs implement models in imperative programming languages. This complicates modeling and excludes the use of certain efficient methods for simulation and optimization. In contrast, equation-based modeling languages declare relations among variables, thereby allowing the use of computer algebra to enable much simpler schematic modeling and to generate efficient code for simulation and optimization.

We contrast the two approaches in this paper. We explain how such manipulations support new use cases. In the first of two examples, we couple models of the electrical grid, multiple buildings, HVAC systems and controllers to test a controller that adjusts building room temperatures and PV inverter reactive power to maintain power quality. In the second example, we contrast the computing time for solving an optimal control problem for a room-level model predictive controller with and without symbolic manipulations. Exploiting the equation-based language led to 2200 times faster solution.

}, keywords = {Equation-based modeling, modelica, Multi-physics simulation, Optimal control, smart grid}, doi = {10.1016/j.enbuild.2015.10.017}, author = {Michael Wetter and Marco Bonvini and Thierry Stephane Nouidui} }