# Optimal Buildings’ Energy Consumption Calculus through a Distributed Experiment Execution

Authors: Pau Fonseca i Casas; Antoni Fonseca i Casas; Nuria Garrido-Soriano; Joana Ortiz; Josep Casanovas; Jaume Salom
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

The calculus of building energy consumption is a demanding task because multiple factors must be considered during experimentation. Additionally, the definition of the model and the experiments is complex because the problem is multidisciplinary. When we face complex models and experiments that require a considerable amount of computational resources, the application of solutions is imperative to reduce the amount of time needed to define the model and the experiments and to obtain the answers. In this paper, we first address the definition and the implementation of an environmental model that describes the behavior of a building from a sustainability point of view and enables the use of several simulations and calculus engines in a cosimulation scenario. Second, we define a distributed experimental framework that enables us to obtain results in an accurate amount of time. This methodology has been applied to the energy consumption calculation, but it can also be applied to other modeling problems that usually require a considerable amount of resources by reducing the amount of time needed to perform modeling, implementation, verification, and experimentation.


---

## Body

## 1. Introduction

Environmental simulation is a demanding area for several reasons. First, the models depend on a greater number of variables and factors that usually are higher than in other disciplines. Second, the teams that are involved in the definition and implementation of the models belong to several different areas, implying that a common language is needed to begin working. Third, because of the substantial number of parameters and factors that exist in the models, the experimentation tends to become time and resource consuming. In this paper, a methodology that simplifies the communication between the different actors that are involved in the project is presented. This methodology defines a distributed execution scenario for these models. This distributed scenario execution reduces the time needed to obtain the results and possibly the exploration of more alternatives as we will discuss later.The paper is organized as follows. In Section2, we describe the types of systems we want to model. In Section 3, the model is presented, and the selected typologies, results, and factors are analyzed. Section 4 presents the formalization of the model. Section 5 presents the implementation, and Section 6 describes the procedure we follow to distribute the experimentation. Finally, the conclusions are presented in Section 7.


## 2. The System

The “Energy Performance of Buildings Directive (EPBD),” approved by the 2010/31/EU European directive, aims to speed up the energy saving policies in the building sector to achieve a 20% reduction in energy consumption, to reduce greenhouse gas emissions by 20%, and to increase the use of renewable energy to 20% in the European Union. Among many other measures, Article 9 of the directive stipulates that, by December 31, 2020, the energy consumption of new buildings must be near zero and that, by December 31, 2018, the energy consumption for occupied buildings and/or public property buildings must be near zero. In relation to this measure, the board recommends that the Member States establish intermediate objectives in 2015 and that they gradually adopt these goals until 2020 to ensure compliance with the objectives set.In relation to the energy renovation of buildings, where the present study is focused, a series of measures must be taken to ensure that the minimum requirements are compiled when renewing at least 25% of the building or its surroundings. The same policy explains that, to adjust and set the minimum requirements for energy efficiency, all methods must be based on a cost-benefit analysis to achieve optimal levels of profitability.The MARIE project, which is framed in the Catalan context and led by the Department of Territory and Sustainability of Catalonia, has the overall aim of defining a strategy for improving the energy refurbishment of Mediterranean buildings. In this context, the study aims to provide the necessary management and to set the minimum criteria for energy renovation, ensuring optimal levels from an energy and economic point of view and proposing solutions adapted to the particular building characteristics of Catalonia (climate and construction).Therefore, the overall objective of this project is to conduct a technical study to find optimal values regarding energy consumption. With the knowledge obtained from the simulations, it is possible to propose modifications on the buildings to gradually achieve near-zero energy buildings (NZEB). This type of analysis is becoming more common because the benefits are clear. As an example, [1] analyzed and evaluated the energy saving, bill saving, and payback period and avoided emissions of one large medical center, while [2] analyzed the energy consumption for educational buildings. In these cases similar to our case, the criteria that must be considered consist of a set of variables; hence, the optimization criteria on this project follow a multiobjective schema. In our case, we are not focused on a single building similar to [1, 2]; hence, the number of experiments we will conduct grows exponentially. Therefore, we need to distribute the experimental design; other approaches exist, as presented in [3], where we analyze the relations among variables in the greenhouse by identifying probabilistic dependencies between them with the goal of allowing us to do predictions without the need of observing all of the variables present in the model. Another example is in [4], where we analyze the materials used on the construction in the South European area from the point of view of several environmental and economic indicators. However, with our approach, we can obtain a complete map detailing the behavior for the typologies selected and the interrelations between all of the factors.This study is focused on four representative typologies and four climates in Catalonia (see Figure1). A dynamic simulation of every building typology was performed in TRNSYS [5]. One of the most challenging problems for this type of simulation is the considerable number of factors we must consider. The building models include a detailed characterization of the building and their systems and the behavior of the occupants. The results obtained for each simulation are (i) energy consumption, (ii) comfort evaluation, and (iii) global costs calculation.Figure 1
Distribution of the residential building stock in Catalonia. Selection of the building typologies and their climate.Approximately 10,000 simulations have been performed for each typology (see Figure1) and climate. Approximately 15 minutes is needed to complete each simulation, making this a demanding simulation scenario.


