Next Article in Journal
Analysis of Transportation Hypernetwork Robustness Based on the Internal Structure of Hyperedges: A Case Study of China’s High-Speed Railway
Previous Article in Journal
Failure Analysis and Machine Learning-Based Prediction in Urban Drinking Water Systems
Previous Article in Special Issue
An Integrated BIM-Based Application for Automating the Conceptual Design for Vietnamese Vernacular Architecture: Using Revit and Dynamo
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Real-Time Digital Twins for Building Energy Optimization Through Blind Control: Functional Mock-Up Units, Docker Container-Based Simulation, and Surrogate Models

by
Cristina Nuevo-Gallardo
1,
Iker Landa del Barrio
2,3,*,
Markel Flores Iglesias
2,
Juan B. Echeverría Trueba
3 and
Carlos Fernández Bandera
1,*
1
School of Technology of Cáceres, Universidad de Extremadura, 10003 Cáceres, Spain
2
Fundación Vicomtech, Basque Research and Technology Alliance (BRTA), 20009 Donostia-San Sebastián, Spain
3
School of Architecture, Universidad de Navarra, 31009 Pamplona, Spain
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2025, 15(24), 12888; https://doi.org/10.3390/app152412888
Submission received: 13 November 2025 / Revised: 28 November 2025 / Accepted: 3 December 2025 / Published: 6 December 2025

Abstract

The transition toward energy-efficient and smart buildings requires Digital Twins (DTs) that can couple real-time data with physics-based Building Energy Models (BEMs) for predictive and adaptive operation. Yet, despite rapid digitalisation, there remains a lack of practical guidance and real-world implementations demonstrating how calibrated BEMs can be effectively integrated into Building Management Systems (BMSs). This study addresses that gap by presenting a complete and reproducible end-to-end framework for embedding physics-based BEMs into operational DTs using two setups: (i) encapsulation as Functional Mock-up Units (FMUs) and (ii) containerisation via Docker. Both approaches were deployed and tested in a real educational building in Cáceres (Spain), equipped with a LoRaWAN-based sensing and actuation infrastructure. A systematic comparison highlights their respective trade-offs: FMUs offer faster execution but limited weather inputs and higher implementation effort, whereas Docker-based workflows provide full portability, scalability, and native interoperability with Internet of Things (IoT) and BMS architectures. To enable real-time operation, a surrogate modelling framework was embedded within the Docker architecture to replicate the optimisation logic of the calibrated BEM and generate predictive blind control schedules in milliseconds—bypassing simulation overhead and enabling continuous actuation. The combined Docker + surrogate setup achieved 10–15% heating energy savings during winter operation without any HVAC retrofit. Beyond the case study, this work provides a step-by-step, in-depth guideline for practitioners to integrate calibrated BEMs into real-time control loops using existing toolchains. The proposed approach demonstrates how hybrid physics- and data-driven DTs can transform building management into a scalable, energy-efficient, and operationally deployable reality.

1. Introduction

As concern over climate change and energy scarcity grows, the building sector—responsible for roughly 30–40% of global energy use and 26–36% of energy-related greenhouse gas emissions [1,2], largely from heating, ventilation and air conditioning (HVAC), lighting, and hot water [3]—must improve efficiency. In response, policies such as Directive (EU) 2024/1275 [1] set stricter frameworks to cut consumption and emissions, requiring all new buildings to reach nearly zero energy building (nZEB) standards by 2025 through high efficiency and renewable energy integration.
To achieve sustainable buildings, energy modelling has become a standard practice for optimising performance throughout the design phase [4]. Building Energy Models (BEMs) enable prediction of consumption, system optimisation, and evaluation of energy management strategies, reducing operational costs. According to IPMVP, ASHRAE, and CIBSE, BEMs are categorised as white-, black-, or grey-box models depending on the degree of physical principles they incorporate [5,6,7,8].
A major advancement in this field is the integration of BEMs with their physical counterparts through Digital Twins (DTs)—virtual replicas that mirror the building’s geometry, systems, and real-time operating conditions [9,10]. By linking BEMs to actual sensor data, DTs enable continuous monitoring, predictive analytics, and the optimisation of energy performance [11]. To achieve this, models must be encapsulated for seamless simulation and feedback with the operational building. The Functional Mock-up Interface (FMI) standard enables such interoperability via Functional Mock-up Units (FMUs), while Docker-based containerisation provides an alternative solution offering portability, scalability, and simplified integration across diverse computing environments.
A review of the literature reveals the use of FMUs in the packaging of partial or total models of buildings. In this context, partial models are utilised to simulate specific parts or systems of a building, with the simulation being conducted in co-simulation mode in conjunction with another program. Examples of partial simulation of HVAC systems can be found in [12,13], where Modelica and Dymola, respectively, were employed for system modelling. Other works encapsulate BEMs generated from EnergyPlus for co-simulation in software such as Dymola or CONTAM [14,15]. In contrast, other studies propose different approaches by generating FMUs from EnergyPlus BEMs to implement hardware-in-the-loop strategies with a laboratory heat pump, simulating through Python libraries [16].
In parallel with FMU-based encapsulation, Docker has become a lightweight and portable solution for deploying energy simulation tools such as EnergyPlus or OpenStudio within isolated containers [17,18]. This ensures consistent execution across local, cloud, and edge platforms, enabling scalable and reproducible DT architectures for parametric analysis, predictive control, and performance monitoring. Its modular design also allows independent deployment of services such as data ingestion or visualisation.
However, both FMU- and Docker-based approaches still rely on running full EnergyPlus simulations, which introduces non-negligible computational overhead and complicates their continuous use in real building operation. This limitation is especially relevant when DTs are expected to provide rapid responses to short-term weather fluctuations or to operate in resource-constrained environments, such as Building Management Systems (BMS) with limited hardware. To address this bottleneck, data-driven models can be employed to enable faster, real-time responsiveness [19]. Machine-learning (ML) methods such as Random Forests, gradient-boosted models or—computationally heavier—multilayer perceptrons have been widely applied in building prediction tasks. In this work, however, we train data-driven models on a highly calibrated BEM rather than directly on measured data, yielding physics-informed surrogate models that enhance robustness and interpretability for DT integration [20,21].
In recent years, the use of surrogate models has emerged as a prominent trend in the application of ML models to BEMs, enabling fast and accurate approximations of complex simulation results while drastically reducing computational demand. Reviews of the literature emphasise that these models are essential when DTs must react to rapid environmental changes or operate within hardware-constrained systems, thus supporting real-time control, scalability, and reduced operational costs [22,23,24]. Several studies have shown that surrogate models, once trained, can produce accurate predictions in seconds, as opposed to the minutes or hours required for full EnergyPlus simulations, maintaining errors below 5% across multiple relevant outputs [25]. Furthermore, surrogate models such as Random Forest, XGBoost, and multilayer perceptrons have achieved values of the coefficient of determination (R2) above 0.9 while offering 200–340 times faster inference speeds compared to physical simulations [26,27,28,29].
Establishing a connection between buildings and DTs involves the coordinated interaction of several layers. BIM models provide the geometric and semantic description of the built asset, serving as the foundation upon which physics-based BEMs are constructed. IoT sensors and actuators, orchestrated through a BMS, supply the real-time and historical thermal and occupancy data required for accurate DT simulations [30,31]. However, integrating these heterogeneous components presents significant challenges: BEM–BMS communication often suffers from system failures, software incompatibilities, and manufacturer-driven fragmentation leading to non-interoperable systems [11,32,33]. These issues are compounded by data discrepancies arising from sensor noise, asynchronous sampling rates, packet loss, and inconsistencies between BIM metadata and the measurements captured by IoT devices [34,35]. Such misalignments can propagate into the DT and compromise the reliability of real-time optimisation under dynamic building conditions [36,37].
In this context, this work aims to bridge this gap by proposing and comparing two alternative approaches for integrating BEMs into BMS to implement energy-saving strategies. To achieve this, two DTs were developed using different technologies. The first is an FMU, created from an EnergyPlus BEM and augmented with an External Interface to enable data exchange. The second is a containerised EnergyPlus simulation, employing Docker to run simulations within an isolated environment. The paper details the real-time implementation of both approaches within an educational building, highlighting the differences observed in their implementation, simulation behaviour, and results. In both cases, the DTs were supplied with data from LoRa environmental sensors installed within the building, in conjunction with meteorological data downloaded from an external provider. Furthermore, the simulations were complemented by the incorporation of predictive meteorological data for the subsequent days. It should be noted that the experiments and tests were conducted during the winter months.
In particular, the study focuses on optimising blind operation during non-operational periods as an energy-saving strategy, supported by data-driven surrogate models that enable fast, containerised, end-to-end computation of optimal set-points. Dynamic control of blinds allows the building to harness passive solar gains when beneficial—such as pre-heating indoor spaces in winter—while avoiding excessive heat losses or overheating. This approach reduces heating demand without requiring any physical intervention in HVAC systems and can therefore be readily implemented in existing buildings. Although the analysis of the results and its effectiveness is beyond the scope of the present work and has been elaborated in another study [38], a brief discussion is provided in this paper.
Beyond the case study, this paper contributes a practical, reproducible guide to the containerisation of EnergyPlus BEMs for direct DT–to–BMS integration, addressing a frequently noted but weakly documented step in the DT pipeline: packaging, orchestrating, and operating BEM simulations as portable services suitable for building control. In addition, the proposed workflow incorporates a lightweight yet robust data-handling layer that ensures temporal alignment and data consistency prior to simulation. Furthermore, the surrogate models employed in this study introduce an additional operational advantage: by executing directly on the project host and relying solely on the most recent validated sensor inputs, they reduce sensitivity to short-term data irregularities and enable robust, low-latency decision-making within the DT architecture.
This document is organised as follows. Section 2 presents the general motivation of the present investigation and the materials used in this work, which involve the case study building, its IoT architecture, and data processing steps. Section 3 describes the methodology followed in this work, encompassing the development of FMU- and Docker-based DTs, the surrogate modelling framework for blind control optimisation, and the implementation workflow. Section 4 shows a comparison between implementation approaches together with the results obtained from surrogate modelling and the energy-saving strategy. Finally, Section 5 provides a comparative discussion of the different methods and results, and the main findings are summarised in Section 6.

2. Materials

This section provides a comprehensive overview that sets the foundation for the present work. It begins by outlining the motivation behind the study, followed by a detailed description of the building for which the DTs were designed, and an explanation of the data processing steps that were taken to prepare the necessary data for simulation.

2.1. General Motivation

The objective of the case study presented in this work was the application of a blind raising/lowering schedule during non-operational days of a building to take advantage of solar energy gains. This approach aimed to prevent excessive temperature decline in specific rooms, thereby reducing heating energy demand on the following working day.
To achieve this objective, two DTs were developed and implemented in a real case scenario, incorporating simulations of both open and closed blinds. The simulation outcomes were compared, resulting in the creation of an optimised schedule that was subsequently applied during the non-operational periods of the building, that is, when it was unoccupied. Consequently, visual comfort aspects, such as daylight availability, glare risk, or electric lighting needs, did not constrain blind operation during the experiments, as the building was unoccupied and no lighting requirements had to be met. More details regarding the energy-saving strategy and the assessment of its performance can be found in [38].
Consequently, the DTs had to be simulated using both historical and predictive data. Initially, historical data established the building’s thermal history, aiding the pre-heating process. Conversely, weather forecast data for non-operational days were employed to evaluate the optimised blind schedule under predicted conditions. A crucial requirement was also maintaining the real-time connectivity between the DTs and the building, enabling them to read both indoor and outdoor environmental sensors’ data as well as the blind schedules of the selected test rooms.
As already mentioned, two deployment approaches and, consequently, two different DT implementations were compared: (1) an FMU-based model and (2) a containerised simulation using Docker. Beyond these physics-based setups, a surrogate model was also introduced as a lightweight, data-driven alternative built upon the same calibrated BEM and designed to support the same energy-saving strategy.

2.2. Pilot Building

This section describes the pilot building for which the DTs were developed, an educational building at the University of Extremadura, providing a detailed description that encompasses its BEM modelling and the IoT architecture of its sensor systems and databases.

2.2.1. Building Description, Energy Modelling and Calibration

