hongyuanjia / epluspar

Conduct parametric analysis on EnergyPlus models in R
https://hongyuanjia.github.io/epluspar
Other
9 stars 0 forks source link

Flexible interface to specify complex field modifications #4

Closed hongyuanjia closed 5 years ago

hongyuanjia commented 5 years ago

Current way to specify parameters in SensitivityJob class is using $param() which only makes it possible to specify a single field value range.

sen <- Sensitivity$new(path_idf, path_epw)
sen$param(
    # Syntax: Object Name = list(Field = c(Min, Max, Levels))
    GP01 = list(Thickness = c(min = 0.01, max = 1, levels = 5)),
    `Supply Fan 1` = list(Fan_Total_Efficiency = c(0.1, 1.0, 5)),
    # See `r` and `grid_jump` in `sensitivity::morris`
    .rep = 12, .grid_jump = 4
)

There are cases when the user may want to modify the same field in all related objects, e.g. change the fan efficiency for all fans. Below are several possible interfaces that came into my mind:

It may be better to do both ways to provide more options for different level users.

hongyuanjia commented 5 years ago

With https://github.com/hongyuanjia/eplusr/pull/100, the := notation is supported. Documentation added and both ways are supported after c98c4db2fa39b761eaeb9251ef3a5d93b9f5c035.