Automatic code generation method for building a co-simulation platform integrating building automatic systems and EnergyPlus

• A joint energy consumption simulation code generation method based on an abstract syntax tree and templates is proposed. • A variable mapping table and automatic code generation method are used to achieve a flexible combination of different building automation systems and Energy Plus. • Using the proposed automatic code generation method, a visual joint simulation interactive platform is constructed, allowing joint simulation experiments to be conducted without writing code. Building energy consumption researchers are generally not proficient in programming, but require co-simulation tools and physical systems to validate energy-saving patterns and perform data analysis. This paper proposes a code-generation-based method for constructing a universal real-time co-simulation platform integrating EnergyPlus with building control systems. This method eliminates the need for writing code programs; through simple selection, it automatically generates code based on Abstract Syntax Tree (AST) design, enabling specific interactive functions between different EnergyPlus models and different building control systems.This paper first proposes an automatic code generation mode for energy consumption co-simulation, designing co-simulation tool integration template files and building control data communication templates. Utilizing this method, a universal co-simulation platform is implemented, providing building energy consumption researchers with a code-free universal co-simulation platform tool.Through evaluation across 30 experimental cases, the code generation approach proposed in this paper achieves over 95% time savings compared to manual coding, while ensuring the correctness and extensibility of the generated code. The platform has been tested with connections to 2 building control systems and 4 simulation models for joint operation. Each model contains 500 simulation monitoring points, enabling comparative analysis of over six months of actual building control and simulation model data, and provides a user-friendly comparative data interface for researchers.

Authors

Institutions

Publication Details

Journal
Energy and Buildings
Published
2025-11-11
DOI
https://doi.org/10.1016/j.enbuild.2025.116667
Primary Topic
Building Energy and Comfort Optimization
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automatic code generation method for building a co-simulation platform integrating building automatic systems and EnergyPlus

Yupei Yan, Xin Li, Chuang Chen, Qiang Yang et al.
Energy and Buildings
Building Energy and Comfort Optimization
article

Automatic code generation method for building a co-simulation platform integrating building automatic systems and EnergyPlus

Yupei Yan, Xin Li, Chuang Chen, Qiang Yang, Hairong Yan, Chenxi Guo
article en

Abstract

• A joint energy consumption simulation code generation method based on an abstract syntax tree and templates is proposed. • A variable mapping table and automatic code generation method are used to achieve a flexible combination of different building automation systems and Energy Plus. • Using the proposed automatic code generation method, a visual joint simulation interactive platform is constructed, allowing joint simulation experiments to be conducted without writing code. Building energy consumption researchers are generally not proficient in programming, but require co-simulation tools and physical systems to validate energy-saving patterns and perform data analysis. This paper proposes a code-generation-based method for constructing a universal real-time co-simulation platform integrating EnergyPlus with building control systems. This method eliminates the need for writing code programs; through simple selection, it automatically generates code based on Abstract Syntax Tree (AST) design, enabling specific interactive functions between different EnergyPlus models and different building control systems.This paper first proposes an automatic code generation mode for energy consumption co-simulation, designing co-simulation tool integration template files and building control data communication templates. Utilizing this method, a universal co-simulation platform is implemented, providing building energy consumption researchers with a code-free universal co-simulation platform tool.Through evaluation across 30 experimental cases, the code generation approach proposed in this paper achieves over 95% time savings compared to manual coding, while ensuring the correctness and extensibility of the generated code. The platform has been tested with connections to 2 building control systems and 4 simulation models for joint operation. Each model contains 500 simulation monitoring points, enabling comparative analysis of over six months of actual building control and simulation model data, and provides a user-friendly comparative data interface for researchers.

Energy and BuildingsVol. 351
Beijing University of Technology (CN), Shenzhen Bay Laboratory (CN), China Academy of Building Research (CN)
Openalex Percentile: Top 64%
Building Energy and Comfort Optimization
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.