The Computer Science Pavilion at the School of Technology of Cáceres (EPCC), one of three similar buildings within the six-building campus (marked with red colour in Figure 1), is the focus of this study. Although the figure depicts several buildings on the campus, the case study concerns exclusively the pavilion where all experiments were conducted. This building operates independently from the others and has no physical or operational connection with them. The pavilion features a central hall with classrooms, laboratories, and offices on two floors, many of which are equipped with controllable blinds that allow dynamic daylight and solar gain management—an aspect that constitutes the main focus of this work. The HVAC system uses boilers for heating via radiators, while cooling is limited to individual air conditioning (AC) units in some rooms. Similarly to the study developed by Guerrero et al. [38], the present work focuses on four upper-floor rooms—PA:023, PA:024, PA:029, and PA:031—which share similar size, orientation, and blind control capabilities.
For this work, an existing “as-built” Building Information Model (BIM) provided the basis for defining the building’s architecture, materials, and construction details. This information was used to develop a BEM in accordance with Option D of the IPMVP [5], which corresponds to a white-box modelling approach. The building volume was modelled using DesignBuilder and then exported to the EnergyPlus format for further adjustment.
Recognising previous findings that highlight the discrepancy between BEM outputs and actual building performance [40], the model was calibrated by tuning model parameters based on measured indoor temperature data from two datasets collected in 2024, each with 10-min intervals, encompassing both the training and checking periods [41]. The calibrated parameters and sub-parameters were the same as Model A indicated in [38], which are: Zone Capacitance Multiplier (temperature capacity multiplier), Window Material (U-Factor), Internal Mass (surface area, thickness, conductivity, density, specific heat, and thermal and solar absorptance), Envelope properties (conductivity, density, specific heat, and thermal and solar absorptance), Zone Infiltration (effective air leakage area, stack coefficient, and wind coefficient), and Zone Mixing (design flow rate). The calibration metrics obtained for rooms PA:023, PA:024, PA:029, and PA:031 during training (May to July 2024) and checking (December 2024) periods were as follows: the Mean Absolute Error (MAE) ranged from 0.42 to 0.70 during the training period and from 0.59 to 0.69 during the checking period; the Root Mean Square Error (RMSE) ranged from 0.52 to 1.01 during the training period and from 0.65 to 0.73 during the checking period; and R2 varied between 95.26% and 98.96% in the training period and between 95.41% and 99.20% in the checking period. Further details on the calibration procedure can be found in [38,42], as this process is not the primary focus of the present study.

2.2.2. IoT Architecture

The IT infrastructure at the EPCC, detailed in [43] and depicted in Figure 2, employs a three-tiered architecture: a front-end for data acquisition (comprising various sensors across the building), a service bus for overseeing service execution and managing communication protocols, and a back-end dedicated to data reception and storage.
The EPCC hosts two virtual machines (VMs). One VM manages core system services, including ChirpStack [44], Docker [45], and Message Queuing Telemetry Transport (MQTT), which is the communication protocol utilised by all sensor types. Docker containers on this VM execute scripts for receiving, processing, and storing sensor data within the database, making its operational status critical for the entire BMS. The second VM hosts an InfluxDB database [46], serving as the repository for the dynamic sensor measurements. Secure access to both the Microservices and Database VMs is provided via SecureShell (SSH) connections through a terminal.
Since 2013, the EPCC building has been progressively equipped with various sensors and actuators, initially as part of the SmartPolitech project [47]. This instrumentation includes environmental, electricity consumption, window opening, and gas consumption sensors, alongside radiator and blind actuators [43,48]. Among these, the environmental sensors and blind actuators are of particular relevance, as they are the ones employed in the present study. Concerning communication protocols, the data from these devices is transmitted using either WiFi or LoRaWAN.
This study utilised LoRaWAN indoor environmental sensors to capture the building’s thermal history. Located across various thermal zones within the Computer Science Pavilion, these sensors record temperature, relative humidity, and CO2 measurements. Additionally, historical opening/closing schedules of the blinds, communicated via WiFi, were incorporated to further define the thermal history. Technical information regarding the sensors and actuators used in this work is displayed in Table 1.
It should be noted that, while the environmental sensor provides measurements of temperature, humidity, and CO2, only temperature readings are utilised in the present work. The accuracy and precision of these sensors are inherently limited; CO2 sensors, in particular, can exhibit drift over time and require periodic calibration to maintain reliability. Humidity measurements may also be influenced by environmental conditions such as condensation or rapid fluctuations in temperature, potentially introducing noise into the data. Additionally, the sampling intervals (15 min for environmental parameters and 5 min for blind actuation) may limit the temporal resolution of dynamic changes, especially for rapidly varying conditions. These factors should be considered when interpreting the sensor data and its potential impact on system performance.

2.3. Data Processing

To perform the DT simulation, it was essential to integrate environmental data from both indoor and outdoor conditions, including the test and adjacent rooms. Schedules for blind operation, HVAC ideal loads, and air infiltration were also included. Historical data from the preceding 15 days were used to define the building’s thermal history, whereas forecast data covered the simulation period during which the optimised blind schedule was applied. As an example, when the simulation commenced on a Friday to account for a weekend schedule, the forecast extended over the subsequent three days, resulting in a total simulation period of 18 days.
In summary, the input data supplied to the DTs, along with their forecast estimations, were as follows:
  • Outdoor environmental data included all relevant weather variables from a nearby station, with emphasis on solar radiation to improve simulation accuracy, though some limitations remained and the variables differed between the two DT approaches, as discussed later in this work. Both historical and forecast data at hourly resolution were retrieved from Open-Meteo’s Historical Weather and Weather Forecast application programming interfaces (APIs) [49] using a Python (version 3.11) command provided in their website, with the download parameters summarised in Table 2. To complete the weather data, the “Horizontal Infrared Radiation Intensity” ( I R H ) variable was calculated as detailed in the EnergyPlus documentation [50] and in Appendix A, as it could not be downloaded from the API.
  • Indoor environmental data included temperature measurements from the test and adjacent rooms obtained through indoor sensors. The historical data was downloaded in CSV format from the building’s BMS through an SSH connection to the VM database accessing the “sensors” database within InfluxDB. Concerning the forecast data, it was estimated as an average of the preceding five days.
  • Blind opening/closing schedules of the test rooms were determined by blinds actuators. Historical blind schedules were retrieved following the same procedure used for the indoor environmental data. For the forecast schedules, two scenarios were simulated to assess the energy-saving strategy: blinds fully open and blinds fully closed.
  • Activation schedules of ideal loads were defined based on the experiments. The system was activated continuously during the historical days, allowing the model to adapt to the environmental conditions and follow as closely as possible the thermal history of the real building. During the test period, corresponding to forecasted unoccupied days, the Ideal Loads were switched off enabling the model to enter a free oscillation state.
  • Schedules of infiltrations were modelled using the Effective Leakage Area (ELA) method.
Concerning the output data, the indoor simulated environmental data (temperature and humidity) as well as the heating/cooling and solar gain/loss consumptions of each of the test rooms were extracted as outputs of the DTs.
Historical outdoor and indoor environmental data were processed using a two-step methodology. First, the data were resampled with linear interpolation to align with the simulation timestep. Next, they were checked and cleaned by removing out-of-range values and filling gaps resulting from sensor failures or the resampling process, following the criteria described below:
  • Gap shorter than 18 timesteps: filled by linear interpolation.
  • Gap longer than 18 timesteps: filled using the arithmetic mean of the corresponding time points over the previous five days.
Finally, the processing of historical open/close schedules of the blinds was done similarly to the indoor environmental data; however, the gap-filling approach differed slightly, as missing values were replaced with the previous blind state, regardless of the gap length.
It should be pointed out that, although these gap-filling rules were defined to ensure consistent data preprocessing, experiments containing extensive or prolonged gaps were discarded from the analysis. The final simulations were performed only with datasets that did not require filling long missing periods.

3. Methods

This section describes the methodological workflow followed to develop, deploy, and test the DTs used in this study. The process begins with the generation of a calibrated BEM and its encapsulation through two complementary integration approaches: FMUs and Docker-based containerisation. Both methods enable direct coupling of the BEM with real building data for simulation and control. In addition, a ML–based surrogate framework was implemented to reproduce the behaviour of the calibrated model and a rule-based (RB) optimisation module with significantly lower computational effort. These surrogates were specifically applied to optimise blind operation during non-operational periods, aiming to maximise passive solar gains and reduce heating demand. The following subsections detail the procedures for FMU creation, containerised simulation, surrogate model training, and the practical implementation of each DT in the case study building.

3.1. Generating an FMU from EnergyPlus

In order to create an FMU from an EnergyPlus (version 8.7) model, the “EnergyPlusToFMU” toolbox must be used. Developed in Python (version 3.11), this software package enables users to export building simulations from EnergyPlus (version 8.0 or higher) as FMUs for co-simulation, compliant with FMI standards 1.0 and 2.0. These FMUs can then be imported into various simulation programs supporting FMI co-simulation [51]. An External Interface object must be added to the EnergyPlus IDF (Input Data File) file in order to be able to create the FMU.
The steps undertaken in this work to create an FMU using this tool and to prepare the corresponding files, as illustrated in Figure 3, were as follows (further details are provided in Appendix B).
  • BEM file: a BEM in EnergyPlus, taken as a basis what is indicated in Section 3.1, was prepared for “EnergyPlusToFMU” toolbox. This involved implementing the FunctionalMockupUnitExport External Interface and defining inputs and outputs (I/O) in the IDF file.
  • Input Data Dictionary (IDD) file: this file specifies the syntax and data structure of all input objects used in EnergyPlus simulations. It defines object classes, fields, measurement units, and descriptive comments specific to each EnergyPlus version, serving as a reference for creating and validating IDF models. In this study, the file was obtained from EnergyPlus version 9.4.
  • Weather file in EPW format (optional): it involved preparing the weather data file for a whole year in hourly sampling. All variables may be included in the file, however, this step is optional and the FMU can be created without specifying it. It is important to note that the use of a weather file in this step may affect the FMU simulation results to some extent. In this work, an EPW file of 2023 weather data was used to create the FMU.
Once all the necessary files are prepared, the FMU can be generated using a Python command specified in Appendix B [51].
Concerning the FMU’s I/O, the variables that can be defined as such are detailed in the EnergyPlus documentation [50]. Regarding outputs, EnergyPlus allows a wide range of model variables to be defined and selected as FMU outputs, depending on the intended purpose of the FMU. The External Interface provides one object for defining outputs, called From:Variable. In contrast, FMU inputs are more limited, restricted to EnergyPlus actuators, schedules, or variables. An important note is that only seven weather variables from the EPW file can be overridden and thus defined as actuators and FMU inputs: outdoor dry bulb temperature, outdoor relative humidity, outdoor dew point, wind speed and direction, and direct and diffuse solar radiation. This limitation in weather actuators can affect the BEM’s results and represents a disadvantage of the FMU approach. To define FMU inputs, the External Interface provides three objects, named as To:Schedule, To:Actuator, and To:Variable, corresponding to schedules, actuators, and variables, respectively.
Table 3 summarises the FMU’s I/O considered for this case study. The FMU inputs were limited to schedules and actuators; therefore, only the To:Schedule and To:Actuator objects of the External Interface were used. The outputs, in turn, were defined using the dedicated From:Variable object.

3.2. DT Based on Docker Container

A Docker container not only allows for the launch of EnergyPlus simulations within an isolated environment but also creates a highly portable, consistent, and reproducible simulation platform. Because the container packages EnergyPlus and all its dependencies, it ensures simulations run identically across different systems, from development to deployment. This isolation also simplifies setup and prevents conflicts with other software on the host machine. Furthermore, the container’s lightweight nature means it can be easily shared, scaled, and integrated into automated workflows, enabling efficient and reliable energy modelling at scale.
It is possible to launch an EnergyPlus simulation within a container by utilising the EnergyPlus Python API, which requires the same files as for simulating with EnergyPlus: (1) a BEM model in IDF format; (2) weather data in EPW format; and (3) other files needed for the simulation, such as historical environmental data or machine schedules, which can be saved in any format read by EnergyPlus. These files are accessed via Python code, which reads them and runs the EnergyPlus simulation in the container.
In this work, two Docker containers have been developed to perform two interconnected services to manage EnergyPlus simulations, as seen in Figure 4. The main features of this architecture include:
  • Simulation management, enabling job creation, deletion, and general oversight.
  • Real-time display of simulation results, with the capability to retrieve data for selected output variables and simulation zones.
  • Download of results as a ZIP file upon simulation completion.
On the one hand, the FRONTEND service exposes a JavaScript-based frontend along with a REDIS REDIS: https://redis.io/docs/latest/ (accessed on 16 April 2025) queue for launching and managing simulation jobs. On the other hand, the WORKER is responsible for executing the simulations as it integrates EnergyPlus in the container. Both services and their submodules are interconnected using REDIS as a database and Python with RQ RQ: https://python-rq.org/docs/ (accessed on 16 April 2025) to manage the job queue, as seen in Figure 4.
Finally, the user interacts with the services via either a Rest API or a web interface. This is performed using the required simulation files and transmitting all data to a local server via a HyperText Transfer Protocol (HTTP) POST request. Subsequently, a Python script automates the process of downloading and unzipping the simulation results to a local folder, then deleting the simulation from the server to optimise resource allocation.
For this work, the BEM used as a basis for containerised EnergyPlus simulations was that detailed in Section 2.2.1. The inputs pertaining to indoor temperatures, blinds, HVAC, and infiltrations were designated as schedules in the IDF, while the outputs of the DT were defined as variables in the IDF. The weather data was incorporated into the simulation by means of the EPW file; therefore, it was not necessary to add these variables as inputs inside the IDF. In summary, the BEM I/O are listed in Table 3.
While Docker supports explicit memory and CPU limits for container isolation, these options were deliberately left unused to maintain methodological symmetry with the FMU-based setup. Applying resource throttling would have biased runtime measurements and hindered a like-for-like comparison. By running both DT implementations under identical, unrestricted hardware conditions, the analysis captures intrinsic differences in execution behaviour rather than artefacts of container-level resource management.

