# Building model

## Question

How to estimate the size of the building stock of a city, including heating properties, renovations etc? The situation is followed over time, and different policies can be implemented.

The building model follows the development of a city's or area's building stock over time. The output of the model is the floor area (or volume, depending on the input data) of the building stock of a city at specified timepoints, classified by energy efficiency, heating type, and optionally by other case-specific characteristics. The model functions as part of Opasnet's modeling environment and it is coded using R. It uses specific R objects called ovariables. The model can also be downloaded and run on one's own computer.

The model is given data about the building stock of a certain city or area during a certain period of time. The data can be described with very different levels of precision depending on the situation and what kind of information is needed. Some kind of data on the energy efficiency and heating type is necessary, but even rough estimates suffice. Then again, if there is sufficient data, the model can analyse even individual buildings.

In addition to that, the model can describe changes in the building stock, i.e. construction of new buildings and demolishing of old ones. Data on the heating- and energy efficiencies of new and demolished buildings is required at the same level of precision as that of other buildings. This data is used to calculate how construction and demolishing change the building stock's size and heating types.

The model takes into account the energy renovation of existing buildings. They are analysed using two variables: firstly, what fraction of the building stock is energy renovated yearly and secondly, what type of renovation it is. This information, too, can be rough or precise and detailed. It can describe the whole building stock with a single number or be specific data on the time, the building's age, use or other background information.

For examples of model use, see Helsinki energy decision 2015, Building stock in Kuopio and Climate change policies and health in Kuopio.

The overall equation in the model is this:

$\displaystyle B_{t,h,e,r} = \int\int (Bs_{c,t,a} Hs_h Es_e + Bc_{c,h,e,t,a}) Rr_a Rs_{r,t} O)\mathrm{d}c \mathrm{d}a$

• B = buildings, floor area of buildings in specified groups
• Bs = stockBuildings, floor area of the current buildings
• Bc = changeBuildings, floor area of constructed and demolished (as negative areas) buildings
• Hs = heatingShares, fractions of different heating types in a group of buildings
• Es = efficiencyShares, fractions of different efficiency classes in a group of buildings
• Rr = renovationRate, fraction of buildings renovated per year
• Rs = renovationShares, fractions of different renovation types performed when buildings are renovated
• O = obstime, timepoints for which the building stock is calculated.
• Indices required (also other indices are possible)
• t = Obsyear, time of observation. This is renamed Time on the output data.
• c = Construction year (the index is named 'Time' in the input data), time when the building was built.
• a = Age, age of building at a timepoint. This is calculated as a = t - b.
• h = Heating, primary heating type of a building
• e = Efficiency, efficiency class of building when built
• r = Renovation, type of renovation done to a non-renovated building (currently, you can only renovate a building once)

The model is iterative across the Obsyear index so that renovations performed at one timepoint are inherited to the next timepoint, and that situation is the starting point for renovations in that timepoint.

## Rationale

### Inputs and calculations

Variables in the building model
Variable Measure Indices Missing data
stockBuildings (case-specific data from the user) e.g. Building stock in Helsinki or Building stock in Kuopio Amount of building stock (typically in floor-m2) at given timepoints. Required indices: Time (time the building was built. If not known, present year can be used for all buildings.) Typical indices: City_area, Building (building type) You must give either stockBuildings, heatingShares, and efficiencyShares or changeBuildings or both. For missing data, use 0.
heatingShares (case-specific data from the user) Fractions of heating types. Should sum up to 1 within each group defined by optional indices. Required indices: Heating. Typical indices: Time, Building If no data, use 1 as a placeholder.
efficiencyShares (case-specific data from the user) Fraction of energy efficiency types. Should sum up to 1 for each group defined by other indices. Required indices: Efficiency. Typical indices: Time, Building. If no data, use 1 as default.
changeBuildings (case-specific data from the user) Construction or demolition rate as floor-m2 at given timepoints. Required indices: Obsyear, Time, Efficiency, Heating. If both stockBuildings and changeBuildings are used, changeBuildings should have all indices in stockBuildings, heatingShares, and efficiencyShares. Typical indices: Building, City_area. If the data is only in stockBuildings, use 0 here.
renovationShares (case-specific data from the user) Fraction of renovation types when renovation is done. Should sum to 1 for each group defined by other indices. Required indices: Renovation, Obsyear. Obsyear is the time when the renovation is done If no data, use 1 as default.
renovationRate (case-specific data from user. You can also use fairly generic data from Building stock in Helsinki or Building stock in Kuopio.) Rate of renovation (fraction per time unit). Required indices: Age (the time difference between construction and renovation, i.e. Obsyear - Time for each building). If no data, use 0.
obstime (assessment-specific years of interest) The years to be used in output. The only index Obsyear contains the years to look at; Result is 1. Required indices: Obsyear. Typical indices: other indices are not allowed. -

