openstudio-ee 0.12.3 → 0.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.coverage +0 -0
  3. data/.github/workflows/test-with-openstudio.yml +109 -74
  4. data/.gitignore +21 -0
  5. data/.rubocop.yml +15 -2
  6. data/CHANGELOG.md +6 -0
  7. data/Gemfile +7 -8
  8. data/README.md +3 -2
  9. data/WORKFLOW_CHANGES.md +74 -0
  10. data/lib/measures/AddDaylightSensors/measure.rb +79 -79
  11. data/lib/measures/AddDaylightSensors/measure.xml +4 -4
  12. data/lib/measures/AddOverhangsByProjectionFactor/measure.rb +38 -41
  13. data/lib/measures/AddOverhangsByProjectionFactor/measure.xml +4 -4
  14. data/lib/measures/EnableDemandControlledVentilation/measure.rb +37 -40
  15. data/lib/measures/EnableDemandControlledVentilation/measure.xml +4 -4
  16. data/lib/measures/EnableEconomizerControl/measure.rb +36 -37
  17. data/lib/measures/EnableEconomizerControl/measure.xml +4 -4
  18. data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.rb +27 -41
  19. data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.xml +4 -4
  20. data/lib/measures/GLHEProGFunctionImport/measure.rb +11 -15
  21. data/lib/measures/GLHEProGFunctionImport/measure.xml +4 -4
  22. data/lib/measures/GLHEProSetupExportLoadsforGroundHeatExchangerSizing/measure.rb +5 -9
  23. data/lib/measures/GLHEProSetupExportLoadsforGroundHeatExchangerSizing/measure.xml +3 -3
  24. data/lib/measures/ImproveFanBeltEfficiency/measure.rb +78 -95
  25. data/lib/measures/ImproveFanBeltEfficiency/measure.xml +6 -6
  26. data/lib/measures/ImproveMotorEfficiency/measure.rb +75 -100
  27. data/lib/measures/ImproveMotorEfficiency/measure.xml +6 -6
  28. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb +137 -130
  29. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml +4 -4
  30. data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.rb +114 -115
  31. data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.xml +3 -3
  32. data/lib/measures/IncreaseInsulationRValueForRoofs/measure.rb +137 -130
  33. data/lib/measures/IncreaseInsulationRValueForRoofs/measure.xml +4 -4
  34. data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.rb +114 -115
  35. data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.xml +3 -3
  36. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb +69 -63
  37. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml +6 -6
  38. data/lib/measures/ReduceLightingLoadsByPercentage/measure.rb +77 -66
  39. data/lib/measures/ReduceLightingLoadsByPercentage/measure.xml +6 -6
  40. data/lib/measures/ReduceNightTimeElectricEquipmentLoads/measure.rb +45 -43
  41. data/lib/measures/ReduceNightTimeElectricEquipmentLoads/measure.xml +4 -4
  42. data/lib/measures/ReduceNightTimeLightingLoads/measure.rb +45 -43
  43. data/lib/measures/ReduceNightTimeLightingLoads/measure.xml +4 -4
  44. data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb +58 -52
  45. data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +6 -6
  46. data/lib/measures/ReduceVentilationByPercentage/measure.rb +49 -46
  47. data/lib/measures/ReduceVentilationByPercentage/measure.xml +6 -6
  48. data/lib/measures/add_variable_speed_rtu_control_logic/measure.rb +31 -23
  49. data/lib/measures/add_variable_speed_rtu_control_logic/measure.xml +4 -4
  50. data/lib/measures/create_variable_speed_rtu/measure.rb +166 -174
  51. data/lib/measures/create_variable_speed_rtu/measure.xml +6 -6
  52. data/lib/measures/fan_assist_night_ventilation/measure.rb +33 -32
  53. data/lib/measures/fan_assist_night_ventilation/measure.xml +4 -4
  54. data/lib/measures/nze_hvac/measure.rb +72 -62
  55. data/lib/measures/nze_hvac/measure.xml +4 -4
  56. data/lib/measures/replace_water_heater_mixed_with_thermal_storage_chilled_water/measure.rb +16 -19
  57. data/lib/measures/replace_water_heater_mixed_with_thermal_storage_chilled_water/measure.xml +4 -4
  58. data/lib/measures/window_enhancement/LICENSE.md +14 -0
  59. data/lib/measures/window_enhancement/README.md +112 -0
  60. data/lib/measures/window_enhancement/docs/.gitkeep +0 -0
  61. data/lib/measures/window_enhancement/measure.py +386 -0
  62. data/lib/measures/window_enhancement/measure.xml +271 -0
  63. data/lib/measures/window_enhancement/resources/EC3_lookup.py +321 -0
  64. data/lib/measures/window_enhancement/resources/Test_API.py +32 -0
  65. data/lib/measures/window_enhancement/resources/__pycache__/EC3_lookup.cpython-39.pyc +0 -0
  66. data/lib/measures/window_enhancement/resources/__pycache__/Original_EC3_lookup.py +322 -0
  67. data/lib/measures/window_enhancement/resources/__pycache__/Test_API.cpython-39.pyc +0 -0
  68. data/lib/measures/window_enhancement/resources/calculate_perimeter.py +39 -0
  69. data/lib/measures/window_enhancement/test_output.log +39 -0
  70. data/lib/openstudio/ee_measures/version.rb +1 -1
  71. data/openstudio-ee.gemspec +10 -8
  72. data/test-workflow-locally.sh +152 -0
  73. metadata +64 -35
  74. data/Jenkinsfile +0 -11