3.3. Integration of Online Rule-Based Blind Control

Beyond the FMU- and Docker-based implementations described above, we introduce a ML-based approach creating a surrogate model to accelerate the decision process for blind operation within the DT structure. Unlike prior work by the authors (where surrogate models directly generated optimal HVAC temperature set-points [24]), the objective here is to predict binary blind states (0 = closed, 1 = open) at each timestep. These schedules are designed to maximise passive solar heat gains during non-operational periods while avoiding excessive losses, following a RB control strategy previously implemented with a calibrated physics-based BEM [38]. Training data are obtained by coupling the BEM with the RB optimiser to produce an optimised blind schedule. Inputs include exogenous weather variables (dry-bulb temperature, relative humidity, atmospheric pressure, direct and diffuse solar radiation, wind direction and speed, and precipitation), timestamp encodings, and actual monitored indoor air temperature. The output comprises the optimised 0/1 position per thermal zone and timestep.
Building on this formulation, we compare two surrogate schemes that trade off simplicity, interpretability, and robustness. The stand-alone (end-to-end) method learns the direct mapping from inputs to the zone-wise binary schedule, yielding 0/1 trajectories in a single inference step with minimal latency and implementation effort. The two-step regression method first approximates key BEM-derived results that drive the RB logic (e.g., window heat gains/losses), and then feeds these estimated physical features into a surrogate optimiser to obtain the final 0/1 schedule. While the stand-alone model prioritises computational efficiency, the two-step scheme preserves physical interpretability and may be more robust under distribution shifts.
From an implementation standpoint, previous to this study, the pure Docker-based workflow for blind optimisation required downloading simulation outputs (e.g., CSV results files) from the container to a client, post-processing them to derive the schedule, and then uploading the resulting timetable back to the platform for actuation. In contrast, the surrogates can be serialised as a lightweight .pkl file and executed in situ within the same Docker worker that runs the DT, computing the optimised 0/1 schedules directly without intermediate transfers or manual interference required. This eliminates I/O overhead and round-trips, reduces end-to-end latency, simplifies operations, and enables (near) real-time BMS/MQTT actuation while retaining the robust control intent of the physics-based strategy at a fraction of the computational cost.

3.3.1. Original Blind Control Optimisation (Physics-Based, Rule-Based)

The original RB optimisation method computes optimal open/close schedules for window blinds to harvest passive solar gains during non-operational periods (e.g., weekends), thereby reducing heating demand at the next start-up (e.g., Monday morning). The strategy relies on a calibrated physics-based BEM that reproduces the building’s thermal response with high fidelity, using recent indoor measurements to reconstruct the thermal history and short-term weather forecasts to project conditions over the optimisation horizon. Blind position also affects modelled infiltration (different leakage states when blinds are open/closed), so both radiative and infiltration-related effects are consistently captured within the same simulation framework.
At each timestep, the BEM predicts zone temperatures and window heat gains/losses for alternative blind states. A transparent RB controller selects the action according to:
  • Gain-seeking rule: open when the predicted net window heat gain is positive and the zone temperature remains below an upper comfort/operational bound.
  • Loss-avoidance rule: close otherwise to limit nocturnal/overcast losses or to mitigate excessive temperature rise.
  • Stability safeguards: enforce minimum dwell time, apply hysteresis bands on temperature and gains, and impose time-of-day constraints to avoid chattering and ensure compliance with occupancy policies.
Facade orientation, external shading from surrounding buildings, and inter-zone interactions are implicitly accounted for by the BEM geometry and radiative model; the rules act on predicted gains/losses and temperature trajectories rather than raw irradiance alone.
The end-to-end procedure is:
  • Thermal history: ingest recent indoor measurements (and baseline blind operation) to initialise the BEM state.
  • Forecast-driven simulation: run the calibrated BEM forward over the non-operational horizon under the rule set, evaluating candidate blind actions.
  • Schedule synthesis: assemble a binary timetable per zone and timestep ( 0 = closed , 1 = open ), enforcing dwell-time and policy constraints.
  • Export and actuation: write the final schedule (e.g., CSV) and dispatch it to the BMS (e.g., via MQTT) for automated execution.
This physics-based, rule-driven optimisation provides interpretable decisions, leverages the calibrated model to account for site-specific phenomena (shading, envelope, infiltration), and yields measurable reductions in start-up heating demand. By exploiting weekend solar gains where beneficial and preventing excessive losses otherwise, the method reduces grid demand and improves operational efficiency without modifying the HVAC plant. The resulting zone-wise 0/1 schedules are directly actionable within the DT workflow and compatible with both FMU- and Docker-based deployments.

3.3.2. Stand-Alone vs. Two-Step Methods for Optimisation Surrogation

Building on our previous study on ensemble surrogate modelling, the general procedure for creating surrogates followed the same pipeline: coupling the calibrated BEM with the RB controller to generate labelled schedules, assembling features from weather, timestamps, and recent indoor conditions, and adopting temporally robust splits to avoid leakage and ensure operational validity [24]. Within this framework, we consider two complementary variants—stand-alone and two-step—summarised below.
Let x t denote the input feature vector at timestep t (weather, timestamp, recent indoor air conditions), and let w t { 0 , 1 } Z be the zone-wise blind state (0 = closed, 1 = open) for Z zones. The goal is to produce a daily sequence { w t } t = 0 T that maximises passive solar gains during non-operational periods while avoiding excessive losses, following the same control intent as the physics-based rule set.
The stand-alone approach learns a direct mapping
f θ : x t w ^ t
using a multi-output regressor. It outputs the 0/1 schedule per zone in a single inference (see schematic in Figure 5). This design minimises latency and engineering complexity, and is therefore suitable for real-time deployment and edge computing scenarios. Inference is fast (sub-second for a full day on commodity CPUs), and the model can be serialised as a compact .pkl file.
The two-step approach first emulates key BEM-derived quantities that drive the RB logic,
g ϕ : x t z ^ t ,
z ^ t = { Open Window Heat Gain ^ , Open Window Heat Loss ^ , Closed Window Heat Gain ^ , Closed Window Heat Loss ^ }
Secondly in the two-step approach, the original RB optimiser described in Section 3.3.1 is replaced with a light regressor h ψ ( z ^ t ) trained to mimic the rules, which removes the rules engine from the online path while retaining the physics-informed features. See schematic of the two-step approach in Figure 6.
h ψ : x t z ^ t ,
This preserves physical interpretability and direct compatibility with the existing control logic; updates to rules or thresholds are immediately reflected without retraining g ϕ .
Both schemes are trained on labels generated by the calibrated BEM coupled to the RB optimiser (Section 3.3.1): { x t , w t } . To avoid leakage, we adopt time-series splits (e.g., expanding-window CV). We report accuracy together with training and inference runtimes. For the two-step method we additionally report regression errors for z ^ t , such as RMSE or MAE, to ensure that intermediate physics proxies remain within acceptable error bands.
In the current Docker workflow, blind optimisation requires downloading simulation outputs from the container, post-processing them client-side to derive the schedule, and uploading the final timetable back to the platform for actuation. With either surrogate, the model can be shipped as a .pkl and executed in situ within the same Docker worker that runs the DT, computing the zone-wise 0/1 schedules directly and eliminating intermediate transfers.

3.4. Implementation Workflow of the DTs

The steps taken to implement the DTs in the case study are shown in Figure 7. The initial step entailed the download and processing of the input data required for the models, as already detailed in Section 2.3. Then, the DTs were simulated and, once the results were obtained, the energy-saving strategy was evaluated, obtaining optimised blinds schedules that were sent to the BMS to act on the blinds. The subsequent sections provide a detailed description of these last three steps.

3.4.1. Simulation of the DTs

FMUs can be executed by a variety of software as long as they comply with the FMI standard [52], acting as the master to orchestrate the simulation and run EnergyPlus as a slave. While Modelica and Dymola are common choices in the literature for modelling partial building systems [12,13], Python libraries also exist for simulating EnergyPlus FMUs [16]. However, at the time of this work, these Python libraries were outdated and no longer in use. Moreover, compatibility issues with other Python libraries prevented the simulations from running in this software.
Therefore, in the search for more robust alternatives, the simulations were carried out in MATLAB®/Simulink® (version 2025b). This platform offers a dedicated FMI block that supports FMI versions 1.0, 2.0, and 3.0 [53], which automatically detects whether an FMU is for co-simulation or model exchange and configures the corresponding I/O ports. MATLAB®/Simulink® was selected for FMU simulation due to its stability, active support, and ability to handle both input and output processing within a single environment, ensuring a reliable and reproducible workflow for EnergyPlus integration.
On another note, the Docker-based DT was simulated within a Python environment specifically designed to orchestrate EnergyPlus executions inside isolated containers, as detailed in Section 3.2. This setup ensured a consistent and reproducible runtime across systems, while simplifying dependency management and avoiding compatibility issues typical of local installations. The containerised structure also facilitated real-time interaction with input data and automated export of simulation outputs, providing a scalable and lightweight alternative for implementing the DT workflow.

3.4.2. Actuation to the Building

Following the completion of simulations, the energy-saving strategy was evaluated by processing the results. The final output of this evaluation was an optimised blinds schedule, specifying the daily times for raising and lowering blinds to optimise solar energy utilisation. These schedules were stored in comma-separated CSV files, specifying the date and time (dd/mm/yyyy HH:MM:SS) and a binary code (0 for blinds down, 1 for blinds up).
The CSV files were then sent to the BMS’ Microservices VM, which hosts the MQTT broker, using the SCP (Secure Copy Protocol) command via Python and previously establishing an SSH connection between the computer and the VM. A Python script running on the Microservices VM continuously monitored the CSV files for updates, read the designated times for raising or lowering the blinds, and subsequently sent the corresponding commands to the blind actuators.
Once the CSVs were received in the VM, they were read to identify the date and time of each blind raise/lower and acted upon by Mosquitto. The command used for the action is as follows:
f’mosquitto_pub -t “{BlindCode}” -m “A”
where BlindCode is the code assigned to each blind in the database and A is the binary code to raise or lower the blind.

3.4.3. Simulation Setup

The simulations of the DTs were performed in a computer equipped with an 11th Gen® Core™ i7-1165G7 processor running at 2.80 GHz, 16.0 GB of installed RAM, and a 64-bit OS on an x64-based architecture. This computer was connected to the same network as the VMs of the BMS.
Simulation models for both DTs were developed with EnergyPlus in its 9.4 version. The FMU was simulated within MATLAB® R2024b version, and the EnergyPlus containerised simulation was employed with Python 3.11.9 version.
Concerning the simulation interval, it was set to 10 min as a compromise between the different sensor resolutions and the computational demands of the co-simulation. Given that blind actuation was measured at 5-min intervals and environmental sensors at 15-min intervals (see Table 1), a 10-min timestep was selected to represent both processes with sufficient accuracy while maintaining a manageable simulation time. In addition to these considerations, the choice of timestep was further informed by the characteristics of the key variable used for model calibration: the indoor air temperature, which is recorded at a fixed 15-min sampling interval. Employing a significantly finer timestep would increase missing observational data, requiring additional interpolation that would introduce artificial uncertainty without improving the model’s ability to represent building thermal dynamics. Consequently, this 10-min timestep ensured stable solver performance without sacrificing system fidelity.
This timestep choice is further supported by previous calibration efforts, in which a 10-min interval has consistently yielded stable and reliable outcomes. Earlier studies [54,55], as well as the calibration of the BEM employed in the present work, were likewise conducted using temperature datasets sampled at this same temporal resolution. Collectively, these experiences offer empirical evidence that a 10-min timestep is appropriate for capturing the building’s thermodynamic behaviour.
Finally, an important note concerning FMU simulation is that the sampling period must match the timestep indicated in the IDF file, converted to seconds. In this case, a 10-min timestep in the IDF translates to a 600-s sampling period in MATLAB. The simulation time frame was specified as a one-dimensional array in seconds, starting at zero, incrementing by 600 s, and concluding with the total seconds corresponding to the full simulation duration. In this specific case, simulating 18 days resulted in the array’s final element being 1,555,200 s.

4. Results

This section presents the main results obtained from the implementation and testing of the proposed DTs. First, the performance of the FMU- and Docker-based approaches is compared in terms of simulation behaviour, computational efficiency, and practical applicability. The analysis highlights their respective advantages and limitations when integrating calibrated BEMs into real-time building operation. Subsequently, the outcomes of the surrogate models are evaluated, focusing on their ability to replicate the physics-based blind control strategy and to generate optimal schedules with minimal computational cost. Finally, the energy savings achieved under different modelling approaches are compared, demonstrating the potential of surrogate-assisted optimisation for efficient and scalable building operation.

