Skip to content
Housing Stock Energy Hub edited this page Nov 13, 2019 · 4 revisions

First off, for this basic example, a dwelling archetype is selected.

id.model <- 1

A weather file (in Energy Plus format: EPW) is referenced.

var.EnHub.weatherFile <-
  fnAssignEPWfile(id.model,lst.EHS.2011.ext$dwelling.and.household.information)

And the generated IDF is then passed to the argument of the function fnRunEnergyPlus() to perform the simulation (see generation of IDF).

simulation of one single archetype

fnRunEnergyPlus(var.idfModelToRun, id.model, var.EnHub.weatherFile)

If required, the output table may be directly stored in a data.frame.

tbl.Sim.outputs.der <- fnRunEnergyPlus(var.idfModelToRun, id.model,
                                 var.EnHub.weatherFile)

To check on the performance of the simulation process, a timer may be attached to the process: fnChrono(). The following example shows their application.

fnChrono()

tbl.Sim.outputs.der <-
fnRunEnergyPlus(var.idfModelToRun, id.model, var.EnHub.weatherFile)

fnChrono()

simulation of multiple archetypes

This method applies the function fnRunEnergyPlus() repeatedly (see the script Run_EnergyPlus.R)

# verify previous simulation
stock.sample <- fnCheckIfSimulated(stock.sample, status=T)

# evaluation of chosen elements
invisible(pblapply(stock.sample, fnRunEnergyPlusIteratively, FALSE, 'd'))

stand-alone simulation


See Test