@@ -9,18 +9,18 @@
9
9
  class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasure
10
10
  # define the name that a user will see
11
11
  def name
12
- return 'Reduce Electric Equipment Loads by Percentage'
12
+ 'Reduce Electric Equipment Loads by Percentage'
13
13
  end
14
14
 
15
15
  # human readable description
16
16
  def description
17
- return 'Reduce Electric Equipment Loads by Percentage</display_name>
17
+ 'Reduce Electric Equipment Loads by Percentage</display_name>
18
18
  <description>Reduce electric equipment loads. This will affect equipment that have a, power, power per area (LPD), or power per person value. This can be applied to the entire building or a specific space type. A positive percentage represents an increase electric equipment power, while a negative percentage can be used for an increase in electric equipment power.'
19
19
  end
20
20
 
21
21
  # human readable description of modeling approach
22
22
  def modeler_description
23
- return 'Loop through all electric equipment objects in the specified space type or the entire building. Clone the definition if it has not already been cloned, rename and adjust the power based on the specified percentage. Link the new definition to the existing electric equipment instance. Loop through objects first in space types and then in spaces, but only for spaces that are in the specified space type, unless entire building has been chosen.'
23
+ 'Loop through all electric equipment objects in the specified space type or the entire building. Clone the definition if it has not already been cloned, rename and adjust the power based on the specified percentage. Link the new definition to the existing electric equipment instance. Loop through objects first in space types and then in spaces, but only for spaces that are in the specified space type, unless entire building has been chosen.'
24
24
  end
25
25
 
26
26
  # define the arguments that the user will input
@@ -41,7 +41,7 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
41
41
  # looping through sorted hash of model objects
42
42
  space_type_args_hash.sort.map do |key, value|
43
43
  # only include if space type is used in the model
44
- if !value.spaces.empty?
44
+ unless value.spaces.empty?
45
45
  space_type_handles << value.handle.to_s
46
46
  space_type_display_names << key
47
47
  end
@@ -53,20 +53,25 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
53
53
  space_type_display_names << '*Entire Building*'
54
54
 
55
55
  # make a choice argument for space type
56
- space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles, space_type_display_names)
56
+ space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles,
57
+ space_type_display_names)
57
58
  space_type.setDisplayName('Apply the Measure to a Specific Space Type or to the Entire Model')
58
59
  space_type.setDefaultValue('*Entire Building*') # if no space type is chosen this will run on the entire building
59
60
  args << space_type
60
61
 
61
62
  # make an argument for reduction percentage
62
- elecequip_power_reduction_percent = OpenStudio::Measure::OSArgument.makeDoubleArgument('elecequip_power_reduction_percent', true)
63
+ elecequip_power_reduction_percent = OpenStudio::Measure::OSArgument.makeDoubleArgument(
64
+ 'elecequip_power_reduction_percent', true
65
+ )
63
66
  elecequip_power_reduction_percent.setDisplayName('Electric Equipment Power Reduction')
64
67
  elecequip_power_reduction_percent.setDefaultValue(30.0)
65
68
  elecequip_power_reduction_percent.setUnits('%')
66
69
  args << elecequip_power_reduction_percent
67
70
 
68
71
  # make an argument for material and installation cost