4.1. General Comparison Between FMU- and Docker-Based DTs

The comparison between the EnergyPlus models for the FMU and the container shows that, in both cases, an IDF must be used where I/O such as schedules, actuators, or variables have already been defined. While it is possible to start from the same IDF in both cases, the FMU requires additional preparation to add the External Interface and the FMU I/O with the objects indicated in Table A1 of the Appendix B. For simple BEM models with a small number of thermal zones (as is the case in this paper), the creation of the FMU is not a time-intensive process. However, this could take much longer for more complex models with a large number of thermal zones, which could be the case when implementing these strategies for a whole building.
Comparing inputs and outputs of both approaches, presented in Table 3, it can be extracted that schedule I/O coincided in both cases, while the main difference was found in weather variables. As stated before, weather inputs are restricted in the FMU, while the EnergyPlus container allows to use all variables included in the EPW file. Thus, given that the FMU accepts a maximum of seven weather inputs, the influence of other variables cannot be accounted for in the simulations. Advantages and disadvantages of both methods are presented in Figure 8. Green checkmarks indicate the aspects where one method outperforms the other, inversely for red crosses.
Moreover, it has been determined that the variables incorporated into the EPW which were not defined as FMU inputs significantly impact the outcomes, since the simulation retrieves these values directly from the EPW file used to generate the FMU. Similarly, the values of other EPW variables during the initial days of the year can also impact results. This occurs because the FMU does not allow simulation dates to be specified, with its time vector inherently starting at zero. Consequently, the simulation incorrectly assumes the initial days of the year for its time frame, incorporating variable values from this period. For example, rainfall from the EPW’s initial days can affect results, particularly if precipitation occurred then. Therefore, when creating the FMU, this should be addressed by modifying the EPW to zero out these variables for the initial days, by generating the FMU without an EPW entirely, or by rebuilding the FMU for each simulation, which implies a substantial workload.
With regard to the simulation, it has been determined that a one-timestep temporal discrepancy exists between the outcomes of the FMU and the containerised EnergyPlus simulation. This delay is attributable to the discrepancy between the FMU solver and the Simulink solver in this instance. Since the FMU was generated for co-simulation, the simulation is primarily governed by the internal solver of the EnergyPlus FMU, which is embedded within the FMU binary, while MATLAB®/Simulink® functions solely as the master, providing inputs and receiving outputs at each timestep. To ensure proper synchronisation, a fixed-step solver must be employed in Simulink to match the timestep of the EnergyPlus solver. Although several fixed-step solvers were evaluated, the observed one-timestep discrepancy could not be eliminated, since the FMU’s internal solver ultimately determines the simulation results. Consequently, the step size cannot be modified independently and must remain identical to that of the original EnergyPlus model. Likewise, tolerance settings in Simulink are only relevant for variable-step solvers and do not apply to fixed-step configurations; similarly, while the FMU may include internal tolerance settings, these have no effect in co-simulation mode, since the FMU advances its states according to its own solver logic and numerical precision.
The temporal discrepancy can, theoretically, be resolved by generating the FMU with FMI version 3.0 and adjusting certain simulation options. However, it should be noted that this is not a possibility in the case of FMUs created with the EnergyPlusToFMU tool, which only supports FMI versions 1.0 and 2.0. Therefore, the influence of this delay on the simulation results and their application to the real building should be evaluated prior to real implementation. In particular, although a one-timestep delay may appear negligible, it could affect the performance of real-time control strategies, such as blind actuation or HVAC regulation, where timely responses are critical. To mitigate this limitation, several strategies can be considered:
  • Conducting sensitivity analyses to quantify the impact of the delay on control performance;
  • Incorporating predictive control schemes that anticipate system dynamics and compensate for the lag; and
  • Post-processing the simulation results to align signals for off-line analyses.
These measures help ensure that the temporal discrepancy does not compromise the reliability of the proposed strategies when transitioning from simulation to real implementation.
Furthermore, a notable difference between both approaches is their reliance on different software for simulating each approach. In order to simulate the FMU, a master software—MATLAB (version 2025b) in this study—and EnergyPlus are required, whereas for containerised EnergyPlus simulations only EnergyPlus and Docker are needed. In the first case, it will also be necessary to have the corresponding licence for the master programme, if necessary, and ensure that it can be installed on the computer or VM used for the simulation.
A further advantage of the containerised approach is its inherent OS independence. FMUs are generated for a specific OS, necessitating checking compatibility before simulating an FMU on a different machine. Otherwise, re-creation and installation of Python libraries are required. For these reasons, the installation and implementation of containerised EnergyPlus appears to be more straightforward and replicable in principle, as well as being a portable solution for different systems and buildings.
Regarding execution times, the FMU-based simulation ran approximately twice as fast as the Docker-based approach in our tests—4.5–6.5 min of FMU approach versus 10–11 min of Docker—. However, this difference must not be interpreted as an intrinsic advantage of FMU encapsulation. In our implementation, the FMU was executed in MATLAB®/Simulink®, which benefits from an optimised co-simulation engine, whereas the Docker workflow relied on native EnergyPlus invoked through a Python microservice using Redis and RQ for job management. The measured runtime differences therefore reflect the combined effects of these environments, including solver implementation and orchestration overhead, rather than encapsulation alone.
Moreover, the adoption of MATLAB®/Simulink® as the FMU master was not a design preference but a practical consequence of current tool support: at the time of the study, we were unable to execute EnergyPlus-generated FMUs reliably using the available Python libraries, which were outdated or incompatible with recent dependencies. As a result, FMU-based and Docker-based DTs were implemented through different software stacks, and the conclusion that “FMUs execute faster” should be understood as specific to these stacks and not generalised to all possible configurations.
Despite this limitation, reporting the end-to-end execution times remains relevant. Operational DTs must consider not only the simulation engine but also the surrounding integration layers, and our results provide a realistic picture of the practical overhead imposed by each workflow under currently available toolchains. This practice-oriented comparison is particularly valuable in a context where fully operational FMU- and container-based DTs in buildings are still emerging, and concrete implementation experiences remain scarce.

4.2. Surrogate Modelling for Blind Control Optimisation

The surrogate modelling framework was adopted not only as an alternative to the physics-based, rule-driven optimisation previously implemented with calibrated BEMs, but also to remove the I/O bottleneck of the original pipeline. In the FMU/Docker workflows, deriving blind schedules required running full EnergyPlus simulations, exporting CSV results, downloading them to a client for post-processing, and re-uploading the optimal timetables for actuation. By contrast, the surrogate models learn the mapping from environmental inputs to optimal blind states and is executed in situ inside the Docker worker, emitting the final open/close schedule directly—without exporting simulation outputs, transferring files, or performing any local post-processing. This design collapses the “download–process–upload” loop, cuts end-to-end latency to milliseconds, and streamlines MQTT integration with the BMS.
Results showed that different surrogate strategies offered complementary benefits. The stand-alone models ( f θ ) directly predicted the binary trajectory from weather and indoor variables; ensemble methods such as Extra Trees and LightGBM consistently outperformed linear baselines, achieving MAE <   0.07 and R2 in the 0.84–0.86 range (Table 4). These figures confirm that comparatively simple regressors can replicate the BEM-based controller’s logic at negligible computational cost, yielding daily schedules in real time within the worker and with no ancillary data handling.
The two-step surrogation method ( g ϕ + h ψ ) is designed to emulate intermediate BEM outputs—namely, window heat gains and losses—through g ϕ and then pass these proxies to a surrogate optimiser. Because  g ϕ predicts raw energy magnitudes (with ranges orders of magnitude larger than the binary targets in f θ and h ψ ), absolute error metrics such as MAE/RMSE appear numerically higher in Table 5. This difference reflects the scale of the predicted variables, not a loss of relative fidelity. When assessed with scale-independent measures (e.g., R 2 ) or normalised error criteria, g ϕ attains competitive accuracy (Table 5), and the resulting schedules capture the intended open/close dynamics with sufficient precision. A key advantage of this design is traceability: by exposing interpretable physical features, g ϕ preserves a direct link to the original rule set and accommodates changes in thresholds or constraints without re-engineering the whole data pipeline.
By contrast, g ϕ exhibited lower accuracy, with numerically higher MAE and RMSE values. This behaviour is expected, since g ϕ is designed to replicate raw physical outputs of the BEM (e.g., window heat gains and losses), which span larger numerical ranges and depend on a greater number of interacting and non-linear variables. In this sense, predicting intermediate physical quantities is inherently more challenging than directly estimating the final blind states, which involve a more compact and less complex mapping. As a result, although  g ϕ retains valuable physical interpretability, its predictive performance remains below that of the other two surrogates ( f θ and g ϕ ).
The h ψ surrogate configuration yielded the best overall results, achieving R 2   >   0.96 and MAE   0.01 with models such as K-Nearest Neighbours, Extra Trees, and Random Forest (Table 6).
A comparative summary (Table 7) highlights that: stand-alone surrogates maximise speed and simplicity for ultra-low-latency or edge scenarios; and two-step surrogates favour interpretability and policy robustness, while assuring sub-second execution.
Overall, the surrogates reproduce the operational schedules of the physics-based pipeline while eliminating the need to download, post-process, and re-upload simulation results. This materially reduces computational and network overheads, simplifies operations, and enables near real-time responsiveness in the DT framework, with seamless hand-off to the building’s BMS via MQTT.
Note that cross-model comparisons of absolute error magnitudes (MAE/MSE/RMSE) between surrogate models are not directly meaningful due to the very different target scales; scale-independent metrics (e.g., R 2 ) provide a fair basis for comparison.
If the priority is minimal latency and operational simplicity (e.g., tight actuation windows, edge compute), the stand-alone model is preferable. If traceability, auditability and robustness are paramount (e.g., heterogeneous facades, evolving policies, regulatory contexts), the two-step scheme is advantageous. Both options drastically reduce computational cost vs. looping full BEM simulations, enabling (near) real-time scheduling and streamlined Docker-based operation without download/upload round-trips.

4.3. Comparison of Energy-Saving Results

In order to facilitate a comparative analysis of the various methods examined in this study, simulations were conducted over the course of two weekends in February 2025 (specifically, on the 8th–9th and 22nd–23rd, henceforth designated as periods 1 and 2, respectively). The simulations were conducted on the Friday preceding each weekend, thereby ensuring optimal blind schedules for energy savings. These schedules were then applied to the blinds during the two-day period. In reality, the schedules that were applied were those of the EnergyPlus container and the FMU, with the aim of comparing both implementations in a real application. The surrogate models f θ and h ψ were compared with the previous ones using the simulation results only. Furthermore, simulations were conducted with the blinds closed throughout the weekend in order to calculate the energy savings of the other models in comparison to the typical situation when the building is unoccupied, i.e., closed enclosures.
In this section, the optimal blind schedules obtained from each model are firstly compared, followed by the analysis of energy demand and energy savings when applying each optimal schedule.

4.3.1. Optimal Blind Schedules

Table 8 presents the optimal blinds schedules obtained by each model for each room and day. On initial observation, it becomes evident that the opening times for the blinds exhibit a high degree of similarity across all models and rooms. However, a more pronounced variation is observed in the closing times. It is evident that as the date and season of the year progress, the opening of the blinds is brought forward, with differences of up to half an hour between one weekend and another. Conversely, closing times are progressively delayed, presumably to take advantage of the increased daylight hours as the year progresses.
A closer analysis of the opening of blinds reveals that the EnergyPlus container schedules are consistently later, while the FMU opens 10–20 min earlier. In terms of closure, the EnergyPlus container has been found to maintain the blinds in an open position for a greater duration, whilst the FMU has been observed to close them earlier. With regard to f θ and h ψ , their closing times deviate from those of the EnergyPlus container (the model used for their training) by up to one hour in some cases. These discrepancies arise from the simplified nature of the surrogate models, which approximate the control logic of the physics-based simulations rather than reproducing their exact dynamics.
It is evident that the FMU exhibits more consistent opening-closing patterns, while the EnergyPlus container, f θ , and  h ψ demonstrate greater variability in their schedules. This finding suggests that these models may be better adapted to the climatic and interior conditions of the building, resulting in more variable and adapted schedules. However, the FMU has been observed to underperform in accurately capturing meteorological phenomena and indoor environmental conditions, thereby producing more stable but less responsive schedules in most cases.

4.3.2. Expected Energy Demand and Savings from Simulations

