GAOptimJob | R Documentation |
GAOptimJob
class provides a prototype of conducting single- or multi-
objective(s) optimizations on an EnergyPlus model using Genetic Algorithm
The basic workflow is basically:
eplusr::EplusGroupJob
-> eplusr::ParametricJob
-> GAOptimJob
new()
Create a GAOptimJob
object
GAOptimJob$new(idf, epw)
idf
A path to an local EnergyPlus IDF file or an eplusr::Idf object.
epw
A path to an local EnergyPlus EPW file or an eplusr::Epw object.
A GAOptimJob
object.
\dontrun{ if (eplusr::is_avail_eplus(8.8)) { idf_name <- "1ZoneUncontrolled.idf" epw_name <- "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw" idf_path <- file.path(eplusr::eplus_config(8.8)$dir, "ExampleFiles", idf_name) epw_path <- file.path(eplusr::eplus_config(8.8)$dir, "WeatherData", epw_name) # create from local files GAOptimJob$new(idf_path, epw_path) # create from an Idf and an Epw object opt <- GAOptimJob$new(eplusr::read_idf(idf_path), eplusr::read_epw(epw_path)) } }
param()
GAOptimJob$param(..., .names = NULL)
apply_measure()
GAOptimJob$apply_measure(measure, ..., .names = NULL)
objective()
GAOptimJob$objective(..., .n = NULL, .dir = "min")
recombinator()
GAOptimJob$recombinator( ..., .float = setwith(ecr::recSBX, eta = 15, p = 0.7), .integer = setwith(recPCrossover, p = 0.7), .choice = setwith(recPCrossover, p = 0.7) )
mutator()
GAOptimJob$mutator( ..., .float = setwith(ecr::mutPolynomial, eta = 25, p = 0.1), .integer = mutRandomChoice, .choice = mutRandomChoice )
selector()
GAOptimJob$selector( parent = ecr::selSimple, survival = ecr::selNondom, strategy = "plus" )
terminator()
GAOptimJob$terminator( fun = NULL, name, message, max_gen = NULL, max_eval = NULL, max_time = NULL )
validate()
GAOptimJob$validate(param = NULL, ddy_only = TRUE, verbose = TRUE)
run()
GAOptimJob$run( mu = 20L, p_recomb = 0.7, p_mut = 0.1, dir = NULL, wait = TRUE, parallel = TRUE )
best_set()
GAOptimJob$best_set(unique = TRUE)
pareto_set()
GAOptimJob$pareto_set(unique = TRUE)
population()
GAOptimJob$population()
print()
GAOptimJob$print()
Hongyuan Jia
## ------------------------------------------------
## Method `GAOptimJob$new`
## ------------------------------------------------
## Not run:
if (eplusr::is_avail_eplus(8.8)) {
idf_name <- "1ZoneUncontrolled.idf"
epw_name <- "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
idf_path <- file.path(eplusr::eplus_config(8.8)$dir, "ExampleFiles", idf_name)
epw_path <- file.path(eplusr::eplus_config(8.8)$dir, "WeatherData", epw_name)
# create from local files
GAOptimJob$new(idf_path, epw_path)
# create from an Idf and an Epw object
opt <- GAOptimJob$new(eplusr::read_idf(idf_path), eplusr::read_epw(epw_path))
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.