69
- material_and_installation_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('material_and_installation_cost', true)
72
+ material_and_installation_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument(
73
+ 'material_and_installation_cost', true
74
+ )
70
75
  material_and_installation_cost.setDisplayName('Increase in Material and Installation Cost for Electric Equipment per Floor Area')
71
76
  material_and_installation_cost.setDefaultValue(0.0)
72
77
  material_and_installation_cost.setUnits('%')
@@ -113,7 +118,7 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
113
118
  om_frequency.setUnits('whole years')
114
119
  args << om_frequency
115
120
 
116
- return args
121
+ args
117
122
  end
118
123
 
119
124
  # define what happens when the measure is run
@@ -121,13 +126,12 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
121
126
  super(model, runner, user_arguments)
122
127
 
123
128
  # use the built-in error checking
124
- if !runner.validateUserArguments(arguments(model), user_arguments)
125
- return false
126
- end
129
+ return false unless runner.validateUserArguments(arguments(model), user_arguments)
127
130
 
128
131
  # assign the user inputs to variables
129
132
  object = runner.getOptionalWorkspaceObjectChoiceValue('space_type', user_arguments, model)
130
- elecequip_power_reduction_percent = runner.getDoubleArgumentValue('elecequip_power_reduction_percent', user_arguments)
133
+ elecequip_power_reduction_percent = runner.getDoubleArgumentValue('elecequip_power_reduction_percent',
134
+ user_arguments)
131
135
  material_and_installation_cost = runner.getDoubleArgumentValue('material_and_installation_cost', user_arguments)
132
136
  demolition_cost = runner.getDoubleArgumentValue('demolition_cost', user_arguments)
133
137
  years_until_costs_start = runner.getIntegerArgumentValue('years_until_costs_start', user_arguments)
@@ -147,15 +151,13 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
147
151
  runner.registerError("The selected space type with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
148
152
  end
149
153
  return false
154
+ elsif !object.get.to_SpaceType.empty?
155
+ space_type = object.get.to_SpaceType.get
156
+ elsif !object.get.to_Building.empty?
157
+ apply_to_building = true
150
158
  else
151
- if !object.get.to_SpaceType.empty?
152
- space_type = object.get.to_SpaceType.get
153
- elsif !object.get.to_Building.empty?
154
- apply_to_building = true
155
- else
156
- runner.registerError('Script Error - argument not showing up as space type or building.')
157
- return false
158
- end
159
+ runner.registerError('Script Error - argument not showing up as space type or building.')
160
+ return false
159
161
  end
160
162
 
161
163
  # check the elecequip_power_reduction_percent and for reasonableness
@@ -198,24 +200,25 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
198
200
  return false
199
201
  end
200
202
 
201
- if om_frequency < 1
202
- runner.registerError('Choose an integer greater than 0 for O & M Frequency.')
203
- end
203
+ runner.registerError('Choose an integer greater than 0 for O & M Frequency.') if om_frequency < 1
204
204
 
205
205
  # helper to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure.
206
206
  def neat_numbers(number, roundto = 2) # round to 0 or 2)
207
- if roundto == 2
208
- number = format '%.2f', number
209
- else
210
- number = number.round
211
- end
207
+ number = if roundto == 2
208
+ format '%.2f', number
209
+ else
210
+ number.round
211
+ end
212
212
  # regex to add commas
213
213
  number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
214
214
  end
215
215
 
216
216
  # helper to make it easier to do unit conversions on the fly. The definition be called through this measure.
217
217
  def unit_helper(number, from_unit_string, to_unit_string)
218
- converted_number = OpenStudio.convert(OpenStudio::Quantity.new(number, OpenStudio.createUnit(from_unit_string).get), OpenStudio.createUnit(to_unit_string).get).get.value
218
+ converted_number = OpenStudio.convert(
219
+ OpenStudio::Quantity.new(number,
220
+ OpenStudio.createUnit(from_unit_string).get), OpenStudio.createUnit(to_unit_string).get
221
+ ).get.value
219
222
  end
220
223
 
221
224
  # helper that loops through lifecycle costs getting total costs under "Construction" or "Salvage" category and add to counter if occurs during year 0
@@ -224,14 +227,12 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
224
227
  objects.each do |object|
225
228
  object_LCCs = object.lifeCycleCosts
226
229
  object_LCCs.each do |object_LCC|
227
- if (object_LCC.category == 'Construction') || (object_LCC.category == 'Salvage')
228
- if object_LCC.yearsFromStart == 0
229
- counter += object_LCC.totalCost
230
- end
231
- end
230
+ next unless (object_LCC.category == 'Construction') || (object_LCC.category == 'Salvage')
231
+
232
+ counter += object_LCC.totalCost if object_LCC.yearsFromStart == 0
232
233
  end
233
234
  end
234
- return counter
235
+ counter
235
236
  end
236
237
 
237
238
  # counter for demo cost of baseline objects
@@ -247,7 +248,9 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
247
248
  building = model.getBuilding
248
249
  building_equip_power = building.electricEquipmentPower
249
250
  building_EPD = unit_helper(building.electricEquipmentPowerPerFloorArea, 'W/m^2', 'W/ft^2')
250
- runner.registerInitialCondition("The model's initial building electric equipment power was #{neat_numbers(building_equip_power, 0)} watts, an electric equipment power density of #{neat_numbers(building_EPD)} w/ft^2.")
251
+ runner.registerInitialCondition("The model's initial building electric equipment power was #{neat_numbers(
252
+ building_equip_power, 0
253
+ )} watts, an electric equipment power density of #{neat_numbers(building_EPD)} w/ft^2.")
251
254
 
