Difference between revisions of "Building model"

From Testiwiki
Jump to: navigation, search
(Calculations: emissions and exposure moved here)
(Calculations)
Line 33: Line 33:
 
"rateBuildings", # Percentage of renovations and other relative changes per year
 
"rateBuildings", # Percentage of renovations and other relative changes per year
 
# "eventyear", # A dummy variable to combine time periods to numerical time axis.
 
# "eventyear", # A dummy variable to combine time periods to numerical time axis.
"obsyear" # A data.frame of years for which observations are calculated. This requires timepoints function.
+
"year" # A data.frame of years for which observations are calculated. This requires timepoints function.
 
)),
 
)),
 
formula = function(...) {
 
formula = function(...) {
Line 39: Line 39:
 
stock <- stockBuildings * heatingShares * efficiencyShares
 
stock <- stockBuildings * heatingShares * efficiencyShares
  
if(!"Eventyear" %in% colnames(stock@output)) { # Make a duplicate of Time because Eventyear is needed later.
+
if(!"Built" %in% colnames(stock@output)) { # Make a duplicate of Time because Built is needed later.
stock <- stock * Ovariable(output = data.frame(Eventyear = NA, Result = 1), marginal = c(TRUE, FALSE))
+
marginals <- colnames(stock@output)[stock@marginal]
stock@output$Eventyear <- stock@output$Time
+
stock@output$Built <- stock@output$Time
 +
stock@marginal <- colnames(stock@output) %in% c(marginals, "Built")
 
}
 
}
 +
 +
#### Changes in building stock due to construction etc.
 
 
# # Annual changes of floor amount in time multiplied by time, fraction of energy classes and heating types.
+
# change <- changeBuildings  
# timelength <- Ovariable(
+
change <- timepoints(changeBuildings, obsyear, sumtimecol = FALSE) # Cumulative changes at certain timepoints.
# output = data.frame(
+
stock@output$Time <- as.numeric(as.character(stock@output$Time))
# obsyear,
+
stock@output$Built <- as.numeric(as.character(stock@output$Built))
# Result = c(diff(obsyear[[1]]), 0)
 
# ),
 
# marginal = c(TRUE, FALSE)
 
# )
 
 
 
change <- changeBuildings * timelength
 
change <- timepoints(change, obsyear, sumtimecol = FALSE) # Cumulative changes at certain timepoints.
 
  
 
stock@output <- orbind(stock, change)
 
stock@output <- orbind(stock, change)
rate <- stock * rateBuildings * rateHeatingShares * rateEfficiencyShares
+
stock@output$Age <- stock@output$Time - stock@output$Built
+
stock@marginal <- colnames(stock@output) %in% c(
temp1 <- EvalOutput(Ovariable("temp1", data = orbind(Now, New))) # All construction
+
"Age",  
temp1 <- unkeep(temp1, cols = "Building2", sources = TRUE, prevresults = TRUE)
+
colnames(stock@output)[stock@marginal],  
# All source indices can be unkept, because each has only one location.
+
colnames(changeBuildings@output)[changeBuildings@marginal]
 +
)
 +
stock <- unkeep(stock, prevresults = TRUE, sources = TRUE)
 +
# nonrenovated <- oapply(stock, cols = character(), FUN = sum) # Simplify row structure
 +
# if("Renovation" %in% colnames(nonrenovated@output)) {nonrenovated@output <- subset(
 +
# nonrenovated@output,
 +
# Renovation == "None",  
 +
# colnames(nonrenovated@output) != "Renovation"
 +
# )}
  
renovationyear <- Ovariable("renovationyear", data = data.frame(
+
reno <- nonrenovated * renovationShares
Renovationyear = c(2015, 2025, 2035, 2045),
 
Age = NA,
 
Result = 1
 
))
 
reno <- temp1 * renovationyear # reno is the building stock repeated for every potential renovation decade.
 
 
 
reno@output$Age <- as.numeric(as.character(reno@output$Renovationyear)) -
 
as.numeric(as.character(reno@output$Eventyear))
 
 
 
# Floor area of renovations in ten years. Combine with continuous index Age.
 
# Floor area of renovations in ten years. Combine with continuous index Age.
reno <- continuousOps(reno, rateBuildings, '*') * renovationShares * 10  
+
reno <- continuousOps(stock, renovationRate, '*') * renovationShares * 10  
reno@output$Eventyear <- reno@output$Renovationyear # Renovation is the new event.
+
reno@output$Built <- reno@output$Time # Renovation is the new event.
reno <- unkeep(reno, cols = c("Age", "Renovationyear"), sources = TRUE, prevresults = TRUE)
+
reno <- unkeep(reno, cols = c("Age", "Time"), sources = TRUE, prevresults = TRUE)
  
 
temp2 <- orbind(temp1 * 1, reno * -1) # Equal amount stops being non-renovated.
 
temp2 <- orbind(temp1 * 1, reno * -1) # Equal amount stops being non-renovated.
Line 83: Line 79:
 
temp2$Renovation <- as.factor(temp2$Renovation)
 
temp2$Renovation <- as.factor(temp2$Renovation)
  
temp3 <- EvalOutput(Ovariable("buildings", data = temp2)) # Temp3: Like Temp2 but ovariable
+
temp3 <- Ovariable(output = temp2)) # Temp3: Like Temp2 but ovariable
 
temp3 <- unkeep(temp3, sources = TRUE, prevresults = TRUE)
 
temp3 <- unkeep(temp3, sources = TRUE, prevresults = TRUE)
temp3@output <- fillna(temp3@output, marginals = colnames(temp3@output)[temp3@marginal])
+
# temp3@output <- fillna(temp3@output, marginals = colnames(temp3@output)[temp3@marginal]) # WHY THIS? CANNOT FILLNA AMOUNTS!
colnames(temp3@output)[colnames(temp3@output) == "City area"] <- "City.area"
+
# colnames(temp3@output)[colnames(temp3@output) == "City area"] <- "City.area"
  
 
# temp4: Drop redundant time indices
 
# temp4: Drop redundant time indices
temp4 <- oapply(temp3, cols = c("Constructed", "Renovationyear", "Age"), FUN = "sum", na.rm = TRUE)
+
temp4 <- oapply(temp3, cols = c("Built", "Age"), FUN = "sum", na.rm = TRUE)
temp4@output <- temp4@output[!is.na(result(temp4)) , ]
+
# temp4@output <- temp4@output[!is.na(result(temp4)) , ]
  
 
# Calculate cumulative events at timepoints defined by obsyear.
 
# Calculate cumulative events at timepoints defined by obsyear.

Revision as of 15:50, 16 February 2015



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

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

Rationale

Error creating thumbnail: Unable to save thumbnail to destination
Causal diagram of the building model.

Calculations

+ Show code

Dependencies

  • Exposure to PM2.5 in Finland
  • OpasnetUtils/Drafts
  • Energy use of buildings
  • Ovariables used or produced and example pages where they are used:
    • Building stock in Kuopio
      • buildingStock, # Current building stock
      • renovation, # Percentage of renovations per year
      • renovationShares, # Fraction of renovation type when renovation is done.
      • construction, # Construction rate in the future
      • constructionAreas,
      • buildingTypes, # A dummy variable to combine two different indices: Building and Building2
      • heatingShares, # Heating types of current buildings
      • heatingSharesNew, # Heating types of the buildings in the future
      • buildings,
    • Energy use of buildings
      • energyUse,
      • efficienciesNew, # Energy efficiencies in the future
      • savingPotential,
    • Climate change policies and health in Kuopio
      • eventyear, # A dummy variable to combine time periods to numerical time axis.
      • efficiencies, # Energy efficiencies of current buildings
      • obsyear # Years for which observations are calculated. This requires timepoints function.


See also

Urgenche research project 2011 - 2014: city-level climate change mitigation
Urgenche pages

Urgenche main page · Category:Urgenche · Urgenche project page (password-protected)

Relevant data
Building stock data in Urgenche‎ · Building regulations in Finland · Concentration-response to PM2.5 · Emission factors for burning processes · ERF of indoor dampness on respiratory health effects · ERF of several environmental pollutions · General criteria for land use · Indoor environment quality (IEQ) factors · Intake fractions of PM · Land use in Urgenche · Land use and boundary in Urgenche · Energy use of buildings

Relevant methods
Building model · Energy balance · Health impact assessment · Opasnet map · Help:Drawing graphs · OpasnetUtils‎ · Recommended R functions‎ · Using summary tables‎

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)

Energy balances
Energy balance in Basel · Energy balance in Kuopio · Energy balance in Stuttgart · Energy balance in Suzhou


References