diff --git a/404.html b/404.html index feb5fbd5a..8b2f0116d 100644 --- a/404.html +++ b/404.html @@ -6,12 +6,6 @@ Page not found (404) • eplusr - - - - - - @@ -33,7 +27,7 @@ - +
@@ -56,7 +50,7 @@
  • - +
  • @@ -65,7 +59,7 @@
  • - + @@ -123,7 +117,7 @@ - +
    @@ -151,17 +145,17 @@

    Page not found (404)

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Contributor Code of Conduct • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -122,16 +122,16 @@

    Contributor Code of Conduct

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + NA • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -120,16 +120,16 @@

    NA

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + License • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -116,16 +116,16 @@

    License

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + MIT License • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -120,16 +120,16 @@

    MIT License

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + NA • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -118,16 +118,16 @@

    Pull request overview
    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + NA • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -137,16 +137,16 @@

    NA

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + @@ -20,8 +14,6 @@ - - @@ -124,7 +116,7 @@ - +
    @@ -133,9 +125,9 @@

    Introduction to eplusr

    Hongyuan Jia

    -

    2024-05-25

    +

    2024-07-16

    - Source: vignettes/eplusr.Rmd + Source: vignettes/eplusr.Rmd
    @@ -189,9 +181,8 @@

    Locate EnergyPluseplus_config().

     avail_eplus()
    -#> [1] '23.1.0'
    -
    -
    +#> [1] '23.1.0'
    +
     eplus_config("23.1")
     #> $version
     #> [1] '23.1.0'
    @@ -204,11 +195,11 @@ 

    Locate EnergyPlususe_eplus(). After adding, all models of that version will use this path to call EnergyPlus.

    -
    +
     use_eplus("C:/EnergyPlusV23-1-0")

    If the needed version of EnergyPlus was not installed, you can use install_eplus() to install it.

    -
    +
     install_eplus(ver = "23.1")
    @@ -221,7 +212,7 @@

    Download EnergyPlus IDDIdd object that will be used whenever parsing all EnergyPlus models of version v23.1.

    -
    +
     path_idd <- download_idd("23.1", dir = tempdir())
     use_idd(path_idd)
     
    @@ -248,16 +239,15 @@ 

    Read and parse IDF
    +
     path <- path_eplus_example("23.1", "5Zone_Transformer.idf")
     model <- read_idf(path)
     #> IDD v23.1.0 has not been parsed before.
     #> Try to locate 'Energy+.idd' in EnergyPlus v23.1.0 installation folder '/usr/local/EnergyPlus-23-1-0'.
     #> IDD file found: '/usr/local/EnergyPlus-23-1-0/Energy+.idd'.
     #> Start parsing...
    -#> Parsing completed.
    -
    -
    +#> Parsing completed.
    +
     model
     #> ── EnergPlus Input Data File ───────────────────────────────────────────────────
     #>  • Path: '/usr/local/EnergyPlus-23-1-0/ExampleFiles/5Zone_Transformer.idf'
    @@ -534,7 +524,7 @@ 

    Basic Info
    +
    -
    +
     model$class_name()
     #>  [1] "Version"                                   
     #>  [2] "SimulationControl"                         
     #>  [3] "Building"                                  
     #>  [4] "SurfaceConvectionAlgorithm:Inside"         
     #>  [5] "SurfaceConvectionAlgorithm:Outside"        
    -....
    -
    @@ -577,7 +565,7 @@

    Class definitionIddObject. All required fields in each class are marked with *. For example, you can get the IddObject of class Material:

    -
    +
     

    You can also achieve this using methods in Idd class.

    -
    +
     idd <- use_idd("23.1")
     idd$Material
     
    @@ -622,7 +610,7 @@ 

    Class definition"autosize" or "autocalculate", the type of returned values will be “character”.

    -
    +
     def_val <- def_mat$field_default()
     str(def_val)
     #> List of 9
    @@ -645,7 +633,7 @@ 

    Get object
    +
     model$object_id(c("Material", "Construction"))
     #> $Material
     #>  [1] 43 44 45 46 47 48 49 50 51 52
    @@ -655,7 +643,7 @@ 

    Get object
    +
     model$object_name(c("Version", "Material", "Construction"))
     #> $Version
     #> [1] NA
    @@ -669,7 +657,7 @@ 

    Get object#> [7] "Sgl Grey 3mm"

    Object number in each class can be retrieved using $object_num().

    -
    +
     model$object_num(c("BuildingSurface:Detailed", "Material", "Output:Variable"))
     #> [1] 40 10 13

    Having the object ID or name, you can easily get any object using @@ -681,7 +669,7 @@

    Get object is equivalent to model$object("roof").

    -
    +
     model$objects(c("WD10", "ROOF-1"))
     #> $WD10
     #> <IdfObject: 'Material'> [ID:43] `WD10`
    @@ -706,7 +694,7 @@ 

    Get object#> └─ 5 : "WD01"; !- Layer 4

    If you want to get all objects in a single class, use $objects_in_class().

    -
    +
     model$objects_in_class("Material")
     #> $WD10
     #> <IdfObject: 'Material'> [ID:43] `WD10`
    @@ -744,7 +732,7 @@ 

    Get object
    +
    -
    -# OR
    +....
    +# OR
     # model[["Material_NoMass"]]

    Based on the above, if you want to get the first object in class RunPeriod, you can simply run:

    -
    +
     rp <- model$RunPeriod[[1]]

    For unique object, such like SimulationControl and Building, you can use $object_unique() which returns a single IdfObject object.

    -
    +
    -
    -
    +#> └─ 8: 6;              !- Minimum Number of Warmup Days
    +
     # OR just
     # model$Building

    Many fields in a model can be referred by others. For example, the @@ -814,12 +800,11 @@

    Get object
    +
     model$object_name("Material:NoMass")
     #> $`Material:NoMass`
    -#> [1] "CP01"        "MAT-SB-U"    "MAT-CLNG-1"  "MAT-FLOOR-1"
    -
    -model$object_relation("mat-clng-1")
    +#> [1] "CP01"        "MAT-SB-U"    "MAT-CLNG-1"  "MAT-FLOOR-1"
    +model$object_relation("mat-clng-1")
     #> ── Refer to Others ─────────────────────────────────────────────────────────────
     #> Target(s) does not refer to any other field.
     #> 
    @@ -838,7 +823,7 @@ 

    Get object
    +
     mat_const <- model$objects_in_relation("mat-clng-1", "ref_by")
     mat_const
     #> $`MAT-CLNG-1`
    @@ -862,16 +847,15 @@ 

    Get object and "[[" to get a single value in an IdfObject class or "[" to get multiple values just like normal lists in R.

    -
    +
     rp$Begin_Day_of_Month
    -#> [1] 14
    -
    -
    +#> [1] 14
    +
     # OR
     # rp[["Begin Day of Month"]]
     # rp[[3]]

    You can also make a chain.

    -
    +
     model$RunPeriod$WinterDay$Begin_Day_of_Month
     #> [1] 14
    @@ -901,7 +885,7 @@

    Duplicate existing objects (Idf new_name = "old_name". If new name is not given, the newly added object will have the same name as the original object except a appended suffix of “1”, “2” and etc.

    -
    +
     model$dup(c(my_roof = "ROOF-1", "ROOF-1", "WALL-1"))
     #> New names of duplicated objects not given are automatically generated:
     #>  #2| Object ID [324] in class 'Construction' --> New object name 'ROOF-1 1'
    @@ -950,7 +934,7 @@ 

    Add new objects using lists (I special element .comment.

    For example, here we add two new objects with comments in RunPeriod class:

    -
    +
     rp1 <- list(RunPeriod = list("rp_test_1", 1, 1, NULL, 2, 1, .comment = c("Comment for new object 1", "Another comment")))
     
     model$add(rp1,
    @@ -992,7 +976,7 @@ 

    Add new objects using lists (I :=, instead of =. For instance, below we create 3 materials. Note that field values with shorter length are automatically recycled.

    -
    +
     model$add(Material := .(
       sprintf("mat%i", 1:3),
       c("Rough", "MediumSmooth", "Smooth"),
    @@ -1039,7 +1023,7 @@ 

    Set new values and comme $set() in Idf and IdfObject:

    Note that you can also use .() here as an alias of list().

    -
    +
     model$set(
       rp_test_1 = .(name = "rp_test_3", begin_day_of_month = 2,
         .comment = c(format(Sys.Date()), "begin day has been changed.")
    @@ -1048,7 +1032,7 @@ 

    Set new values and comme #> $rp_test_3 #> <IdfObject: 'RunPeriod'> [ID:326] `rp_test_3` #> ── COMMENTS ──────────────────────────────────────────────────────────────────── -#> !2024-05-25 +#> !2024-07-16 #> !begin day has been changed. #> ── VALUES ────────────────────────────────────────────────────────────────────── #> Class: <RunPeriod> @@ -1061,7 +1045,7 @@

    Set new values and comme #> └─ 7 : <Blank>; !- End Year

    You can modify all objects in a class using class := list(...):

    -
    +
     model$set(RunPeriod := .(
       ..8 = c("Monday", "Tuesday", "Wednesday", "Thursday"),
       ..10 = "No"
    @@ -1103,7 +1087,7 @@ 

    Set new values and comme #> $rp_test_3 #> <IdfObject: 'RunPeriod'> [ID:326] `rp_test_3` #> ── COMMENTS ──────────────────────────────────────────────────────────────────── -#> !2024-05-25 +#> !2024-07-16 #> !begin day has been changed. #> ── VALUES ────────────────────────────────────────────────────────────────────── #> Class: <RunPeriod> @@ -1141,7 +1125,7 @@

    Set new values and comme

    Multiple objects can be grouped inside .() or c():

    -
    +
     model$set(.("WinterDay", "SummerDay") := .(..10 = "Yes"))
     #> $WinterDay
     #> <IdfObject: 'RunPeriod'> [ID:8] `WinterDay`
    @@ -1178,12 +1162,12 @@ 

    Set new values and comme #> └─ 13 : "Yes"; !- Use Weather File Snow Indicators

    For setting a single value on one object, you can write it in a chain:

    -
    +
     (model$RunPeriod$rp_test_2$End_Day_of_Month <- 2)
     #> [1] 2

    Also, if the modified fields are referenced by fields in other objects, the corresponding fields will also be updated.

    -
    +
     mat <- model$Material$CC03
     
     mat$value_relation("Name")
    @@ -1201,9 +1185,8 @@ 

    Set new values and comme #> #> #> ── Node Relation ─────────────────────────────────────────────────────────────── -#> Target(s) has no node or their nodes have no reference to other object.

    -
    -
    +#> Target(s) has no node or their nodes have no reference to other object.
    +
     mat$set(name = "CC03_renamed")
     #> <IdfObject: 'Material'> [ID:52] `CC03_renamed`
     #> Class: <Material>
    @@ -1215,9 +1198,8 @@ 

    Set new values and comme #> │─ 6*: 837, !- Specific Heat {J/kg-K} #> │─ 7 : 0.9, !- Thermal Absorptance #> │─ 8 : 0.65, !- Solar Absorptance -#> └─ 9 : 0.65; !- Visible Absorptance

    -
    -
    +#> └─ 9 : 0.65;           !- Visible Absorptance
    +
     mat$value_relation("Name")
     #> ── Refer to Others ─────────────────────────────────────────────────────────────
     #> Target(s) does not refer to any other field.
    @@ -1238,7 +1220,7 @@ 

    Set new values and comme you change them. You can achieve that by using $value_possible() method in IdfObject class.

    -
    +
     mat$value_possible(c(2, 7))
     #> ── 2: Roughness ────────────────────────────────────────────────────────────────
     #> * Auto value: <NA>
    @@ -1265,7 +1247,7 @@ 

    Insert objects from another I example, you may want to import some design days and update location data from a “.ddy” file. You can achieve that using $insert().

    -
    +
     # read ddy file as normal IDF
     path_ddy <- path_eplus_weather("23.1", "USA_CA_San.Francisco.Intl.AP.724940_TMY3.ddy")
     ddy <- read_idf(path_ddy, idd = model$version(), encoding = "Latin-1")
    @@ -1291,9 +1273,8 @@ 

    Insert objects from another I #> │─ 07 : "DefaultMultipliers", !- Dry-Bulb Temperature Range Modifier Type #> │─ 08 : <"Blank">, !- Dry-Bulb Temperature Range Modifier Day Schedule… #> │─ 09 : "Wetbulb", !- Humidity Condition Type -....

    -
    -
    +....
    +
     # get location data
     loc <- ddy$Site_Location$value()
     
    @@ -1312,16 +1293,15 @@ 

    Load objects using

    Here load means insert. You can use character vectors or data.frames to load new objects.

    -
    +
     mat_chr <- c("Construction,", "new_const1,", paste0(model$Material[[1]]$name(), ";"))
     model$load(mat_chr)
     #> $new_const1
     #> <IdfObject: 'Construction'> [ID:349] `new_const1`
     #> Class: <Construction>
     #> ├─ 1*: "new_const1", !- Name
    -#> └─ 2*: "WD10";       !- Outside Layer
    -
    -
    +#> └─ 2*: "WD10";       !- Outside Layer
    +
     # extract first construction data in a data.table
     dt <- model$Construction[[1L]]$to_table()
     # modify value
    @@ -1337,7 +1317,7 @@ 

    Load objects using #> └─ 5 : "WD01"; !- Layer 4

    The relation is automatically generated whenever new fields are added or modified.

    -
    +
     model$object_relation("new_const1")
     #> ── Refer to Others ─────────────────────────────────────────────────────────────
     #>  Class: <Construction>
    @@ -1353,9 +1333,8 @@ 

    Load objects using #> Target(s) is not referred by any other field. #> #> ── Node Relation ─────────────────────────────────────────────────────────────── -#> Target(s) has no node or their nodes have no reference to other object.

    -
    -model$object_relation("new_const2")
    +#> Target(s) has no node or their nodes have no reference to other object.
    +model$object_relation("new_const2")
     #> ── Refer to Others ─────────────────────────────────────────────────────────────
     #>  Class: <Construction>
     #>  └─ Object [ID:350] <new_const2>
    @@ -1396,7 +1375,7 @@ 

    Update objects

    Here update means set. You can use character vectors or data.frames to update existing objects.

    -
    +
     mat_chr <- model$Material$WD10$to_string()
     # change material density
     mat_chr[6] <- "600,"
    @@ -1412,9 +1391,8 @@ 

    Update objects #> │─ 6*: 1381, !- Specific Heat {J/kg-K} #> │─ 7 : 0.9, !- Thermal Absorptance #> │─ 8 : 0.78, !- Solar Absorptance -#> └─ 9 : 0.78; !- Visible Absorptance

    -
    -
    +#> └─ 9 : 0.78;           !- Visible Absorptance
    +
     # extract roof construction data in a data.table
     dt <- model$Construction$`ROOF-1`$to_table()
     # modify value
    @@ -1436,7 +1414,7 @@ 

    Delete existing objects (Idf$del() names. For example, in current model, there is a material named "MAT-CLNG-1" in class Material:NoMass. Let’s see if it has been referred by other objects.

    -
    +
     model$Material_NoMass$`MAT-CLNG-1`$value_relation()
     #> ── Refer to Others ─────────────────────────────────────────────────────────────
     #> Target(s) does not refer to any other field.
    @@ -1457,7 +1435,7 @@ 

    Delete existing objects (Idf$del() construction named "CLNG-1".

    First, let’s try to direct delete Material MAT-CLNG-1.

    -
    +
     model$del("mat-clng-1")
     #> Error: Cannot delete object(s) that are referred by others:
     #> 
    @@ -1474,7 +1452,7 @@ 

    Delete existing objects (Idf$del() CLNG-1.

    In some cases, you may still want to delete that object. You can achieve this by setting .force to TRUE.

    -
    +
     model$del("mat-clng-1", .force = TRUE)
     #> Deleting object(s) [ID: 55]
     #> 
    @@ -1498,7 +1476,7 @@ 

    Purge unused resource objects (< referenced by other objects, e.g. Material, Construction, Schedule:Compact and etc.

    Below we remove all schedules that are not currently used.

    -
    +
     model$purge(group = "Schedules")
     #> Object(s) below have been purged:
     #>  #1| Object ID [18] (name 'On/Off') in class 'ScheduleTypeLimits'
    @@ -1513,7 +1491,7 @@ 

    Find and remove dupl objects refer to objects whose field values are the same except the names. Object comments are ignored during comparison. These two methods can be useful when doing model cleaning.

    -
    +
     print(model$duplicated(group = "Schedules"))
     #>                  class    id                               name duplicate
     #>                 <char> <int>                             <char>     <int>
    @@ -1545,7 +1523,7 @@ 

    Find and remove dupl #> 26: Schedule:Compact 41 OA Heating Supply Air Temp Sch NA #> 27: Schedule:Compact 42 Always On 34 #> class id name duplicate

    -
    +
     model$unique(group = "Schedules")
     #> Duplications for object ID [32] (name 'FanAvailSched') in class 'Schedule:Compact' have been removed:
     #>   #1| Object ID [35] (name 'ReheatCoilAvailSched')
    @@ -1577,11 +1555,10 @@ 

    Check possible field errors ("none", "draft" and "final". To get what validation components those levels contain, use level_checks().

    -
    +
     eplusr_option("validate_level")
    -#> [1] "final"
    -
    -str(level_checks("final"))
    +#> [1] "final"
    +str(level_checks("final"))
     #> List of 10
     #>  $ required_object: logi TRUE
     #>  $ unique_object  : logi TRUE
    @@ -1598,7 +1575,7 @@ 

    Check possible field errors (The final validation level turns all checking components on. We can just trigger invalid reference checking using custom_validate() function.

    -
    +
     model$validate(custom_validate(reference = TRUE))
     #>  ✖ [1] Errors found during validation.
     #> ══════════════════════════════════════════════════════════════════════════════
    @@ -1618,11 +1595,10 @@ 

    Check possible field errors (data.tables, we can extract invalid objects for different types directly using $validate(). Below we extract all objects that have invalid reference errors.

    -
    +
     (id <- model$validate()$invalid_reference$object_id)
    -#> [1] 68
    -
    -model$objects(id)
    +#> [1] 68
    +model$objects(id)
     #> $`CLNG-1`
     #> <IdfObject: 'Construction'> [ID:68] `CLNG-1`
     #> Class: <Construction>
    @@ -1632,7 +1608,7 @@ 

    Check possible field errors (Outside Layer using $value_possible() method in IdfObject class.

    -
    +
     model$object(id)$value_possible("Outside Layer")$source
     #> [[1]]
     #>  [1] "WD10"          "RG01"          "BR01"          "IN46"         
    @@ -1644,7 +1620,7 @@ 

    Check possible field errors (#> [25] "ARGON 13MM"

    Now let’s change the construction’s Outside Layer to WD10.

    -
    +
     model$object(id)$set(Outside_Layer = "WD10")
     #> <IdfObject: 'Construction'> [ID:68] `CLNG-1`
     #> Class: <Construction>
    @@ -1659,13 +1635,12 @@ 

    Save to an IDF file (Idf$save()overwrite to TRUE to confirm the process.

    -
    +
     (model$save(tempfile(fileext = ".idf")))
    -#> [1] "/tmp/Rtmp7WO3f9/file1d973639e252.idf"
    -
    -
    +#> [1] "/tmp/RtmpgMyDkL/file1ebd7a30658a.idf"
    +
     model$save(overwrite = TRUE)
    -#> Replace the existing IDF located at /tmp/Rtmp7WO3f9/file1d973639e252.idf.
    +#> Replace the existing IDF located at /tmp/RtmpgMyDkL/file1ebd7a30658a.idf.

    Summary @@ -1679,9 +1654,7 @@

    Summary - -

    +
    @@ -1694,17 +1667,17 @@

    Summary

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + @@ -20,8 +14,6 @@ - -

    @@ -124,7 +116,7 @@
    - +
    @@ -133,9 +125,9 @@

    Work with weather files

    Hongyuan Jia

    -

    2024-05-25

    +

    2024-07-16

    - Source: vignettes/epw.Rmd + Source: vignettes/epw.Rmd
    @@ -444,9 +436,8 @@

    Modify weather data#> 8757: 2023-12-31 21:00:00 #> 8758: 2023-12-31 22:00:00 #> 8759: 2023-12-31 23:00:00 -#> 8760: 2024-01-01 00:00:00

    -

    Epw class supports multiple data periods in a single EPW file:

    -
    +
     d <- epw$data(start_year = 2014, align_wday = FALSE)
     #> Warning: Invalid 'start_year' found for Data period #1 'Data' starting from
     #> 2023/ 1/ 1 to 2023/12/31. The original starting date falls in a leap year,
     #> however input 'start_year' is not a leap year. Invalid date time may occur.
     #> Warning: Data period #1 'Data' seems like a real-year data starting from 2023/
    -#> 1/ 1 to 2023/12/31. The starting date will be overwriten as 2014/ 1/ 1.
    -
    -
    +#> 1/ 1 to 2023/12/31. The starting date will be overwriten as 2014/ 1/ 1.
    +
     epw$add(d, after = 0L, realyear = TRUE)
     #> ── Info ────────────────────────────────────────────────────────────────────────
     #> New data period has been added successfully:
     #> 
     #>       Name StartDayOfWeek   StartDay     EndDay
     #>  1:  Data1      Wednesday 2014/ 1/ 1 2014/12/31
    -#> ────────────────────────────────────────────────────────────────────────────────
    -
    +
    @@ -499,17 +486,17 @@

    Modify weather data

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + @@ -20,8 +14,6 @@ - -
    @@ -124,7 +116,7 @@

    - +
    @@ -133,9 +125,9 @@

    Frequently asked questions about eplusr

    Hongyuan Jia

    -

    2024-05-25

    +

    2024-07-16

    - Source: vignettes/faq.Rmd + Source: vignettes/faq.Rmd
    @@ -153,9 +145,7 @@

    How to contro +

    @@ -168,17 +158,17 @@

    How to contro

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + @@ -20,8 +14,6 @@ - -
    @@ -124,7 +116,7 @@

    - +
    -
    -geom <- idf$geometry()
    +#> Parsing completed.
    +geom <- idf$geometry()
     geom
     #> ── EnergPlus IDF Geometry ──────────────────────────────────────────────────────
     #>  • Path: '/usr/local/EnergyPlus-23-1-0/ExampleFiles/HospitalLowEnergy.idf'
    @@ -196,7 +187,7 @@ 

    Get geometry data

    Get geometry rules

    -
    +
     geom$rules()
     #> $starting_vertex_position
     #> [1] "upperleftcorner"
    @@ -216,7 +207,7 @@ 

    Get geometry rules

    Get surface area

    -
    +
     geom$area()
     #>         id                                               name
     #>      <int>                                             <char>
    @@ -244,7 +235,7 @@ 

    Get surface areaobject to only calculate objects of interest. This is also true for the $azimuth() and $tilt() methods.

    -
    +
     

    With net being TRUE, the window and door areas will be excluded in the results of surfaces.

    -
    +
    -
    -geom$area(net = TRUE)[type == "Wall"]
    +....
    +geom$area(net = TRUE)[type == "Wall"]
     #>         id                             name                    class
     #>      <int>                           <char>                   <char>
     #>   1:   155                           25C85A BuildingSurface:Detailed
    @@ -319,7 +309,7 @@ 

    Get surface area

    Get surface azimuth and tilt

    -
    +
    -
    -geom$tilt()
    +....
    +geom$tilt()
     #>         id                                               name
     #>      <int>                                             <char>
     #>   1:   154                                  Floor 1 Cafe Slab
    @@ -380,7 +369,7 @@ 

    Convert simple geometryShading:Building:Detailed
  • Shading:Zone:Detailed
  • -
    +
    -
    -
    +#> [16] "Shading:Fin"
    +
     simple$geometry()$convert()
     #> Warning: Empty 'Daylighting Reference Point Coordinate System' found in
     #> 'GlobalGeometryRules'. Assuming 'Relative'.
     #> Warning: Empty 'Daylighting Reference Point Coordinate System' found in
    -#> 'GlobalGeometryRules'. Assuming 'Relative'.
    -
    -
    +#> 'GlobalGeometryRules'. Assuming 'Relative'.
    +
     simple$class_name(by_group = TRUE)["Thermal Zones and Surfaces"]
     #> $`Thermal Zones and Surfaces`
     #> [1] "GlobalGeometryRules"          "Zone"                        
    @@ -410,7 +397,7 @@ 

    Convert simple geometryAn attribute named mapping is attached in the converted Idf object which contains the meta data of objects before and after the conversion.

    -
    +
     attr(simple, "mapping")
     #>     ori_id                       ori_name         ori_class new_id
     #>      <int>                         <char>            <char>  <int>
    @@ -441,7 +428,7 @@ 

    Change coordinate systemsGlobalGeometryRules in parent [Idf] accordingly.

    -
    +
    -
    -
    -
    -
    +#>    - Daylighting: 'Relative'
    +
     geom$parent()$to_table("Floor 1 Cafe Slab")
     #>        id              name                    class index
     #>     <int>            <char>                   <char> <int>
    @@ -533,7 +517,7 @@ 

    Round vertices decimal digits
    +
     geom$round_digits(3)
     
     geom$parent()$to_table("Floor 1 Cafe Slab")
    @@ -574,7 +558,7 @@ 

    View geometry in 3D
    +
     viewer <- geom$view()

    @@ -635,70 +619,70 @@

    Tweak the view

    Change background

    -
    +
     viewer$background("grey50")

    -
    +
     viewer$background("white")

    Change viewpoint

    -
    +
     viewer$viewpoint("top")

    -
    +
     viewer$viewpoint("iso")

    Change axis style

    -
    +
     viewer$axis(width = 5)

    -
    +
     viewer$axis(FALSE)

    Change ground style

    -
    +
     viewer$ground(TRUE)

    Turn on/off X-ray style

    -
    +
     viewer$x_ray(TRUE)

    -
    +
     viewer$x_ray(FALSE)

    Change render style

    -
    +
     viewer$render_by("zone")

    -
    +
     viewer$render_by("surface_type")

    Turn on/off components

    -
    +
     viewer$show(zone = "floor 7 clean")

    -
    +
     viewer$show(surface = "MOB Floor 5 Perimeter 2 Ext Wall")

    -
    +
     viewer$show(type = "wall")

    @@ -708,7 +692,7 @@

    Save the snapshot
    +
     viewer$show()
     viewer$snapshot("view.png")

    @@ -736,9 +720,7 @@

    Summary - -

    +
    @@ -751,17 +733,17 @@

    Summary

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Articles • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -127,16 +127,16 @@

    All vignettes

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + @@ -20,8 +14,6 @@ - -
    @@ -124,7 +116,7 @@
    - +
    -
    -
    +....
    +
     class(job)
    -#> [1] "EplusJob" "R6"
    -
    -
    +#> [1] "EplusJob" "R6"
    +
     job
     #> ── EnergPlus Simulation Job ────────────────────────────────────────────────────
    -#>  • Path: '/tmp/RtmpHFnMUi/5Zone_Transformer.idf'
    +#>  • Path: '/tmp/RtmpsdjzSQ/5Zone_Transformer.idf'
     #>  • Version: '<< Not specified >>'
     #>  • EnergyPlus Version: '23.1.0'
     #>  • EnergyPlus Path: '/usr/local/EnergyPlus-23-1-0'
    -#>  Simulation started at '2024-05-25 14:31:41.841431' and completed successfully after 0.64 secs.
    +#> Simulation started at '2024-07-16 02:52:03.733822' and completed successfully after 0.66 secs.

    job prints the path of model and weather, the version and path of EnergyPlus used to run simulations, and the simulation job status.

    You can always retrieve the last simulation job of an Idf object using Idf$last_job() method:

    -
    +
     model$last_job()
     #> ── EnergPlus Simulation Job ────────────────────────────────────────────────────
    -#>  • Path: '/tmp/RtmpHFnMUi/5Zone_Transformer.idf'
    +#>  • Path: '/tmp/RtmpsdjzSQ/5Zone_Transformer.idf'
     #>  • Version: '<< Not specified >>'
     #>  • EnergyPlus Version: '23.1.0'
     #>  • EnergyPlus Path: '/usr/local/EnergyPlus-23-1-0'
    -#>  Simulation started at '2024-05-25 14:31:41.841431' and completed successfully after 0.64 secs.
    +#> Simulation started at '2024-07-16 02:52:03.733822' and completed successfully after 0.66 secs.

    Run simulation in the background @@ -226,20 +216,18 @@

    Run simulation in the backgroundFALSE. The simulation job status can be shown by printing the EplusJob object or using the EplusJob$status() method.

    -
    +
     job <- model$run(path_epw, tempdir(), wait = FALSE)
     #> Adding an object in class 'Output:SQLite' and setting its 'Option Type' to 'SimpleAndTabular' in order to create SQLite output file.
    -#> Replace the existing IDF located at /tmp/RtmpHFnMUi/5Zone_Transformer.idf.
    -
    -job
    +#> Replace the existing IDF located at /tmp/RtmpsdjzSQ/5Zone_Transformer.idf.
    +job
     #> ── EnergPlus Simulation Job ────────────────────────────────────────────────────
    -#>  • Path: '/tmp/RtmpHFnMUi/5Zone_Transformer.idf'
    +#>  • Path: '/tmp/RtmpsdjzSQ/5Zone_Transformer.idf'
     #>  • Version: '/usr/local/EnergyPlus-23-1-0/WeatherData/USA_CA_San.Francisco.Intl…
     #>  • EnergyPlus Version: '23.1.0'
     #>  • EnergyPlus Path: '/usr/local/EnergyPlus-23-1-0'
    -#>  Simulation started at '2024-05-25 14:31:42.914416' and is still running...
    -
    -
    +#>  Simulation started at '2024-07-16 02:52:04.824198' and is still running...
    +
     job$status()
     #> $run_before
     #> [1] TRUE
    @@ -261,11 +249,11 @@ 
    @@ -2127,16 +2127,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse, Query and Modify EnergyPlus Input Data Dictionary (IDD) — Idd • eplusr

    - +
    @@ -112,7 +112,7 @@

    Parse, Query and Modify EnergyPlus Input Data Dictionary (IDD)

    Overview

    - +

    EnergyPlus operates off of text input files written in its own Input @@ -160,7 +160,7 @@

    Author

    Methods

    - +

    Public methods

    @@ -1132,67 +1132,67 @@

    Examples

    #> Try to locate 'Energy+.idd' in EnergyPlus v8.8.0 installation folder '/usr/local/EnergyPlus-8-8-0'. #> Failed to locate 'Energy+.idd' because EnergyPlus v8.8.0 is not available. #> Starting to download the IDD file from EnergyPlus GitHub repo... -#> EnergyPlus v8.8.0 IDD file 'V8-8-0-Energy+.idd' has been successfully downloaded into /tmp/Rtmp4lKach. -#> IDD file found: '/tmp/Rtmp4lKach/V8-8-0-Energy+.idd'. +#> EnergyPlus v8.8.0 IDD file 'V8-8-0-Energy+.idd' has been successfully downloaded into /tmp/RtmprBReQ0. +#> IDD file found: '/tmp/RtmprBReQ0/V8-8-0-Energy+.idd'. #> Start parsing... #> Parsing completed. - + # \dontrun{} ## ------------------------------------------------ ## Method `Idd$version` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get version idd$version() -} +} # } ## ------------------------------------------------ ## Method `Idd$build` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get build tag idd$build() -} +} # } ## ------------------------------------------------ ## Method `Idd$path` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get path idd$path() -} +} # } ## ------------------------------------------------ ## Method `Idd$group_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get names of all groups Idf contains idd$group_name() -} +} # } ## ------------------------------------------------ ## Method `Idd$from_group` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$from_group(c("Version", "Schedule:Compact")) -} +} # } ## ------------------------------------------------ ## Method `Idd$class_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get names of the 10th to 20th class idd$class_name(10:20) @@ -1201,148 +1201,148 @@

    Examples

    # get names of all classes grouped by group names in Idf idd$class_name(by_group = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idd$required_class_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$required_class_name() -} +} # } ## ------------------------------------------------ ## Method `Idd$unique_class_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$unique_class_name() -} +} # } ## ------------------------------------------------ ## Method `Idd$extensible_class_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$extensible_class_name() -} +} # } ## ------------------------------------------------ ## Method `Idd$group_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$group_index() -} +} # } ## ------------------------------------------------ ## Method `Idd$class_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$class_index() -} +} # } ## ------------------------------------------------ ## Method `Idd$is_valid_group` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$is_valid_group(c("Schedules", "Compliance Objects")) -} +} # } ## ------------------------------------------------ ## Method `Idd$is_valid_class` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$is_valid_class(c("Building", "ShadowCalculation")) -} +} # } ## ------------------------------------------------ ## Method `Idd$object` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$object(3) idd$object("Building") -} +} # } ## ------------------------------------------------ ## Method `Idd$objects` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$objects(c(3,10)) idd$objects(c("Version", "Material")) -} +} # } ## ------------------------------------------------ ## Method `Idd$object_relation` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # check each construction layer's possible references idd$object_relation("Construction", "ref_to") # check where construction being used idd$object_relation("Construction", "ref_by") -} +} # } ## ------------------------------------------------ ## Method `Idd$objects_in_relation` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get class Construction and all classes that it can refer to idd$objects_in_relation("Construction", "ref_to") # get class Construction and all classes that refer to it idd$objects_in_relation("Construction", "ref_by") -} +} # } ## ------------------------------------------------ ## Method `Idd$objects_in_group` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all classes in Schedules group idd$objects_in_group("Schedules") -} +} # } ## ------------------------------------------------ ## Method `Idd$to_table` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # extract data of class Material idd$to_table(class = "Material") # extract multiple class data idd$to_table(c("Construction", "Material")) -} +} # } ## ------------------------------------------------ ## Method `Idd$to_string` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get text format of class Material head(idd$to_string(class = "Material")) @@ -1351,16 +1351,16 @@

    Examples

    # tweak output formatting idd$to_string(c("Material", "Construction"), leading = 0, sep_at = 0, sep_each = 5) -} +} # } ## ------------------------------------------------ ## Method `Idd$print` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idd$print() -} +} # }

    @@ -1376,16 +1376,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + EnergyPlus IDD object — IddObject • eplusr - +
    @@ -36,7 +36,7 @@

    - +
    @@ -155,7 +155,7 @@

    Author

    Methods

    - +

    Public methods

    @@ -2125,134 +2125,134 @@

    Examples

    ## Method `IddObject$new` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf <- IddObject$new("BuildingSurface:Detailed", use_idd(8.8, download = "auto")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$version` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get version surf$version() -} +} # } ## ------------------------------------------------ ## Method `IddObject$parent` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$parent() -} +} # } ## ------------------------------------------------ ## Method `IddObject$group_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$group_name() -} +} # } ## ------------------------------------------------ ## Method `IddObject$group_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$group_index() -} +} # } ## ------------------------------------------------ ## Method `IddObject$class_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$class_name() -} +} # } ## ------------------------------------------------ ## Method `IddObject$class_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$class_index() -} +} # } ## ------------------------------------------------ ## Method `IddObject$class_format` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$class_format() -} +} # } ## ------------------------------------------------ ## Method `IddObject$min_fields` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$min_fields() -} +} # } ## ------------------------------------------------ ## Method `IddObject$num_fields` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$num_fields() -} +} # } ## ------------------------------------------------ ## Method `IddObject$memo` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$memo() -} +} # } ## ------------------------------------------------ ## Method `IddObject$num_extensible` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$num_extensible() -} +} # } ## ------------------------------------------------ ## Method `IddObject$first_extensible_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$first_extensible_index() -} +} # } ## ------------------------------------------------ ## Method `IddObject$extensible_group_num` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$extensible_group_num() -} +} # } ## ------------------------------------------------ ## Method `IddObject$add_extensible_group` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # field number before adding surf$num_fields() # extensible group number before adding @@ -2265,14 +2265,14 @@

    Examples

    surf$num_fields() # extensible group number after adding surf$extensible_group_num() -} +} # } ## ------------------------------------------------ ## Method `IddObject$del_extensible_group` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # field number before deleting surf$num_fields() # extensible group number before deleting @@ -2285,50 +2285,50 @@

    Examples

    surf$num_fields() # extensible group number after deleting surf$extensible_group_num() -} +} # } ## ------------------------------------------------ ## Method `IddObject$has_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$has_name() -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_required` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_required() -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_unique` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_unique() -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_extensible` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_extensible() -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field names surf$field_name() @@ -2340,283 +2340,283 @@

    Examples

    # change field name to lower-style surf$field_name(unit = TRUE, in_ip = TRUE) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field indices surf$field_index() # get field indices for specific fields surf$field_index(c("number of vertices", "vertex 10 z-coordinate")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_type` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field types surf$field_type() # get field types for specific fields surf$field_type(c("name", "zone name", "vertex 10 z-coordinate")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_note` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field notes surf$field_note() # get field types for specific fields surf$field_note(c("name", "zone name", "vertex 10 z-coordinate")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_unit` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field units surf$field_unit() # get field units for specific fields surf$field_unit(c("name", "zone name", "vertex 10 z-coordinate")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_default` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field default values surf$field_default() # get default values for specific fields surf$field_default(c("name", "zone name", "vertex 10 z-coordinate")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_choice` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field value choices surf$field_choice() # get field value choices for specific fields surf$field_choice(c("name", "sun exposure", "wind exposure")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_range` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all field value ranges surf$field_range() # get value ranges for specific fields surf$field_range(c("name", "number of vertices", "vertex 10 z-coordinate")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_relation` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get field relation for specific fields surf$field_relation(c("name", "zone name", "vertex 10 z-coordinate")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$field_possible` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get field possible values for specific fields surf$field_possible(6:10) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_valid_field_num` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_valid_field_num(c(10, 14, 100)) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_extensible_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_extensible_index(c(10, 14, 100)) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_valid_field_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_valid_field_name(c("name", "sun_exposure")) # exact match surf$is_valid_field_name(c("Name", "Sun_Exposure"), strict = TRUE) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_valid_field_index` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_valid_field_index(1:10) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_autosizable_field` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_autosizable_field() surf$is_autosizable_field(c("name", "sun_exposure")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_autocalculatable_field` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_autocalculatable_field() surf$is_autocalculatable_field(c("name", "sun_exposure")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_numeric_field` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_numeric_field() surf$is_numeric_field(c("name", "sun_exposure")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_real_field` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_real_field() surf$is_real_field(c("name", "number of vertices")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_integer_field` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_integer_field() surf$is_integer_field(c("name", "number of vertices")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$is_required_field` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$is_required_field() surf$is_required_field(c("name", "number of vertices")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$has_ref` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$has_ref() surf$has_ref(c("name", "zone name")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$has_ref_to` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$has_ref_to() surf$has_ref_to(c("name", "zone name")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$has_ref_by` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$has_ref_by() surf$has_ref_by(c("name", "zone name")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$outputs` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$outputs() -} +} # } ## ------------------------------------------------ ## Method `IddObject$to_table` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf$to_table() surf$to_table(TRUE) -} +} # } ## ------------------------------------------------ ## Method `IddObject$to_string` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get text format of class BuildingSurface:Detailed surf$to_string() @@ -2625,18 +2625,18 @@

    Examples

    # add comments surf$to_string(c("This", "will", "be", "comments")) -} +} # } ## ------------------------------------------------ ## Method `IddObject$print` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ surf surf$print(brief = TRUE) -} +} # }

    @@ -2652,16 +2652,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Read, Modify, and Run an EnergyPlus Model — Idf • eplusr

    - +
    @@ -143,7 +143,7 @@

    Author

    Methods

    - +

    Public methods

    @@ -3589,7 +3589,7 @@

    Examples

    ## Method `Idf$new` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # example model shipped with eplusr from EnergyPlus v8.8 path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr") # v8.8 @@ -3615,37 +3615,37 @@

    Examples

    " Idf$new(string_idf, use_idd(8.8, download = "auto")) -} +} # } ## ------------------------------------------------ ## Method `Idf$version` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get version idf$version() -} +} # } ## ------------------------------------------------ ## Method `Idf$path` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get path idf$path() # return `NULL` if Idf is not created from a file Idf$new("Version, 8.8;\n")$path() -} +} # } ## ------------------------------------------------ ## Method `Idf$group_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get names of all groups Idf contains idf$group_name() @@ -3654,14 +3654,14 @@

    Examples

    # get names of all available groups in underlying Idd idf$group_name(all = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$class_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get names of all classes in Idf idf$class_name() @@ -3677,50 +3677,50 @@

    Examples

    # get names of all available classes grouped by group names in # underlying Idd idf$class_name(all = TRUE, by_group = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$is_valid_group` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # check if input is a valid group name in current Idf idf$is_valid_group(c("Schedules", "Compliance Objects")) # check if input is a valid group name in underlying Idd idf$is_valid_group(c("Schedules", "Compliance Objects"), all = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$is_valid_class` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # check if input is a valid class name in current Idf idf$is_valid_class(c("Building", "ShadowCalculation")) # check if input is a valid class name in underlying Idd idf$is_valid_class(c("Building", "ShadowCalculation"), all = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$definition` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get the IddObject object for specified class idf$definition("Version") -} +} # } ## ------------------------------------------------ ## Method `Idf$object_id` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get IDs of all objects in current Idf object idf$object_id() @@ -3734,14 +3734,14 @@

    Examples

    # get IDs of objects in class Version and Zone, and merge them into a # single integer vector idf$object_id(c("Version", "Zone"), simplify = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$object_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get names of all objects in current Idf object idf$object_name() @@ -3755,150 +3755,150 @@

    Examples

    # get names of objects in class Version and Zone, and merge them into # a single character vector idf$object_name(c("Version", "Zone"), simplify = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$object_num` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get total number of objects idf$object_num() # get number of objects in class Zone and Schedule:Compact idf$object_num(c("Zone", "Schedule:Compact")) -} +} # } ## ------------------------------------------------ ## Method `Idf$is_valid_id` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$is_valid_id(c(51, 1000)) -} +} # } ## ------------------------------------------------ ## Method `Idf$is_valid_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$is_valid_name(c("Simple One Zone (Wireframe DXF)", "ZONE ONE", "a")) # name matching is case-insensitive idf$is_valid_name(c("simple one zone (wireframe dxf)", "zone one", "a")) -} +} # } ## ------------------------------------------------ ## Method `Idf$object` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get an object whose ID is 3 idf$object(3) # get an object whose name is "simple one zone (wireframe dxf)" # NOTE: object name matching is case-insensitive idf$object("simple one zone (wireframe dxf)") -} +} # } ## ------------------------------------------------ ## Method `Idf$objects` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get objects whose IDs are 3 and 10 idf$objects(c(3,10)) # get objects whose names are "Simple One Zone (Wireframe DXF)" and "ZONE ONE" # NOTE: object name matching is case-insensitive idf$objects(c("Simple One Zone (Wireframe DXF)", "zone one")) -} +} # } ## ------------------------------------------------ ## Method `Idf$object_unique` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get the SimulationColtrol object idf$object_unique("SimulationControl") # S3 "[[" and "$" can also be used idf$SimulationControl idf[["SimulationControl"]] -} +} # } ## ------------------------------------------------ ## Method `Idf$objects_in_class` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all objects in Zone class idf$objects_in_class("Zone") # S3 "[[" and "$" can also be used idf$Zone idf[["Zone"]] -} +} # } ## ------------------------------------------------ ## Method `Idf$objects_in_group` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all objects in Schedules group idf$objects_in_group("Schedules") -} +} # } ## ------------------------------------------------ ## Method `Idf$object_relation` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # check each layer's reference of a construction named FLOOR idf$object_relation("floor", "ref_to") # check where is this construction being used idf$object_relation("floor", "ref_by") -} +} # } ## ------------------------------------------------ ## Method `Idf$objects_in_relation` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get a construction named FLOOR and all materials it uses idf$objects_in_relation("floor", "ref_to") # get a construction named FLOOR and all surfaces that uses it idf$objects_in_relation("floor", "ref_by", class = "BuildingSurface:Detailed") -} +} # } ## ------------------------------------------------ ## Method `Idf$search_object` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all objects whose names contains "floor" idf$search_object("floor", ignore.case = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$dup` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # duplicate an object named "FLOOR" idf$dup("floor") # New object name 'FLOOR_1' is auto-generated @@ -3912,14 +3912,14 @@

    Examples

    floors_1 <- c(new_floor3 = "floor", new_floor4 = "floor") floors_2 <- setNames(rep(16, 5), paste0("flr", 1:5)) idf$dup(floors_1, floors_2) -} +} # } ## ------------------------------------------------ ## Method `Idf$add` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # add a new Building object with all default values empty <- empty_idf(8.8) # create an empty Idf empty$add(Building = .()) @@ -3937,14 +3937,14 @@

    Examples

    objs1 <- list(Schedule_Constant = list("const"), Building = list()) rp <- list(RunPeriod = list("rp", 2, 1, 2, 28)) empty$add(objs1, rp) -} +} # } ## ------------------------------------------------ ## Method `Idf$set` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # modify an object by name (case-insensitive) idf$set(r13layer = list(roughness = "smooth")) @@ -3979,14 +3979,14 @@

    Examples

    # use variable input sets <- list(r13layer = list(roughness = "smooth")) idf$set(sets) -} +} # } ## ------------------------------------------------ ## Method `Idf$del` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # delete objects using names idf$object("Fraction") # ScheduleTypeLimits idf$del("Fraction") @@ -4014,14 +4014,14 @@

    Examples

    # delete objects using variable inputs ids <- idf$object_id("Output:Variable", simplify = TRUE) idf$del(ids) -} +} # } ## ------------------------------------------------ ## Method `Idf$purge` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # purge unused "Fraction" schedule type idf$purge("on/off") # ScheduleTypeLimits @@ -4030,14 +4030,14 @@

    Examples

    # purge all unused schedule related objects idf$purge(group = "Schedules") -} +} # } ## ------------------------------------------------ ## Method `Idf$duplicated` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # check if there are any duplications in the Idf idf$duplicated(class = "ScheduleTypeLimits") @@ -4047,14 +4047,14 @@

    Examples

    # check if there are any duplications in the schedule groups and # material class idf$duplicated(class = "Material", group = "Schedules") -} +} # } ## ------------------------------------------------ ## Method `Idf$unique` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # remove duplications in the Idf idf$unique(class = "ScheduleTypeLimits") @@ -4063,24 +4063,24 @@

    Examples

    # remove duplications in the schedule groups and material class idf$unique(class = "Material", group = "Schedules") -} +} # } ## ------------------------------------------------ ## Method `Idf$rename` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$objects(c("on/off", "test 352a")) idf$rename(on_off = "on/off", test_352a = 51) -} +} # } ## ------------------------------------------------ ## Method `Idf$insert` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # insert all material from another IDF path_idf2 <- file.path(eplus_config(8.8)$dir, "ExampleFiles/5ZoneTDV.idf") idf2 <- Idf$new(path_idf2) @@ -4088,14 +4088,14 @@

    Examples

    # insert objects from same Idf is equivalent to using Idf$dup() idf$insert(idf$SizingPeriod_DesignDay) -} +} # } ## ------------------------------------------------ ## Method `Idf$load` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # load objects from character vectors idf$load( c("Material,", @@ -4125,14 +4125,14 @@

    Examples

    idf$load("Material, mat2, smooth, 0.5, 0.2, 500, 1000,,,;", .default = FALSE, .empty = TRUE ) -} +} # } ## ------------------------------------------------ ## Method `Idf$update` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # update objects from string definitions: str <- idf$to_string("zone one", header = FALSE, format = "new_top") str[8] <- "2," # Multiplier @@ -4142,37 +4142,37 @@

    Examples

    dt <- idf$to_table("zone one") dt[field == "Multiplier", value := "1"] idf$update(dt) -} +} # } ## ------------------------------------------------ ## Method `Idf$search_value` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # search values that contains "floor" idf$search_value("floor", ignore.case = TRUE) # search values that contains "floor" in class Construction idf$search_value("floor", "Construction", ignore.case = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$replace_value` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # search values that contains "win" and replace them with "windows" idf$replace_value("win", "windows") -} +} # } ## ------------------------------------------------ ## Method `Idf$validate` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$validate() # check at predefined validate level @@ -4182,14 +4182,14 @@

    Examples

    # custom validate checking components idf$validate(custom_validate(auto_field = TRUE, choice = TRUE)) -} +} # } ## ------------------------------------------------ ## Method `Idf$is_valid` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$is_valid() # check at predefined validate level @@ -4199,14 +4199,14 @@

    Examples

    # custom validate checking components idf$is_valid(custom_validate(auto_field = TRUE, choice = TRUE)) -} +} # } ## ------------------------------------------------ ## Method `Idf$to_string` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get text format of the whole Idf head(idf$to_string()) @@ -4221,14 +4221,14 @@

    Examples

    # tweak output formatting head(idf$to_string("floor", leading = 0, sep_at = 0)) -} +} # } ## ------------------------------------------------ ## Method `Idf$to_table` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # extract whole Idf data idf$to_table() @@ -4275,32 +4275,32 @@

    Examples

    # create table for new object input idf$to_table(class = "BuildingSurface:Detailed", init = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$external_deps` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$external_deps() -} +} # } ## ------------------------------------------------ ## Method `Idf$is_unsaved` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$is_unsaved() -} +} # } ## ------------------------------------------------ ## Method `Idf$save` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # save Idf as a new file idf$save(tempfile(fileext = ".idf")) @@ -4313,14 +4313,14 @@

    Examples

    # save the model to a new file and copy all external csv files used in # "Schedule:File" class into the same folder idf$save(path = file.path(tempdir(), "test1.idf"), copy_external = TRUE) -} +} # } ## ------------------------------------------------ ## Method `Idf$run` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf <- Idf$new(path_idf) # save the model to tempdir() idf$save(file.path(tempdir(), "test_run.idf")) @@ -4354,43 +4354,43 @@

    Examples

    # get simulation results job$report_data() -} +} # } ## ------------------------------------------------ ## Method `Idf$last_job` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$last_job() -} +} # } ## ------------------------------------------------ ## Method `Idf$geometry` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$geometry() -} +} # } ## ------------------------------------------------ ## Method `Idf$view` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$view() idf$view(render_by = "zone") idf$view(render_by = "construction") -} +} # } ## ------------------------------------------------ ## Method `Idf$print` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$print("group") idf$print("class") idf$print("object") @@ -4399,7 +4399,7 @@

    Examples

    # order objects by there classes idf$print("object", order = FALSE) idf$print("field", order = FALSE) -} +} # }

    @@ -4415,16 +4415,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Modify and Visualize an EnergyPlus Model Geometry — IdfGeometry • eplusr

    - +
    @@ -115,11 +115,13 @@

    Modify and Visualize an EnergyPlus Model Geometry

    Arguments

    -
    parent
    + + +
    parent

    A path to an IDF file or an Idf object.

    -
    object
    +
    object

    A character vector of valid names or an integer vector of valid IDs of objects to extract. If NULL, all objects in geometry classes will be extracted.

    @@ -127,9 +129,7 @@

    Arguments

    Value

    - - -

    An IdfGeometry object.

    +

    An IdfGeometry object.

    See also

    @@ -141,7 +141,7 @@

    Author

    Methods

    - +

    Public methods

    @@ -632,7 +632,7 @@

    Examples

    ## Method `IdfGeometry$new` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # example model shipped with eplusr from EnergyPlus v8.8 path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr") # v8.8 @@ -644,89 +644,89 @@

    Examples

    # create from an IDF file geom <- idf_geometry(path_idf) geom <- IdfGeometry$new(path_idf) -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$parent` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$parent() -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$rules` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$rules() -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$convert` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$convert() -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$coord_system` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$coord_system("world", "world", "world") -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$round_digits` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$round_digits() -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$area` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$area() -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$azimuth` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$azimuth() -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$tilt` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$tilt() -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$view` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ idf$view() idf$view(render_by = "zone") idf$view(new = TRUE, render_by = "construction") -} +} # } ## ------------------------------------------------ ## Method `IdfGeometry$print` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ geom$print() -} +} # }
    @@ -741,16 +741,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Create and Modify an EnergyPlus Object — IdfObject • eplusr

    - +
    @@ -112,7 +112,7 @@

    Create and Modify an EnergyPlus Object

    Note

    - +
    • Only one single list is allowed, e.g. idfobj$set(lst1) where lst1 <- list(field1 = value1) is allowed, but idfobj$set(lst1, lst2) is not.

    • You can delete a field by assigning NULL to it, e.g. iddobj$set(fld = NULL) means to delete the value of field fld. If .default is FALSE, also fld is not a required field and the index of fld is larger than @@ -148,7 +148,7 @@

      Author

    Methods

    - +

    Public methods

    @@ -1943,7 +1943,7 @@

    Examples

    ## Method `IdfObject$new` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # example model shipped with eplusr from EnergyPlus v8.8 path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr") # v8.8 idf <- read_idf(path_idf, use_idd(8.8, "auto")) @@ -1952,82 +1952,82 @@

    Examples

    # get the IdfObject of material named "C5 - 4 IN HW CONCRETE" mat <- idf$Material[["C5 - 4 IN HW CONCRETE"]] -} +} # } ## ------------------------------------------------ ## Method `IdfObject$version` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get version roof$version() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$parent` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ roof$parent() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$id` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ roof$id() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ roof$name() # NA will be returned if the class does not have name attribute. For example, # "Version" class idf$Version$name() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$group_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ roof$group_name() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$class_name` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ roof$class_name() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$definition` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ roof$definition() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$comment` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get object comments roof$comment() @@ -2054,14 +2054,14 @@

    Examples

    # delete all comments roof$comment(NULL) roof$comment() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$value` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all existing field values str(mat$value()) @@ -2080,14 +2080,14 @@

    Examples

    mat[["Specific_Heat"]] mat[c(1,2)] mat[c("Name", "Density")] -} +} # } ## ------------------------------------------------ ## Method `IdfObject$set` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # set field values mat$set(name = "new_name", Thickness = 0.02) mat[c("Name", "Thickness")] @@ -2104,23 +2104,23 @@

    Examples

    mat$Name mat[["Thickness"]] <- 0.019 mat$Thickness -} +} # } ## ------------------------------------------------ ## Method `IdfObject$value_possible` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ mat$value_possible() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$validate` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ mat$validate() # check at predefined validate level @@ -2130,14 +2130,14 @@

    Examples

    # custom validate checking components mat$validate(custom_validate(auto_field = TRUE, choice = TRUE)) -} +} # } ## ------------------------------------------------ ## Method `IdfObject$is_valid` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ mat$is_valid() mat$definition()$field_range("Density") @@ -2153,97 +2153,97 @@

    Examples

    # custom validate checking components mat$is_valid(custom_validate(auto_field = TRUE, choice = TRUE)) -} +} # } ## ------------------------------------------------ ## Method `IdfObject$value_relation` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # check each layer's reference of a construction named FLOOR roof$value_relation("zone name", "ref_to") # check where is this construction being used roof$value_relation("name", direction = "ref_by") -} +} # } ## ------------------------------------------------ ## Method `IdfObject$ref_to_object` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get other objects that this object refereces mat$ref_to_object() # not referencing other objects -} +} # } ## ------------------------------------------------ ## Method `IdfObject$ref_by_object` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get other objects that reference this object mat$ref_by_object() # referenced by construction "FLOOR" -} +} # } ## ------------------------------------------------ ## Method `IdfObject$ref_to_node` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ if (is_avail_eplus(8.8)) { path <- file.path(eplus_config(8.8)$dir, "ExampleFiles/5Zone_Transformer.idf") idf_5z <- read_idf(path) idf_5z$NodeList$OutsideAirInletNodes$ref_to_node() } -} +} # } ## ------------------------------------------------ ## Method `IdfObject$has_ref_to` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ mat$has_ref_to() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$has_ref_by` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ mat$has_ref_by() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$has_ref_node` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ mat$has_ref_node() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$has_ref` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # check if having any referenced objects or is referenced by other objects mat$has_ref() -} +} # } ## ------------------------------------------------ ## Method `IdfObject$to_table` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get all object data in a data.table format without field units str(mat$to_table(unit = FALSE)) @@ -2272,14 +2272,14 @@

    Examples

    # when grouping extensible, 'string_value' and 'unit' still take effect surf$to_table(group_ext = "index", wide = TRUE, string_value = FALSE, unit = TRUE) -} +} # } ## ------------------------------------------------ ## Method `IdfObject$to_string` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # get string format object mat$to_string() @@ -2289,21 +2289,21 @@

    Examples

    # get string format of object, and decrease the leading space of field values mat$to_string(leading = 0) -} +} # } ## ------------------------------------------------ ## Method `IdfObject$print` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # print the object without comment mat$print(comment = FALSE) # print the object, and auto separate field values and field names at the # largetst character length of field values mat$print(auto_sep = TRUE) -} +} # }

    @@ -2319,16 +2319,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Create an IdfScheduleCompact object. — IdfSchedule • eplusr - +
    @@ -36,7 +36,7 @@

    - +
    @@ -119,24 +119,24 @@

    Create an IdfScheduleCompact object.

    Arguments

    -
    parent
    + + +
    parent

    An Idf object.

    -
    name
    +
    name

    A valid name (a string) for a Schedule:Compact object.

    -
    new
    +
    new

    If TRUE, a new empty IdfScheduleCompact is created. Default: FALSE.

    Value

    - - -

    An IdfScheduleCompact object.

    +

    An IdfScheduleCompact object.

    Details

    @@ -161,7 +161,7 @@

    Super classes

    Methods

    - +

    Public methods

    @@ -594,7 +594,7 @@

    Examples

    ## Method `IdfScheduleCompact$new` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ model <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")) # create an empty 'Schedule:Compact' @@ -602,26 +602,26 @@

    Examples

    # get an existing 'Schedule:Compact' sch <- schedule_compact(model, "sch") -} +} # } ## ------------------------------------------------ ## Method `IdfScheduleCompact$set` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ sch$set(c("weekday", "summerdesignday") := list( ..6 = 0.2, "8:00" = 0.5, ..12 = 0.95, "13:30" = 0.6, ..14 = 0.8, ..18 = 0.95, ..19 = 0.2, ..24 = 0), allotherday = list(..24 = 0) ) -} +} # } ## ------------------------------------------------ ## Method `IdfScheduleCompact$update` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ sch$update(sch$extract()) val1 <- data.table::data.table( @@ -636,39 +636,39 @@

    Examples

    ) val <- data.table::rbindlist(list(val1, val2)) sch$update(val) -} +} # } ## ------------------------------------------------ ## Method `IdfScheduleCompact$validate` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ sch$validate() # check at predefined validate level sch$validate("none") sch$validate("draft") sch$validate("final") -} +} # } ## ------------------------------------------------ ## Method `IdfScheduleCompact$is_valid` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ sch$is_valid() -} +} # } ## ------------------------------------------------ ## Method `IdfScheduleCompact$extract` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ sch$extract() sch$extract("expand") sch$extract(timestep = "30 mins") -} +} # }

    @@ -683,16 +683,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Visualize an EnergyPlus Model Geometry and Simulation Results — IdfViewer • eplusr

    - +
    @@ -111,7 +111,9 @@

    Visualize an EnergyPlus Model Geometry and Simulation Results

    Arguments

    -
    geometry
    + + +
    geometry

    An IdfGeometry object. geometry can also be a path to an IDF file or an Idf object. In this case, an IdfGeometry is created based on input Idf.

    @@ -119,9 +121,7 @@

    Arguments

    Value

    - - -

    An IdfViewer object.

    +

    An IdfViewer object.

    See also

    @@ -133,7 +133,7 @@

    Author

    Methods

    - +

    Public methods

    @@ -844,7 +844,7 @@

    Examples

    ## Method `IdfViewer$new` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # example model shipped with eplusr from EnergyPlus v8.8 path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr") # v8.8 @@ -856,145 +856,145 @@

    Examples

    # create from an IDF file viewer <- idf_viewer(path_idf) viewer <- IdfViewer$new(path_idf) -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$parent` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$parent() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$geometry` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$geometry() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$device` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$device() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$background` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$background("blue") -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$viewpoint` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$viewpoint() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$win_size` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$win_size(0, 0, 400, 500) -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$mouse_mode` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$mouse_mode() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$axis` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$axis() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$ground` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$ground() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$wireframe` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$wireframe() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$x_ray` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$x_ray() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$render_by` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$render_by() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$show` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$show() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$focus` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$top() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$close` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$close() -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$snapshot` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$show() viewer$snapshot(tempfile(fileext = ".png")) -} +} # } ## ------------------------------------------------ ## Method `IdfViewer$print` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ viewer$print() -} +} # }

    @@ -1009,16 +1009,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Create and Run Parametric Analysis, and Collect Results — ParametricJob • eplusr

    - +
    @@ -115,11 +115,13 @@

    Create and Run Parametric Analysis, and Collect Results

    Arguments

    -
    idf
    + + +
    idf

    A path to EnergyPlus IDF or IMF file or an Idf object.

    -
    epw
    +
    epw

    A path to EnergyPlus EPW file or an Epw object. epw can also be NULL which will force design-day-only simulation when $run() method is called. Note this needs at least @@ -128,9 +130,7 @@

    Arguments

    Value

    - - -

    A ParametricJob object.

    +

    A ParametricJob object.

    Details

    @@ -154,7 +154,7 @@

    Super class

    Methods

    - +

    Public methods

    @@ -784,7 +784,7 @@

    Examples

    ## Method `ParametricJob$new` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ if (is_avail_eplus("8.8")) { path_idf <- path_eplus_example("8.8", "5Zone_Transformer.idf") path_epw <- path_eplus_weather("8.8", "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw") @@ -796,41 +796,41 @@

    Examples

    # create from an Idf and an Epw object param_job(read_idf(path_idf), read_epw(path_epw)) } -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$version` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ param$version() -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$seed` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ param$seed() -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$weather` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ param$weather() -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$param` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ param$param( Material := .( @@ -867,14 +867,14 @@

    Examples

    "Supply Fan 1" = list(fan_total_efficiency = c(0.1, 0.5, 0.8)), .cross = TRUE ) -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$apply_measure` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # create a measure to change the orientation of the building rotate_building <- function(idf, degree = 0L) { if (!idf$is_valid_class("Building")) { @@ -914,45 +914,45 @@

    Examples

    param$apply_measure(rotate_building, degree = seq(30, 360, 30), .names = paste0("rotate_", seq(30, 360, 30)) ) -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$models` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ param$models() -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$cases` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ param$cases() -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$save` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # save all parametric models with each model in a separate folder param$save(tempdir()) # save all parametric models with all models in the same folder param$save(tempdir(), separate = FALSE) -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$run` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ # run parametric simulations param$run(wait = TRUE, echo = FALSE) @@ -960,19 +960,19 @@

    Examples

    param$run(wait = FALSE) # get detailed job status by printing print(param) -} +} # } ## ------------------------------------------------ ## Method `ParametricJob$print` ## ------------------------------------------------ -if (FALSE) { +if (FALSE) { # \dontrun{ param$print() Sys.sleep(10) param$print() -} +} # }
    @@ -988,16 +988,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Add new objects — add_idf_object • eplusr - +
    @@ -31,7 +31,7 @@

    - +
    @@ -118,48 +118,48 @@

    Add new objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    -
    dt_value
    +
    dt_value

    A data.table::data.table() that contains value data.

    -
    default
    +
    default

    If TRUE, default values are used for those blank fields if possible. If FALSE, empty fields are kept blank. Default: TRUE.

    -
    unique
    +
    unique

    If TRUE, there are same objects in current Idf as input, duplications in input are removed. Default: FALSE.

    -
    empty
    +
    empty

    If TRUE, trailing empty fields are kept. Default: FALSE.

    -
    level
    +
    level

    Validate level. Default: eplusr_option("validate_level").

    Value

    - - -

    The modified Idf data in a named list of 5 elements, i.e. object, +

    The modified Idf data in a named list of 5 elements, i.e. object, value, reference, changed and updated. First 3 elements are data.table::data.table()s containing the actual updated Idf data while changed and updated are integer vectors containing IDs of objects that @@ -179,16 +179,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Coerce an IddObject into a Character Vector — as.character.IddObject • eplusr

    - +
    @@ -106,51 +106,51 @@

    Coerce an IddObject into a Character Vector

    -
    # S3 method for IddObject
    +    
    # S3 method for class 'IddObject'
     as.character(x, comment = NULL, leading = 4L, sep_at = 29L, all = FALSE, ...)

    Arguments

    -
    x
    + + +
    x

    An IddObject object.

    -
    comment
    +
    comment

    A character vector to be used as comments of returned string format object. If NULL, no comments are inserted. Default: NULL.

    -
    leading
    +
    leading

    Leading spaces added to each field. Default: 4.

    -
    sep_at
    +
    sep_at

    The character width to separate value string and field string. Default: 29 which is the same as IDF Editor.'

    -
    all
    +
    all

    If TRUE, all fields in current class are returned, otherwise only minimum fields are returned.

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    A character vector.

    +

    A character vector.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     as.character(use_idd(8.8, download = "auto")$Materal, leading = 0)
    -}
    +} # }
     
     
    @@ -166,16 +166,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Coerce an Idf object into a Character Vector — as.character.Idf • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -104,7 +104,7 @@

    Coerce an Idf object into a Character Vector

    -
    # S3 method for Idf
    +    
    # S3 method for class 'Idf'
     as.character(
       x,
       comment = TRUE,
    @@ -118,41 +118,41 @@ 

    Coerce an Idf object into a Character Vector

    Arguments

    -
    x
    + + +
    x

    An Idf object.

    -
    comment
    +
    comment

    If FALSE, all comments will not be included. Default: TRUE.

    -
    header
    +
    header

    If FALSE, the header will not be included. Default: TRUE.

    -
    format
    +
    format

    Specific format used when formatting. For details, please see $save(). Default: eplusr_option("save_format")

    -
    leading
    +
    leading

    Leading spaces added to each field. Default: 4L.

    -
    sep_at
    +
    sep_at

    The character width to separate value string and field string. Default: 29L which is the same as IDF Editor.

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    A character vector.

    +

    A character vector.

    Author

    @@ -161,10 +161,10 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
     as.character(read_idf(idf_path, use_idd(8.8, "auto")), leading = 0)
    -}
    +} # }
     
    @@ -179,16 +179,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Coerce an IdfObject into a Character Vector — as.character.IdfObject • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -104,48 +104,48 @@

    Coerce an IdfObject into a Character Vector

    -
    # S3 method for IdfObject
    +    
    # S3 method for class 'IdfObject'
     as.character(x, comment = TRUE, leading = 4L, sep_at = 29L, all = FALSE, ...)

    Arguments

    -
    x
    + + +
    x

    An IdfObject object.

    -
    comment
    +
    comment

    If FALSE, all comments will not be included. Default: TRUE.

    -
    leading
    +
    leading

    Leading spaces added to each field. Default: 4L.

    -
    sep_at
    +
    sep_at

    The character width to separate value string and field string. Default: 29L which is the same as IDF Editor.

    -
    all
    +
    all

    If TRUE, values of all possible fields in current class the IdfObject belongs to are returned. Default: FALSE

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    A character vector.

    +

    A character vector.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     idf <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr"),
         idd = use_idd("8.8", download = "auto"))
     
    @@ -153,7 +153,7 @@ 

    Examples

    mat <- idf$Material[["C5 - 4 IN HW CONCRETE"]] as.character(mat, leading = 0, sep_at = 10) -} +} # }
    @@ -169,16 +169,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Convert to EnergyPlus Weather File date — as_EpwDate • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,11 +109,13 @@

    Convert to EnergyPlus Weather File date

    Arguments

    -
    x
    + + +
    x

    An integer vector or a character vector.

    -
    leapyear
    +
    leapyear

    Whether support leap year. Default: TRUE

    @@ -142,16 +144,16 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Check for Idd, Idf and Epw objects — is_eplus_ver • eplusr

    - +
    @@ -125,29 +125,29 @@

    Check for Idd, Idf and Epw objects

    Arguments

    -
    ver
    + + +
    ver

    A character or numeric vector with suitable numeric version strings.

    -
    strict
    +
    strict

    If FALSE, ver can be a special string "latest" which represents the latest version.

    -
    path
    +
    path

    A path to test.

    -
    x
    +
    x

    An object to test.

    Value

    - - -

    A logical vector.

    +

    A logical vector.

    Details

    @@ -182,7 +182,7 @@

    Examples

    is_eplus_path("/usr/local/EnergyPlus-9-0-1") #> [1] FALSE -if (FALSE) { +if (FALSE) { # \dontrun{ is_idd(use_idd("8.8", download = "auto")) idf <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr"), @@ -194,7 +194,7 @@

    Examples

    is_idfobject(idf_object(idf, 1)) is_epw(read_epw(download_weather("los angeles.*tmy3", type = "epw", ask = FALSE, max_match = 1))) -} +} # }

    @@ -209,16 +209,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Assign default field values — assign_idf_value_default • eplusr - +
    @@ -31,7 +31,7 @@

    - +
    @@ -109,25 +109,25 @@

    Assign default field values

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_value
    +
    dt_value

    A data.table::data.table() that contains object value data.

    Value

    - - -

    The updated version of data.table::data.table().

    +

    The updated version of data.table::data.table().

    @@ -142,16 +142,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Clean working directory of a previous EnergyPlus simulation — clean_wd • eplusr - +
    @@ -111,7 +111,9 @@

    Clean working directory of a previous EnergyPlus simulation

    Arguments

    -
    path
    + + +
    path

    An .idf or .imf file path.

    @@ -130,7 +132,7 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     # run a test simulation
     idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
     epw_path <- path_eplus_weather("8.8",
    @@ -145,7 +147,7 @@ 

    Examples

    clean_wd(file.path(dir, basename(idf_path))) list.files(dir) -} +} # }
    @@ -160,16 +162,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Customize validation components — custom_validate • eplusr - +
    @@ -124,62 +124,62 @@

    Customize validation components

    Arguments

    -
    required_object
    + + +
    required_object

    Check if required objects are missing in current model. Default: FALSE.

    -
    unique_object
    +
    unique_object

    Check if there are multiple objects in one unique-object class. Default: FALSE.

    -
    unique_name
    +
    unique_name

    Check if all objects in every class have unique names. Default: FALSE.

    -
    extensible
    +
    extensible

    Check if all fields in an extensible group have values. Default: FALSE.

    -
    required_field
    +
    required_field

    Check if all required fields have values. Default: FALSE.

    -
    auto_field
    +
    auto_field

    Check if all fields with value "Autosize" and "Autocalculate" are valid or not. Default: FALSE.

    -
    type
    +
    type

    Check if all fields have values with valid types, i.e. character, numeric and integer fields should be filled with corresponding type of values. Default: FALSE.

    -
    choice
    +
    choice

    Check if all choice fields have valid choice values. Default: FALSE.

    -
    range
    +
    range

    Check if all numeric fields have values within defined ranges. Default: FALSE.

    -
    reference
    +
    reference

    Check if all fields whose values refer to other fields are valid. Default: FALSE.

    Value

    - - -

    A named list with 10 elements.

    +

    A named list with 10 elements.

    Details

    @@ -270,16 +270,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Delete existing objects — del_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -118,31 +118,33 @@

    Delete existing objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    -
    ref_to
    +
    ref_to

    If TRUE, objects whose fields are referred by input objects will also be deleted. Default: FALSE.

    -
    ref_by
    +
    ref_by

    If TRUE, objects whose fields refer to input objects will also be deleted. Default: FALSE.

    -
    recursive
    +
    recursive

    If TRUE, relation searching is performed recursively, in case that objects whose fields refer to target object are also referred by another object, and also objects @@ -150,20 +152,18 @@

    Arguments

    by another object. Default: FALSE.

    -
    force
    +
    force

    If TRUE, objects are deleted even if they are referred by other objects.

    -
    level
    +
    level

    Validate level. Default: eplusr_option("validate_level").

    Value

    - - -

    The modified Idf data in a named list of 5 elements, i.e. object, +

    The modified Idf data in a named list of 5 elements, i.e. object, value, reference, changed and updated. First 3 elements are data.table::data.table()s containing the actual updated Idf data while changed and updated are integer vectors containing IDs of objects that @@ -183,16 +183,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Download EnergyPlus Weather File (EPW) and Design Day File (DDY) — download_weather • eplusr
    - +
    @@ -118,45 +118,45 @@

    Download EnergyPlus Weather File (EPW) and Design Day File (DDY)

    Arguments

    -
    pattern
    + + +
    pattern

    A regular expression used to search locations, e.g. "los angeles.*tmy3". The search is case-insensitive.

    -
    filename
    +
    filename

    File names (without extension) used to save downloaded files. Internally, make.unique() is called to ensure unique names.

    -
    dir
    +
    dir

    Directory to save downloaded files. Will create if not exist.

    -
    type
    +
    type

    File type to download. Only applicable to data provided by EnergyPlus website. For OneBuilding.org, "all" will always be used. Should be one of "all", "epw", "ddy" and "stat". If "all", all weather data will be downloaded in a ZIP file. Default: "all".

    -
    ask
    +
    ask

    If TRUE, a command line menu will be shown to let you select which one to download. If FALSE and the number of returned results is less than max_match, files are downloaded automatically without asking.

    -
    max_match
    +
    max_match

    The max results allowed to download when ask is FALSE.

    Value

    - - -

    A character vector containing paths of downloaded files.

    +

    A character vector containing paths of downloaded files.

    Data sources

    - +

    There are 2 data sources:

    • EnergyPlus.net

    • @@ -171,9 +171,9 @@

      Author

      Examples

      -
      if (FALSE) {
      +    
      if (FALSE) { # \dontrun{
       download_weather("los angeles.*tmy3", "LosAngeles", tempdir(), ask = FALSE)
      -}
      +} # }
       
      @@ -188,16 +188,16 @@

      Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Format Long Table to Standard Input for Idf$load() Method — dt_to_load • eplusr - +
    @@ -35,7 +35,7 @@
    - +
    @@ -117,14 +117,16 @@

    Format Long Table to Standard Input for Idf$load() Method

    Arguments

    -
    dt
    + + +
    dt

    A data.table created using Idf$to_table() and IdfObject$to_table(). dt should at least contain column id (indicator used to distinguish object definitions), class (class names). If a name column exists, it will be preserved.

    -
    string_value
    +
    string_value

    If TRUE, all value will be coerced into character and the value column of returned datat.table will be character type. If FALSE, the original value will be @@ -134,9 +136,7 @@

    Arguments

    Value

    - - -

    A data.table with 5 or 6 columns:

    • id: Integer type. Used to distinguish each object definition.

    • +

      A data.table with 5 or 6 columns:

      • id: Integer type. Used to distinguish each object definition.

      • name: Character type. Only exists when input dt has a name column.

      • class: Character type.

      • index: Integer type. Field indices.

      • @@ -146,7 +146,7 @@

        Value

        Examples

        -
        if (FALSE) {
        +    
        if (FALSE) { # \dontrun{
         # read an example distributed with eplusr
         path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
         idf <- read_idf(path_idf)
        @@ -155,7 +155,7 @@ 

        Examples

        dt <- idf$to_table(class = "Material", wide = TRUE) dt_to_load(dt) -} +} # }
        @@ -171,16 +171,16 @@

        Examples

        -

        Site built with pkgdown 2.0.9.

        +

        Site built with pkgdown 2.1.0.

    - + Duplicate existing objects — dup_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -114,29 +114,29 @@

    Duplicate existing objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    -
    level
    +
    level

    Validate level. Default: eplusr_option("validate_level").

    Value

    - - -

    The modified Idf data in a named list of 5 elements, i.e. object, +

    The modified Idf data in a named list of 5 elements, i.e. object, value, reference, changed and updated. First 3 elements are data.table::data.table()s containing the actual updated Idf data while changed and updated are integer vectors containing IDs of objects that @@ -156,16 +156,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Determine duplicate objects — duplicated_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,25 +109,25 @@

    Determine duplicate objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    Value

    - - -

    A same data.table::data.table() as input dt_object (updated by +

    A same data.table::data.table() as input dt_object (updated by reference) with appended integer column unique_object_id indicating the object is a duplicated one of that object.

    @@ -144,16 +144,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Create an Empty Idf — empty_idf • eplusr - +
    @@ -111,23 +111,23 @@

    Create an Empty Idf

    Arguments

    -
    ver
    + + +
    ver

    Any acceptable input of use_idd(). If latest, which is the default, the latest IDD released version is used.

    Value

    - - -

    An Idf object

    +

    An Idf object

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     if (is_avail_idd(8.8)) empty_idf(8.8)
    -}
    +} # }
     
     
    @@ -143,16 +143,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Run EnergyPlus and its various processors — EPMacro • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -211,57 +211,59 @@

    Run EnergyPlus and its various processors

    Arguments

    -
    model
    + + +
    model

    [character(1)]
    A path of an EnergyPlus IDF or IMF file.

    -
    output_dir
    +
    output_dir

    [character(1) or NULL]
    Output directory of EnergyPlus simulation outputs. If NULL, the directory where the input model locates is used. Default: NULL.

    -
    output_prefix
    +
    output_prefix

    [character(1) or NULL]
    Prefix for EnergyPlus output file names. If NULL, the input model file name is used. Default: NULL.

    -
    wait
    +
    wait

    [logical(1)]
    If FALSE, simulation is run in the background and a processx::process object is returned. Extra steps are needed to collect the results after the process completes.

    -
    echo
    +
    echo

    [logical(1)]
    Whether to show standard output and error from EnergyPlus and its pre- and post- processors. Default: TRUE.

    -
    eplus
    +
    eplus

    [character(1) or NULL]
    An EnergyPlus version or a path of EnergyPlus installation directory. If NULL, the version of EnergyPlus to use is determined by the version of input model. Default: NULL.

    -
    idd
    +
    idd

    [character(1) or NULL]
    The full path of EnergyPlus IDD (Input Data Dictionary). If NULL, Energy+.idd file in EnergyPlus installation directory is used. Default: NULL.

    -
    weather
    +
    weather

    [character(1) or NULL]
    A path of an EnergyPlus weather (EPW) file. If NULL, design-day-only simulation is triggered, regardless of the design_day value.

    -
    output_suffix
    +
    output_suffix

    [character(1)]
    Suffix style for EnergyPlus output file names. Should be one of the followings:

    • C: Capital, e.g. eplusTable.csv. This is the default.

    • @@ -270,56 +272,56 @@

      Arguments

    -
    annual
    +
    annual

    [logical(1)]
    If TRUE, annual simulation is forced. Currently, only support EnergyPlus >= v8.3. Note that annual and design_day cannot both be TRUE. Default: FALSE.

    -
    design_day
    +
    design_day

    [logical(1)]
    If TRUE, design-day-only simulation is forced. Currently, only support EnergyPlus >= v8.3. Note that annual and design_day cannot both be TRUE. Default: FALSE.

    -
    eso
    +
    eso

    [character(1)]
    A path of an EnergyPlus standard output (.eso) or EnergyPlus meter output (.mtr) file.

    -
    bnd
    +
    bnd

    [character(1)]
    A path of an EnergyPlus branch node details (.bnd) file.

    -
    epmacro
    +
    epmacro

    [logical(1)]
    If TRUE, EPMacro processor is called prior to simulation. Only applicable if input file is an IMF file. Default: TRUE.

    -
    expand_obj
    +
    expand_obj

    [logical(1)]
    If TRUE, ExpandObjects processor is called prior to simulation. Should be TRUE if calling Basement or Slab preprocessors is desired. Default: TRUE.

    -
    eso_to_ip
    +
    eso_to_ip

    [logical(1)]
    If TRUE, convertESOMTR post-processor is called after simulation to convert the units of data in eso file from SI units to IP units. Default: FALSE.

    -
    readvars
    +
    readvars

    [logical(1)]
    If TRUE, ReadVarsESO post-processor is called after to simulation. Default: TRUE.

    -
    resources
    +
    resources

    [character() or NULL]
    Any external file dependencies that EnergyPlus will use for simulation. If not NULL, files will be copied to the output directory. Default: NULL.

    @@ -327,9 +329,7 @@

    Arguments

    Value

    - - -

    Functions except for energyplus() return a list of two elements:

    • file: a named list of full paths of output files

    • +

      Functions except for energyplus() return a list of two elements:

      • file: a named list of full paths of output files

      • run: a named list of outputs from the process.

      energyplus() returns a list of 7 elements:

      • ver: EnergyPlus version used

      • energyplus: EnergyPlus installation directory

      • @@ -371,16 +371,16 @@

        Note

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Read an Energy SQLite Output File — eplus_sql • eplusr
    - +
    @@ -113,15 +113,15 @@

    Read an Energy SQLite Output File

    Arguments

    -
    sql
    + + +
    sql

    A path to an local EnergyPlus SQLite output file.

    Value

    - - -

    An EplusSql object.

    +

    An EplusSql object.

    Author

    @@ -130,7 +130,7 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     if (is_avail_eplus(8.8)) {
         idf_name <- "1ZoneUncontrolled.idf"
         epw_name <-  "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
    @@ -145,7 +145,7 @@ 

    Examples

    # create from local file sql <- eplus_sql(file.path(tempdir(), "1ZoneUncontrolled.sql")) } -} +} # }
    @@ -160,16 +160,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + eplusr: A Toolkit for Using EnergyPlus in R — eplusr-package • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -112,7 +112,7 @@

    Details

    Features

    - +
    • Download and install EnergyPlus in R

    • Read, parse and modify EnergyPlus:

      • Input Data File (IDF)

      • @@ -160,16 +160,16 @@

        Author

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get and Set eplusr options — eplusr_option • eplusr - +
    @@ -111,7 +111,9 @@

    Get and Set eplusr options

    Arguments

    -
    ...
    + + +
    ...

    Any available options to define, using name = value. All available options are shown below. If no options are given, all values of current options are returned. If a single option name, its value is returned.

    @@ -119,16 +121,14 @@

    Arguments

    Value

    - - -

    If called directly, a named list of input option values. If input is +

    If called directly, a named list of input option values. If input is a single option name, a length-one vector whose type is determined by that option. If input is new option values, a named list of newly set option values.

    Details

    - +
    • validate_level: The strictness level of validation during field value modification and model error checking. Possible value: "none", "draft" and "final" or a custom validation level using @@ -229,16 +229,16 @@

      Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse object values given in literal character vectors or data.frames — expand_idf_dots_literal • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,26 +109,28 @@

    Parse object values given in literal character vectors or data.frames

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    ...
    +
    ...

    Character vectors or data.frames.

    -
    .default
    +
    .default

    If TRUE, all empty fields will be filled with default values if possible. Default: TRUE.

    -
    .exact
    +
    .exact

    If TRUE, all inputs should match existing objects in the Idf. In this case, id column is require for data.frame input. Default: FALSE.

    @@ -136,9 +138,7 @@

    Arguments

    Value

    - - -

    A named list of 2 element object and value which is a +

    A named list of 2 element object and value which is a data.table::data.table() with object data and value data respectively.

    @@ -186,16 +186,16 @@

    Note

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse object ID or name specifications given in list format — expand_idf_dots_name • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -115,35 +115,35 @@

    Parse object ID or name specifications given in list format

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    ...
    +
    ...

    Lists of object ID or name pair, e.g. c(Name1, Name2), c(ID1, ID2), NewName = OldName and NewName = ID. NewName is optional.

    -
    .keep_name
    +
    .keep_name

    If TRUE, input new names will be kept in a column named new_object_name, otherwise they will be dropped. Default: TRUE.

    -
    .property
    +
    .property

    A character vector of column names in class table to return. Default: NULL.

    Value

    - - -

    A data.table::data.table() containing extracted object data.

    +

    A data.table::data.table() containing extracted object data.

    @@ -158,16 +158,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse object values given in a list of Idf or IdfObject format — expand_idf_dots_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,46 +117,46 @@

    Parse object values given in a list of Idf or IdfObject format

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    ...
    +
    ...

    Lists of Idfs or IdfObjects.

    -
    .unique
    +
    .unique

    If TRUE, make sure there are no duplicated objects in the input. If FALSE, duplicates are kept. If NULL, duplicates are removed. Default: TRUE.

    -
    .strict
    +
    .strict

    If TRUE, make sure all input objects come from the same version as that from idf_env. Default: TRUE.

    -
    .complete
    +
    .complete

    If TRUE, make sure the returned field number meets the \min-fields requirement. Default: TRUE

    -
    .all
    +
    .all

    If TRUE, make sure the all possible fields are returned. Default: FALSE.

    Value

    - - -

    A named list of 3 data.table::data.table(): meta, object and +

    A named list of 3 data.table::data.table(): meta, object and value.

    @@ -172,16 +172,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse object field values given in list format — expand_idf_dots_value • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -123,17 +123,19 @@

    Parse object field values given in list format

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    ...
    +
    ...

    Lists of object definitions. Each list should be named with a valid class/object id/name. ID should be denoted in style ..ID. There is a special element .comment in each list, which will @@ -146,29 +148,29 @@

    Arguments

    -
    .type
    +
    .type

    Should be either "class" or "object". If "class", id/name of each input will be treated as class index/name. If "object", id/name of each input will be treated as object id/name.

    -
    .complete
    +
    .complete

    If TRUE, make sure the returned field number meets the \min-fields requirement. Default: TRUE

    -
    .all
    +
    .all

    If TRUE, make sure the all possible fields are returned. Default: FALSE.

    -
    .scalar
    +
    .scalar

    If TRUE, make sure the value of each field in the object is a scalar value. If FALSE, value_chr and value_num column will be list type. Default: TRUE.

    -
    .pair
    +
    .pair

    Only works when .scalar is FALSE. If .pair is TRUE, vector field values will be paired to each id/name on the LHS. In this case, value_chr and value_num will be character type and double @@ -176,36 +178,34 @@

    Arguments

    be replicated to match the length of the value vector. Default: FALSE.

    -
    .ref_assign
    +
    .ref_assign

    If TRUE, allow using := to gather multiple classes/objects on the LHS when defining the objects. Default: TRUE.

    -
    .unique
    +
    .unique

    If TRUE, make sure there are no duplicated classes/objects in the input. Default: FALSE.

    -
    .empty
    +
    .empty

    If TRUE, allow using an empty list, i.e. list() to define an object with all default values. Default: TRUE.

    -
    .default
    +
    .default

    If TRUE, all empty fields will be filled with default values if possible. Default: TRUE.

    -
    .env
    +
    .env

    An environment specifying the environment to evaluate the .... Default: parent.frame().

    Value

    - - -

    A named list of 2 element object and value which is a +

    A named list of 2 element object and value which is a data.table::data.table() with object data and value data respectively.

    @@ -221,16 +221,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse regular expression of object field values — expand_idf_regex • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -119,26 +119,28 @@

    Parse regular expression of object field values

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    pattern
    +
    pattern

    A single string of regular expression used to match field values

    -
    class
    +
    class

    A character vector specifying the target class names

    -
    ignore.case, perl, fixed, useBytes
    +
    ignore.case, perl, fixed, useBytes

    All of them are directly passed to base::grepl and base::gsub with the same default values.

    @@ -146,9 +148,7 @@

    Arguments

    Value

    - - -

    A named list of 2 data.table::data.table(): object and value.

    +

    A named list of 2 data.table::data.table(): object and value.

    @@ -163,16 +163,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Format an Idd — format.Idd • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -104,32 +104,32 @@

    Format an Idd

    -
    # S3 method for Idd
    +    
    # S3 method for class 'Idd'
     format(x, ...)

    Arguments

    -
    x
    + + +
    x

    An Idd object.

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    A single length character vector.

    +

    A single length character vector.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     format(use_idd(8.8, download = "auto"))
    -}
    +} # }
     
     
    @@ -145,16 +145,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Format an IddObject — format.IddObject • eplusr
    - +
    @@ -106,36 +106,36 @@

    Format an IddObject

    -
    # S3 method for IddObject
    +    
    # S3 method for class 'IddObject'
     format(x, ver = TRUE, ...)

    Arguments

    -
    x
    + + +
    x

    An IddObject object.

    -
    ver
    +
    ver

    If TRUE, a suffix of version string is added. Default: TRUE.

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    A single length character vector.

    +

    A single length character vector.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     format(use_idd(8.8, download = "auto")$Material)
    -}
    +} # }
     
     
    @@ -151,16 +151,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Format an Idf Object — format.Idf • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -104,7 +104,7 @@

    Format an Idf Object

    -
    # S3 method for Idf
    +    
    # S3 method for class 'Idf'
     format(
       x,
       comment = TRUE,
    @@ -118,41 +118,41 @@ 

    Format an Idf Object

    Arguments

    -
    x
    + + +
    x

    An Idf object.

    -
    comment
    +
    comment

    If FALSE, all comments will not be included. Default: TRUE.

    -
    header
    +
    header

    If FALSE, the header will not be included. Default: TRUE.

    -
    format
    +
    format

    Specific format used when formatting. For details, please see $save(). Default: eplusr_option("save_format")

    -
    leading
    +
    leading

    Leading spaces added to each field. Default: 4L.

    -
    sep_at
    +
    sep_at

    The character width to separate value string and field string. Default: 29L which is the same as IDF Editor.

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    A single length string.

    +

    A single length string.

    Author

    @@ -161,10 +161,10 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
     cat(format(read_idf(idf_path, use_idd(8.8, "auto")), leading = 0))
    -}
    +} # }
     
    @@ -179,16 +179,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Format an IdfObject — format.IdfObject • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -104,48 +104,48 @@

    Format an IdfObject

    -
    # S3 method for IdfObject
    +    
    # S3 method for class 'IdfObject'
     format(x, comment = TRUE, leading = 4L, sep_at = 29L, all = FALSE, ...)

    Arguments

    -
    x
    + + +
    x

    An IdfObject object.

    -
    comment
    +
    comment

    If FALSE, all comments will not be included. Default: TRUE.

    -
    leading
    +
    leading

    Leading spaces added to each field. Default: 4L.

    -
    sep_at
    +
    sep_at

    The character width to separate value string and field string. Default: 29L which is the same as IDF Editor.

    -
    all
    +
    all

    If TRUE, values of all possible fields in current class the IdfObject belongs to are returned. Default: FALSE

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    A character vector.

    +

    A character vector.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     idf <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr"),
         idd = use_idd("8.8", download = "auto"))
     
    @@ -153,7 +153,7 @@ 

    Examples

    mat <- idf$Material[["C5 - 4 IN HW CONCRETE"]] cat(format(mat, leading = 0, sep_at = 10)) -} +} # }
    @@ -169,16 +169,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get the enclosed environment of an R6 object — get_env • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -113,15 +113,15 @@

    Get the enclosed environment of an R6 object

    Arguments

    -
    x
    + + +
    x

    An R6 object.

    Value

    - - -

    An environment.

    +

    An environment.

    Details

    @@ -145,16 +145,16 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get class data — get_idd_class • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,22 +109,24 @@

    Get class data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names. If NULL, all classes are returned.

    -
    property
    +
    property

    A character vector of column names in class table to return. If NULL, only class index columns are returned, plus column rleid.

    -
    underscore
    +
    underscore

    If TRUE, input class name will be converted into underscore style name first and column class_name_us will be used for matching.

    @@ -132,9 +134,7 @@

    Arguments

    Value

    - - -

    A data.table containing specified columns.

    +

    A data.table containing specified columns.

    @@ -149,16 +149,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get field data — get_idd_field • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -118,38 +118,40 @@

    Get field data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names.

    -
    field
    +
    field

    An integer vector of valid field indexes or a character vector of valid field names (can be in in underscore style). class and field should have the same length.

    -
    property
    +
    property

    A character vector of column names in field table to return.

    -
    underscore
    +
    underscore

    If TRUE, input class name and field names will be converted into underscore style name first and column class_name_us and field_name_us will be used for matching.

    -
    no_ext
    +
    no_ext

    If TRUE, no new extensible groups will be added even if there are no matched input found and an error will be issued right away.

    -
    complete
    +
    complete

    If TRUE, at least fields till the current whole extensible group will be returned. A new column named "matched_rleid" will be created (when property is NULL) indicating if given field has been @@ -158,9 +160,7 @@

    Arguments

    Value

    - - -

    A data.table containing specified columns.

    +

    A data.table containing specified columns.

    @@ -175,16 +175,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get field relation data — get_idd_relation • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -121,42 +121,44 @@

    Get field relation data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    class_id
    +
    class_id

    An integer vector of valid class indexes. Should be NULL if field_id is given.

    -
    field_id
    +
    field_id

    An integer vector of valid field id. Should be NULL if class_id is given.

    -
    direction
    +
    direction

    The relation direction to extract. Should be one of "ref_to" or "ref_by".

    -
    depth
    +
    depth

    If > 0, the relation is searched recursively. If NULL, all possible recursive relations are returned. Default: 0.

    -
    name
    +
    name

    If TRUE, additional formatting columns are added and an IddRelation object is returned. Default: FALSE.

    -
    class, group
    +
    class, group

    A character vector of group names used for searching relations. Default: NULL.

    -
    class_ref
    +
    class_ref

    Specify how to handle class-name-references. There are 3 options in total, i.e. "none", "both" and "all", with "both" being the default. @@ -168,7 +170,7 @@

    Arguments

    option.

    -
    match_all
    +
    match_all

    If TRUE, relation search will continue even though one relation has been found. If FALSE, searching is stopped whenever one relation is found in specified classes/groups. Default: FALSE.

    @@ -176,9 +178,7 @@

    Arguments

    Value

    - - -

    A data.table.

    +

    A data.table.

    @@ -193,16 +193,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Extract node relations — get_idf_node_relation • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -120,64 +120,64 @@

    Extract node relations

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    object_id
    +
    object_id

    An integer vector of valid object IDs. If NULL, all object IDs in current IDF will be used.

    -
    value_id
    +
    value_id

    An integer vector of valid value IDs. If NULL, all value IDs in current IDF will be used.

    -
    object
    +
    object

    An integer vector of valid object IDs or a character vector of valid object names to specify the targeting relation objects. Default: NULL.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names to specify the targeting relation classes. Default: NULL.

    -
    group
    +
    group

    A character vector of valid group names to specify the targeting relation groups. Default: NULL.

    -
    name
    +
    name

    If TRUE, all class, object, field value ID and name columns will be added and a IdfRelationTo or IdfRelationBy object is returned with customized printing method. Default: FALSE.

    -
    keep_all
    +
    keep_all

    If TRUE, all input ID are kept. Otherwise, only input IDs that have relations are kept. Default: FALSE.

    -
    depth
    +
    depth

    Recursive reference relation depth. NULL means infinite. Default: 0L.

    Value

    - - -

    A data.table.

    +

    A data.table.

    @@ -192,16 +192,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get object data — get_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,37 +117,39 @@

    Get object data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names. Default: NULL.

    -
    object
    +
    object

    An integer vector of valid object IDs or a character vector of valid object names. Default: NULL.

    -
    property
    +
    property

    A character vector of column names in class table to return.

    -
    underscore
    +
    underscore

    If TRUE, input class name will be converted into underscore style name first and column class_name_us will be used for matching. Default: FALSE.

    -
    ignore_case
    +
    ignore_case

    If TRUE, input object name will be converted into lower case and column object_name_lower will be used for matching. converted into underscore style name first and column class_name_us @@ -156,9 +158,7 @@

    Arguments

    Value

    - - -

    A data.table.

    +

    A data.table.

    @@ -173,16 +173,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Extract object and value reference relations — get_idf_relation • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -123,65 +123,67 @@

    Extract object and value reference relations

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    object_id
    +
    object_id

    An integer vector of valid object IDs. If NULL, all object IDs in current IDF will be used.

    -
    value_id
    +
    value_id

    An integer vector of valid value IDs. If NULL, all value IDs in current IDF will be used.

    -
    direction
    +
    direction

    Reference relation direction. Should be one of "ref_to" and "ref_by". Default: "ref_to".

    -
    depth
    +
    depth

    Recursive reference relation depth. NULL means infinite. Default: 0L.

    -
    name
    +
    name

    If TRUE, all class, object, field value ID and name columns will be added and a IdfRelationTo or IdfRelationBy object is returned with customized printing method. Default: FALSE.

    -
    object
    +
    object

    An integer vector of valid object IDs or a character vector of valid object names to specify the targeting relation objects. Default: NULL.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names to specify the targeting relation classes. Default: NULL.

    -
    group
    +
    group

    A character vector of valid group names to specify the targeting relation groups. Default: NULL.

    -
    keep_all
    +
    keep_all

    If TRUE, all input ID are kept. Otherwise, only input IDs that have relations are kept. Default: FALSE.

    -
    class_ref
    +
    class_ref

    Specify how to handle class-name-references. There are 3 options in total, i.e. "none", "both" and "all", with "both" being the default. @@ -192,7 +194,7 @@

    Arguments

    option.

    -
    match_all
    +
    match_all

    If TRUE, relation search will continue even though one relation has been found. If FALSE, searching is stopped whenever one relation is found in specified classes/groups. Default: FALSE.

    @@ -200,9 +202,7 @@

    Arguments

    Value

    - - -

    A data.table.

    +

    A data.table.

    @@ -217,16 +217,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Extract value data in a data.table — get_idf_table • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -122,27 +122,29 @@

    Extract value data in a data.table

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names. Default: NULL.

    -
    object
    +
    object

    An integer vector of valid object IDs or a character vector of valid object names. Default: NULL.

    -
    string_value
    +
    string_value

    If TRUE, all field values are returned as character. If FALSE, value column in returned data.table is a list column with @@ -152,13 +154,13 @@

    Arguments

    type being a string instead of a number. Default: TRUE.

    -
    unit
    +
    unit

    Only applicable when string_value is FALSE. If TRUE, values of numeric fields are assigned with units using units::set_units() if applicable. Default: FALSE.

    -
    wide
    +
    wide

    Only applicable if target objects belong to a same class. If TRUE, a wide table will be returned, i.e. first three columns are always id, name and class, and then every @@ -167,20 +169,20 @@

    Arguments

    Default: FALSE.

    -
    align
    +
    align

    If TRUE, all objects in the same class will have the same field number. The number of fields is the same as the object that have the most fields among objects specified. Default: FALSE.

    -
    all
    +
    all

    If TRUE, all available fields defined in IDD for the class that objects belong to will be returned. Default: FALSE.

    -
    group_ext
    +
    group_ext

    Should be one of "none", "group" or "index". If not "none", value column in returned data.table::data.table() will be converted into a list. @@ -194,7 +196,7 @@

    Arguments

    Default: "none".

    -
    force
    +
    force

    If TRUE, wide can be TRUE even though there are multiple classes in input. This can result in a data.table with lots of columns. But may be useful when you know that @@ -202,7 +204,7 @@

    Arguments

    Ceiling:Adiabatic and Floor:Adiabatic. Default: FALSE.

    -
    init
    +
    init

    If TRUE, a table for new object input will be returned with all values filled with defaults. In this case, object input will be ignored. The id column will be filled with @@ -211,12 +213,8 @@

    Arguments

    Value

    - - -

    A data.table with 6 columns (if +

    A data.table with 6 columns (if wide is FALSE) or at least 5 columns (if wide is TRUE).

    - -

    When wide is FALSE, the 5 columns are:

    • id: Integer type. Object IDs.

    • name: Character type. Object names.

    • class: Character type. Current class name.

    • @@ -238,16 +236,16 @@

      Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get value data — get_idf_value • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -121,72 +121,72 @@

    Get value data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names. Default: NULL.

    -
    object
    +
    object

    An integer vector of valid object IDs or a character vector of valid object names. Default: NULL.

    -
    field
    +
    field

    An integer vector of valid field indexes or a character vector of valid field names (can be in in underscore style). class and field should have the same length.

    -
    property
    +
    property

    A character vector of column names in field table to return.

    -
    underscore
    +
    underscore

    If TRUE, input class name will be converted into underscore style name first and column class_name_us will be used for matching. Default: FALSE.

    -
    ignore_case
    +
    ignore_case

    If TRUE, input object name will be converted into lower case and column object_name_lower will be used for matching. converted into underscore style name first and column class_name_us and field_name_us will be used for matching. Default: FALSE.

    -
    align
    +
    align

    If TRUE, all objects in the same class will have the same field number. The number of fields is the same as the object that have the most fields among objects specified. Default: FALSE.

    -
    complete
    +
    complete

    If TRUE, at least fields till the current whole extensible group will be returned. A new column named "matched_rleid" will be created (when property is NULL) indicating if given field has been matched or not.

    -
    all
    +
    all

    If TRUE, all available fields defined in IDD for the class that objects belong to will be returned. Default: FALSE.

    Value

    - - -

    A data.table containing specified columns.

    +

    A data.table containing specified columns.

    @@ -201,16 +201,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Format object information string — get_object_info • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,46 +117,46 @@

    Format object information string

    Arguments

    -
    dt_object
    + + +
    dt_object

    A data.table::data.table() of object data

    -
    component
    +
    component

    A character vector specifying what information to be formatted. Should be a subset of "id", "name" and "class". Defaults are all of them.

    -
    by_class
    +
    by_class

    If TRUE, multiple objects in the same class will be concatenated. Default: FALSE.

    -
    numbered
    +
    numbered

    If TRUE, a index number will be prepended. If rleid column exists in dt_object, its values will be used as the index numbers.

    -
    collapse
    +
    collapse

    A single string used to collapse the results into a single string. Default: NULL.

    -
    prefix
    +
    prefix

    A character vector used to add at the beginning of object information. Default: NULL.

    -
    name_prefix
    +
    name_prefix

    If TRUE, Default: TRUE.

    Value

    - - -

    A character vector of the same length as the row number of input +

    A character vector of the same length as the row number of input dt_object if collapse is NULL. Otherwise a single string.

    @@ -172,16 +172,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Create an IddObject object. — idd_object • eplusr - +
    @@ -111,30 +111,30 @@

    Create an IddObject object.

    Arguments

    -
    parent
    + + +
    parent

    An Idd object or a valid input for use_idd().

    -
    class
    +
    class

    A valid class name (a string).

    Value

    - - -

    An IddObject object.

    +

    An IddObject object.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     idd <- use_idd("8.8", download = "auto")
     
     # get an IddObject using class name
     idd_object(idd, "Material")
     idd_object("8.8", "Material")
    -}
    +} # }
     
     
    @@ -150,16 +150,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Create an IdfObject object. — idf_object • eplusr
    - +
    @@ -111,17 +111,19 @@

    Create an IdfObject object.

    Arguments

    -
    parent
    + + +
    parent

    An Idf object.

    -
    object
    +
    object

    A valid object ID (an integer) or name (a string). If NULL and class is not NULL, an empty IdfObject is created with all fields fill with default values if possible. Default: NULL.

    -
    class
    +
    class

    A valid class name (a string). If object is not NULL, class is used to further specify what class is the target object belongs to. If object is NULL, an empty IdfObject of class is created.

    @@ -129,9 +131,7 @@

    Arguments

    Value

    - - -

    An IdfObject object.

    +

    An IdfObject object.

    Details

    @@ -147,7 +147,7 @@

    Details

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     model <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr"))
     
     # get an IdfObject using object ID
    @@ -166,7 +166,7 @@ 

    Examples

    zone eplusr_option(validate_level = "final") zone$validate() -} +} # }
    @@ -181,16 +181,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Package index • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -338,16 +338,16 @@

    eplusr Options
    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Initialize object data — init_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,48 +117,46 @@

    Initialize object data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names. Default: NULL.

    -
    property
    +
    property

    A character vector of column names in class table to return.

    -
    underscore
    +
    underscore

    If TRUE, input class name will be converted into underscore style name first and column class_name_us will be used for matching. Default: FALSE.

    -
    id
    +
    id

    If TRUE, new object IDs will be added in column object_id based on current existing objects found in idf_env. Default: TRUE.

    -
    name
    +
    name

    If TRUE, column object_name and object_name_lower will be filled using make_idf_object_name(). Default: TRUE.

    @@ -173,16 +171,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Initialize value data — init_idf_value • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -120,64 +120,64 @@

    Initialize value data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    class
    +
    class

    An integer vector of valid class indexes or a character vector of valid class names. Default: NULL.

    -
    field
    +
    field

    An integer vector of valid field indexes or a character vector of valid field names (can be in in underscore style). class and field should have the same length.

    -
    property
    +
    property

    A character vector of column names in field table to return.

    -
    underscore
    +
    underscore

    If TRUE, input class name will be converted into underscore style name first and column class_name_us will be used for matching. Default: FALSE.

    -
    complete
    +
    complete

    If TRUE, at least fields till the current whole extensible group will be returned. A new column named "matched_rleid" will be created (when property is NULL) indicating if given field has been matched or not. Default: FALSE.

    -
    all
    +
    all

    If TRUE, all available fields defined in IDD for the class that objects belong to will be returned. Default: FALSE.

    -
    default
    +
    default

    If TRUE, column value_chr and value_num will be filled with default values. Default: TRUE.

    -
    id
    +
    id

    If TRUE, new value id will be added in column value_id based on current existing value ids found in idf_env. Default: TRUE.

    Value

    - - -

    A data.table containing specified columns.

    +

    A data.table containing specified columns.

    Note

    @@ -196,16 +196,16 @@

    Note

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Download and Install EnergyPlus — install_eplus • eplusr
    - +
    @@ -122,13 +122,15 @@

    Download and Install EnergyPlus

    Arguments

    -
    ver
    + + +
    ver

    The EnergyPlus version number, e.g., "8.7". For download_eplus() and install_eplus(), the special value "latest", which is the default, means the latest version supported by eplusr.

    -
    local
    +
    local

    Whether to install EnergyPlus only for current user. For Windows and Linux, if FALSE, administrative privileges are required to install EnergyPlus to the default system-level location. See details. @@ -138,7 +140,7 @@

    Arguments

    want EnergyPlus to be install at /Applications or ~/Applications.

    -
    dir
    +
    dir

    A single string of directory.

    • For download_eplus(), where to save EnergyPlus installer file. Default: ".".

    • For install_eplus(), the installer will always be saved into @@ -152,7 +154,7 @@

      Arguments

    -
    force
    +
    force

    Whether to install EnergyPlus even if it has already been installed. Setting to TRUE if you want to install the downloaded EnergyPlus anyway. Please note that this may results in multiple @@ -160,12 +162,12 @@

    Arguments

    eplusr will only use the first EnergyPlus installation. Default: FALSE.

    -
    portable
    +
    portable

    Whether to download the portable version of EnergyPlus. Only works for EnergyPlus v8.8 and above. Default: FALSE.

    -
    ...
    +
    ...

    Other arguments to be passed to the installer. Current only one additional argument exists and is only for Linux:

    • dir_bin: A path where symbolic links will be created to the software executables. The default is /usr/local/bin if local is FALSE @@ -175,9 +177,7 @@

      Arguments

    Value

    - - -

    An invisible integer 0 if succeed. Moreover, some attributes will +

    An invisible integer 0 if succeed. Moreover, some attributes will also be returned:

    • For install_eplus():

      • path: the EnergyPlus installation path

      • installer: the path of downloaded EnergyPlus installer file

    • @@ -219,7 +219,7 @@

      Author

      Examples

      -
      if (FALSE) {
      +    
      if (FALSE) { # \dontrun{
       # download the latest version of EnergyPlus
       download_eplus("latest", dir = tempdir())
       # install the latest version of EnergyPlus system-wide which is the default
      @@ -238,7 +238,7 @@ 

      Examples

      # custom EnergyPlus install home directory install_eplus("8.8", dir = "~/MyPrograms", local = TRUE, force = TRUE) -} +} # }
      @@ -253,16 +253,16 @@

      Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Show components of validation strictness level — level_checks • eplusr
    - +
    @@ -113,16 +113,16 @@

    Show components of validation strictness level

    Arguments

    -
    level
    + + +
    level

    Should be one of "none", "draft", "final" or an output of custom_validate().

    Value

    - - -

    A named list with 10 elements, e.g. required_object, +

    A named list with 10 elements, e.g. required_object, unique_object, unique_name, extensible, required_field, auto_field, type, choice, range and reference. For the meaning of each validation component, seecustom_validate().

    @@ -268,16 +268,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Initialize object data — make_idf_object_name • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -118,54 +118,52 @@

    Initialize object data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() containing object data.

    -
    use_old
    +
    use_old

    If TRUE, new object names are based on the original object names in column object_name. If FALSE, new object names are created based on the class name it belongs to. Default: TRUE.

    -
    prefix_col
    +
    prefix_col

    An character vector of column names in input dt_object whose values will be combined together as the prefix of the new object names. Default: NULL.

    -
    prefix_sep
    +
    prefix_sep

    A single string specifying the separation character among prefix columns. Default: NULL.

    -
    keep_na
    +
    keep_na

    If TRUE, new object names will be NA if the original object names in column object_name are NAs. Default: TRUE.

    -
    include_ori
    +
    include_ori

    If TRUE, make sure new object names are not the same as the original object names in the object_name column. Default: FALSE.

    @@ -180,16 +178,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse object field values given in list format — parse_dots_value • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,7 +117,9 @@

    Parse object field values given in list format

    Arguments

    -
    ...
    + + +
    ...

    Lists of object definitions. Each list should be named with a valid class/object id/name. ID should be denoted in style ..ID. There is a special element .comment in each list, which will @@ -130,13 +132,13 @@

    Arguments

    -
    .scalar
    +
    .scalar

    If TRUE, make sure the value of each field in the object is a scalar value. If FALSE, value_chr and value_num column will be list type. Default: TRUE.

    -
    .pair
    +
    .pair

    Only works when .scalar is FALSE. If .pair is TRUE, vector field values will be paired to each id/name on the LHS. In this case, value_chr and value_num will be character type and double @@ -144,31 +146,29 @@

    Arguments

    be replicated to match the length of the value vector. Default: FALSE.

    -
    .ref_assign
    +
    .ref_assign

    If TRUE, allow using := to gather multiple classes/objects on the LHS when defining the objects. Default: TRUE.

    -
    .unique
    +
    .unique

    If TRUE, make sure there are no duplicated classes/objects in the input. Default: FALSE.

    -
    .empty
    +
    .empty

    If TRUE, allow using an empty list, i.e. list() to define an object with all default values. Default: TRUE.

    -
    .env
    +
    .env

    An environment specifying the environment to evaluate the .... Default: parent.frame().

    Value

    - - -

    A named list of 2 element object and value which is a +

    A named list of 2 element object and value which is a data.table::data.table() with object data and value data respectively.

    @@ -184,16 +184,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Get file path from EnergyPlus installation directory — path_eplus • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,27 +117,29 @@

    Get file path from EnergyPlus installation directory

    Arguments

    -
    ver
    + + +
    ver

    An acceptable EnergyPlus version or an EnergyPlus installation directory

    -
    ...
    +
    ...

    File paths passed to base::file.path().

    -
    strict
    +
    strict

    If TRUE, an error will be issued if the specified file does not exist

    -
    file
    +
    file

    A single string of file name.

    Details

    - +
    • path_eplus() returns the file path specified in EnergyPlus installation directory.

    • path_eplus_processor() is the same as path_eplus() expect it @@ -157,7 +159,7 @@

      Author

      Examples

      -
      if (FALSE) {
      +    
      if (FALSE) { # \dontrun{
       path_eplus("8.8", "Energy+.idd")
       
       path_eplus_processor("8.8", "EPMacro", strict = TRUE)
      @@ -170,7 +172,7 @@ 

      Examples

      path_eplus_dataset("8.8", "Boilers.idf") path_eplus_dataset("8.8", "FMUs/MoistAir.fmu") -} +} # }
      @@ -185,16 +187,16 @@

      Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Print EnergyPlus Error File — print.ErrFile • eplusr
    - +
    @@ -106,34 +106,34 @@

    Print EnergyPlus Error File

    -
    # S3 method for ErrFile
    +    
    # S3 method for class 'ErrFile'
     print(x, brief = FALSE, info = TRUE, ...)

    Arguments

    -
    x
    + + +
    x

    An ErrFile created using read_err().

    -
    brief
    +
    brief

    If TRUE, only summary data is printed. Default: FALSE.

    -
    info
    +
    info

    If FALSE, informative messages are excluded. Only warnings and errors are printed. Default: TRUE.

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    An ErrFile object, invisibly.

    +

    An ErrFile object, invisibly.

    @@ -148,16 +148,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Print EnergyPlus Transition Error File — print.TransitionErrFile • eplusr - +
    @@ -106,34 +106,34 @@

    Print EnergyPlus Transition Error File

    -
    # S3 method for TransitionErrFile
    +    
    # S3 method for class 'TransitionErrFile'
     print(x, brief = FALSE, info = TRUE, ...)

    Arguments

    -
    x
    + + +
    x

    An TransitionErrFile created using read_err().

    -
    brief
    +
    brief

    If TRUE, only summary data is printed. Default: FALSE.

    -
    info
    +
    info

    If FALSE, informative messages are excluded. Only warnings and errors are printed. Default: TRUE.

    -
    ...
    +
    ...

    Further arguments passed to or from other methods.

    Value

    - - -

    An TransitionErrFile object, invisibly.

    +

    An TransitionErrFile object, invisibly.

    @@ -148,16 +148,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Purge not-used resource objects — purge_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,25 +109,25 @@

    Purge not-used resource objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    Value

    - - -

    The modified Idf data in a named list of 5 elements, i.e. object, +

    The modified Idf data in a named list of 5 elements, i.e. object, value, reference, changed and updated. First 3 elements are data.table::data.table()s containing the actual updated Idf data while changed and updated are integer vectors containing IDs of objects that @@ -147,16 +147,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Read an EnergyPlus Report Data Dictionary File — read_rdd • eplusr
    - +
    @@ -117,7 +117,9 @@

    Read an EnergyPlus Report Data Dictionary File

    Arguments

    -
    path
    + + +
    path

    For read_rdd(), a file path of EnergyPlus EnergyPlus Report Data Dictionary file with an extension .rdd. For read_mdd(), a file path of EnergyPlus EnergyPlus Meter Data Dictionary file with an extension .mdd

    @@ -125,12 +127,8 @@

    Arguments

    Value

    - - -

    For read_rdd(), an RddFile object. For read_mdd(), a MddFile

    - - -

    object.

    +

    For read_rdd(), an RddFile object. For read_mdd(), a MddFile +object.

    Details

    @@ -159,7 +157,7 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     # run simulation and get the err file
     idf_name <- "1ZoneUncontrolled.idf"
     epw_name <-  "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
    @@ -171,7 +169,7 @@ 

    Examples

    # read the err file read_rdd(job$locate_output(".rdd")) read_mdd(job$locate_output(".mdd")) -} +} # }
    @@ -186,16 +184,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Format RddFile Object to Standard Input for Idf$load() Method — rdd_to_load • eplusr
    - +
    @@ -120,18 +120,20 @@

    Format RddFile Object to Standard Input for Idf$load() Method

    Arguments

    -
    rdd, mdd
    + + +
    rdd, mdd

    A RddFile object created using read_rdd() and a MddFile object created using read_mdd(), respectively.

    -
    key_value
    +
    key_value

    Key value name for all variables. If not specified and the key_value column in the input RddFile object will be used. If key_value column does not exist, "*" are used for all variables.

    -
    reporting_frequency
    +
    reporting_frequency

    Variable value reporting frequency for all variables. If not specified and the reporting_freqency column in the input RddFile object will be used. If reporting_freqency column does not exist, @@ -140,7 +142,7 @@

    Arguments

    "Environment", and "Annual".

    -
    class
    +
    class

    Class name for meter output. All possible values: "Output:Meter", "Output:Meter:MeterFileOnly", "Output:Meter:Cumulative", and "Output:Meter:Cumulative:MeterFileOnly". @@ -149,9 +151,7 @@

    Arguments

    Value

    - - -

    A data.table with 5 columns with an additional +

    A data.table with 5 columns with an additional attribute named eplus_version extracted from the original RddFile and MddFile:

    • id: Integer type. Used to distinguish each object definition.

    • class: Character type. Class names, e.g. Output:Variable and @@ -163,7 +163,7 @@

      Value

      Examples

      -
      if (FALSE) {
      +    
      if (FALSE) { # \dontrun{
       # read an example distributed with eplusr
       path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
       idf <- read_idf(path_idf)
      @@ -207,7 +207,7 @@ 

      Examples

      # meter class can be further specified using `class` arg mdd_to_load(mdd_sub, class = "Output:Meter:MeterFileOnly") -} +} # }
      @@ -222,16 +222,16 @@

      Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Read and Parse EnergyPlus Weather File (EPW) — read_epw • eplusr - +
    @@ -113,11 +113,13 @@

    Read and Parse EnergyPlus Weather File (EPW)

    Arguments

    -
    path
    + + +
    path

    A path of an EnergyPlus EPW file.

    -
    encoding
    +
    encoding

    The file encoding of input IDD. Should be one of "unknown", "Latin-1" and "UTF-8". The default is "unknown"` which means that the file is encoded in the native encoding.

    @@ -125,9 +127,7 @@

    Arguments

    Value

    - - -

    An Epw object.

    +

    An Epw object.

    See also

    @@ -140,7 +140,7 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     # read an EPW file from EnergyPlus v8.8 installation folder
     if (is_avail_eplus(8.8)) {
         path_epw <- file.path(
    @@ -157,7 +157,7 @@ 

    Examples

    path_file <- "USA_CA_San.Francisco.Intl.AP.724940_TMY3/USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw" path_epw <- file.path(path_base, path_region, path_file) read_epw(path_epw) -} +} # }
    @@ -173,16 +173,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Read an EnergyPlus Simulation Error File — read_err • eplusr
    - +
    @@ -111,16 +111,16 @@

    Read an EnergyPlus Simulation Error File

    Arguments

    -
    path
    + + +
    path

    a file path of EnergyPlus simulation error file, usually with an extension .err.

    Value

    - - -

    An ErrFile object.

    +

    An ErrFile object.

    Details

    @@ -149,7 +149,7 @@

    Details

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     # run simulation and get the err file
     idf_name <- "1ZoneUncontrolled.idf"
     epw_name <-  "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
    @@ -160,7 +160,7 @@ 

    Examples

    # read the err file read_err(job$locate_output(".err")) -} +} # }
    @@ -175,16 +175,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Read an EnergyPlus Input Data File (IDF) — read_idf • eplusr
    - +
    @@ -111,20 +111,22 @@

    Read an EnergyPlus Input Data File (IDF)

    Arguments

    -
    path
    + + +
    path

    Either a path, a connection, or literal data (either a single string or a raw vector) to an EnergyPlus Input Data File (IDF). If a file path, that file usually has a extension .idf.

    -
    idd
    +
    idd

    Any acceptable input of use_idd(). If NULL, which is the default, the version of IDF will be passed to use_idd(). If the input is an .ddy file which does not have a version field, the latest version of Idf cached will be used.

    -
    encoding
    +
    encoding

    The file encoding of input IDD. Should be one of "unknown", "Latin-1" and "UTF-8". The default is "unknown"` which means that the file is encoded in the native encoding.

    @@ -132,9 +134,7 @@

    Arguments

    Value

    - - -

    An Idf object.

    +

    An Idf object.

    Details

    @@ -157,7 +157,7 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     # example model shipped with eplusr from EnergyPlus v8.8
     idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr") # v8.8
     
    @@ -187,7 +187,7 @@ 

    Examples

    " read_idf(idf_string, use_idd("8.8", download = "auto")) -} +} # }
    @@ -202,16 +202,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Parse objects from IDF Editor — read_idfeditor_copy • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,23 +109,25 @@

    Parse objects from IDF Editor

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    version
    +
    version

    The version of IDF file open by IDF Editor, e.g. "8.6", "8.8.0". If NULL, assume that the file has the same version as current Idf object. Default: NULL.

    -
    in_ip
    +
    in_ip

    Set to TRUE if the IDF file is open with Inch-Pound view option toggled. Numeric values will automatically converted to SI units if necessary. Default: FALSE.

    @@ -133,9 +135,7 @@

    Arguments

    Value

    - - -

    The copied object data from IDF Editor in a named list of 3 +

    The copied object data from IDF Editor in a named list of 3 data.table::data.table()s, i.e. object, value and reference.

    @@ -156,16 +156,16 @@

    Note

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Reload Idf data — reload • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,22 +109,22 @@

    Reload Idf data

    Arguments

    -
    x
    + + +
    x

    An object of class Idd, IddObject, Idf, IdfObject, Epw, EplusJob, EplusGroupJob or ParametricJob object. Any object of other class will be directly returned without any modifications.

    -
    ...
    +
    ...

    further arguments passed to or from other methods. Currently not used.

    Value

    - - -

    The input object with its internal data.table::data.table()s +

    The input object with its internal data.table::data.table()s properly initialized.

    @@ -154,16 +154,16 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Remove duplicated objects in inputs — remove_duplicated_objects • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,29 +109,29 @@

    Remove duplicated objects in inputs

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    -
    dt_value
    +
    dt_value

    A data.table::data.table() that contains value data.

    Value

    - - -

    The modified input data in a named list of 2 +

    The modified input data in a named list of 2 data.table::data.table()s, i.e. object and value.

    @@ -147,16 +147,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Remove trailing empty object fields — remove_empty_fields • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,27 +109,25 @@

    Remove trailing empty object fields

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_value
    +
    dt_value

    A data.table::data.table() that contains value data.

    @@ -144,16 +142,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Rename existing objects — rename_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -114,29 +114,29 @@

    Rename existing objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    -
    level
    +
    level

    Validate level. Default: eplusr_option("validate_level").

    Value

    - - -

    The modified Idf data in a named list of 5 elements, i.e. object, +

    The modified Idf data in a named list of 5 elements, i.e. object, value, reference, changed and updated. First 3 elements are data.table::data.table()s containing the actual updated Idf data while changed and updated are integer vectors containing IDs of objects that @@ -156,16 +156,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Run simulations of EnergyPlus models. — run_idf • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -131,12 +131,14 @@

    Run simulations of EnergyPlus models.

    Arguments

    -
    model
    + + +
    model

    A path (for run_idf()) or a vector of paths (for run_multi()) of EnergyPlus IDF or IMF files.

    -
    weather
    +
    weather

    A path (for run_idf()) or a vector of paths (for run_multi()) of EnergyPlus EPW weather files. If set to NULL, design-day-only simulation will be triggered, @@ -148,7 +150,7 @@

    Arguments

    corresponding weather to NA.

    -
    output_dir
    +
    output_dir

    Output directory path (for rum_idf()) or paths (for run_mult()). If NULL, the directory of input model is used. For run_multi(), output_dir, if not NULL, should have the same @@ -156,38 +158,38 @@

    Arguments

    output_dir is prohibited.

    -
    design_day
    +
    design_day

    Force design-day-only simulation. For rum_multi(), design_day can also be a logical vector which has the same length as model. Note that design_day and annual cannot be all TRUE at the same time. Default: FALSE.

    -
    annual
    +
    annual

    Force annual simulation. For rum_multi(), annual can also be a logical vector which has the same length as model. Note that design_day and annual cannot be all TRUE at the same time. Default: FALSE.

    -
    expand_obj
    +
    expand_obj

    Whether to run ExpandObjects preprocessor before simulation. Default: TRUE.

    -
    wait
    +
    wait

    If TRUE, R will hang on and wait all EnergyPlus simulations finish. If FALSE, all EnergyPlus simulations are run in the background, and a process object is returned.

    -
    echo
    +
    echo

    Only applicable when wait is TRUE. Whether to show standard output and error from EnergyPlus for run_idf() and simulation status for run_multi(). Default: TRUE.

    -
    eplus
    +
    eplus

    An acceptable input (for run_idf()) or inputs (for run_multi()) of use_eplus() and eplus_config(). If NULL, which is the default, the version of EnergyPlus to use is determined by the @@ -197,16 +199,12 @@

    Arguments

    Value

    -
    • For run_idf(), if wait is TRUE, a named list of 11 elements:

    No.ColumnTypeDescription
    1idfcharacter(1)Full path of input IDF file
    2epwcharacter(1) or NULLFull path of input EPW file
    3versioncharacter(1)Version of called EnergyPlus
    4exit_statusinteger(1) or NULLExit status of EnergyPlus. NULL if terminated or wait is FALSE
    5start_timePOSIXct(1)Start of time of simulation
    6end_timePOSIXct(1) or NULLEnd of time of simulation. NULL if wait is FALSE
    7output_dircharacter(1)Full path of simulation output directory
    8energypluscharacter(1)Full path of called EnergyPlus executable
    9stdoutcharacter(1) or NULLStandard output of EnergyPlus during simulation
    10stderrcharacter(1) or NULLStandard error of EnergyPlus during simulation
    11processr_processA process object which called EnergyPlus and ran the simulation

    If wait is FALSE, the R process is directly returned. You can get the results by calling result <- proc$get_result() (proc is the returned process). Please note that in this case, result$process will -always be NULL. But you can easily assign it by running result$process <- proc

    - - -
    • For rum_multi(), if wait is TRUE, a +always be NULL. But you can easily assign it by running result$process <- proc

      • For rum_multi(), if wait is TRUE, a data.table of 12 columns:

        No.ColumnTypeDescription
        1indexintegerIndex of simulation
        2statuscharacterSimulation status
        3idfcharacterFull path of input IDF file
        4epwcharacterFull path of input EPW file. NA for design-day-only simulation
        5versioncharacterVersion of EnergyPlus
        6exit_statusintegerExit status of EnergyPlus. NA if terminated
        7start_timePOSIXctStart of time of simulation
        8end_timePOSIXctEnd of time of simulation.
        9output_dircharacterFull path of simulation output directory
        10energypluscharacterFull path of called EnergyPlus executable
        11stdoutlistStandard output of EnergyPlus during simulation
        12stderrlistStandard error of EnergyPlus during simulation

        For column status, there are 4 possible values:

        • "completed": the simulation job is completed successfully

        • "failed": the simulation job ended with error

        • "terminated": the simulation job started but was terminated

        • @@ -253,7 +251,7 @@

          Author

          Examples

          -
          if (FALSE) {
          +    
          if (FALSE) { # \dontrun{
           idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
           
           if (is_avail_eplus("8.8")) {
          @@ -274,7 +272,7 @@ 

          Examples

          output_dirs <- file.path(tempdir(), tools::file_path_sans_ext(basename(idf_paths))) run_multi(idf_paths, epw_paths, output_dir = output_dirs) } -} +} # }
          @@ -289,16 +287,16 @@

          Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Modifying existing objects — set_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,37 +117,37 @@

    Modifying existing objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    -
    dt_value
    +
    dt_value

    A data.table::data.table() that contains value data.

    -
    empty
    +
    empty

    If TRUE, trailing empty fields are kept. Default: FALSE.

    -
    level
    +
    level

    Validate level. Default: eplusr_option("validate_level").

    Value

    - - -

    The modified Idf data in a named list of 5 elements, i.e. object, +

    The modified Idf data in a named list of 5 elements, i.e. object, value, reference, changed and updated. First 3 elements are data.table::data.table()s containing the actual updated Idf data while changed and updated are integer vectors containing IDs of objects that @@ -167,16 +167,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Standardize Value Data — standardize_idf_value • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -115,36 +115,36 @@

    Standardize Value Data

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_value
    +
    dt_value

    An data.table of object field values.

    -
    type
    +
    type

    A character vector to specify what type of values to be standardized. Should be a subset of c("choice", "reference"). Default: c("choice", "reference").

    -
    keep
    +
    keep

    If TRUE, the original value will be kept even if it is invalid. If FALSE, invalid values will be converted into NAs. Default: TRUE.

    Value

    - - -

    A data.table

    +

    A data.table

    @@ -159,16 +159,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Perform version transition of EnergyPlus model — transition • eplusr - +
    @@ -113,27 +113,29 @@

    Perform version transition of EnergyPlus model

    Arguments

    -
    idf
    + + +
    idf

    An Idf object or a path of IDF file.

    -
    ver
    +
    ver

    A valid EnergyPlus IDD version, e.g. "9", "8.8", or "8.8.0".

    -
    keep_all
    +
    keep_all

    If TRUE, a list will be return which contains all Idf objects of intermediate versions. The list will be named using first two number of that version, e.g. 8.1, 8.2. If FALSE, only the Idf object of the version specified by ver will be returned. Default: FALSE.

    -
    save
    +
    save

    If TRUE, the models will be saved into specified directory. Default: FALSE.

    -
    dir
    +
    dir

    Only applicable when save is TRUE. The directory to save the new IDF files. If the directory does not exist, it will be created before save. If NULL, the directory of input Idf object or IDF file will be @@ -142,9 +144,7 @@

    Arguments

    Value

    - - -

    An Idf object if keep_all is FALSE or a list of Idf objects +

    An Idf object if keep_all is FALSE or a list of Idf objects if keep_all is TRUE.

    @@ -159,7 +159,7 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     if (any(avail_eplus()) > "7.2") {
         # create an empty IDF
         idf <- empty_idf("7.2")
    @@ -178,7 +178,7 @@ 

    Examples

    save = TRUE, dir = tempdir() ) } -} +} # }
    @@ -193,16 +193,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Remove duplicate objects — unique_idf_object • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,25 +109,25 @@

    Remove duplicate objects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment or list contains IDD tables including class, field, and reference.

    -
    idf_env
    +
    idf_env

    An environment or list contains IDF tables including object, value, and reference.

    -
    dt_object
    +
    dt_object

    A data.table::data.table() that contains object data.

    Value

    - - -

    The modified Idf data in a named list of 5 elements, i.e. object, +

    The modified Idf data in a named list of 5 elements, i.e. object, value, reference, changed and updated. First 3 elements are data.table::data.table()s containing the actual updated Idf data while changed and updated are integer vectors containing IDs of objects that @@ -147,16 +147,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Configure which version of EnergyPlus to use — use_eplus • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -117,18 +117,19 @@

    Configure which version of EnergyPlus to use

    Arguments

    -
    eplus
    + + +
    eplus

    An acceptable EnergyPlus version or an EnergyPlus installation path.

    -
    ver
    +
    ver

    An acceptable EnergyPlus version.

    Value

    -
    • For use_eplus() and eplus_config(), an (invisible for use_eplus()) list of three contains EnergyPlus version, directory and @@ -160,14 +161,14 @@

      See also

      Examples

      -
      if (FALSE) {
      +    
      if (FALSE) { # \dontrun{
       # add specific version of EnergyPlus
       use_eplus("8.9")
       use_eplus("8.8.0")
       
       # get configure data of specific EnergyPlus version if avaiable
       eplus_config("8.6")
      -}
      +} # }
       
       # get all versions of avaiable EnergyPlus
       avail_eplus()
      @@ -193,16 +194,16 @@ 

      Examples

      -

      Site built with pkgdown 2.0.9.

      +

      Site built with pkgdown 2.1.0.

      - + Use a specific EnergyPlus Input Data Dictionary (IDD) file — use_idd • eplusr - +
      @@ -31,7 +31,7 @@
    - +
    @@ -115,14 +115,16 @@

    Use a specific EnergyPlus Input Data Dictionary (IDD) file

    Arguments

    -
    idd
    + + +
    idd

    Either a path, a connection, or literal data (either a single string or a raw vector) to an EnergyPlus Input Data Dictionary (IDD) file, usually named as Energy+.idd, or a valid version of IDD, e.g. "8.9", "8.9.0".

    -
    download
    +
    download

    If TRUE and argument idd, the IDD file will be downloaded from EnergyPlus GitHub Repository, and saved to tempdir(). It will be parsed after it is downloaded @@ -133,26 +135,25 @@

    Arguments

    whole EnergyPlus software. Default is FALSE.

    -
    encoding
    +
    encoding

    The file encoding of input IDD. Should be one of "unknown", "Latin-1" and "UTF-8". The default is "unknown"` which means that the file is encoded in the native encoding.

    -
    ver
    +
    ver

    A valid EnergyPlus version, e.g. "8", "8.7" or "8.7.0". For download_idd(), the special value "latest", which is default, means the latest version.

    -
    dir
    +
    dir

    A directory to indicate where to save the IDD file. Default: current working directory.

    Value

    -
    • use_idd() returns an Idd object

    • download_idd() returns an invisible integer 0 if succeed. Also an @@ -193,7 +194,7 @@

      Author

      Examples

      -
      if (FALSE) {
      +    
      if (FALSE) { # \dontrun{
       # get all available Idd version
       avail_idd()
       
      @@ -218,7 +219,7 @@ 

      Examples

      use_idd("8.8") avail_idd() # should contain "8.8.0" -} +} # }
      @@ -233,16 +234,16 @@

      Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Validate input IDF data in terms of various aspects — validate_objects • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -124,80 +124,80 @@

    Validate input IDF data in terms of various aspects

    Arguments

    -
    idd_env
    + + +
    idd_env

    An environment that contains IDD data

    -
    idf_env
    +
    idf_env

    An environment that contains IDF data

    -
    dt_object
    +
    dt_object

    A data.table that contains object data to validate. If NULL, the object data from idf_env will be used, which means to validate the whole IDF.

    -
    dt_value
    +
    dt_value

    A data.table that contains value data to validate. If NULL, the value data from idf_env will be used, which means to validate the whole IDF.

    -
    required_object
    +
    required_object

    Whether to check if required objects are missing. This will only be applied when checking the whole IDF.

    -
    unique_object
    +
    unique_object

    Whether to check if there are multiple instances of unique object.

    -
    unique_name
    +
    unique_name

    Whether to check if there are objects having the same name in same class.

    -
    extensible
    +
    extensible

    Whether to check if there are incomplete extensible.

    -
    required_field
    +
    required_field

    Whether to check if there are missing value for required fields.

    -
    auto_field
    +
    auto_field

    Whether to check if there are non-autosizable or non-autocalculatable fields that are assigned "autosize" or "autocalculate".

    -
    type
    +
    type

    Whether to check if there are input values whose type are not consistent with definitions in IDD.

    -
    choice
    +
    choice

    Whether to check if there are invalid choice values.

    -
    range
    +
    range

    Whether to check if there are numeric values that are out of ranges specified in IDD.

    -
    reference
    +
    reference

    Whether to check if there are values that have invalid references.

    Value

    - - -

    An IdfValidity object.

    +

    An IdfValidity object.

    @@ -212,16 +212,16 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Run IDFVersionUpdater to Update Model Versions — version_updater • eplusr - +
    @@ -113,21 +113,23 @@

    Run IDFVersionUpdater to Update Model Versions

    Arguments

    -
    idf
    + + +
    idf

    An Idf object or a path of IDF file.

    -
    ver
    +
    ver

    A valid EnergyPlus IDD version, e.g. "9", "8.8", or "8.8.0".

    -
    dir
    +
    dir

    The directory to save the new IDF files. If the directory does not exist, it will be created before save. If NULL, the directory of input Idf object or IDF file will be used. Default: NULL.

    -
    keep_all
    +
    keep_all

    If TRUE, a list will be return which contains all Idf objects of intermediate versions. The list will be named using first two number of that version, e.g. 8.1, 8.2. If FALSE, only the Idf @@ -136,9 +138,7 @@

    Arguments

    Value

    - - -

    An Idf object if keep_all is FALSE or a list of Idf objects +

    An Idf object if keep_all is FALSE or a list of Idf objects if keep_all is TRUE. An attribute named errors is attached which contains all error messages from transition error (.VCpErr) files.

    @@ -155,7 +155,7 @@

    Author

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     if (any(avail_eplus()) > "7.2") {
         # create an empty IDF
         idf <- empty_idf("7.2")
    @@ -171,7 +171,7 @@ 

    Examples

    # see transition error messages attr(updated, "errors") } -} +} # }
    @@ -186,16 +186,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Evaluate an expression with temporary eplusr options — with_option • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -115,11 +115,13 @@

    Evaluate an expression with temporary eplusr options

    Arguments

    -
    opts
    + + +
    opts

    A list of valid input for eplusr::eplusr_option().

    -
    expr
    +
    expr

    An expression to be evaluated.

    @@ -133,7 +135,7 @@

    Details

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
     
     # temporarily disable verbose messages
    @@ -143,7 +145,7 @@ 

    Examples

    without_checking(idf$'BuildingSurface:Detailed' <- NULL) # OR with_option(list(validate_level = "none"), idf$'BuildingSurface:Detailed' <- NULL) -} +} # }
    @@ -159,16 +161,16 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - + Evaluates an expression without checking — with_speed • eplusr - +
    @@ -31,7 +31,7 @@
    - +
    @@ -109,7 +109,9 @@

    Evaluates an expression without checking

    Arguments

    -
    expr
    + + +
    expr

    An expression to be evaluated.

    @@ -126,16 +128,16 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.0.

    - +