Building model: Difference between revisions
(→Rationale: OpasnetUtils::combine) |
|||
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | |||
[[Category:Energy]] | [[Category:Energy]] | ||
[[Category:Buildings]] | [[Category:Buildings]] | ||
{{method|moderator=Jouni}} | {{method|moderator=Jouni}} | ||
</noinclude> | |||
==Question== | ==Question== | ||
Line 11: | Line 13: | ||
[[image:Building model causal diagram.png|thumb|400px|Causal diagram of the [[building model]]. The actual model is up to the yellow node Building stock, and the rest is an example how the result can be used in models downstream.]] | [[image:Building model causal diagram.png|thumb|400px|Causal diagram of the [[building model]]. The actual model is up to the yellow node Building stock, and the rest is an example how the result can be used in models downstream.]] | ||
The building model follows the development of a city's or area's building stock over time. The model functions as | 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 [[ovariable]]s. The model can also be downloaded and run on one's own computer. | ||
part of Opasnet's modeling environment and it is coded using R. | |||
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. | 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 | 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. | 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. | ||
Line 28: | Line 29: | ||
The overall equation in the model is this: | The overall equation in the model is this: | ||
<math>B_{t,h,e,r} = \int\int (Bs_{ | <math>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</math> | ||
* B = buildings, floor area of buildings in specified groups | * B = buildings, floor area of buildings in specified groups | ||
Line 37: | Line 38: | ||
* Rr = renovationRate, fraction of buildings renovated per year | * Rr = renovationRate, fraction of buildings renovated per year | ||
* Rs = renovationShares, fractions of different renovation types performed when buildings are renovated | * 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) | * Indices required (also other indices are possible) | ||
** t = Obsyear, time of observation. This is renamed Time on the output data. | ** 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. | ** a = Age, age of building at a timepoint. This is calculated as a = t - b. | ||
** h = Heating, primary heating type of a building | ** h = Heating, primary heating type of a building | ||
Line 50: | Line 51: | ||
==Rationale== | ==Rationale== | ||
=== | === Inputs and calculations === | ||
{| {{prettytable}} | |||
|+'''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. | |||
<rcode name='buildingstest' label='Initiate buildings (only for developers)' embed=1 store=1> | <rcode name='buildingstest' label='Initiate buildings (only for developers)' embed=1 store=1> | ||
Line 67: | Line 111: | ||
"renovationShares", | "renovationShares", | ||
"renovationRate", # Fraction of buildings renovated between timepoints | "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 | #"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. | "obstime" # In the new version obstime is ovariable with column Obsyear. | ||
Line 89: | Line 134: | ||
stock2@output$Time <- as.factor(stock2@output$Time) # Also stock@output$Time is factor | stock2@output$Time <- as.factor(stock2@output$Time) # Also stock@output$Time is factor | ||
buil <- combine(stock, stock2) # Buildings in the whole timeline | buil <- OpasnetUtils::combine(stock, stock2) # Buildings in the whole timeline | ||
buil <- unkeep(buil, sources = TRUE) | buil <- unkeep(buil, sources = TRUE) | ||
buil@output$Age <- as.numeric(as.character(buil@output$Obsyear)) - as.numeric(as.character(buil@output$Time)) | buil@output$Age <- as.numeric(as.character(buil@output$Obsyear)) - as.numeric(as.character(buil@output$Time)) | ||
Line 105: | Line 150: | ||
# heatTypeConversion dependent on buil, which defined above, and hence must be handled here. | # heatTypeConversion dependent on buil, which defined above, and hence must be handled here. | ||
heatTypeConversion <- EvalOutput(heatTypeConversion) | # Scope is messed up due to the dependency and the following produces error when run within EvalOutput of buildings | ||
buil <- combine(buil, heatTypeConversion) | #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 <- merge(renovationRate, unique(buil@output["Age"])) # Avoid redundant calculations | ||
Line 113: | Line 197: | ||
temp2@output <- temp2@output[temp2@output$Renovation == "None" , ] | temp2@output <- temp2@output[temp2@output$Renovation == "None" , ] | ||
renovate <- (1 - temp1) * (1 - temp2) # Assumes that data has row for Renovation: None = 0 | renovate <- (1 - temp1) * (1 - temp2) # Assumes that data has row for Renovation: None = 0 | ||
renovate <- combine(renovate, temp1 * renovationShares) | renovate <- OpasnetUtils::combine(renovate, temp1 * renovationShares) | ||
out <- data.frame() | out <- data.frame() | ||
Line 119: | Line 203: | ||
prevreno@output <- prevreno@output[prevreno@output$Renovation != "None" , ][1,] # Just take one renovated example row | prevreno@output <- prevreno@output[prevreno@output$Renovation != "None" , ][1,] # Just take one renovated example row | ||
marginals <- colnames(prevreno@output)[prevreno@marginal] | 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 | for(i in obstime@output$Obsyear) { # Accumulate the building stock | ||
Line 125: | Line 210: | ||
temp@output <- temp@output[temp@output$Obsyear == i , ] # Take buildings of year i | 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 | 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. | # Subtrack from the building stock buildings that are already renovated. | ||
temp <- combine(temp, -1 * oapply(prevreno, cols = "Renovation", FUN = sum)) # Subtract previously 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 | 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. | # If renovate does not match with this timepoint, mark all buildings here as unrenovated. | ||
Line 136: | Line 225: | ||
) | ) | ||
} | } | ||
newreno <- combine(prevreno, reno) # Renovated buildings in this time point. | newreno <- OpasnetUtils::combine(prevreno, reno) # Renovated buildings in this time point. | ||
# Take the previous timepoints, and previously renovated and now possibly renovated together. | # Take the previous timepoints, and previously renovated and now possibly renovated together. | ||
out <- rbind(newreno@output, out) # Add previously and now renovated together | out <- rbind(newreno@output, out) # Add previously and now renovated together | ||
Line 166: | Line 255: | ||
</rcode> | </rcode> | ||
<noinclude> | |||
==See also== | ==See also== | ||
Line 246: | Line 294: | ||
* Samet, JM, Spengler, JD. Indoor environments and health: Moving into the 21st century. AMERICAN JOURNAL OF PUBLIC HEALTH 93 (2003) 9: 1489-1493. {{doi|DI 10.2105/AJPH.93.9.1489}} ISSN 0090-0036 | * Samet, JM, Spengler, JD. Indoor environments and health: Moving into the 21st century. AMERICAN JOURNAL OF PUBLIC HEALTH 93 (2003) 9: 1489-1493. {{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 | * 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 | ||
</noinclude> |
Latest revision as of 03:48, 10 April 2019
Moderator:Jouni (see all) |
|
Upload data
|
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.
Answer
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:
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\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
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.
See also
- Building stock in Kuopio
- Building stock in Europe
- Building data availability in Kuopio
- Energy balance
- Exposure to PM2.5 in Finland
- Energy use of buildings
- Building stock in Kuopio
- Intake fractions of PM
- Greenhouse gas emissions in Kuopio
- heande:File:2013 10 29 - Exposure-Response Functions.xlsx
- heande:Health impact assessment framework
- heande:File:2013 10 29 WP6.2 Agreed ER.doc
- heande:Urgenche: Workpackage Exposure, Health, and Well-being
- heande:File:WP6 Deliverable 6 1.doc
- Land use in Kuopio
- City and energy solutions from Siemens:
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