In this section, the results of the simulations carried out with predictive climate data, performed on Fridays, are firstly compared to ascertain the energy savings obtained with each optimal blind schedule proposed in Section 4.3.1. Secondly, the savings that would be obtained with each optimal blind schedule are assessed and compared among models.
As demonstrated in Table 9, where the energy consumption of all models is shown for both periods, it is evident that, with the exception of room PA:029, all models exhibit a reduced energy consumption than in the case with the blinds closed. However, in room PA:029, the converse is observed: all models exhibit marginally higher consumption. Consequently, with the exception of this particular room, all models obtain an optimal blinds schedule that facilitates energy savings. Notably, room PA:024 exhibits the most substantial reduction in consumption when compared to the scenario where the blinds are fully lowered.
In order to facilitate a more precise evaluation of the energy savings for each room, these have been calculated based on the simulation with the blinds closed as follows:
E S i ( % ) = E D c l o s e d b l i n d s E D i E D c l o s e d b l i n d s × 100
where E D c l o s e d b l i n d s is the energy demand for the closed blinds case, and  E S i and E D i are the energy saving and demand, respectively, for model i, which can be EnergyPlus container, FMU, f θ , or  h ψ .
The energy savings for each model and room during periods 1 and 2 are tabulated in Table 10. As also depicted in Table 9, the room designated as PA:024 demonstrates the highest savings across both periods, while PA:029 exhibits a contrasting scenario, characterised by a decline in energy efficiency and an increase in energy consumption, as evident in Table 9.
A comparison of the four models reveals that the one offering the greatest energy savings does not coincide between the rooms, although it does match for each room and both periods. For PA:023, the  f θ model offers superior energy savings, while for the PA:024 and PA:031 rooms, the optimal choices are determined to be the FMU and EnergyPlus container, respectively. Furthermore, the second model for which savings are greatest coincides for rooms PA:023 and PA:031 and for both periods, being model f θ . In relation to room PA:029, the model yielding the lowest possible energy demand should be selected, i.e., the savings (although negative) should be as close to zero as possible. Consequently, the models that demonstrate the highest level of savings are f θ for period 1 and h ψ for period 2, both of which are surrogate models. From this analysis, it can be concluded that the h ψ surrogate model provides superior energy savings on three occasions, outperforming the other models.
However, it should be pointed out that there are no significant discrepancies in energy savings above 1% between the models. Specifically, for rooms PA:024, PA:029, and PA:031, the only discrepancies observed are of a decimal nature; as such, the results obtained are highly likely to be comparable among all models. Nevertheless, PA:023 constitutes an exception, with a disparity of 2.47% between the maximum and minimum energy savings (models h ψ and EnergyPlus container, respectively), which represents a considerable difference that should be taken into account for this room.

4.3.3. Comparison of Obtained Energy Savings in Simulated and Actual Scenarios

As previously mentioned, the implementations proposed in this study, specifically the EnergyPlus container and the FMU, were applied in reality and the optimal schedules obtained were sent to the blinds to be executed over the weekend. In order to compare these implementations, the models were simulated using real temperature data from the weekend, taking into account the optimal schedules applied to the blinds. This facilitated the estimation of simulated energy demand using real data, as well as the calculation of estimated energy savings. The schedules that were determined to be optimal were applied to various rooms: the optimal FMU schedule was implemented in rooms PA:023 and PA:031, while the EnergyPlus container schedule was applied to rooms PA:024 and PA:029, as they are symmetrical to each other within the building.
The results of the aforementioned simulations are displayed in Table 11, where energy consumption and savings have been calculated solely for those rooms in which the optimal blind schedule has been implemented. Furthermore, the energy savings have been calculated according to Equation (1) based on consumption with the blinds closed, which is also shown in Table 11. In an initial analysis, it is evident that the EnergyPlus container offers greater savings for each facade in comparison to the FMU. The EnergyPlus container demonstrated significant energy savings of 74.17% and 73.29% for the east facade during periods 1 and 2, respectively, while the FMU offered savings of 50.68% and 59.39% for the same periods. Furthermore, savings for the west facade were 82.97% and 82.02% from the EnergyPlus container during periods 1 and 2, respectively, and 77.10% and 79.00% from the FMU.
Beyond the quantitative results, it is instructive to compare the behaviour of the surrogate-driven schedules with those derived from the physics-based simulations (FMU and Docker). As shown in Table 11, the energy savings obtained by the surrogate models were generally within the same range as those produced by the calibrated BEMs, with discrepancies typically below 1–2%. This confirms that the surrogate approach preserves the control intent of the physics-based optimisation while offering much faster computation.
In practical terms, the FMU and Docker simulations required full EnergyPlus executions lasting several minutes per scenario, whereas the surrogates produced equivalent 0/1 blind schedules in a few milliseconds within the same Docker worker. This reduction in end-to-end latency enables near real-time schedule generation and immediate actuation through MQTT without manual post-processing.
From an operational perspective, the FMU and Docker workflows remain indispensable for model calibration and physics validation, ensuring traceability and physical consistency. However, once these models are validated, surrogate inference can replace repetitive optimisation loops during daily operation, maintaining accuracy while significantly reducing computational and data-transfer overheads. Together, these complementary methods establish a practical balance between fidelity and responsiveness, allowing DTs to operate efficiently at both design and operational stages.

5. Discussion

In this section, the results obtained across all experiments are synthesised and interpreted by comparing FMU, Docker and surrogates, along with the main limitations of the study and the extent to which the findings can be generalised.

5.1. Evaluation and Comparison of DT Architectures

The results obtained in this study allow for a critical assessment of the practical applicability, advantages, and limitations of the different approaches proposed for the implementation of DTs based on BEMs. The comparison between FMU- and Docker-based strategies (Section 4) shows that, although both enable direct coupling of the BEM with the BMS, they exhibit complementary characteristics in terms of portability, scalability, and implementation effort.
The FMU-based approach demonstrated higher computational efficiency, with simulation times approximately twice as fast as those obtained with the Docker implementation, prior to surrogation. This performance gain may be particularly relevant in contexts where short response times are required, such as closed-loop control or predictive operation with limited computational resources. However, this gain in speed comes at the cost of greater technical complexity during model preparation and reduced flexibility during deployment. The need to generate an FMU specific to each OS, together with the limitation of only seven weather input variables, restricts its scalability and complicates replication across different buildings or computing infrastructures. In contrast, the Docker-based implementation simplifies deployment and ensures reproducibility, allowing simulations to run identically across any environment without software conflicts. This aligns with recent research that highlights containerisation as a core enabler of scalable and cloud-based DT architectures [17,18,19].
Although Docker simulations required approximately twice the execution time of the FMU, this difference is not operationally limiting, particularly considering the gain in robustness, maintainability, and the ease of integration with auxiliary services such as automated data ingestion or visualisation modules. Consequently, the Docker-based DT stands out as a portable and practical alternative, enabling reproducible simulations and facilitating real-time communication with IoT and BMS infrastructures. These properties are especially valuable for scaling the methodology to multi-building environments or for integration into cloud services.
Experimental results confirmed that both implementations produced highly consistent blind opening and closing schedules (Section 4.3.2). Temporal differences between the models were below one hour, indicating coherent representations of the building’s thermal response. Although a one-timestep (10-min) offset was identified between FMU and Docker simulations, its impact on predicted heating demand and overall savings was negligible. The simulated energy reductions ranged from 10% to 15% compared with the static closed-blind configuration, confirming that the proposed control strategy effectively harnesses passive solar gains during unoccupied periods without requiring physical HVAC retrofits. These findings are consistent with prior research on predictive blind control and energy-aware management in buildings [24,38], validating the robustness of the implemented strategy.
The comparison between simulated and real-world applications also showed strong agreement, confirming the reliability of both DTs for predictive and operational use. Some deviations were observed, mainly related to sensor limitations, variations in local climatic conditions, and the limited temporal resolution of the BMS datasets. These discrepancies emphasise the importance of continuous calibration and periodic validation, as recommended in recent DT literature [10], to sustain long-term accuracy and adaptability under changing boundary conditions.
The incorporation of surrogate models within the Docker workflow represents a significant methodological improvement in terms of computational scalability and operational efficiency. In addition to replicating the optimisation logic of the physics-based controller with negligible computational cost (MAE  <   0.07 when predicting binary blind states), the surrogates simplified the overall workflow. In the original Docker-based pipeline, blind optimisation required downloading simulation outputs from the container, post-processing them externally to generate the schedule, and uploading the resulting timetable back for actuation. In contrast, the surrogate models can be serialised as lightweight .pkl files and executed in situ within the same Docker worker that hosts the DT, computing the optimised 0/1 schedules directly without intermediate data transfers or manual steps. This integration effectively mitigates the I/O bottleneck of the original process, reduces end-to-end latency to milliseconds, and enables near real-time actuation through MQTT, while maintaining the control intent of the calibrated BEM. Ensemble methods such as Extra Trees, LightGBM, and Random Forest consistently outperformed linear baselines, corroborating findings from previous surrogate-based optimisation frameworks [22,24].
The comparison between surrogate strategies revealed complementary advantages. The stand-alone model ( f θ ) maximises inference speed and implementation simplicity, making it suitable for low-latency or edge-computing applications. Conversely, the two-step approach ( g ϕ + h ψ ) enhances interpretability by predicting intermediate physical quantities such as window heat gains and losses before deriving the final blind states. This structure provides direct traceability to the original RB controller and allows for straightforward updates to operational thresholds without retraining. Depending on the application domain, either strategy can be prioritised: the former for computationally constrained environments, and the latter for regulatory or auditability contexts where interpretability is essential. In both cases, the surrogates preserved the control intent of the calibrated BEM while drastically reducing computational and data-handling overhead.
Overall, the results highlight the value of combining calibrated models, containerised simulation, and surrogate-based acceleration as complementary pillars for operational DTs. This integration balances physical fidelity and responsiveness, bridging the gap between high-fidelity simulation and real-time building operation. Nonetheless, certain limitations should be acknowledged: the restricted number of thermal zones analysed, the winter-specific conditions of the case study, and the absence of occupant comfort and multi-system coupling analyses (e.g., lighting, ventilation).
In summary, the proposed combination of FMUs, Docker containers, and surrogate models demonstrates that hybrid DT workflows can effectively transition from theoretical modelling to operational decision-making. The presented methodology preserves physical consistency while enabling scalable, low-latency, and data-driven control—paving the way toward adaptive, efficient, and deployable DTs for the building sector.

5.2. Limitations & Generalisability of This Study

The findings of this study must be interpreted within the scope and constraints of the case study. The experiments were carried out in a educational building and focused on four thermal zones operating during winter weekends, when the building is unused. While suitable for demonstrating the feasibility of the proposed workflows, this configuration does not capture the full diversity of multi-zone, seasonally variable buildings. In larger buildings, the number of actuators, internal gains and interacting thermal masses increases substantially, which may amplify modelling uncertainties and computational demands.
The limitations of the FMU-based workflow are expected to become more pronounced in more complex buildings. The EnergyPlus-to-FMU export restricts the set of weather variables that can be overridden, which may be problematic in scenarios requiring dynamic inputs such as natural ventilation, humidity control or detailed solar–thermal interactions. By contrast, the Docker-based workflow does not suffer from weather-input limitations, but its scalability is conditioned by hardware allocation, parallel execution capabilities and container orchestration. Whole-building or high-frequency simulations may increase execution times or require more advanced resource management.
An important methodological implication arising from this study concerns the role of surrogate modelling. Although the present work does not evaluate large-scale building models, the extremely low computational cost of surrogate-based optimisation offers a promising pathway towards scalability. Surrogate inference operates in milliseconds and can evaluate thousands of candidate control actions without invoking full-physics simulations. This lightweight computational behaviour can mitigate the increasing simulation burden of large, detailed BEMs, and therefore represents a viable strategy for deploying operational DTs in more complex buildings or under higher temporal resolutions.
On another note, the results discussed here correspond to winter conditions characterised by heating demand and the absence of occupancy during the experimental periods. Other seasons may exhibit different sensitivities, particularly when cooling loads or solar gains dominate. To address these limitations and build upon the demonstrated feasibility of both workflows, future work will extend the proposed approach to whole-building simulations and multi-season scenarios in order to more comprehensively assess robustness and scalability across diverse operating conditions.
Moreover, several methodological refinements warrant further investigation. Sensitivity analyses comparing alternative imputation approaches for filling data gaps will help identify the most robust strategies for handling missing or faulty sensor data. Additionally, timestep sensitivity studies are needed to determine the most suitable temporal resolution for real-time control and simulation, balancing computational efficiency with control accuracy.
Beyond these technical considerations, incorporating occupant-driven interactions and fallback strategies will be essential to ensure resilient operation under communication failures and other uncertainties typical of real-world deployments. These enhancements would address practical operational concerns that were not evaluated in the current unoccupied, weekend-only experimental setup.
Overall, these considerations underline that the present study provides a practice-oriented demonstration of two viable digital-twin deployment pathways, while its conclusions should be interpreted in light of building size, system complexity and seasonal variability.

6. Conclusions

