Skip to content

Commit 5e5b1fb

Browse files
authored
Merge pull request #1855 from NREL/more_ruby_doc
Some more ruby documentation
2 parents 5b28c43 + 0dbfaa0 commit 5e5b1fb

File tree

7 files changed

+241
-243
lines changed

7 files changed

+241
-243
lines changed

HPXMLtoOpenStudio/measure.xml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>hpxm_lto_openstudio</name>
55
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
6-
<version_id>c80e402f-4c82-4eae-9336-698bde0e09c3</version_id>
7-
<version_modified>2024-10-11T18:59:49Z</version_modified>
6+
<version_id>72c688f5-e64c-48f3-b1e4-062d4e53586c</version_id>
7+
<version_modified>2024-10-11T22:49:23Z</version_modified>
88
<xml_checksum>D8922A73</xml_checksum>
99
<class_name>HPXMLtoOpenStudio</class_name>
1010
<display_name>HPXML to OpenStudio Translator</display_name>
@@ -357,7 +357,7 @@
357357
<filename>hpxml.rb</filename>
358358
<filetype>rb</filetype>
359359
<usage_type>resource</usage_type>
360-
<checksum>AF9C179B</checksum>
360+
<checksum>10F59ACC</checksum>
361361
</file>
362362
<file>
363363
<filename>hpxml_schema/HPXML.xsd</filename>
@@ -387,7 +387,7 @@
387387
<filename>hvac.rb</filename>
388388
<filetype>rb</filetype>
389389
<usage_type>resource</usage_type>
390-
<checksum>CEDAF4B3</checksum>
390+
<checksum>96EEE054</checksum>
391391
</file>
392392
<file>
393393
<filename>hvac_sizing.rb</filename>
@@ -405,7 +405,7 @@
405405
<filename>lighting.rb</filename>
406406
<filetype>rb</filetype>
407407
<usage_type>resource</usage_type>
408-
<checksum>E8D2508C</checksum>
408+
<checksum>9B17C563</checksum>
409409
</file>
410410
<file>
411411
<filename>location.rb</filename>
@@ -441,7 +441,7 @@
441441
<filename>misc_loads.rb</filename>
442442
<filetype>rb</filetype>
443443
<usage_type>resource</usage_type>
444-
<checksum>ABD35A7F</checksum>
444+
<checksum>2DCA8614</checksum>
445445
</file>
446446
<file>
447447
<filename>model.rb</filename>
@@ -639,20 +639,14 @@
639639
<filename>xmlhelper.rb</filename>
640640
<filetype>rb</filetype>
641641
<usage_type>resource</usage_type>
642-
<checksum>D1BB113E</checksum>
642+
<checksum>DA4456A1</checksum>
643643
</file>
644644
<file>
645645
<filename>xmlvalidator.rb</filename>
646646
<filetype>rb</filetype>
647647
<usage_type>resource</usage_type>
648648
<checksum>93120E27</checksum>
649649
</file>
650-
<file>
651-
<filename>in.schedules.csv</filename>
652-
<filetype>csv</filetype>
653-
<usage_type>test</usage_type>
654-
<checksum>C8EBFF38</checksum>
655-
</file>
656650
<file>
657651
<filename>test_airflow.rb</filename>
658652
<filetype>rb</filetype>

HPXMLtoOpenStudio/resources/hpxml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11184,7 +11184,7 @@ def from_doc(performance_data_point)
1118411184
#
1118511185
# @return [Oga::XML::Document] The HPXML document
1118611186
def _create_hpxml_document
11187-
doc = XMLHelper.create_doc('1.0', 'UTF-8')
11187+
doc = XMLHelper.create_doc()
1118811188
hpxml = XMLHelper.add_element(doc, 'HPXML')
1118911189
XMLHelper.add_attribute(hpxml, 'xmlns', NameSpace)
1119011190
XMLHelper.add_attribute(hpxml, 'schemaVersion', Version::HPXML_Version)

HPXMLtoOpenStudio/resources/hvac.rb

Lines changed: 92 additions & 88 deletions
Large diffs are not rendered by default.

HPXMLtoOpenStudio/resources/lighting.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,14 @@ def self.apply(runner, model, spaces, hpxml_bldg, hpxml_header, schedules_file)
205205
end
206206
end
207207

208-
# TODO
208+
# Calculates the annual interior lighting energy use based on the conditioned floor area and types of lamps.
209209
#
210210
# @param eri_version [String] Version of the ANSI/RESNET/ICC 301 Standard to use for equations/assumptions
211211
# @param cfa [Double] Conditioned floor area in the dwelling unit (ft2)
212-
# @param f_int_cfl [TODO] TODO
213-
# @param f_int_lfl [TODO] TODO
214-
# @param f_int_led [TODO] TODO
215-
# @return [TODO] TODO
212+
# @param f_int_cfl [Double] Fraction of interior lighting that is compact fluorescent (CFL)
213+
# @param f_int_lfl [Double] Fraction of interior lighting that is linear fluorescent (LFL)
214+
# @param f_int_led [Double] Fraction of interior lighting that is light-emitting diode (LED)
215+
# @return [Double or nil] Annual interior lighting energy use (kWh/yr)
216216
def self.calc_interior_energy(eri_version, cfa, f_int_cfl, f_int_lfl, f_int_led)
217217
return if f_int_cfl.nil? || f_int_lfl.nil? || f_int_led.nil?
218218

@@ -249,14 +249,14 @@ def self.calc_interior_energy(eri_version, cfa, f_int_cfl, f_int_lfl, f_int_led)
249249
return int_kwh
250250
end
251251

