Building model: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Calculations: buildings still need bug fix)
Line 35: Line 35:
)),
)),
formula = function(...) {
formula = function(...) {
######## Current building stock
# ######## Current building stock
stock <- stockBuildings * heatingShares * efficiencyShares
# stock <- stockBuildings * heatingShares * efficiencyShares


# if(!"Startyear" %in% colnames(stock@output)) { # Make a duplicate of Time because Startyear is needed later.
# marginals <- colnames(stock@output)[stock@marginal]
# stock@output$Startyear <- stock@output$Time
# stock@marginal <- colnames(stock@output) %in% c(marginals, "Startyear")
# }


#### Changes in building stock due to construction etc.
# #### Changes in building stock due to construction etc.
# change <- changeBuildings
# change <- timepoints(changeBuildings, obsyear, sumtimecol = FALSE) # Cumulative changes at certain timepoints.
change <- timepoints(changeBuildings, obsyear, sumtimecol = FALSE) # Cumulative changes at certain timepoints.


nw <- stock
#### Calculate cb ie. those buildings that were built between Time-1 and Time.
nw@output$Time <- as.numeric(as.character(nw@output$Time))
#### This has two parts: the stock (stockBuildings) is treated as net construction rate
nw@output <- subset(nw@output, Time == max(Time))
#### by assuming that after construction Time nothing is demolished.
colnames(nw@output)[colnames(nw@output) == "Time"] <- "Startyear"
#### Then this is added to the direct construction data (changeBuildings).
changeBuildings@output$Startyear <- as.numeric(as.character(changeBuildings@output$Startyear))


nw <- unkeep(nw, prevresults = TRUE, sources = TRUE)
# ### This code can be used to change cumulative building stock data to construction rates of periods.
# stockBuildings@output$Time <- as.numeric(as.character(stockBuildings@output$Time))
# years <- sort(unique(stockBuildings@output$Time))
# cb <- stockBuildings
# cb@output$Time <- years[match(cb@output$Time, years) + 1] # Frame shift with time, years 2:n.
# cb@output <- subset(cb@output, !is.na(Time))
# cb <- stockBuildings - cb
# cb@output <- orbind(cb, subset(stockBuildings@output, Time = years[1])) # First year


nw@output <- orbind(nw, unkeep(1 * changeBuildings, prevresults = TRUE, sources = TRUE))
cb <- stockBuildings * heatingShares * efficiencyShares
# nw <-
# colnames(cb@output)[colnames(cb@output) == "Time"] <- "Startyear"
# stock <- unkeep(change, cols = "Startyear")
# Add buildings from stock and buildings from construction data
 
cb <- orbind2(cb, changeBuildings)


# change@marginal <- colnames(change@output) %in% c(
# "Age",
# colnames(stock@output)[stock@marginal],
# colnames(changeBuildings@output)[changeBuildings@marginal]
# )
# change <- unkeep(change, cols = "Startyear", prevresults = TRUE, sources = TRUE)
########### Floor area of renovations. Combine with continuous index Age.
########### Renovations of existing buildings. # Combine with (continuous) index Age.
reno <- nw * renovationShares
 
reno <- cb * renovationShares
marginals <- colnames(reno@output)[reno@marginal]
marginals <- colnames(reno@output)[reno@marginal]
reno@output$Age <- as.numeric(as.character(reno@output$Time)) -  
reno@output$Age <- as.numeric(as.character(reno@output$Startyear)) - # Startyear is the time of renovation
as.numeric(as.character(reno@output$Startyear))
as.numeric(as.character(reno@output$Time)) # Time is the time of construction
reno@marginal <- colnames(reno@output) %in% marginals
reno@marginal <- colnames(reno@output) %in% marginals


reno <- reno * 0.03 # continuousOps(reno, renovationRate, '*') FIX continuousOps
reno@output <- reno@output[result(reno) != 0 , ] # Zeros are meaningless
reno@output$Startyear <- reno@output$Time # Renovation is the new event.
reno <- reno * renovationRate # continuousOps(reno, renovationRate, '*') FIX continuousOps before using
# reno@output$Startyear <- reno@output$Time # Renovation is the new event.
reno <- oapply(reno, cols = c("Age", "Time"), FUN = sum)
reno <- oapply(reno, cols = c("Age", "Time"), FUN = sum)
reno <- timepoints(reno, obstime)  
# reno <- timepoints(reno, obstime) # Accumulate over observation time.
reno@output <- reno@output[result(reno) != 0 , ]


out <- reno * -1 # Equal amount stops being non-renovated.
out <- reno * -1 # Equal amount stops being non-renovated.
out@output$Renovation <- "None"
out@output$Renovation <- "None"
out@output$Renovation <- as.factor(out@output$Renovation)
# out@output$Renovation <- as.factor(out@output$Renovation)
out <- orbind(out, reno) # Temp2: Construction + renovation in data.frame
out <- orbind2(out, reno) # Temp2: Construction + renovation in data.frame


for(i in colnames(reno@output)[reno@marginal]) {
for(i in colnames(reno@output)[reno@marginal]) {

Revision as of 15:25, 17 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

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