Training exposure: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(adjusted)
(code possibly works)
Line 9: Line 9:


<t2b index="Year,Observation" locations="Unit,Result,Description" unit="-">
<t2b index="Year,Observation" locations="Unit,Result,Description" unit="-">
2012|ug/m3|10|
2012|ug/m3|1 - 2|
2020|ug/m3|20|
2020|ug/m3|20 - 11|
</t2b>
</t2b>


Line 20: Line 20:
page:Object-oriented_programming_in_Opasnet|name:answer|
page:Object-oriented_programming_in_Opasnet|name:answer|
page:OpasnetBaseUtils|name:generic|
page:OpasnetBaseUtils|name:generic|
page:Cost_curves_for_energy|name:formula
page:Training_exposure|name:formula
"
"
>
>


out <- formula.Op_en5674(dependencies.Op_en5674)
out <- tidy(op_baseGetData("opasnet_base", "Op_en5674"), direction = "wide")
out <- make.ovariable(out)
cat("Computed training exposures.\n")
cat("Computed training exposures.\n")
print(out)
print(out)
print(formula.Op_en5674(dependencies.Op_en5674))
cat("Computed training exposures.\n")


</rcode>
</rcode>
Line 43: Line 46:
>
>


formula.Op_en5674 <- function(x) {
cat("Initiation successful. Now starting the model.\n")
data <- tidy(op_baseGetData("opasnet_base", x$curves[1]), direction = "wide")
 
curves <- strsplit(as.character(data$Parameters), split = ",")
############ tapply of ovariables applies a function to each cell of a ragged array, that is to each (non-empty) group of values given by a unique combination of the levels of certain factors.
coefficients <- data.frame(array(NA, dim = c(length(curves), 10)))
### parameters (other parameters are as in generic tapply):
### X an ovariable


for(j in 1:length(curves)) {
setMethod(f = "tapply",
coefficients[j, 1:length(curves[[j]])] <- curves[[j]]
signature = signature(X = "ovariable"),
definition = function(X, INDEX, FUN = NULL, ..., simplify = TRUE) {
out <- as.data.frame(as.table(tapply(X@sample$Result, INDEX, FUN, ..., simplify = TRUE)))
X@sample <- out
return(X)
}
}
coefficients[nrow(coefficients) + 1, 1] <- x$deviation
)
for(k in 1:ncol(coefficients)) {
 
coefficients[, k] <- ifelse(is.na(coefficients[, k]), 0, as.numeric(coefficients[, k]))
formula.Op_en5674 <- function(x) {
}
ueConc <- make.ovariable(x$microenvironment.concentration)
x.new <- polyroot(as.vector(colSums(coefficients)))
ueTime <- make.ovariable(x$microenvironment.time)
x.new <- ifelse(abs(Im(x.new)) < 1e-6, Re(x.new), 1e+30) # Take only the real roots.
out <- ueConc * ueTime
x.new <- x.new[abs(x.new) == min(abs(x.new))] # Pick the root that is closest to zero (=BAU).
out <- tapply(out, out@sample[c("Iter", "Unit")], sum)
y.new <- 0
return(out)
for(k in 1:ncol(coefficients)) {
y.new <- y.new + coefficients[, k] * x.new^(k-1)
}
temp <- data[1, ]
temp[1, ] <- "Deviation"
data <- rbind(data, temp)
data <- cbind(data, data.frame(Result = y.new))
return(data)
}
}


dependencies.Op_en5674 <- list(
dependencies.Op_en5674 <- list(
curves = c("Op_en5478", "Cost curves for energy"),
microenvironment.concentration = data.frame(
bau = c("Op_en5469", "Energy balance in Kuopio"),
Microenvironment = c("Home", "Other"),
deviation = -5
Unit = "ug/m3",
Result = c(1, 2)),
microenvironment.time = data.frame(
Microenvironment = c("Home", "Other"),
Unit = "ug/m3",
Result = c(0.7, 0.3))
)
)



Revision as of 04:50, 13 May 2012



Question

What is the exposure in the Training assessment?

Answer

Training exposure: Difference between revisions(-)
ObsYearUnitResultDescription
12012ug/m31 - 2
22020ug/m320 - 11


+ Show code

Rationale

Formula

+ Show code

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


Keywords

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>