252-
# TODO
252+
# Calculates the annual exterior lighting energy use based on the conditioned floor area and types of lamps.
253253
#
254254
# @param eri_version [String] Version of the ANSI/RESNET/ICC 301 Standard to use for equations/assumptions
255255
# @param cfa [Double] Conditioned floor area in the dwelling unit (ft2)
256-
# @param f_ext_cfl [TODO] TODO
257-
# @param f_ext_lfl [TODO] TODO
258-
# @param f_ext_led [TODO] TODO
259-
# @return [TODO] TODO
256+
# @param f_ext_cfl [Double] Fraction of exterior lighting that is compact fluorescent (CFL)
257+
# @param f_ext_lfl [Double] Fraction of exterior lighting that is linear fluorescent (LFL)
258+
# @param f_ext_led [Double] Fraction of exterior lighting that is light-emitting diode (LED)
259+
# @return [Double or nil] Annual exterior lighting energy use (kWh/yr)
260260
def self.calc_exterior_energy(eri_version, cfa, f_ext_cfl, f_ext_lfl, f_ext_led)
261261
return if f_ext_cfl.nil? || f_ext_lfl.nil? || f_ext_led.nil?
262262

@@ -293,14 +293,14 @@ def self.calc_exterior_energy(eri_version, cfa, f_ext_cfl, f_ext_lfl, f_ext_led)
293293
return ext_kwh
294294
end
295295

296-
# TODO
296+
# Calculates the annual garage lighting energy use based on the garage area and types of lamps.
297297
#
298298
# @param eri_version [String] Version of the ANSI/RESNET/ICC 301 Standard to use for equations/assumptions
299-
# @param gfa [TODO] TODO
300-
# @param f_grg_cfl [TODO] TODO
301-
# @param f_grg_lfl [TODO] TODO
302-
# @param f_grg_led [TODO] TODO
303-
# @return [TODO] TODO
299+
# @param gfa [Double] Garage floor area (ft2)
300+
# @param f_grg_cfl [Double] Fraction of garage lighting that is compact fluorescent (CFL)
301+
# @param f_grg_lfl [Double] Fraction of garage lighting that is linear fluorescent (LFL)
302+
# @param f_grg_led [Double] Fraction of garage lighting that is light-emitting diode (LED)
303+
# @return [Double or nil] Annual garage lighting energy use (kWh/yr)
304304
def self.calc_garage_energy(eri_version, gfa, f_grg_cfl, f_grg_lfl, f_grg_led)
305305
return if f_grg_cfl.nil? || f_grg_lfl.nil? || f_grg_led.nil?
306306

HPXMLtoOpenStudio/resources/misc_loads.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def self.apply_plug_loads(runner, model, spaces, hpxml_bldg, hpxml_header, sched
3636
#
3737
# @param runner [OpenStudio::Measure::OSRunner] Object typically used to display warnings
3838
# @param model [OpenStudio::Model::Model] OpenStudio Model object
39-
# @param plug_load [TODO] TODO
39+
# @param plug_load [HPXML::PlugLoad] The HPXML plug load of interest
4040
# @param obj_name [String] Name for the OpenStudio object
4141
# @param spaces [Hash] Map of HPXML locations => OpenStudio Space objects
4242
# @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files
4343
# @param unavailable_periods [HPXML::UnavailablePeriods] Object that defines periods for, e.g., power outages or vacancies
44-
# @param apply_ashrae140_assumptions [TODO] TODO
44+
# @param apply_ashrae140_assumptions [Boolean] True if an ASHRAE 140 test case where we want to override our normal assumptions
4545
# @return [nil]
4646
def self.apply_plug_load(runner, model, plug_load, obj_name, spaces, schedules_file, unavailable_periods, apply_ashrae140_assumptions)
4747
kwh = 0
@@ -132,7 +132,7 @@ def self.apply_fuel_loads(runner, model, spaces, hpxml_bldg, hpxml_header, sched
132132
#
133133
# @param runner [OpenStudio::Measure::OSRunner] Object typically used to display warnings
134134
# @param model [OpenStudio::Model::Model] OpenStudio Model object
135-
# @param fuel_load [TODO] TODO
135+
# @param fuel_load [HPXML::FuelLoad] The HPXML fuel load of interest
136136
# @param obj_name [String] Name for the OpenStudio object
137137
# @param spaces [Hash] Map of HPXML locations => OpenStudio Space objects
138138
# @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files
@@ -213,7 +213,7 @@ def self.apply_pools_and_permanent_spas(runner, model, spaces, hpxml_bldg, hpxml
213213
#
214214
# @param runner [OpenStudio::Measure::OSRunner] Object typically used to display warnings
215215
# @param model [OpenStudio::Model::Model] OpenStudio Model object
216-
# @param pool_or_spa [TODO] TODO
216+
# @param pool_or_spa [HPXML::Pool or HPXML::PermanentSpa] The HPXML pool or permanent space of interest
217217
# @param spaces [Hash] Map of HPXML locations => OpenStudio Space objects
218218
# @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files
219219
# @param unavailable_periods [HPXML::UnavailablePeriods] Object that defines periods for, e.g., power outages or vacancies
@@ -303,7 +303,7 @@ def self.apply_pool_or_permanent_spa_heater(runner, model, pool_or_spa, spaces,
303303
#
304304
# @param runner [OpenStudio::Measure::OSRunner] Object typically used to display warnings
305305
# @param model [OpenStudio::Model::Model] OpenStudio Model object
306-
# @param pool_or_spa [TODO] TODO
306+
# @param pool_or_spa [HPXML::Pool or HPXML::PermanentSpa] The HPXML pool or permanent space of interest
307307
# @param spaces [Hash] Map of HPXML locations => OpenStudio Space objects
308308
# @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files
309309
# @param unavailable_periods [HPXML::UnavailablePeriods] Object that defines periods for, e.g., power outages or vacancies

0 commit comments

Comments
 (0)