## 3. Model Definition

The main objective of this method is providing cost-optimal measures for the energy renovation of residential buildings by considering three main criteria: thermal comfort, primary energy use, and global economic costs. This method was introduced previously in [6]. This study is performed using dynamic building simulations, where the building and its interaction with the user are characterized in detail with TRNSYS. The selection of TRNSYS was performed by the project partners. They work with this calculus engine and have deep knowledge on its use. Additionally, this calculus engine is absolutely sufficient for the goals pursued on this project. Other alternatives can be considered here, such as EnergyPlus [7] or DOE2; however, the selection of TRNSYS does not represent any limitation on the results we can obtain, and the methodology proposed is not affected in any sense by this selection because we can use, thanks to the cosimulation approach, any other calculus engine.The simulation evaluates the three main criteria for the base case, that is, the existing building, and for the building with different packages of energy efficiency measures (passive and active measures).The simulations follow a two-step optimization procedure: the passive optimizations and the active optimizations. In the passive optimization, the goal is to obtain optimal passive measures and the best thermal comfort possible without using any mechanical systems. In this first optimization, we consider the cost of the investment.In the second step, we apply the active measures. With this, we can compare the primary energy consumption and the global costs to obtain a cost-optimal solution. Due to the inherently great volume of possibilities and to reduce the number of combinations (and consequently the time and the resources needed to perform the experimentation), five packages of passive measures are selected in the first step. These selected measures are combined with the active measures that will be tested in the second step.The building model, which represents the main element of our simulation model, is described in the next section.


### 3.1. Building Simulation

The buildings we will analyze are representative of the residential building typologies of Catalonia. As an example, the typology presented in Figure2 represents 45% of the dwellings for Catalonia [8]. This typology was built before the first building regulation (1950–1980) and is characterized for having a low thermal performance. The building typology is a block of apartments with a commercial ground floor and four residential floors. There are two dwellings per floor with 78.8 m2 of surface for each one. The typology is simulated in four climates of Catalonia.Figure 2
Building typology: block of apartments (1951–1980).The building geometry (Figure2) is introduced in the simulation by a multizone 3D model using the plugin Trnsys3D for Google SketchUp. Only two floors are included to simulate the building with more detail: the standard floor and the under roof floor. Then, each dwelling is divided into the following two zoning criteria: night and day use and orientation. The building model includes the external environment and its corresponding shadings.In the simulation, the occupancy has been defined as the main driver for the use of the building (heating, cooling, natural ventilation, solar protection, and lighting use). For that reason, one of the main objectives is to use realistic profiles of the occupants. This profile must reproduce the variability of the real occupants and, at the same time, their behavior must be representative of the average occupant. The stochastic profiles are created from the Time Use Data survey of Spain (INE, 2010). This survey allows us to determine what people are doing at each moment of the day. Then, an annual profile can be created by applying a statistical analysis of the raw data and by assigning a state to each occupant: outside of home, passive at home, and active at home.Vernacular strategies from the Mediterranean climates have been included in the simulation as the main strategy for cooling the household during the warm season. The control strategies for natural ventilation and for the use of solar protections have been defined with the objective to reproduce the real behavior of the users. The details of the approach used in the simulations are explained in [6].Finally, the energy systems have been defined with a simplified method based on the efficiency of the different parts of the system: generation, emission, and control. The efficiency of generation is calculated using [9] and the efficiency of the emitters and control follow is calculated using [10].


### 3.2. Energy Efficiency Measures