This work presented a unified methodological framework for developing and deploying Digital Twins (DTs) based on calibrated Building Energy Models (BEMs), demonstrating their capacity to support predictive, energy-saving strategies in real buildings. Two alternative encapsulation pathways were compared: a Functional Mock-up Unit (FMU) simulated in MATLAB®/Simulink® and a containerised EnergyPlus deployment using Docker. Both implementations were validated through real-time coupling with an educational building’s Building Management System (BMS), enabling automatic actuation of optimised blind schedules derived from model-based predictions. The results confirmed that both approaches can accurately reproduce indoor environmental dynamics and deliver measurable heating energy reductions without physical heating, ventilation, and air conditioning (HVAC) interventions.
The FMU-based approach offered faster simulation runtimes and tighter integration with engineering tools, making it suitable for co-simulation or hardware-in-the-loop applications. In contrast, the Docker-based workflow prioritised portability, reproducibility, and ease of deployment, allowing identical simulations across diverse computing environments while simplifying integration with internet of things (IoT) services and cloud infrastructures. Despite slightly higher runtimes, the containerised DT proved to be the most flexible and scalable option for continuous operation.
Beyond the comparison of FMU and Docker deployments, this study demonstrated the integration of machine-learning-based surrogate models within the Docker workflow to accelerate optimisation and actuation processes. These surrogates replicated the rule-based (RB) logic of the calibrated BEM while removing the input/output (I/O) bottlenecks of traditional simulation pipelines. Their in-situ execution inside the Docker worker reduced latency from minutes to milliseconds and enabled near real-time communication with the BMS through Message Queuing Telemetry Transport (MQTT). The findings show that surrogate models can complement physics-based simulations as lightweight accelerators, maintaining the operational intent and physical consistency of the original models while drastically reducing computational cost.
Taken together, the proposed methodology establishes a reproducible route toward deployable DTs that combine physical rigour, operational robustness, and computational scalability. By embedding calibrated simulations, containerised execution, and surrogate-assisted optimisation within a single framework, the work bridges the gap between high-fidelity modelling and day-to-day building operation. The approach enhances energy efficiency, reduces grid demand, and enables data-driven decision-making in existing buildings without requiring invasive retrofits.
Future work should extend the framework to other seasons, building typologies, and control objectives, incorporating continuous calibration routines and multi-objective optimisation strategies to further enhance robustness and generalisability. Additional research should include a sensitivity analysis comparing alternative imputation approaches for addressing data gaps, as well as a timestep sensitivity assessment to identify the temporal resolution most suitable for real-time control and simulation. Furthermore, integrating occupant-driven interactions and implementing fallback strategies to handle communication failures will be essential to ensure reliable and resilient operation in real-world DT–BMS deployments.

Author Contributions

Conceptualization, J.B.E.T. and C.F.B.; methodology, C.N.-G., I.L.d.B. and C.F.B.; software, C.N.-G., I.L.d.B. and M.F.I.; validation, C.N.-G. and I.L.d.B.; formal analysis, C.N.-G. and I.L.d.B.; investigation, C.N.-G. and I.L.d.B. resources, C.F.B. and J.B.E.T.; data curation, C.N.-G.; writing—original draft preparation, C.N.-G. and I.L.d.B.; writing—review and editing, C.N.-G., I.L.d.B., M.F.I., J.B.E.T. and C.F.B.; visualization, C.N.-G., I.L.d.B. and M.F.I.; supervision, J.B.E.T. and C.F.B.; project administration, J.B.E.T. and C.F.B.; funding acquisition, J.B.E.T. and C.F.B. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been funded by the Agencia Estatal de Investigación under the project “Gemelo Digital de Nueva Generación de Edificios Inteligentes” (DigiTwin) (ref. CPP2021-008909).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

We would like to thank School of Technology of Cáceres (Spain), for providing us with both the building documentation and the sensor data to perform the necessary tests for this paper. Additionally, the authors wish to acknowledge the Agencia Estatal de Meteorología (AEMET) for providing the weather data crucial for BEM simulation. During the preparation of this manuscript, the authors used ChatGPT (OpenAI GPT-5, 2025) for language editing and to improve the clarity and readability of certain sections. The tool was employed exclusively to assist with rephrasing, summarising, and grammatical refinement of existing content written by the authors. All generated suggestions were critically reviewed, verified, and edited by the authors to ensure factual accuracy and coherence with the scientific context. The authors take full responsibility for the final content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

    The following abbreviations are used in this manuscript:
HVACHeating, ventilation and air conditioning
nZEBNearly zero energy building
BEMBuilding Energy Model
DTDigital Twin
FMIFunctional Mock-up Interface
FMUFunctional Mock-up Unit
BMSBuilding Management System
MLMachine learning
IoTInternet of Things
EPCCSchool of Technology of Cáceres
ACAir conditioning
BIMBuilding Information Model
ITInformation Technology
VMVirtual machine
MQTTMessage Queuing Telemetry Transport
SSHSecureShell
APIApplication programming interfaces
ELAEffective Leakage Area
IDFInput Data File
IDDInput Data Dictionary
I/OInputs and/or outputs
HTTPHypertext Transfer Protocol
RBRule-based
RMSERoot Mean Square Error
MAEMean Absolute Error
SCPSecure Copy Protocol
OSOperating system
AEMETAgencia Estatal de Meteorología

Appendix A. Estimation of Horizontal Infrared Radiation Intensity

The “Horizontal Infrared Radiation Intensity” ( I R H ) variable was calculated as follows:
I R H = ϵ s k y σ T d b 4
where ϵ s k y is the sky emissivity, σ the Stefan–Boltzmann constant, and  T d b the drybulb temperature. The sky emissivity under partially cloudy conditions ( ϵ s k y ) can be calculated as [56,57]:
ϵ s k y = ϵ s k y , c l e a r ( 1 + 0.0224 N 0.0035 N 2 + 0.00028 N 3 )
being N the opaque sky cover in tenths, and  ϵ s k y , c l e a r the sky emissivity under clear-sky conditions, calculated as:
ϵ s k y , c l e a r = 0.787 + 0.764 ln T d p 273
where T d p is the dewpoint temperature.

Appendix B. Generic Considerations for FMU Creation and Simulation

Appendix B.1. Background of FMU

An FMU is an executable simulation model that adheres to the open, tool-independent FMI standard [12], enabling both model exchange and co-simulation across diverse simulation platforms through a combination of XML files, C code, and binaries [15,51]. An FMU is essentially a compressed file comprising: (1) an XML model description file that outlines variable names, model meta-information, and all communication-related information for each slave in the co-simulation; (2) shared libraries; and (3) additional resources such as tables, images, or other documentation [12,13].
In co-simulation, FMI provides a standardised interface that allows multiple subsystems (each with its own solver) to exchange data at discrete communication points. A master algorithm coordinates this process by managing input/output (I/O) exchanges, solver synchronisation, and execution order, thereby ensuring stable and consistent results. The FMI standard, supported by more than 200 tools, is actively maintained by the Modelica Association Project [52].
Combining BEMs with FMUs is particularly attractive for direct, DT-based building control because it enables real-time simulation and optimisation of building systems while maintaining tool independence. FMUs allow BEMs to be integrated into co-simulation frameworks, providing accurate predictions of energy performance and system behaviour without being tied to a specific simulation platform. This approach supports fast, automated decision-making for control strategies, making it highly suitable for the development and testing of advanced energy-saving measures in real buildings, which motivates the present work.

Appendix B.2. Preparation of the BEM

Before FMU creation, the BEM’s IDF file requires modification to include the FMU export interface, where the FMU’s I/O must be defined.

Appendix B.2.1. Selection of the Inputs/Outputs of the FMU

Regarding outputs, EnergyPlus allows numerous model variables to be defined and subsequently selected as FMU outputs, with the specific choices depending on the FMU’s purpose. However, FMU inputs are more restricted, limited to EnergyPlus actuators, schedules, or variables. In overall, the variables that can be defined as I/O can be checked at EnergyPlus documentation [50].
An important note is that only seven weather variables from the EPW file can be overridden and thus defined as actuators and FMU inputs: outdoor dry bulb temperature, outdoor relative humidity, outdoor dew point, wind speed and direction, and direct and diffuse solar radiation. This limitation in weather actuators can impact the BEM’s results and represents a disadvantage of the FMU approach.

Appendix B.2.2. Addition of the External Interface Object in the IDF File

This step only involves the addition of the External Interface object in the IDF file of the model. The External Interface to be used to create an FMU is named as FunctionalMockupUnitExport. Thus, the following lines should be added:
ExternalInterface,!- Object to activate external interface
FunctionalMockupUnitExport;!- Name of external interface

Appendix B.2.3. Definition of the FMU’s I/O Through the External Interface

The External Interface provides three objects for defining FMU inputs (for schedules, actuators, and variables) and one object for defining outputs. Table A1 details the correspondence among the FMU’s I/O, EnergyPlus objects, and the External Interface objects.
Table A1. Objects to define the inputs and outputs of the FMU and EnergyPlus in the IDF file.
Table A1. Objects to define the inputs and outputs of the FMU and EnergyPlus in the IDF file.
I/O of FMUObject of External InterfaceObject/Variable of EnergyPlus
Input* To:ScheduleEnergyPlus schedules
* To:ActuatorEMS actuators
* To:VariableEMS variables
Output* From:VariableOutput:Variable
EnergyManagementSystem:OutputVariable
* ExternalInterface: FunctionalMockupUnitExport.
It should be pointed out that, before including the I/O in the IDF file, it should be checked that the FMU inputs have been previously defined as schedules, actuators, or variables in the IDF file. In the same way, the outputs must be defined as output variables of EnergyPlus. If these conditions are met, they can be used as FMU’s I/O.

Appendix B.3. Creation of an FMU

The steps to be followed in order to create an FMU with this tool are [51]:
  • Prepare and organise the files required for the FMU: a BEM in EnergyPlus (already prepared in previous section); Input Data Dictionary (IDD) file; and weather file in EPW format (optional).
  • Create the FMU with the following Python command:
                  python <path-to-scripts-subdir>EnergyPlusToFMU.py -i <path-to-idd-file> -w                                               <path-to-weather-file> -a <fmi-version> <path-to-idf-file>
  • where:
  • <path-to-scripts-subdir> is the path where the “EnergyPlusToFMU” toolbox is installed.
  • <path-to-idd-file> and <path-to-weather-file> are the paths where the IDD and EPW files are saved.
  • <fmi-version> refers to the FMI version to use and may acquire values 1 or 2.
  • <path-to-idf-file> is the path where the IDF file of the BEM is saved.

Appendix B.4. Simulation of an FMU

Several generic aspects related to the simulation of an FMU should be taken into account [51]:
  • Simulation dates: unlike standard EnergyPlus simulations, FMU simulations do not utilise the start and end dates specified in the IDF file’s “RUNPERIOD” object. From this object, only the day of the week on which the simulation starts is taken into account.
  • Simulation time frame: across the software used, the simulation duration is defined by a start time of zero seconds and an end time representing the total simulation period in seconds. Since simulations must encompass full 24-h periods, the end time must be a multiple of 86,400 s (equivalent to one day).
  • Simulation sampling period: the simulation sampling period must match the FMU sampling period defined in the IDF file’s “Timestep” object, expressed in seconds. For instance, if the IDF file specifies 6 timesteps per hour, i.e., 10 min, the sampling period should be 600 s.
  • Ensuring EnergyPlus is in the “PATH” environment variable: to guarantee the successful execution of the simulation, it is essential to add the EnergyPlus installation directory to the system’s “PATH” environment variable. This setting enables the operating system (OS) to find and launch the EnergyPlus application from any command prompt or application without requiring the complete file path.