This code defines the generic building model object called buildings. Other objects needed can be found from case-specific pages, see table above.

 ### This code is Op_en6289/buildingstest on page [[Building model]]. library(OpasnetUtils) ########## Calculate all building events (constructions, demolitions, renovations) buildings <- Ovariable("buildings", dependencies = data.frame(Name = c( "stockBuildings", "changeBuildings", "heatingShares", # This can be indexed by building year (Time) or Observation year (Obsyear) "efficiencyShares", # Same here "renovationShares", "renovationRate", # Fraction of buildings renovated between timepoints "demolitionRate", # Fraction of buildings demolished between timepoints #"heatTypeConversion", # Is dependent on buil, which defined in the formula (must handle withihn formula). Fraction of heating types converted to other "obstime" # In the new version obstime is ovariable with column Obsyear. )), formula = function(...) { stock <- stockBuildings * obstime if( ! "Efficiency" %in% colnames(stock@output)) { # Add those shares that are missing stock <- stock * efficiencyShares } if( ! "Heating" %in% colnames(stock@output)) { stock <- stock * heatingShares } stock2 <- changeBuildings * obstime if( ! "Efficiency" %in% colnames(stock2@output)) { # Add those shares that are missing stock2 <- stock2 * efficiencyShares } if( ! "Heating" %in% colnames(stock2@output)) { stock2 <- stock2 * heatingShares } stock2@output$Time <- as.factor(stock2@output$Time) # Also stock@output$Time is factor buil <- OpasnetUtils::combine(stock, stock2) # Buildings in the whole timeline buil <- unkeep(buil, sources = TRUE) buil@output$Age <- as.numeric(as.character(buil@output$Obsyear)) - as.numeric(as.character(buil@output$Time)) buil@marginal <- c(buil@marginal, TRUE) buil@output <- buil@output[buil@output$Age >= 0 , ] # Note that if stockBuildings and changeBuildings have different marginals (typically policies), # there will be NA in these indices. This will be corrected below. for(i in colnames(buil@output)[buil@marginal]) { if(any(is.na(buil@output[[i]]))) { buil@output <- fillna(buil@output, i) print(paste("Column", i, "treated with fillna (difference between stockBuildings and changeBuildings).")) } } # heatTypeConversion dependent on buil, which defined above, and hence must be handled here. # Scope is messed up due to the dependency and the following produces error when run within EvalOutput of buildings #objects.latest("Op_en7115", code_name = "heatTypeConversion") #heatTypeConversion <- EvalOutput(heatTypeConversion) heatTypeConversion <- function(){ dat <- opbase.data("Op_en7115", subset = "Yearly_heating_converted_factor") colnames(dat)[colnames(dat) == "Time"] <- "Obsyear" dat$Obs <- NULL out <- data.frame() temp <- unique(dat[c("Heating_from", "Heating_to")]) for (i in 1:nrow(temp)) { onetype <- merge(temp[i,], dat) tempout <- merge(obstime@output, onetype, all.x = TRUE)[c("Obsyear","Result")] tempout <- merge(tempout, temp[i,]) for (j in (1:nrow(tempout))[is.na(tempout$Result)]) { a <- onetype$Obsyear[which.min(abs(as.numeric(as.character(onetype$Obsyear)) - as.numeric(as.character(obstime$Obsyear[j]))))] tempout$Result[j] <- onetype$Result[a] } out <- rbind(out, tempout) } out <- Ovariable(output = out, marginal = colnames(out) != "Result") colnames(out@output)[colnames(out@output) == "Heating_from"] <- "Heating" out <- buil * out out1 <- out out1$Result <- - out1$Result out1$Heating_to <- NULL out$Heating <- out$Heating_to out$Heating_to <- NULL out@output <- rbind(out1@output, out@output) heatTypeConversion <- out return(out) } buil <- OpasnetUtils::combine(buil, heatTypeConversion()) temp1 <- merge(renovationRate, unique(buil@output["Age"])) # Avoid redundant calculations temp1@name <- renovationRate@name temp2 <- renovationShares temp2@output <- temp2@output[temp2@output$Renovation == "None" , ] renovate <- (1 - temp1) * (1 - temp2) # Assumes that data has row for Renovation: None = 0 renovate <- OpasnetUtils::combine(renovate, temp1 * renovationShares) out <- data.frame() prevreno <- unkeep(buil * renovate * 0, sources = TRUE) # Previously renovated buildings for the first time point prevreno@output <- prevreno@output[prevreno@output$Renovation != "None" , ][1,] # Just take one renovated example row marginals <- colnames(prevreno@output)[prevreno@marginal] demolitionRate <- unkeep(demolitionRate, sources = TRUE) # Would otherwise cause trouble in rbind. for(i in obstime@output$Obsyear) { # Accumulate the building stock # Take the building stock temp <- buil temp@output <- temp@output[temp@output$Obsyear == i , ] # Take buildings of year i prevreno@output$Obsyear <- i # update the observation year of the previous renovation # Remove from the stock buildings that are demolished temp <- temp * (1 - demolitionRate) # Subtrack from the building stock buildings that are already renovated. temp <- OpasnetUtils::combine(temp, -1 * oapply(prevreno, cols = "Renovation", FUN = sum)) # Subtract previously renovated reno <- unkeep(temp * renovate, sources = TRUE) # Renovate the current non-renovated stock # If renovate does not match with this timepoint, mark all buildings here as unrenovated. # Is there new renovation in this time point? if(sum(result(reno)) == 0) { reno <- temp * Ovariable( output = data.frame(Renovation = "None", Result = 1), marginal = c(TRUE, FALSE) ) } newreno <- OpasnetUtils::combine(prevreno, reno) # Renovated buildings in this time point. # Take the previous timepoints, and previously renovated and now possibly renovated together. out <- rbind(newreno@output, out) # Add previously and now renovated together prevreno <- unkeep(newreno, sources = TRUE) prevreno@output <- prevreno@output[prevreno@output$Renovation != "None" , ] } out <- Ovariable(output = out, marginal = colnames(out) %in% marginals) # Note that if buil and renovate have different marginals (typically policies), # there will be NA in these indices. This will be corrected below. for(i in colnames(out@output)[out@marginal]) { if(any(is.na(out@output[[i]]))) { out@output <- fillna(out@output, i) print(paste("Column", i, "treated with fillna (difference between buil and renovate).")) } } out <- oapply(unkeep(out, sources = TRUE), cols = c("Age", "Time"), FUN = sum) colnames(out@output)[colnames(out@output) == "Obsyear"] <- "Time" # From now on, Time means the time of observation out@output$Time <- as.numeric(as.character(out@output$Time)) return(out) } ) objects.store(buildings) cat("Saved ovariable buildings\n") 