The energy efficiency measures evaluated in this study include passive and active measures, such as renewable energy systems. Table1 briefly describes the different measures.Table 1
Description of the energy efficiency measures to be considered in the models.
Measure
Description
Add. benefit
Façade insulation
(i)  External(ii)  Air chamber (iii)  Internal
Reduction of the thermal bridge
Roof insulation
(i)  Inverted(ii)  Internal
—
Window change
(i)  4/16/4 aluminum(ii)  4/16/4 PVC
Reduction of air infiltration
Solar protection
Awning
—
Condensing boiler
EER 1.09
—
Improve efficiencyinstallation
(i)  Programmable thermostat(ii)  Thermostatic valve(iii)  Tap aerators (iv)  Water volume saving
—
Solar thermal system
16 m2/building1500 liters storage tank
—
Efficient Split
COP 4
—
PV system
12 m2/building240 Wp
—
LED
1.5 W/m2
Luminous efficiency 80%
Awareness campaign
Reduction of 13% of lighting and appliances
Reduction of internal gainsWith the definition of the building structure and all of the parameters that must be permutated in the experimentation, we should use an infrastructure that allows us to (i) define the process that rules the behavior of the building and rules the multicriteria optimization algorithms and (ii) establish a mechanism to integrate the TRNSYS calculus engine in the overall process that details the behavior of a building.To allow the combination of different models in a single simulation model, [11] proposed three main mechanisms.(1)
Metaformalism: this approach is based on the idea that a formalism subsumes the different formalisms of the submodels that compose the system representation.(2)
Common formalism: this approach is based on the transformation of the different submodels to a common formalism.(3)
Cosimulation: different simulators are working together. In this case, the representation of the different submodels does not matter because we are analyzing the inputs and the outputs of each submodel.Cosimulation is the approach we will use here because we need to combine our model with other simulation engines, in our case, TRNSYS.The multicriteria optimization and cosimulation process was performed with SDLPS [12–14] (http://sdlps.upc.edu/), which is a simulation software infrastructure that allows us to find optimal values for several model parameters. In the core of the distributed and discrete simulator SDLPS, a model rules the main simulation process in a cosimulation scenario [15] by optimizing the building parameters and their associated impacts; TRNSYS is used as a calculus engine for the energy simulation in this cosimulation scenario.SDLPS is a general-purpose simulation software infrastructure that allows us to formally define the behavior of a building and to find optimal values for several building parameters and their associated impacts. Because the objective is to obtain a complete characterization of the problem, the brute-force approach is used. This approach consists of running the simulation with all of the possible combinations.The factors are, among many others, the insulation of the façade, the insulation of the roof, the window performance, the use of solar protection, the heating and cooling system, the lighting, and the renewable systems, implying approximately 10,000 simulations per typology.


## 3.1. Building Simulation

The buildings we will analyze are representative of the residential building typologies of Catalonia. As an example, the typology presented in Figure2 represents 45% of the dwellings for Catalonia [8]. This typology was built before the first building regulation (1950–1980) and is characterized for having a low thermal performance. The building typology is a block of apartments with a commercial ground floor and four residential floors. There are two dwellings per floor with 78.8 m2 of surface for each one. The typology is simulated in four climates of Catalonia.Figure 2
Building typology: block of apartments (1951–1980).The building geometry (Figure2) is introduced in the simulation by a multizone 3D model using the plugin Trnsys3D for Google SketchUp. Only two floors are included to simulate the building with more detail: the standard floor and the under roof floor. Then, each dwelling is divided into the following two zoning criteria: night and day use and orientation. The building model includes the external environment and its corresponding shadings.In the simulation, the occupancy has been defined as the main driver for the use of the building (heating, cooling, natural ventilation, solar protection, and lighting use). For that reason, one of the main objectives is to use realistic profiles of the occupants. This profile must reproduce the variability of the real occupants and, at the same time, their behavior must be representative of the average occupant. The stochastic profiles are created from the Time Use Data survey of Spain (INE, 2010). This survey allows us to determine what people are doing at each moment of the day. Then, an annual profile can be created by applying a statistical analysis of the raw data and by assigning a state to each occupant: outside of home, passive at home, and active at home.Vernacular strategies from the Mediterranean climates have been included in the simulation as the main strategy for cooling the household during the warm season. The control strategies for natural ventilation and for the use of solar protections have been defined with the objective to reproduce the real behavior of the users. The details of the approach used in the simulations are explained in [6].Finally, the energy systems have been defined with a simplified method based on the efficiency of the different parts of the system: generation, emission, and control. The efficiency of generation is calculated using [9] and the efficiency of the emitters and control follow is calculated using [10].


## 3.2. Energy Efficiency Measures

The energy efficiency measures evaluated in this study include passive and active measures, such as renewable energy systems. Table1 briefly describes the different measures.Table 1
Description of the energy efficiency measures to be considered in the models.
Measure
Description
Add. benefit
Façade insulation
(i)  External(ii)  Air chamber (iii)  Internal
Reduction of the thermal bridge
Roof insulation
(i)  Inverted(ii)  Internal
—
Window change
(i)  4/16/4 aluminum(ii)  4/16/4 PVC
Reduction of air infiltration
Solar protection
Awning
—
Condensing boiler
EER 1.09
—
Improve efficiencyinstallation
(i)  Programmable thermostat(ii)  Thermostatic valve(iii)  Tap aerators (iv)  Water volume saving
—
Solar thermal system
16 m2/building1500 liters storage tank
—
Efficient Split
COP 4
—
PV system
12 m2/building240 Wp
—
LED
1.5 W/m2
Luminous efficiency 80%
Awareness campaign
Reduction of 13% of lighting and appliances
Reduction of internal gainsWith the definition of the building structure and all of the parameters that must be permutated in the experimentation, we should use an infrastructure that allows us to (i) define the process that rules the behavior of the building and rules the multicriteria optimization algorithms and (ii) establish a mechanism to integrate the TRNSYS calculus engine in the overall process that details the behavior of a building.To allow the combination of different models in a single simulation model, [11] proposed three main mechanisms.(1)
Metaformalism: this approach is based on the idea that a formalism subsumes the different formalisms of the submodels that compose the system representation.(2)
Common formalism: this approach is based on the transformation of the different submodels to a common formalism.(3)
Cosimulation: different simulators are working together. In this case, the representation of the different submodels does not matter because we are analyzing the inputs and the outputs of each submodel.Cosimulation is the approach we will use here because we need to combine our model with other simulation engines, in our case, TRNSYS.The multicriteria optimization and cosimulation process was performed with SDLPS [12–14] (http://sdlps.upc.edu/), which is a simulation software infrastructure that allows us to find optimal values for several model parameters. In the core of the distributed and discrete simulator SDLPS, a model rules the main simulation process in a cosimulation scenario [15] by optimizing the building parameters and their associated impacts; TRNSYS is used as a calculus engine for the energy simulation in this cosimulation scenario.SDLPS is a general-purpose simulation software infrastructure that allows us to formally define the behavior of a building and to find optimal values for several building parameters and their associated impacts. Because the objective is to obtain a complete characterization of the problem, the brute-force approach is used. This approach consists of running the simulation with all of the possible combinations.The factors are, among many others, the insulation of the façade, the insulation of the roof, the window performance, the use of solar protection, the heating and cooling system, the lighting, and the renewable systems, implying approximately 10,000 simulations per typology.


## 4. Model Formalization

The need to share at least the model structure and behavior in a transdisciplinary environment justifies the need to use a formal language to define the model.In our approach, we propose the use of a widely used formal language to represent the models, to structure the cosimulation mechanism, and to define the experimental design to be conducted.


### 4.1. Specification and Description Language

Several languages exist to formalize a simulation model [16]. In our approach, we use the Specification and Description Language (SDL) [17], a formal, graphical, unambiguous, and complete formalist that is widely used to represent simulation models.The structure of the language allows us to easily obtain the code needed to perform the simulations [18], an aspect that simplifies the verification of the models [19].The language has a modular structure that simplifies the definition of the different model components, see Figure3.Figure 3
A structural vision of an SDL model with its four main levels.Specifically, SDL is an object-oriented formal language defined by the International Telecommunications Union-Telecommunications Standardization Sector (ITU-T) (the Comité Consultatif International Telegraphique et Telephonique (CCITT)) on the Z. 100 recommendation [20]. The language was designed for the specification of event-oriented, real-time, and interactive complex systems. These systems might involve different concurrent activities that use signals to perform communication. In our current scope, SDL SIGNALS represent the events of the simulation model; hence, in this paper, the SDL SIGNAL or event can be considered equivalent because the SIGNAL is the representation of the event in the language. SDL is based on the definition of four levels to describe the structure and the behavior of the models: system, blocks, processes, and procedures. In SDL, BLOCKS and PROCESSES are named AGENTS. The outermost block, the system BLOCK, is an agent itself. Figure 1 shows this hierarchy of levels.The different concepts that the SDL language covers are the following:(1)
system structure: from the blocks to the processes and their related hierarchy;(2)
communication: signals, communication paths or channels, and parameters that can be performed by the signals;(3)
behavior: defined by different processes;(4)
data: based on abstract data types (ADT);(5)
inheritance: useful to describe relations between objects and their properties.


### 4.2. SDL Processes

The processes describe more specifically the behavior of the block. Each of the processes for the block has one state or more. For each of the states of a process, SDL describes how it behaves if different events occur. An object may react differently to an event depending on the port that sends it. The process is basically specified using graphical elements that describe operations or decisions. We define the cosimulation structures in our approach at this level.Table2 shows the elements used in the SDL process diagrams implemented in the system. Figure 4 shows an example of an SDL process.Table 2
Some SDL blocks.
Start. It defines the first operations to be executed. This is needed to define the initial condition of the model processes.
State. A state element contains the name of a state.
Input. These elements describe the type of signals that can be received on a specific STATE.
Create. This element allows the creation of an object.
Task. This element allows the definition of assignments, assignment attempts, or the interpretation of informal texts.
Procedure call. These elements represent pieces of code that are encapsulated on PROCEDURES.
Output. These elements are needed to send a SIGNAL from one PROCESS to another (or to itself).
Decision. These elements describe bifurcations. Their behavior depends on how the related question is answered.Figure 4
Relation between the no graphical SDL and the graphical SDL.Two standard representations for SDL exist: a textual representation (SDL/PR) and a graphical representation (called SDL/GR) (see Figure4).Although SDL-PR can be used to represent our model, some technical reasons lead us to use a new XML representation of the SDL language.(1)
We need to describe information that does not belong to the model. As an example, in a diagram, we need to relate a spatial position to each one of the different SDL blocks to allow for a representation of the model. With XML, it is easy to add an optional tag that can carry this information.(2)
XML has many different libraries that allow for good manipulation of the information. This simplifies the codification and the maintenance of the parser and the related code.(3)
XML can be validated using an XSD schema. This is useful for detecting some structural problems when we write the model to run it on the simulator.(4)
XML can be easily transformed to other representations. Some programs allow us to implement these transformations between XML files in a graphical way (Stylus Studio as an example).(5)
XML representation of the model helps us in the representation of it in a website.(6)
In our XML representation of the SDL language, the code related to the tasks can be C code. Additionally, the code related to the procedures can be a diagram or, similar to the task blocks, C code. This simplifies the implementation of the DLL in the compiler.Because SDL only exists in a standard representation using XML, it is needed to establish a mechanism for transforming from SDL-GR (represented on the Microsoft Visio diagrams) to our SDL-XML. This process is performed on SDLPS.Because of the use of this approach, the schema that depicts a modeling process proposed by Sargent [21] can be simplified at the operative level. To understand the areas affected in the modeling process by this approach, Figure 5 depicts the areas affected by this proposed methodology in red boxes.Figure 5
Areas of the modeling process diagram affected by our proposed methodology. The diagram is based on [21].


### 4.3. Building Model

In this project, a transdisciplinary approach is followed. This means that we work with personnel with different formations and backgrounds and that we want different actors to be involved in all parts of the project. To do this, a common language that allows us to establish this communication is needed. As we stated previously, we use SDL to define the buildings’ behavior. The complete definition of the model is detailed in [15]. Because we need to calculate the energy demand of the buildings, we use a cosimulation approach. This allows us to utilize a widely used and accepted calculus engine such as TRNSYS in the model.Figure6 shows the first level of the building simulation model. Four main blocks represent the environment, the building, the compensation, and the waste treatments. In this experiment, we are mainly focused on the building block because we want to analyze the use of the building and we do not consider other aspects.Figure 6
The first level of the building simulation model.In the model, we can describe, as formally as possible, the structure and the behavior of the lifecycle of a building. Every building is connected to energy and social networking, which has changed the rules of the game. We must currently address these concepts to complete the cycle (an idea already introduced in Cradle to Cradle [22] and in which we face a new paradigm of design (see Figure 7)).Figure 7
Cradle to cradle (see [22]).This concept is incorporated into the SDL model that rules the behavior of the building, taking care of all of these aspects. This allows us to obtain a holistic view of what happens to the building from a sustainability point of view.


## 4.1. Specification and Description Language

Several languages exist to formalize a simulation model [16]. In our approach, we use the Specification and Description Language (SDL) [17], a formal, graphical, unambiguous, and complete formalist that is widely used to represent simulation models.The structure of the language allows us to easily obtain the code needed to perform the simulations [18], an aspect that simplifies the verification of the models [19].The language has a modular structure that simplifies the definition of the different model components, see Figure3.Figure 3
A structural vision of an SDL model with its four main levels.Specifically, SDL is an object-oriented formal language defined by the International Telecommunications Union-Telecommunications Standardization Sector (ITU-T) (the Comité Consultatif International Telegraphique et Telephonique (CCITT)) on the Z. 100 recommendation [20]. The language was designed for the specification of event-oriented, real-time, and interactive complex systems. These systems might involve different concurrent activities that use signals to perform communication. In our current scope, SDL SIGNALS represent the events of the simulation model; hence, in this paper, the SDL SIGNAL or event can be considered equivalent because the SIGNAL is the representation of the event in the language. SDL is based on the definition of four levels to describe the structure and the behavior of the models: system, blocks, processes, and procedures. In SDL, BLOCKS and PROCESSES are named AGENTS. The outermost block, the system BLOCK, is an agent itself. Figure 1 shows this hierarchy of levels.The different concepts that the SDL language covers are the following:(1)
system structure: from the blocks to the processes and their related hierarchy;(2)
communication: signals, communication paths or channels, and parameters that can be performed by the signals;(3)
behavior: defined by different processes;(4)
data: based on abstract data types (ADT);(5)
inheritance: useful to describe relations between objects and their properties.


## 4.2. SDL Processes

The processes describe more specifically the behavior of the block. Each of the processes for the block has one state or more. For each of the states of a process, SDL describes how it behaves if different events occur. An object may react differently to an event depending on the port that sends it. The process is basically specified using graphical elements that describe operations or decisions. We define the cosimulation structures in our approach at this level.Table2 shows the elements used in the SDL process diagrams implemented in the system. Figure 4 shows an example of an SDL process.Table 2
Some SDL blocks.
Start. It defines the first operations to be executed. This is needed to define the initial condition of the model processes.
State. A state element contains the name of a state.
Input. These elements describe the type of signals that can be received on a specific STATE.
Create. This element allows the creation of an object.
Task. This element allows the definition of assignments, assignment attempts, or the interpretation of informal texts.
Procedure call. These elements represent pieces of code that are encapsulated on PROCEDURES.
Output. These elements are needed to send a SIGNAL from one PROCESS to another (or to itself).
Decision. These elements describe bifurcations. Their behavior depends on how the related question is answered.Figure 4
Relation between the no graphical SDL and the graphical SDL.Two standard representations for SDL exist: a textual representation (SDL/PR) and a graphical representation (called SDL/GR) (see Figure4).Although SDL-PR can be used to represent our model, some technical reasons lead us to use a new XML representation of the SDL language.(1)
We need to describe information that does not belong to the model. As an example, in a diagram, we need to relate a spatial position to each one of the different SDL blocks to allow for a representation of the model. With XML, it is easy to add an optional tag that can carry this information.(2)
XML has many different libraries that allow for good manipulation of the information. This simplifies the codification and the maintenance of the parser and the related code.(3)
XML can be validated using an XSD schema. This is useful for detecting some structural problems when we write the model to run it on the simulator.(4)
XML can be easily transformed to other representations. Some programs allow us to implement these transformations between XML files in a graphical way (Stylus Studio as an example).(5)
XML representation of the model helps us in the representation of it in a website.(6)
In our XML representation of the SDL language, the code related to the tasks can be C code. Additionally, the code related to the procedures can be a diagram or, similar to the task blocks, C code. This simplifies the implementation of the DLL in the compiler.Because SDL only exists in a standard representation using XML, it is needed to establish a mechanism for transforming from SDL-GR (represented on the Microsoft Visio diagrams) to our SDL-XML. This process is performed on SDLPS.Because of the use of this approach, the schema that depicts a modeling process proposed by Sargent [21] can be simplified at the operative level. To understand the areas affected in the modeling process by this approach, Figure 5 depicts the areas affected by this proposed methodology in red boxes.Figure 5
Areas of the modeling process diagram affected by our proposed methodology. The diagram is based on [21].


## 4.3. Building Model

In this project, a transdisciplinary approach is followed. This means that we work with personnel with different formations and backgrounds and that we want different actors to be involved in all parts of the project. To do this, a common language that allows us to establish this communication is needed. As we stated previously, we use SDL to define the buildings’ behavior. The complete definition of the model is detailed in [15]. Because we need to calculate the energy demand of the buildings, we use a cosimulation approach. This allows us to utilize a widely used and accepted calculus engine such as TRNSYS in the model.Figure6 shows the first level of the building simulation model. Four main blocks represent the environment, the building, the compensation, and the waste treatments. In this experiment, we are mainly focused on the building block because we want to analyze the use of the building and we do not consider other aspects.Figure 6
The first level of the building simulation model.In the model, we can describe, as formally as possible, the structure and the behavior of the lifecycle of a building. Every building is connected to energy and social networking, which has changed the rules of the game. We must currently address these concepts to complete the cycle (an idea already introduced in Cradle to Cradle [22] and in which we face a new paradigm of design (see Figure 7)).Figure 7
Cradle to cradle (see [22]).This concept is incorporated into the SDL model that rules the behavior of the building, taking care of all of these aspects. This allows us to obtain a holistic view of what happens to the building from a sustainability point of view.


## 5. Implementation and Verification

Once the model is defined using SDL, it is necessary to implement it. In our case, we use SDLPS, which is a software infrastructure that allows the automatic execution of models represented by SDL or DEVS languages. This simplifies the implementation process because the tool assures that the execution follows the definition of the model proposed on the conceptual model. Figure8 shows SDLPS with the model defined on SDL ready for its execution.Figure 8
SDLPS with the model loaded and ready for its execution.Because SDLS understands the formalized model of the SDL language, the verification process is assured because of the ability of SDLPS to execute the model correctly.The model can be defined using the Microsoft Visio drawing tool. As we stated previously, this standard representation is re-represented through XML (SDL-XML), by allowing SDLPS to obtain the structure of the model and to perform an automatic execution of the model. The inclusion of legacy models can be easily represented through an extended set of instructions that are translated to a SDL-XML code. The model shows that we can use the Trnsys or Energy+ calculus engines as a cosimulation engine, as shown in Figure9.Figure 9
Procedure defining the calculus engines to be used on SDLPS model.This procedure is used in the PROCESS diagrams when calculating some values that must be obtained, in our case, from Trnsys, as shown in Figure10.Figure 10
Calling the demand procedure that provides possibilities for the cosimulation mechanism in this model.The overall process of this cosimulation approach is shown in Figure11. SDL allows us to execute the models in a distributed scenario; however, in that case, because the models mainly depend on the Trnsys calculus engine, the distributed scenario is not based on the distribution of the model but on the distribution of the experimental framework defined.Figure 11
The legacy systems that implement the legacy models can be incorporated into the execution through SDLPS.


## 6. Experimentation

The definition of the experiment was based on the definition of several factors that determine the structure of the buildings we want to model. This structure determines the main typologies for the Catalonia residential area. In Table3, a subset of the experiments to be executed to analyze the behavior of the multifamily house constructed before 1939 is shown.Table 3
Experiment definition for the multifamily houses constructed prior to 1939.
n
Clima.
NVENT
FAC
COB
WIN
TOL
19
El
Yes
10
13
10
10
691
El
Yes
26
13
10
10
187
El
Yes
14
13
10
10
247
El
Yes
15
16
10
10
677
El
Yes
26
10
12
10
47
El
Yes
11
10
12
10
107
El
Yes
12
13
12
10
19
C2
Yes
10
13
10
10
691
C2
Yes
26
13
10
10
187
C2
Yes
14
13
10
10
247
C2
Yes
15
16
10
10
677
C2
Yes
26
10
12
10
47
C2
Yes
11
10
12
10
107
C2
Yes
12
13
12
10The overall project needs to conduct more than 60.000 simulations, implying months of calculus using a single server. The first time that we confront a simulation model that required a time to perform the calculations that was too large with respect to the time we must be able to offer an answer to the client was in the project for the Barcelona Airport [23]. In this project, we used a set of machines to run different replications of the same model with the aim of reducing the time needed to obtain the answers.In this case, the problem is not the number of replications of the model that need to be performed but the large number of different scenarios that we want to evaluate. This is due to the considerable amount of variables that we can consider in a building. Specifically, in the first approach for one of the typologies we wanted to evaluate, the time was approximately 20 days. This time was excessive due to the temporal constraints of the project.To accelerate this process, we define a method to automatically generate the different experiments to be executed as we discuss in the next section.


### 6.1. Distributing the Experimentation

Several approaches exist to parallelize a simulation model. The first approach is to try to divide the simulation model over different nodes. In that case, optimistic or conservative approaches can be applied [24]. These approaches, however, are complex due to the cosimulation approach we follow and due to the inherent difficulty of parallelizing a simulation model. In addition, because the execution of a single simulation model does not require considerable computational effort, the real problem resides on the fact that we need to execute multiple scenarios (thousands). Hence, our approach for distributing the execution will be based on the distributed execution of parts for the experimental design. We divide our experimental design into independent pieces that may be executed on different machines; once these executions finish, we again join all of the answers on a single computer following a server-client approach. In that sense, some platforms exist, such as HTCondor [25], that helps for these types of implementations. In our specific case, the simulation tool that we use (SDLPS) implements the needed mechanisms to parallelize this experiment. With the help of a common peer-to-peer synchronization tool, we can centralize the answers obtained in a single server; hence, we do not need to use any other framework.We use one of the teaching rooms by installing the simulation systems on each computer where we must use SDLPS with the model of energy efficiency for buildings, which acts as a comanager simulation by yelling at other simulation systems, TRNSYS, as a calculus engine. Finally, it was necessary to install a manager to establish synchronization between all of the computers. We chose BitTorrentSync, a peer-to-peer synchronization system that would allow us to centralize the results and the definition of the scenarios on a single central server. It takes more time to prepare the experiments that run the 6000 different simulations. Given that the classroom had 25 computers, in this particular scenario that we are presenting here, each one of these computers would run 240 simulations. The time it took each PC to complete its task was less than 8 hours, but, to prepare the configurations of each PC to mainly install the programs used in the cosimulation, it took more than 10 hours. Figure12 shows the computer room with the configured PCs and with the results obtained on the screens.Figure 12
Computer lab used to execute the simulations. Note that all of the computers compose a cluster that shares the model and executes a part of the experiment, uploading the results to a central server.To prepare the distribution of the experimentation along all of the computers, we implement a feature on SDLSP to detect the IPs of the local network and to automatically assign an IP to each one of the parts in which we divide the complete experiment. We can also select IPs over Internet. Figure13 shows the assignation of the IPs (intranet) for the 25 computers we have in the room for the experimentation.Figure 13
Assigning the IPs of the local network to distribute the experimentation over the cluster.Once we detect that the computers will be involved in the cluster execution, the parameterization file that describes what will be executed on each computer is prepared. Each computer (through SDLPS) detects its own IP and, accordingly, executes the part of the job that it has been assigned. SDLPS assures that the distributed experimental definition, following a factorial design, is correctly divided and that the results can be obtained again correctly.


## 6.1. Distributing the Experimentation

Several approaches exist to parallelize a simulation model. The first approach is to try to divide the simulation model over different nodes. In that case, optimistic or conservative approaches can be applied [24]. These approaches, however, are complex due to the cosimulation approach we follow and due to the inherent difficulty of parallelizing a simulation model. In addition, because the execution of a single simulation model does not require considerable computational effort, the real problem resides on the fact that we need to execute multiple scenarios (thousands). Hence, our approach for distributing the execution will be based on the distributed execution of parts for the experimental design. We divide our experimental design into independent pieces that may be executed on different machines; once these executions finish, we again join all of the answers on a single computer following a server-client approach. In that sense, some platforms exist, such as HTCondor [25], that helps for these types of implementations. In our specific case, the simulation tool that we use (SDLPS) implements the needed mechanisms to parallelize this experiment. With the help of a common peer-to-peer synchronization tool, we can centralize the answers obtained in a single server; hence, we do not need to use any other framework.We use one of the teaching rooms by installing the simulation systems on each computer where we must use SDLPS with the model of energy efficiency for buildings, which acts as a comanager simulation by yelling at other simulation systems, TRNSYS, as a calculus engine. Finally, it was necessary to install a manager to establish synchronization between all of the computers. We chose BitTorrentSync, a peer-to-peer synchronization system that would allow us to centralize the results and the definition of the scenarios on a single central server. It takes more time to prepare the experiments that run the 6000 different simulations. Given that the classroom had 25 computers, in this particular scenario that we are presenting here, each one of these computers would run 240 simulations. The time it took each PC to complete its task was less than 8 hours, but, to prepare the configurations of each PC to mainly install the programs used in the cosimulation, it took more than 10 hours. Figure12 shows the computer room with the configured PCs and with the results obtained on the screens.Figure 12
Computer lab used to execute the simulations. Note that all of the computers compose a cluster that shares the model and executes a part of the experiment, uploading the results to a central server.To prepare the distribution of the experimentation along all of the computers, we implement a feature on SDLSP to detect the IPs of the local network and to automatically assign an IP to each one of the parts in which we divide the complete experiment. We can also select IPs over Internet. Figure13 shows the assignation of the IPs (intranet) for the 25 computers we have in the room for the experimentation.Figure 13
Assigning the IPs of the local network to distribute the experimentation over the cluster.Once we detect that the computers will be involved in the cluster execution, the parameterization file that describes what will be executed on each computer is prepared. Each computer (through SDLPS) detects its own IP and, accordingly, executes the part of the job that it has been assigned. SDLPS assures that the distributed experimental definition, following a factorial design, is correctly divided and that the results can be obtained again correctly.


## 7. Conclusions

The more apparent approach related to a distributing simulation that attempts to segment the simulation model in several pieces and that can share information is an optimistic or a conservative approach [24, 26]. However, a simple approach may exist; the distribution of the experimentation through several computers enables us dramatically to reduce the time needed to perform the simulation. To this end, each one of the experiments should be independent and should establish a method for simplifying the results recollection.The proposed methodology, based on the formalization of the model through SDL, reduces the time needed to perform the verification of the model and the analysis and modeling. This gives our team more time to complete the experimentation by allowing us to execute the overall scenarios in some cases without using an optimization algorithm by only using brute force. This was very convenient for us because we can use the complete dataset obtained to conduct additional research.Regarding the specific results of the project, the information obtained was very useful in defining the priority actions and the most effective solutions for the energy renovation of existing buildings, guaranteeing comfortable conditions for the users and energy and economic savings. In Figure14, the results for all of the simulations are presented, and each dot represents one simulation. The x-axis represents the primary energy consumption, and the y-axis represents the global costs over 30 years. The background of the figure represents the energy label scale adapted to the results of the study (including lighting and appliances consumption). The three points highlighted in the figure represent the base case (BC), the cost-optimal measure (CO), and the low energy deep renovation (DR). All of the simulations that are below the horizontal dash-line (and on the left side of the BC) provide energy and economic savings in comparison with the base case (BC). We found that the cost-energy measures achieved a B-class rating and that was improved by three classes. Analyzing the data, we can see that to obtain an A-class, we need a deep renovation of the building and we need to use renewable energies.Figure 14
Cost-energy optimization: primary energy consumption and global costs (colored background: adapted energy label scale).The measures applied to the scenarios are detailed in Table4.Table 4
Description of the passive measures used in the different scenarios.
Measure
Description
Initial investment costs (€/dw)
Façade insulation
External: EPS 4,  6,  8, 10, and 12 cm
8000–9900
External: XPS 4, 6, 8, 10, and 12 cm
8900–11400
Air chamber: rock wool 3, 5, and 10 cm
1900–2500
Air chamber: EPS + graphite 3, 5, and 10 cm
2300–4800
Air chamber: cellulose 5 and 10 cm
1900–2200
Internal: EPS 4, 6, and 8 cm
3700–4100
Internal: rock wool 4, 6, and 8 cm
2700–2900
Roof insulation
Inverted: XPS 4, 6, 8, 10, and 12 cm
5400–5800
Internal: rock wool 4, 6, and 8 cm
1600–1700
Internal: EPS 4, 6, and 8 cm
2100–2400
Window change
4/16/4 aluminum with thermal break
8200
4/16/4 PVC
7400
Solar protection
Awning
1200The description of the BC, CO, and DR and their energy and economic results are detailed in Table5.Table 5
Cost-energy optimization. Energy and economic results of base case, cost-optimal measure, and deep renovation.
Base case
Cost-optimal
Deep renov.
Passive
Base case
Façade air chamber insulation
Façade and roof insulation
Heating + DHW
Conventional NG boiler
Condensing NG boiler
Condensing NG boiler + S. thermal
Cooling
Conventional AC split
Conventional AC split
Efficient AC split
PV solar system
No
No
Yes
Lighting
CFL
LED
LED
Awareness campaign
No
Yes
Yes
Primary energy kWh/yr⋅dw
15,114
8,704
5,208
Primary energy saving%
—
42
65
CO2 reduction %
—
47
70
Energy label
E
C
A
Global cost€/dw
38,000
33,850
52,717
Initial investment€/dw
0
4,594
22,831The model can be applied in other scenarios (buildings and residential areas) by allowing us to calculate the optimum values for a mathematical expression. This mathematical expression can represent, as performed in this research, a combination between the energy consumption and the price; however, no limitations regarding the structure or the variables used exist. The proposed methodology works well in a transdisciplinary scenario because of the use of a graphical, formal, and unambiguous language to represent the model. This allows us to accelerate the process and understand the different details of the model definition, its implementation, and its execution by all of the team members, decreasing the errors due to misunderstandings and the different languages used.



---

*Source: 267974-2015-11-04.xml*