GAOptimJob: Conduct Multi-Objective Optimization on An EnergyPlus Model

GAOptimJobR Documentation

Conduct Multi-Objective Optimization on An EnergyPlus Model

Description

GAOptimJob class provides a prototype of conducting single- or multi- objective(s) optimizations on an EnergyPlus model using Genetic Algorithm

Details

The basic workflow is basically:

Super classes

eplusr::EplusGroupJob -> eplusr::ParametricJob -> GAOptimJob

Methods

Public methods

Inherited methods

Method new()

Create a GAOptimJob object

Usage
GAOptimJob$new(idf, epw)
Arguments
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.

Returns

A GAOptimJob object.

Examples
\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))
}
}


Method param()

Usage
GAOptimJob$param(..., .names = NULL)

Method apply_measure()

Usage
GAOptimJob$apply_measure(measure, ..., .names = NULL)

Method objective()

Usage
GAOptimJob$objective(..., .n = NULL, .dir = "min")

Method recombinator()

Usage
GAOptimJob$recombinator(
  ...,
  .float = setwith(ecr::recSBX, eta = 15, p = 0.7),
  .integer = setwith(recPCrossover, p = 0.7),
  .choice = setwith(recPCrossover, p = 0.7)
)

Method mutator()

Usage
GAOptimJob$mutator(
  ...,
  .float = setwith(ecr::mutPolynomial, eta = 25, p = 0.1),
  .integer = mutRandomChoice,
  .choice = mutRandomChoice
)

Method selector()

Usage
GAOptimJob$selector(
  parent = ecr::selSimple,
  survival = ecr::selNondom,
  strategy = "plus"
)

Method terminator()

Usage
GAOptimJob$terminator(
  fun = NULL,
  name,
  message,
  max_gen = NULL,
  max_eval = NULL,
  max_time = NULL
)

Method validate()

Usage
GAOptimJob$validate(param = NULL, ddy_only = TRUE, verbose = TRUE)

Method run()

Usage
GAOptimJob$run(
  mu = 20L,
  p_recomb = 0.7,
  p_mut = 0.1,
  dir = NULL,
  wait = TRUE,
  parallel = TRUE
)

Method best_set()

Usage
GAOptimJob$best_set(unique = TRUE)

Method pareto_set()

Usage
GAOptimJob$pareto_set(unique = TRUE)

Method population()

Usage
GAOptimJob$population()

Method print()

Usage
GAOptimJob$print()

Author(s)

Hongyuan Jia

Examples


## ------------------------------------------------
## 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)


ideas-lab-nus/epluspar documentation built on March 23, 2024, 11:51 p.m.