Helsinki energy decision 2015
In English
Assessment Main page | Helsinki energy decision options 2015
Helsinki data Building stock in Helsinki | Helsinki energy production | Helsinki energy consumption | Energy use of buildings | Emission factors for burning processes | Prices of fuels in heat production | External cost
Models Building model | Energy balance | Health impact assessment | Economic impacts
Related assessments Climate change policies in Helsinki | Climate change policies and health in Kuopio | Climate change policies in Basel
In Finnish
Yhteenveto Helsingin energiapäätös 2015 | Helsingin energiapäätöksen vaihtoehdot 2015 | Helsingin energiapäätökseen liittyviä arvoja | Helsingin energiapäätös 2015.pptx
 Urgenche pages Urgenche main page · Category:Urgenche · Urgenche project page (password-protected) City Kuopio Climate change policies and health in Kuopio (assessment) · Climate change policies in Kuopio (plausible city-level climate policies) · Health impacts of energy consumption in Kuopio · Building stock in Kuopio · Cost curves for energy (prioritization of options) · Energy balance in Kuopio (energy data) · Energy consumption and GHG emissions in Kuopio by sector · Energy consumption classes (categorisation) · Energy consumption of heating of buildings in Kuopio · Energy transformations (energy production and use processes) · Fuels used by Haapaniemi energy plant · Greenhouse gas emissions in Kuopio · Haapaniemi energy plant in Kuopio · Land use in Kuopio · Building data availability in Kuopio · Password-protected pages: File:Heat use in Kuopio.csv · Kuopio housing City Basel Buildings in Basel (password-protected)

## References

• Sundell, J., Levin, H., Nazaroff, W. W., Cain, W. S., Fisk, W. J., Grimsrud, D. T., Gyntelberg, F., Li, Y., Persily, A. K., Pickering, A. C., Samet, J. M., Spengler, J. D., Taylor, S. T., Weschler, C. J., Ventilation rates and health: multidisciplinary review of the scientific literature. INDOOR AIR 21 (2011) 3: 191 - 204. doi:10.1111/j.1600-0668.2010.00703.x ISSN 0905-6947
• Brightman, H. S., Milton, D. K., Wypij, D., Burge, H. A., Spengler, J. D. Evaluating building-related symptoms using the US EPA BASE study results. INDOOR AIR 18 (2008) 4: 335-345. doi:10.1111/j.1600-0668.2008.00557.x
• Nishioka, Y, Levy, JI, Norris, GA, Bennett, DH, Spengler, JD. A risk-based approach to health impact assessment for input-output analysis - Part 2: Case study of insulation. INTERNATIONAL JOURNAL OF LIFE CYCLE ASSESSMENT 10 (2005) 4: 255-262. doi:10.1065/lca2004.10.186.2 ISSN 0948-3349
• Samet, JM, Spengler, JD. Indoor environments and health: Moving into the 21st century. AMERICAN JOURNAL OF PUBLIC HEALTH 93 (2003) 9: 1489-1493. 10.2105/AJPH.93.9.1489 doi:DI 10.2105/AJPH.93.9.1489 ISSN 0090-0036
• Nishioka, Y, Levy, JI, Norris, GA, Wilson, A, Hofstetter, P, Spengler, JD. Integrating risk assessment and life cycle assessment: A case study of insulation RISK ANALYSIS 22 (2002) 5: 1003-1017. doi:10.1111/1539-6924.00266 ISSN 0272-4332