252
255
  # get space types in model
253
256
  if apply_to_building
@@ -264,24 +267,23 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
264
267
  if demo_cost_initial_const == true
265
268
  baseline_object_LCCs = baseline_object.lifeCycleCosts
266
269
  baseline_object_LCCs.each do |baseline_object_LCC|
267
- if baseline_object_LCC.category == 'Salvage'
268
- counter += baseline_object_LCC.totalCost
269
- end
270
+ counter += baseline_object_LCC.totalCost if baseline_object_LCC.category == 'Salvage'
270
271
  end
271
272
  end
272
- return counter
273
+ counter
273
274
  end
274
275
 
275
276
  # def to alter performance and life cycle costs of objects
276
- def alter_performance_and_lcc(object, elecequip_power_reduction_percent, material_and_installation_cost, demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
277
+ def alter_performance_and_lcc(object, elecequip_power_reduction_percent, material_and_installation_cost,
278
+ demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
277
279
  # edit clone based on percentage reduction
278
280
  new_def = object
279
281
  if !new_def.designLevel.empty?
280
- new_electric_equipment_level = new_def.setDesignLevel(new_def.designLevel.get - new_def.designLevel.get * elecequip_power_reduction_percent * 0.01)
282
+ new_electric_equipment_level = new_def.setDesignLevel(new_def.designLevel.get - (new_def.designLevel.get * elecequip_power_reduction_percent * 0.01))
281
283
  elsif !new_def.wattsperSpaceFloorArea.empty?
282
- new_electric_equipment_per_area = new_def.setWattsperSpaceFloorArea(new_def.wattsperSpaceFloorArea.get - new_def.wattsperSpaceFloorArea.get * elecequip_power_reduction_percent * 0.01)
284
+ new_electric_equipment_per_area = new_def.setWattsperSpaceFloorArea(new_def.wattsperSpaceFloorArea.get - (new_def.wattsperSpaceFloorArea.get * elecequip_power_reduction_percent * 0.01))
283
285
  elsif !new_def.wattsperPerson.empty?
284
- new_electric_equipment_per_person = new_def.setWattsperPerson(new_def.wattsperPerson.get - new_def.wattsperPerson.get * elecequip_power_reduction_percent * 0.01)
286
+ new_electric_equipment_per_person = new_def.setWattsperPerson(new_def.wattsperPerson.get - (new_def.wattsperPerson.get * elecequip_power_reduction_percent * 0.01))
285
287
  else
286
288
  runner.registerWarning("'#{new_def.name}' is used by one or more instances and has no load values. Its performance was not altered.")
287
289
  end
@@ -294,15 +296,15 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
294
296
  else
295
297
  new_def_LCCs.each do |new_def_LCC|
296
298
  if new_def_LCC.category == 'Construction'
297
- new_def_LCC.setCost(new_def_LCC.cost * (1 + material_and_installation_cost / 100))
299
+ new_def_LCC.setCost(new_def_LCC.cost * (1 + (material_and_installation_cost / 100)))
298
300
  new_def_LCC.setYearsFromStart(years_until_costs_start) # just uses argument value, does not need existing value
299
301
  new_def_LCC.setRepeatPeriodYears(expected_life) # just uses argument value, does not need existing value
300
302
  elsif new_def_LCC.category == 'Salvage'
301
- new_def_LCC.setCost(new_def_LCC.cost * (1 + demolition_cost / 100))
303
+ new_def_LCC.setCost(new_def_LCC.cost * (1 + (demolition_cost / 100)))
302
304
  new_def_LCC.setYearsFromStart(years_until_costs_start + expected_life) # just uses argument value, does not need existing value
303
305
  new_def_LCC.setRepeatPeriodYears(expected_life) # just uses argument value, does not need existing value
304
306
  elsif new_def_LCC.category == 'Maintenance'
305
- new_def_LCC.setCost(new_def_LCC.cost * (1 + om_cost / 100))
307
+ new_def_LCC.setCost(new_def_LCC.cost * (1 + (om_cost / 100)))
306
308
  new_def_LCC.setRepeatPeriodYears(om_frequency) # just uses argument value, does not need existing value
307
309
  end
308
310
 
@@ -320,15 +322,14 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
320
322
  # loop through space types
321
323
  space_types.each do |space_type|
322
324
  next if space_type.spaces.size <= 0
325
+
323
326
  space_type_equipments = space_type.electricEquipment
324
327
  space_type_equipments.each do |space_type_equipment|
325
328
  new_def = nil
326
329
 
327
330
  # clone def if it has not already been cloned
328
331
  exist_def = space_type_equipment.electricEquipmentDefinition
329
- if !cloned_elecequip_defs[exist_def.name.get.to_s].nil?
330
- new_def = cloned_elecequip_defs[exist_def.name.get.to_s]
331
- else
332
+ if cloned_elecequip_defs[exist_def.name.get.to_s].nil?
332
333
  # clone rename and add to hash
333
334
  new_def = exist_def.clone(model)
334
335
  new_def_name = new_def.setName("#{exist_def.name.get} - #{elecequip_power_reduction_percent} percent reduction")
@@ -339,8 +340,11 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
339
340
  demo_costs_of_baseline_objects += add_to_baseline_demo_cost_counter(exist_def, demo_cost_initial_const)
340
341
 
341
342
  # call def to alter performance and life cycle costs
342
- alter_performance_and_lcc(new_def, elecequip_power_reduction_percent, material_and_installation_cost, demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
343
+ alter_performance_and_lcc(new_def, elecequip_power_reduction_percent, material_and_installation_cost,
344
+ demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
343
345
 
346
+ else
347
+ new_def = cloned_elecequip_defs[exist_def.name.get.to_s]
344
348
  end
345
349
 
346
350
  # link instance with clone and rename
@@ -355,10 +359,8 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
355
359
  # get space types in model
356
360
  if apply_to_building
357
361
  spaces = model.getSpaces
358
- else
359
- if !space_type.spaces.empty?
360
- spaces = space_type.spaces # only run on a single space type
361
- end
362
+ elsif !space_type.spaces.empty?
363
+ spaces = space_type.spaces
362
364
  end
363
365
 
364
366
  spaces.each do |space|
@@ -366,7 +368,7 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
366
368
  space_equipments.each do |space_equipment|
367
369
  # clone def if it has not already been cloned
368
370
  exist_def = space_equipment.electricEquipmentDefinition
369
- if cloned_elecequip_defs.any? { |k, v| k.to_s == exist_def.name.get.to_s }
371
+ if cloned_elecequip_defs.any? { |k, _v| k.to_s == exist_def.name.get.to_s }
370
372
  new_def = cloned_elecequip_defs[exist_def.name.get.to_s]
371
373
  else
372
374
  # clone rename and add to hash
@@ -379,7 +381,8 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
379
381
  demo_costs_of_baseline_objects += add_to_baseline_demo_cost_counter(exist_def, demo_cost_initial_const)
380
382
 
381
383
  # call def to alter performance and life cycle costs
382
- alter_performance_and_lcc(new_def, elecequip_power_reduction_percent, material_and_installation_cost, demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
384
+ alter_performance_and_lcc(new_def, elecequip_power_reduction_percent, material_and_installation_cost,
385
+ demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
383
386
 
384
387
  end
385
388
 
@@ -400,21 +403,24 @@ class ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasu
400
403
  if demo_cost_initial_const == true
401
404
  building = model.getBuilding
402
405
  lcc_baseline_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost('LCC_baseline_demo', building, demo_costs_of_baseline_objects, 'CostPerEach', 'Salvage', 0, years_until_costs_start).get # using 0 for repeat period since one time cost.
403
- runner.registerInfo("Adding one time cost of $#{neat_numbers(lcc_baseline_demo.totalCost, 0)} related to demolition of baseline objects.")
406
+ runner.registerInfo("Adding one time cost of $#{neat_numbers(lcc_baseline_demo.totalCost,
407
+ 0)} related to demolition of baseline objects.")
404
408
 
405
409
  # if demo occurs on year 0 then add to initial capital cost counter
406
- if lcc_baseline_demo.yearsFromStart == 0
407
- yr0_capital_totalCosts += lcc_baseline_demo.totalCost
408
- end
410
+ yr0_capital_totalCosts += lcc_baseline_demo.totalCost if lcc_baseline_demo.yearsFromStart == 0
409
411
  end
410
412
 
411
413
  # report final condition
412
414
  final_building = model.getBuilding
413
415
  final_building_equip_power = final_building.electricEquipmentPower
414
416
  final_building_EPD = unit_helper(final_building.electricEquipmentPowerPerFloorArea, 'W/m^2', 'W/ft^2')
415
- runner.registerFinalCondition("The model's final building electric equipment power was #{neat_numbers(final_building_equip_power, 0)} watts, an electric equipment power density of #{neat_numbers(final_building_EPD)} w/ft^2. Initial capital costs associated with the improvements are $#{neat_numbers(yr0_capital_totalCosts, 0)}.")
417
+ runner.registerFinalCondition("The model's final building electric equipment power was #{neat_numbers(
418
+ final_building_equip_power, 0
419
+ )} watts, an electric equipment power density of #{neat_numbers(final_building_EPD)} w/ft^2. Initial capital costs associated with the improvements are $#{neat_numbers(
420
+ yr0_capital_totalCosts, 0
421
+ )}.")
416
422
 
417
- return true
423
+ true
418
424
  end
419
425
  end
420
426
 
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.1</schema_version>
4
4
  <name>reduce_electric_equipment_loads_by_percentage</name>
5
5
  <uid>0902e302-70db-4339-99b0-17f08bc93629</uid>
6
- <version_id>c72c2e8b-0369-450a-997b-d2c88cd30b12</version_id>
7
- <version_modified>2025-08-08T15:15:57Z</version_modified>
6
+ <version_id>8784867d-d76a-45cd-b157-dd3ae319cc8d</version_id>
7
+ <version_modified>2025-09-25T15:33:44Z</version_modified>
8
8
  <xml_checksum>F9A5B8F0</xml_checksum>
9
9
  <class_name>ReduceElectricEquipmentLoadsByPercentage</class_name>
10
10
  <display_name>Reduce Electric Equipment Loads by Percentage</display_name>
@@ -18,10 +18,10 @@
18
18
  <type>Choice</type>
19
19
  <required>true</required>
20
20
  <model_dependent>false</model_dependent>
21
- <default_value>{9682dfac-3155-425a-b346-a52d517347ca}</default_value>
21
+ <default_value>{dac39ef0-d1a3-4bb2-b9ee-ebbdc6652e53}</default_value>
22
22
  <choices>
23
23
  <choice>
24
- <value>{9682dfac-3155-425a-b346-a52d517347ca}</value>
24
+ <value>{dac39ef0-d1a3-4bb2-b9ee-ebbdc6652e53}</value>
25
25
  <display_name>*Entire Building*</display_name>
26
26
  </choice>
27
27
  </choices>
@@ -163,7 +163,7 @@
163
163
  <filename>measure.rb</filename>
164
164
  <filetype>rb</filetype>
165
165
  <usage_type>script</usage_type>
166
- <checksum>2052422C</checksum>
166
+ <checksum>59BF0D78</checksum>
167
167
  </file>
168
168
  <file>
169
169
  <filename>EnvelopeAndLoadTestModel_01.osm</filename>
@@ -181,7 +181,7 @@
181
181
  <filename>ReduceElectricEquipmentLoadsByPercentage_Test.rb</filename>
182
182
  <filetype>rb</filetype>
183
183
  <usage_type>test</usage_type>
184
- <checksum>807BDF94</checksum>
184
+ <checksum>854E8902</checksum>
185
185
  </file>
186
186
  </files>
187
187
  </measure>