References

  1. European Parliament and Council of the European Union. Directive (EU) 2024/1275 of the European Parliament and of the Council of 24 April 2024 on the Energy Performance of Buildings (Recast); European Parliament and Council of the European Union: Brussels, Belgium, 2024; pp. 1–68. [Google Scholar]
  2. International Energy Agency. Developing a Global Energy Efficiency Workforce in the Buildings Sector; International Energy Agency: Paris, France, 2024. [Google Scholar]
  3. Barbero, D.A.; Urteneche, E.; Martini, I. Metodología orientada a identificar las soluciones tecnológico-constructivas más frecuentes de la envolvente edilicia para mejorar su eficiencia energética. Estud. Hábitat 2024, 21, e134. [Google Scholar] [CrossRef] [Scilit]
  4. González, J.; Soares, C.A.P.; Najjar, M.; Haddad, A.N. BIM and BEM Methodologies Integration in Energy-Efficient Buildings Using Experimental Design. Buildings 2021, 11, 491. [Google Scholar] [CrossRef] [Scilit]
  5. IPMVP Committee and Others. International Performance Measurement and Verification Protocol: Concepts and Options for Determining Energy and Water Savings; Technical report; National Renewable Energy Lab.: Golden, CO, USA, 2001; Volume I. [Google Scholar]
  6. ASHRAE. ASHRAE Guideline 14-2002: Measurement of Energy and Demand Savings; Technical Report; American Society of Heating, Refrigerating and Air-Conditioning Engineers: Peachtree Corners, GA, USA, 2002. [Google Scholar]
  7. The Chartered Institution of Building Services Engineers. Requirements to be Met by Calculation Methods for the Simulation of Thermal-Energy Efficiency of Buildings and Building Installations; Technical report; The Chartered Institution of Building Services Engineers: London, UK, 2020. [Google Scholar]
  8. Arendt, K.; Jradi, M.; Shaker, H.R.; Veje, C. Comparative analysis of white-, gray-and black-box models for thermal simulation of indoor environment: Teaching building case study. In Proceedings of the Building Performance Analysis Conference and SimBuild: Co-Organized by ASHRAE and IBPSA-USA, Chicago, IL, USA, 26–28 September 2018; ASHRAE: Peachtree Corners, GA, USA, 2018; pp. 173–180. [Google Scholar]
  9. Song, H.; Song, M.; Liu, X. Online autonomous calibration of digital twins using machine learning with application to nuclear power plants. Appl. Energy 2022, 326, 119995. [Google Scholar] [CrossRef] [Scilit]
  10. Eneyew, D.D.; Capretz, M.A.; Bitsuamlak, G.T. Continuous model calibration framework for smart-building digital twin: A generative model-based approach. Appl. Energy 2024, 375, 124080. [Google Scholar] [CrossRef] [Scilit]
  11. Arsecularatne, B.; Rodrigo, N.; Chang, R. Digital Twins for Reducing Energy Consumption in Buildings: A Review. Sustainability 2024, 16, 9275. [Google Scholar] [CrossRef] [Scilit]
  12. Nouidui, T.; Wetter, M.; Zou, W. Functional mock-up unit for co-simulation import in EnergyPlus. J. Build. Perform. Simul. 2014, 7, 192–202. [Google Scholar] [CrossRef] [Scilit]
  13. Raad, A.; Reinbold, V.; Delinchant, B.; Wurtz, F. FMU software component orchestration strategies for co-simulation of building energy systems. In Proceedings of the 2015 Third International Conference on Technological Advances in Electrical, Electronics and Computer Engineering (TAEECE), Beirut, Lebanon, 29 April–1 May 2015; pp. 7–11. [Google Scholar] [CrossRef] [Scilit]
  14. Carbajo Jiménez, P.; Leconte, A.; Ouvrier Bonnaz, O.; Wurtz, E.; Fraisse, G. Energetic Behaviour of a Solar Thermal System Producing Domestic Hot Water and Preheating the Ventilation Air. In Proceedings of the ISES EuroSun 2018 Conference—12th International Conference on Solar Energy for Buildings and Industry, Rapperswil, Switzerland, 24 September 2018; pp. 1–12. [Google Scholar] [CrossRef] [Scilit]
  15. O’Neill, Z.D.; Li, Y.; Cheng, H.C.; Zhou, X.; Taylor, S.T. Energy savings and ventilation performance from CO2-based demand controlled ventilation: Simulation results from ASHRAE RP-1747 (ASHRAE RP-1747). Sci. Technol. Built Environ. 2020, 26, 257–281. [Google Scholar] [CrossRef] [Scilit]
  16. Taddeo, P.; Ortiz, J.; Bellanco, I.; Fuentes, E.; Salom, J. Real-Time Experimental Connection of an EnergyPlus Building Model with a Real Water-To-Water Heat Pump Through Functional Mock-Up Interface. In Proceedings of the Building Simulation 2019: 16th Conference of IBPSA, Rome, Italy, 2–4 September 2019; Volume 16, pp. 1326–1333. [Google Scholar] [CrossRef] [Scilit]
  17. Ball, B.L.; Long, N.; Macumber, D.; Torcellini, P. OpenStudio Analysis Framework (OSAF): A Dockerized Deployment of OpenStudio-Server for Building Energy Analysis. Technical Report NREL/TP-5500-76261; National Renewable Energy Laboratory (NREL): Golden, CO, USA, 2020. [Google Scholar]
  18. NREL. OpenStudio-Server Repository. 2024. Available online: https://github.com/NREL/OpenStudio-server (accessed on 18 September 2025).
  19. Li, X.; Hong, T. A digital twin platform for building performance monitoring and control using simulation and real-time data. Build. Simul. 2025, 18, 1561–1579. [Google Scholar] [CrossRef] [Scilit]
  20. Westermann, P.; Evins, R. Using Bayesian deep learning approaches for uncertainty-aware building energy surrogate models. arXiv 2021, arXiv:2010.03029. [Google Scholar] [CrossRef] [Scilit]
  21. Yin, Q.; Han, C.; Li, A.; Liu, X.; Liu, Y. A Review of Research on Building Energy Consumption Prediction Models Based on Artificial Neural Networks. Sustainability 2024, 16, 7805. [Google Scholar] [CrossRef] [Scilit]
  22. Bárkányi, Á.; Chovan, T.; Nemeth, S.; Abonyi, J. Modelling for Digital Twins—Potential Role of Surrogate Models. Processes 2021, 9, 476. [Google Scholar] [CrossRef] [Scilit]
  23. National Academies of Sciences, Engineering, and Medicine; National Academy of Engineering; Division on Earth and Life Studies; Division on Engineering and Physical Sciences; Board on Atmospheric Sciences and Climate; Board on Life Sciences; Computer Science and Telecommunications Board; Committee on Applied and Theoretical Statistics; Board on Mathematical Sciences and Analytics; Committee on Foundational Research Gaps and Future Directions for Digital Twins. Virtual Representation: Foundational Research Needs and Opportunities; The National Academies Press: Washington, DC, USA, 2024. [Google Scholar]
  24. Landa del Barrio, I.; Fernández-Vigil Iglesias, M.; Peppas, A.; Bruse, J.L.; Echeverría Trueba, J.B.; Fernández Bandera, C. Ensemble surrogate modeling of a real-time HVAC set-point optimization framework for PV self-consumption maximization. Energy Build. 2025, 336, 115478. [Google Scholar] [CrossRef] [Scilit]
  25. Edwards, J.; New, J.; Sanyal, J.; Parker, L.E.; Cui, B.; Dong, J. Constructing Large-Scale Surrogate Models from Big Data. Appl. Energy 2017, 202, 685–699. [Google Scholar] [CrossRef] [Scilit]
  26. Shirzadi, M.; Lau, D.; Stylianou, M. Surrogate Modeling for Building Design: Energy and Cost Optimization Using Machine Learning. Buildings 2025, 15, 2361. [Google Scholar] [CrossRef] [Scilit]
  27. Wu, Z.; Zhang, Y.; Liu, H.; Li, Y. Developing surrogate models for the early-stage design of sustainable residential block design using GNN-based surrogate models. Build. Simul. 2025, 18, 421–438. [Google Scholar] [CrossRef] [Scilit]
  28. Wei, Z.; Zhang, W.; Liu, T.; Yang, R. Scalable evaluation of demand response potential in buildings using surrogate modeling and cluster-based analysis. Build. Simul. 2025, 18, 1559–1582. [Google Scholar] [CrossRef] [Scilit]
  29. Ma, Z.; Chen, J.; Wang, L.; Zhang, H. Neural ordinary differential equations-based approach for surrogate to building performance simulation: Predicting energy consumption under different operational settings. Build. Simul. 2025, 18, 1837–1856. [Google Scholar] [CrossRef] [Scilit]
  30. da Silva Pereira Amado, J.T. MANUTENÇÃO DE SISTEMAS DE GESTÃO TÉCNICA, Caso de Estudo—Edifício do DEEC. Ph.D. Thesis, Universidade de Coimbra, Coimbra, Portugal, 2019. [Google Scholar]
  31. Lee, J.; Woo, D.O.; Jang, J.; Junghans, L.; Leigh, S.B. Collection and Utilization of Indoor Environmental Quality Information Using Affordable Image Sensing Technology. Energies 2022, 15, 921. [Google Scholar] [CrossRef] [Scilit]
  32. Hashempour, N.; Zadeh, P.A.; Staub-French, S. Understanding the Integration of Building Energy Modeling into the Building Design Process: Insights from Two Collaborative Construction Projects. Buildings 2024, 14, 3379. [Google Scholar] [CrossRef] [Scilit]
  33. Domingues, P.; Carreira, P.; Vieira, R.; Kastner, W. Building automation systems: Concepts and technology review. Comput. Stand. Interfaces 2016, 45, 1–12. [Google Scholar] [CrossRef] [Scilit]
  34. Roxin, A.; Abdou, W.; Derigent, W. Interoperable Digital Building Twins Through Communicating Materials and Semantic BIM. SN Comput. Sci. 2022, 3, 23. [Google Scholar] [CrossRef] [Scilit]
  35. Marzi, L.; Arch, P. From bim to Digital Twin .iot Data Integration in Asset Management Platform. J. Inf. Technol. Constr. 2024, 29, 1103–1127. [Google Scholar] [CrossRef] [Scilit]
  36. Pan, Y.; Zhu, M.; Lv, Y.; Yang, Y.; Liang, Y.; Yin, R.; Yang, Y.; Jia, X.; Wang, X.; Zeng, F.; et al. Building energy simulation and its application for building performance optimization: A review of methods, tools, and case studies. Adv. Appl. Energy 2023, 10, 100135. [Google Scholar] [CrossRef] [Scilit]
  37. Venkateswarlu, N.; Sathiyamoorthy, M. Sustainable innovations in digital twin technology: A systematic review about energy efficiency and indoor environment quality in built environment. Front. Built Environ. 2025, 11, 1523464. [Google Scholar] [CrossRef] [Scilit]
  38. Guerrero Ramírez, K.; Nuevo-Gallardo, C.; Santamaría Ulecia, J.M.; Montalbán Pozas, B.; Fernández Bandera, C. Digital twin implementation based on a white-box building energy model: A case study on blind control for passive heating. Energy Build. 2025, 349, 116454. [Google Scholar] [CrossRef] [Scilit]
  39. Google Earth. Google Earth Imagery of 3928′44″ N 620′35″ W. 2024. Available online: https://earth.google.es/ (accessed on 26 July 2024).
  40. Coakley, D.; Raftery, P.; Keane, M. A review of methods to match building energy simulation models to measured data. Renew. Sustain. Energy Rev. 2014, 37, 123–141. [Google Scholar] [CrossRef] [Scilit]
  41. Cornaro, C.; Bosco, F.; Lauria, M.; Puggioni, V.A.; De Santoli, L. Effectiveness of automatic and manual calibration of an office building energy model. Appl. Sci. 2019, 9, 1985. [Google Scholar] [CrossRef] [Scilit]
  42. Guerrero Ramírez, K.; Nuevo-Gallardo, C.; Santamaría Ulecia, J.M.; Montalbán Pozas, B.; Fernández Bandera, C. Calibrated models for effective clustering: Discriminating operation schedules in occupied buildings. Build. Simul. 2025, 18, 161–181. [Google Scholar] [CrossRef] [Scilit]
  43. Montalbán Pozas, B.; Muriel Holgado, B.; Lucas Bonilla, M.; Barroso Ramírez, S.; Bustos Garcí de Castro, P. Iterative Optimization of a Social Inmotics-Based Method in Order to Make Buildings Smart and Resilient. Sustain. Cities Soc. 2022, 82, 103876. [Google Scholar] [CrossRef] [Scilit]
  44. ChirpStack. 2025. Available online: https://www.chirpstack.io/ (accessed on 16 April 2025).
  45. Docker Documentation. 2025. Available online: https://docs.docker.com/ (accessed on 28 May 2025).
  46. InfluxData. 2025. Available online: https://docs.influxdata.com/influxdb/v1/ (accessed on 16 April 2025).
  47. Ministerio de Economía y Competitividad. Smartpolitech: Sistema Inteligente de Eficiencia Energética para la Escuela Politécnica, 2013–2016. Convocatoria de Infraestructura Científico-Tecnológica Ref: UNEX13-1E-1716. Available online: https://biblioteca.sistedes.es/entities/art%C3%ADculo/da398b40-8de6-4843-baf2-fd4bd247582e (accessed on 16 April 2025).
  48. Montalbán Pozas, B.; Lucas Bonilla, M.; Serrano Candela, F.; Bustos García de Castro, P. A Methodology for Designing an Automated System to Improve the Thermal Performance of a Large Building in Operation. Buildings 2023, 13, 1938. [Google Scholar] [CrossRef] [Scilit]
  49. Open-Meteo. Free Weather API. 2025. Available online: https://open-meteo.com/ (accessed on 10 April 2025).
  50. EnergyPlus Documentation. 2025. Available online: https://energyplus.net/documentation (accessed on 9 April 2025).
  51. Lawrence Berkeley National Laboratory. FMU Export of EnergyPlus. 2025. Available online: https://simulationresearch.lbl.gov/fmu/EnergyPlus/export/ (accessed on 7 April 2025).
  52. Functional Mock-up Interface. 2025. Available online: https://fmi-standard.org/ (accessed on 7 April 2025).
  53. Matlab Help Centre. 2025. Available online: https://es.mathworks.com/help (accessed on 15 April 2025).
  54. Pachano, J.E.; Bandera, C.F. Multi-step building energy model calibration process based on measured data. Energy Build. 2021, 252, 111380. [Google Scholar] [CrossRef] [Scilit]
  55. Pachano, J.E.; Fernández-Vigil Iglesias, M.; Saiz, J.C.; Fernández Bandera, C. Two-stage multi-step energy model calibration of the cooling systems of a large-space commercial building. Appl. Therm. Eng. 2023, 230, 120638. [Google Scholar] [CrossRef] [Scilit]
  56. Clark, G.; Allen, C. The Estimation of Atmospheric Radiation for Clear and Cloudy Skies. In Proceedings of the 2nd National Passive Solar Conference (AS/ISES), Philadelphia, PA, USA, 16–18 March 1978; pp. 675–678. [Google Scholar]
  57. Walton, G. Thermal Analysis Research Program Reference Manual; National Bureau of Standards: Gaithersburg, MD, USA, 1983. [Google Scholar]
