diff --git a/404.html b/404.html index feb5fbd5a..8b2f0116d 100644 --- a/404.html +++ b/404.html @@ -6,12 +6,6 @@
vignettes/eplusr.Rmd
+ Source: vignettes/eplusr.Rmd
eplusr.Rmd
avail_eplus()
-#> [1] '23.1.0'
-+#> [1] '23.1.0' + eplus_config("23.1") #> $version #> [1] '23.1.0' @@ -204,11 +195,11 @@
. After adding, all models of that version will use this path to call EnergyPlus. -Locate EnergyPlususe_eplus()
+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$group_name() #> [1] "Simulation Parameters" #> [2] "Location and Climate" @@ -542,16 +532,15 @@
Basic Info#> [4] "Surface Construction Elements" #> [5] "Thermal Zones and Surfaces" ....
+-model$class_name() #> [1] "Version" #> [2] "SimulationControl" #> [3] "Building" #> [4] "SurfaceConvectionAlgorithm:Inside" #> [5] "SurfaceConvectionAlgorithm:Outside" -....
-+.... + # categorize by group names model$class_name(by_group = TRUE) #> $`Simulation Parameters` @@ -563,11 +552,10 @@
Basic Info
+-model$is_valid_group("Schedules") -#> [1] TRUE
-model$is_valid_class("ZoneInfiltration:DesignFlowRate") +#> [1] TRUE +model$is_valid_class("ZoneInfiltration:DesignFlowRate") #> [1] TRUE
@@ -577,7 +565,7 @@Class definitionIddObject. All required fields in each class are marked with
*
. For example, you can get theIddObject
of classMaterial
: -+def_mat <- model$definition("Material") def_mat #> <IddObject: 'Material'> @@ -602,7 +590,7 @@
Class definition#> 9 : Visible Absorptance
You can also achieve this using methods in
-Idd
class.+idd <- use_idd("23.1") idd$Material @@ -622,7 +610,7 @@
orClass definition"autosize"
"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
+-model$Material_NoMass #> $CP01 #> <IdfObject: 'Material:NoMass'> [ID:53] `CP01` @@ -776,18 +764,17 @@
Get object#> │─ 5 : 0.65, !- Solar Absorptance #> └─ 6 : 0.65; !- Visible Absorptance #> -....
-# 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
andBuilding
, you can use$object_unique()
which returns a singleIdfObject
object.+-model$object_unique("Building") #> <IdfObject: 'Building'> [ID:3] `Building` #> Class: <Building> @@ -798,9 +785,8 @@
Get object#> │─ 5: 0.4, !- Temperature Convergence Tolerance Value {deltaC} #> │─ 6: "FullExterior", !- Solar Distribution #> │─ 7: 25, !- Maximum Number of Warmup Days -#> └─ 8: 6; !- Minimum Number of Warmup Days
-+#> └─ 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 anIdfObject
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.
-@@ -901,7 +885,7 @@+model$RunPeriod$WinterDay$Begin_Day_of_Month #> [1] 14
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()
inIdf
andIdfObject
:Note that you can also use
-.()
here as an alias oflist()
.+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
-.()
orc()
:+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 inIdfObject
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 classMaterial: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
toTRUE
.+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.
-- ++@@ -124,7 +116,7 @@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. -
- + @@ -20,8 +14,6 @@ - -+-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
@@ -168,17 +158,17 @@+- +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, uselevel_checks()
. -@@ -124,7 +116,7 @@+-eplusr_option("validate_level") -#> [1] "final"
- + @@ -20,8 +14,6 @@ - --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 usingcustom_validate()
function. -+@@ -499,17 +486,17 @@model$validate(custom_validate(reference = TRUE)) #> ✖ [1] Errors found during validation. #> ══════════════════════════════════════════════════════════════════════════════ @@ -1618,11 +1595,10 @@
s, we can extract invalid objects for different types directly usingCheck possible field errors (
data.table $validate()
. Below we extract all objects that have invalid reference errors. -- ++-(id <- model$validate()$invalid_reference$object_id) -#> [1] 68
@@ -124,7 +116,7 @@-model$objects(id) +#> [1] 68 +model$objects(id) #> $`CLNG-1` #> <IdfObject: 'Construction'> [ID:68] `CLNG-1` #> Class: <Construction> @@ -1632,7 +1608,7 @@
usingCheck possible field errors (
Outside Layer $value_possible()
method inIdfObject
class. -- + @@ -20,8 +14,6 @@ - -+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
toWD10
.@@ -1694,17 +1667,17 @@+model$object(id)$set(Outside_Layer = "WD10") #> <IdfObject: 'Construction'> [ID:68] `CLNG-1` #> Class: <Construction> @@ -1659,13 +1635,12 @@
toSave to an IDF file (
Idf$save()
overwriteTRUE
to confirm the process. -+-(model$save(tempfile(fileext = ".idf"))) -#> [1] "/tmp/Rtmp7WO3f9/file1d973639e252.idf"
+#> Replace the existing IDF located at /tmp/RtmpgMyDkL/file1ebd7a30658a.idf.-+#> [1] "/tmp/RtmpgMyDkL/file1ebd7a30658a.idf" + model$save(overwrite = TRUE) -#> Replace the existing IDF located at /tmp/Rtmp7WO3f9/file1d973639e252.idf.
Summary
-@@ -133,9 +125,9 @@@@ -444,9 +436,8 @@Work with weather files
Hongyuan Jia
-2024-05-25
+2024-07-16
- Source:vignettes/epw.Rmd
+ Source:vignettes/epw.Rmd
epw.Rmd
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
-+#> 8760: 2024-01-01 00:00:00 + epw$set(d, realyear = TRUE) #> ── Info ──────────────────────────────────────────────────────────────────────── #> Data period #1 has been replaced with input data. @@ -456,24 +447,22 @@
Modify weather data#> ────────────────────────────────────────────────────────────────────────────────
-
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 -#> ────────────────────────────────────────────────────────────────────────────────
+-+#> ──────────────────────────────────────────────────────────────────────────────── + epw$period() #> index name start_day_of_week start_day end_day #> <int> <char> <char> <EpwDate> <EpwDate> @@ -484,9 +473,7 @@
Modify weather data - -
Modify weather data -
Site built with pkgdown 2.0.9.
+Site built with pkgdown 2.1.0.
@@ -133,9 +125,9 @@@@ -153,9 +145,7 @@Frequently asked questions about eplusr
Hongyuan Jia
-2024-05-25
+2024-07-16
- Source:vignettes/faq.Rmd
+ Source:vignettes/faq.Rmd
faq.Rmd
How to contro
+How to contro
-@@ -133,9 +125,9 @@@@ -171,9 +163,8 @@Work with geometry
Hongyuan Jia
-2024-05-25
+2024-07-16
- Source:vignettes/geom.Rmd
+ Source:vignettes/geom.Rmd
geom.Rmd
Extract all geometry data#> 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.
-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 @@
to only calculate objects of interest. This is also true for theGet surface areaobject
$azimuth()
and$tilt()
methods. -+geom$area(class = "Shading:Zone:Detailed") #> id name #> <int> <char> @@ -269,7 +260,7 @@
Get surface area....
With
-net
beingTRUE
, the window and door areas will be excluded in the results of surfaces.+-geom$area()[type == "Wall"] #> id name class #> <int> <char> <char> @@ -291,9 +282,8 @@
Get surface area#> 3: Floor 1 Cafe <NA> Wall 76.18049 #> 4: Floor 1 Cafe <NA> Wall 76.18049 #> 5: Floor 1 Clean <NA> Wall 18.58061 -....
-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$azimuth() #> id name #> <int> <char> @@ -341,9 +331,8 @@
Get surface azimuth and tilt#> 3: BuildingSurface:Detailed Floor 1 Cafe <NA> Wall #> 4: BuildingSurface:Detailed Floor 1 Cafe <NA> Ceiling #> 5: BuildingSurface:Detailed Floor 1 Cafe <NA> Wall -....
-geom$tilt() +.... +geom$tilt() #> id name #> <int> <char> #> 1: 154 Floor 1 Cafe Slab @@ -380,7 +369,7 @@
Convert simple geometry
Shading:Building:Detailed
- Shading:Zone:Detailed
+-path_simple <- path_eplus_example("23.1", "4ZoneWithShading_Simple_1.idf") simple <- read_idf(path_simple) @@ -391,16 +380,14 @@
Convert simple geometry#> [7] "Ceiling:Interzone" "Floor:Adiabatic" "Floor:Interzone" #> [10] "Window" "Door" "Window:Interzone" #> [13] "Shading:Site" "Shading:Building" "Shading:Overhang" -#> [16] "Shading:Fin"
--+#> [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 convertedIdf
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 @@
in parent [Idf] accordingly. -Change coordinate systemsGlobalGeometryRules
+-geom$rules() #> $starting_vertex_position #> [1] "upperleftcorner" @@ -456,9 +443,8 @@
Change coordinate systems#> [1] "relative" #> #> $rectangular_surface_coordinate_system -#> [1] "relative"
--+#> [1] "relative" + geom$parent()$to_table("Floor 1 Cafe Slab") #> id name class index #> <int> <char> <char> <int> @@ -480,9 +466,8 @@
Change coordinate systems#> 16: 154 Floor 1 Cafe Slab BuildingSurface:Detailed 16 #> 17: 154 Floor 1 Cafe Slab BuildingSurface:Detailed 17 #> 18: 154 Floor 1 Cafe Slab BuildingSurface:Detailed 18 -....
--+.... + geom$coord_system("world") #> ── EnergPlus IDF Geometry ────────────────────────────────────────────────────── #> • Path: '/usr/local/EnergyPlus-23-1-0/ExampleFiles/HospitalLowEnergy.idf' @@ -497,9 +482,8 @@
Change coordinate systems#> • Coordinate System: #> - Detailed: 'World' #> - Simple: 'Relative' -#> - Daylighting: 'Relative'
-+#> - 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
-@@ -124,7 +116,7 @@+viewer$x_ray(TRUE)
-
+viewer$x_ray(FALSE)
- + - + @@ -20,8 +14,6 @@ - -Change render style
-+viewer$render_by("zone")
-
+viewer$render_by("surface_type")
- +Turn on/off components
-@@ -751,17 +733,17 @@+viewer$show(zone = "floor 7 clean")
-
+viewer$show(surface = "MOB Floor 5 Perimeter 2 Ext Wall")
-
@@ -708,7 +692,7 @@+viewer$show(type = "wall")
Save the snapshot
+viewer$show() viewer$snapshot("view.png")
@@ -736,9 +720,7 @@
Summary +
Summary
Articles • eplusr - +@@ -31,7 +31,7 @@ -@@ -133,9 +125,9 @@@@ -182,39 +174,37 @@Run simulation and data exploration
Hongyuan Jia
-2024-05-25
+2024-07-16
- Source:vignettes/job.Rmd
+ Source:vignettes/job.Rmd
job.Rmd
Run only design day simulation#> No expanded file generated. #> ExpandObjects Finished. Time: 0.020 #> EnergyPlus Starting -#> EnergyPlus, Version 23.1.0-87ed9199d4, YMD=2024.05.25 14:31 +#> EnergyPlus, Version 23.1.0-87ed9199d4, YMD=2024.07.16 02:52 #> Initializing Response Factors #> Calculating CTFs for "ROOF-1" #> Calculating CTFs for "WALL-1" #> Calculating CTFs for "FLOOR-SLAB-1" #> Calculating CTFs for "INT-WALL-1" -....
--+.... + class(job) -#> [1] "EplusJob" "R6"
+#> Simulation started at '2024-07-16 02:52:03.733822' and completed successfully after 0.66 secs.-+#> [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.
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 usingIdf$last_job()
method:++#> Simulation started at '2024-07-16 02:52:03.733822' and completed successfully after 0.66 secs.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.
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 theEplusJob$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 @@
Print simulation errors
You can get simulation errors using
-EplusJob$errors()
.+print(job$errors()) #> ══ EnergyPlus Error File ═══════════════════════════════════════════════════════ #> * EnergyPlus version: 23.1.0 (87ed9199d4) -#> * Simulation started: 2024-05-25 14:31:00 +#> * Simulation started: 2024-07-16 02:52:00 #> * Terminated: FALSE #> * Successful: TRUE #> * Warning[W]: 1 @@ -354,7 +342,7 @@
Get all possible output meta data
units
: The data units -+