Figure 1. School of Technology of Cáceres [39]. The Computer Science Pavilion is marked with red colour.
Figure 1. School of Technology of Cáceres [39]. The Computer Science Pavilion is marked with red colour.
Applsci 15 12888 g001
Figure 2. Information system architecture. Based on [43].
Figure 2. Information system architecture. Based on [43].
Applsci 15 12888 g002
Figure 3. Steps for creating an FMU from a BEM and EnergyPlus.
Figure 3. Steps for creating an FMU from a BEM and EnergyPlus.
Applsci 15 12888 g003
Figure 4. Diagram of the Docker container architecture used in this study.
Figure 4. Diagram of the Docker container architecture used in this study.
Applsci 15 12888 g004
Figure 5. Operational scheme of the stand-alone method.
Figure 5. Operational scheme of the stand-alone method.
Applsci 15 12888 g005
Figure 6. Operational scheme of the two-step method.
Figure 6. Operational scheme of the two-step method.
Applsci 15 12888 g006
Figure 7. Practical case of digital twin implementation.
Figure 7. Practical case of digital twin implementation.
Applsci 15 12888 g007
Figure 8. Advantages and disadvantages of both FMU and EnergyPlus container implementations.
Figure 8. Advantages and disadvantages of both FMU and EnergyPlus container implementations.
Applsci 15 12888 g008
Table 1. Technical specifications of the sensors/actuators installed in the EPCC and used in this work. Based on [43,48].
Table 1. Technical specifications of the sensors/actuators installed in the EPCC and used in this work. Based on [43,48].
Type of SensorParameterCommunicationSampling IntervalActuation
Environmental sensorTemperatureLoRaWAN15′
Humidity
CO2
Blind actuatorBlind state openingWiFi5′Mosquitto (MQTT)
Table 2. Request parameters to download weather data from Open-Meteo APIs.
Table 2. Request parameters to download weather data from Open-Meteo APIs.
Historical Weather DataForecast Weather Data
Start date14 days beforePast days1
End date2 days beforeForecast days4 *
Common parameters
Latitude39.4765Wind speed unitm/s
Longitude−6.3722Time zoneGMT+1
* When sending the request to the API, the present day is included in this counter.
Table 3. Inputs and outputs of the DTs.
Table 3. Inputs and outputs of the DTs.
Inputs
Schedules 1Weather Data 2
Docker-Based DT (EPW File)FMU-Based DT (Actuators)
Sensor indoor temperatureDry Bulb TemperatureOutdoor Dry Bulb
Blinds schedulesRelative HumidityOutdoor Relative Humidity
Ideal loads schedulesDew Point TemperatureOutdoor Dew Point
ELA infiltration schedulesPrecipitable Water
Wind SpeedWind Speed
Wind DirectionWind Direction
Global Horizontal Radiation
Direct Normal RadiationDirect Solar
Diffuse Horizontal RadiationDiffuse Solar
Horizontal Infrared Radiation Intensity
Atmospheric Station Pressure
Liquid Precipitation Depth
Outputs 3
Zone Mean Air TemperatureZone Ideal Loads Supply Air Total Heating EnergyZone Windows Total Heat Gain Energy
Zone Air Relative HumidityZone Ideal Loads Supply Air Total Cooling EnergyZone Windows Total Heat Loss Energy
1 FMU: To:Schedule object from External Interface; Container: Schedule input in IDF. Schedules are similar for both  DTs. 2 FMU: To:Actuator object from External Interface; Container: EPW file. Weather data differs for both DTs. 3 FMU: From:Variable object from External Interface; Container: Variable output in IDF. Outputs are similar for both DTs.
Table 4. ML model comparison for f θ .
Table 4. ML model comparison for f θ .
ModelMAERMSER2MAPETraining Time (s)
Extra Trees Regressor0.06500.16430.85730.03770.2063
Light Gradient Boosting Machine0.06640.17750.83760.03220.4848
Random Forest Regressor0.07110.18930.81770.04390.9970
Gradient Boosting Regressor0.08130.19350.81400.03841.0433
AdaBoost Regressor0.08820.19770.80210.04480.2300
Elastic Net0.14780.23390.73540.07260.0420
Lasso Regression0.15330.23510.73310.08220.0272
Lasso Least Angle Regression0.15330.23510.73310.08220.0240
K Neighbors Regressor0.07630.23420.71780.04530.0638
Decision Tree Regressor0.06730.24100.70220.04270.0612
Table 5. ML model comparison for g ϕ .
Table 5. ML model comparison for g ϕ .
ModelMAERMSER2MAPETraining Time (s)
Extra Trees Regressor34,60663,3590.79571.27420.5757
Gradient Boosting Regressor39,88967,6370.78421.54890.9071
Light Gradient Boosting Machine36,51567,5100.75541.29940.1498
Random Forest Regressor37,66669,6220.68721.28321.7492
Elastic Net60,58085,2950.57033.93090.0932
AdaBoost Regressor75,45290,7350.56033.14720.3791
Decision Tree Regressor45,62889,9920.54591.23560.0550
Lasso Regression64,00591,8260.48383.58270.0799
Ridge Regression66,73195,5510.41723.45980.0243
Bayesian Ridge67,32696,6840.40303.49750.0248
Table 6. ML model comparison for h ψ .
Table 6. ML model comparison for h ψ .
ModelMAERMSER2MAPETraining Time (s)
K Neighbors Regressor0.01240.07900.96880.00830.0278
Extra Trees Regressor0.02260.08290.96470.01690.0813
Random Forest Regressor0.01920.08630.96300.01380.5308
Light Gradient Boosting Machine0.02410.08770.96270.01900.1042
Gradient Boosting Regressor0.02300.09220.95900.01650.7000
AdaBoost Regressor0.03720.11850.93210.03410.0790
Decision Tree Regressor0.01980.12690.91210.01640.0245
Lasso Regression0.15640.19990.81240.12570.0435
Elastic Net0.15640.19990.81240.12570.0473
Lasso Least Angle Regression0.15200.20050.81140.11510.0165
Table 7. Stand-alone vs. two-step surrogate methods: practical trade-offs.
Table 7. Stand-alone vs. two-step surrogate methods: practical trade-offs.
Stand-AloneTwo-Step
Online latencyVery low (single pass)Low (two passes: g ϕ + h ψ )
InterpretabilityLower (direct mapping)Higher (physics proxies z ^ t )
Engineering effortMinimal (.pkl only)Moderate (model + rules or h ψ )
Portability (Docker)Single .pkl in worker.pkl + rules (or two .pkl)
Table 8. Optimal blind schedules. Those applied to the real building are marked in red colour.
Table 8. Optimal blind schedules. Those applied to the real building are marked in red colour.
PeriodDateRoomOpeningClosing
E+CFMU f θ h ψ E+CFMU f θ h ψ
108/02PA:0239:208:309:309:4017:3017:3016:3016:10
PA:0249:208:309:309:3017:3017:2017:0017:10
PA:0299:208:209:309:3018:1017:2017:4017:40
PA:0319:208:309:309:3018:0017:2017:4017:40
109/02PA:0239:208:309:209:3017:5017:2018:0017:30
PA:0249:208:309:109:2017:3017:2018:0017:30
PA:0299:108:209:109:1018:1017:2018:0018:10
PA:0319:208:309:109:2018:1017:2018:0018:00
222/02PA:0239:008:309:309:4017:3018:0017:2016:40
PA:0248:508:309:109:3017:3017:5017:3017:20
PA:0299:008:208:509:0018:2018:0018:0018:00
PA:0319:008:308:509:1018:3018:0018:0018:00
223/02PA:0238:508:409:209:5017:4018:0017:4017:20
PA:0248:508:409:109:3017:4018:0017:5017:40
PA:0298:508:208:509:0018:3018:0018:2018:20
PA:0318:508:308:509:1018:3018:0018:2018:20
E+C: EnergyPlus Container. Dates in dd/mm format (year 2025) and times in HH:MM format.
Table 9. Simulated energy demand with each model using predicted weather.
Table 9. Simulated energy demand with each model using predicted weather.
PeriodRoomClosed BlindsContainerFMU f θ h ψ
1PA:02382.8579.8378.3777.9577.79
PA:024107.0794.0893.8794.1494.28
PA:02978.8581.1181.1480.7580.81
PA:03169.0463.7563.8763.7863.80
2PA:02390.7082.6083.0182.3081.98
PA:024118.4299.9399.48100.24100.38
PA:02988.0292.2892.8392.1891.94
PA:03167.8862.3362.4162.3962.45
  Period 1: 8–9 February 2025. Period 2: 22–23 February 2025.
Table 10. Simulated energy savings (%) of each model compared to the closed blinds case, using predicted weather. The cases offering the greatest savings for a room are marked in red colour.
Table 10. Simulated energy savings (%) of each model compared to the closed blinds case, using predicted weather. The cases offering the greatest savings for a room are marked in red colour.
PeriodRoomContainerFMU f θ h ψ
1PA:0233.645.405.916.11
PA:02412.1312.3312.0811.95
PA:029 2.87 2.90 2.41 2.48
PA:0317.677.497.627.60
2PA:0238.948.499.279.61
PA:02415.6115.9915.3515.23
PA:029 4.83 5.47 4.72 4.45
PA:0318.168.068.097.99
  Period 1: 8–9 February 2025. Period 2: 22–23 February 2025.
Table 11. Simulated energy demand ( E D ) and energy savings ( E S ) using real temperature, weather, and blinds schedule data. Only those cases in which the optimal schedule has been applied in reality to the building are included.
Table 11. Simulated energy demand ( E D ) and energy savings ( E S ) using real temperature, weather, and blinds schedule data. Only those cases in which the optimal schedule has been applied in reality to the building are included.
PeriodRoom ED (kWh)ES * (%)
Closed BlindsContainerFMUContainerFMU
1PA:02382.8540.8650.68
PA:024107.0727.6674.17
PA:02978.8513.4382.97
PA:03169.0415.8177.10
2PA:02390.7036.8359.39
PA:024118.4231.6373.29
PA:02988.0215.8382.02
PA:03167.8814.2679.00
  * Compared to the closed blinds case. Period 1: 8–9 February 2025. Period 2: 22–23 February 2025.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Nuevo-Gallardo, C.; Landa del Barrio, I.; Flores Iglesias, M.; Echeverría Trueba, J.B.; Bandera, C.F. Real-Time Digital Twins for Building Energy Optimization Through Blind Control: Functional Mock-Up Units, Docker Container-Based Simulation, and Surrogate Models. Appl. Sci. 2025, 15, 12888. https://doi.org/10.3390/app152412888

AMA Style

Nuevo-Gallardo C, Landa del Barrio I, Flores Iglesias M, Echeverría Trueba JB, Bandera CF. Real-Time Digital Twins for Building Energy Optimization Through Blind Control: Functional Mock-Up Units, Docker Container-Based Simulation, and Surrogate Models. Applied Sciences. 2025; 15(24):12888. https://doi.org/10.3390/app152412888

Chicago/Turabian Style

Nuevo-Gallardo, Cristina, Iker Landa del Barrio, Markel Flores Iglesias, Juan B. Echeverría Trueba, and Carlos Fernández Bandera. 2025. "Real-Time Digital Twins for Building Energy Optimization Through Blind Control: Functional Mock-Up Units, Docker Container-Based Simulation, and Surrogate Models" Applied Sciences 15, no. 24: 12888. https://doi.org/10.3390/app152412888

APA Style

Nuevo-Gallardo, C., Landa del Barrio, I., Flores Iglesias, M., Echeverría Trueba, J. B., & Bandera, C. F. (2025). Real-Time Digital Twins for Building Energy Optimization Through Blind Control: Functional Mock-Up Units, Docker Container-Based Simulation, and Surrogate Models. Applied Sciences, 15(24), 12888. https://doi.org/10.3390/app152412888

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop