openstudio-standards 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards.xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards_climate_zone_sets.json +96 -0
  4. data/data/standards/OpenStudio_Standards_climate_zones.json +96 -0
  5. data/data/standards/OpenStudio_Standards_construction_properties.json +11424 -0
  6. data/data/standards/OpenStudio_Standards_construction_sets.json +1746 -24
  7. data/data/standards/OpenStudio_Standards_constructions.json +409 -0
  8. data/data/standards/OpenStudio_Standards_curve_biquadratics.json +160 -0
  9. data/data/standards/OpenStudio_Standards_curve_quadratics.json +165 -0
  10. data/data/standards/OpenStudio_Standards_entryways.json +191 -0
  11. data/data/standards/OpenStudio_Standards_exterior_lighting.json +964 -0
  12. data/data/standards/OpenStudio_Standards_exterior_lighting_assumptions.json +191 -0
  13. data/data/standards/OpenStudio_Standards_ground_temperatures.json +11424 -0
  14. data/data/standards/OpenStudio_Standards_illuminated_parking_area.json +157 -0
  15. data/data/standards/OpenStudio_Standards_materials.json +2539 -745
  16. data/data/standards/OpenStudio_Standards_motors.json +420 -0
  17. data/data/standards/OpenStudio_Standards_parking.json +157 -0
  18. data/data/standards/OpenStudio_Standards_prototype_inputs.json +4410 -10
  19. data/data/standards/OpenStudio_Standards_schedules.json +13756 -8383
  20. data/data/standards/OpenStudio_Standards_space_types.json +8593 -907
  21. data/data/standards/OpenStudio_Standards_standards.json +9 -0
  22. data/data/standards/OpenStudio_Standards_templates.json +24 -0
  23. data/data/standards/OpenStudio_Standards_unitary_acs.json +924 -0
  24. data/data/standards/manage_OpenStudio_Standards.rb +1 -1
  25. data/lib/openstudio-standards/btap/btap.rb +0 -1
  26. data/lib/openstudio-standards/btap/compliance.rb +2 -5
  27. data/lib/openstudio-standards/btap/economics.rb +16 -16
  28. data/lib/openstudio-standards/btap/envelope.rb +1 -1
  29. data/lib/openstudio-standards/btap/equest.rb +7 -7
  30. data/lib/openstudio-standards/btap/fileio.rb +2 -2
  31. data/lib/openstudio-standards/btap/geometry.rb +1 -1
  32. data/lib/openstudio-standards/btap/measures.rb +16 -16
  33. data/lib/openstudio-standards/btap/mpc.rb +18 -18
  34. data/lib/openstudio-standards/btap/schedules.rb +35 -2
  35. data/lib/openstudio-standards/btap/simmanager.rb +1 -1
  36. data/lib/openstudio-standards/btap/spaceloads.rb +1 -1
  37. data/lib/openstudio-standards/btap/vintagizer.rb +1 -1
  38. data/lib/openstudio-standards/prototypes/Prototype.Model.elevators.rb +218 -0
  39. data/lib/openstudio-standards/prototypes/Prototype.Model.exterior_lights.rb +399 -0
  40. data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +2 -2
  41. data/lib/openstudio-standards/prototypes/Prototype.Model.rb +237 -0
  42. data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +536 -0
  43. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +6 -0
  44. data/lib/openstudio-standards/standards/Standards.Model.rb +249 -10
  45. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +5 -5
  46. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +161 -0
  47. data/lib/openstudio-standards/utilities/simulation.rb +6 -4
  48. data/lib/openstudio-standards/version.rb +1 -1
  49. metadata +223 -204
  50. data/lib/openstudio-standards/btap/os_lib_schedules.rb +0 -677
@@ -195,7 +195,7 @@ def export_spreadsheet_to_json
195
195
  # cols_to_skip << 'service_water_heating_fraction_sensible'
196
196
  # cols_to_skip << 'service_water_heating_fraction_latent'
197
197
  # cols_to_skip << 'service_water_heating_schedule'
198
- cols_to_skip << 'exhaust_per_area'
198
+ # cols_to_skip << 'exhaust_per_area'
199
199
  cols_to_skip << 'exhaust_per_unit'
200
200
  cols_to_skip << 'exhaust_fan_power_per_area'
201
201
 
@@ -37,7 +37,6 @@ require_relative 'hvac'
37
37
  require_relative 'economics'
38
38
  require_relative 'measures'
39
39
  require_relative 'utilities'
40
- require_relative 'os_lib_schedules'
41
40
  require_relative 'reporting'
42
41
  require_relative 'equest'
43
42
 
@@ -111,10 +111,7 @@ module BTAP
111
111
  end
112
112
  hdd = BTAP::Environment::WeatherFile.new(model.weatherFile.get.path.get).hdd18
113
113
 
114
- old_name = ""
115
- unless default_surface_construction_set.getAttribute("name").empty?
116
- old_name = default_surface_construction_set.getAttribute("name").get.valueAsString
117
- end
114
+ old_name = default_surface_construction_set.name.get.to_s
118
115
 
119
116
 
120
117
  climate_zone_index = get_climate_zone_index(hdd)
@@ -931,7 +928,7 @@ module BTAP
931
928
  #create new zone and add the spaces to it.
932
929
  name = "Sys-#{system_number.to_s} Flr-#{story_counter.to_s} Sch-#{schedule_type.to_s} HPlcmt-#{horizontal_placement}"
933
930
  thermal_zone = BTAP::Geometry::Zones::create_thermal_zone(model, space_array)
934
- thermal_zone.setAttribute("name",name)
931
+ thermal_zone.setName(name)
935
932
  #Set Thermostat bases on
936
933
 
937
934
  # Add a thermostat based on the first space
@@ -335,7 +335,7 @@ module BTAP
335
335
  model.getFanVariableVolumes.each do |fan|
336
336
  fan.setFanEfficiency( @fan_total_eff ) unless @fan_total_eff.nil?
337
337
  fan.setMotorEfficiency( @fan_motor_eff ) unless @fan_motor_eff.nil?
338
- log << fan.getAttribute("name").get.valueAsString << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
338
+ log << fan.name.get.to_s << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
339
339
  end
340
340
  end
341
341
 
@@ -344,7 +344,7 @@ module BTAP
344
344
  model.getFanConstantVolumes.each do |fan|
345
345
  fan.setFanEfficiency( @fan_total_eff ) unless @fan_total_eff.nil?
346
346
  fan.setMotorEfficiency( @fan_motor_eff ) unless @fan_motor_eff.nil?
347
- log << fan.getAttribute("name").get.valueAsString << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
347
+ log << fan.name.get.to_s << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
348
348
  end
349
349
 
350
350
  end
@@ -354,7 +354,7 @@ module BTAP
354
354
  when "VariableVolume"
355
355
  model.getFanConstantVolumes.each do |fan_const|
356
356
  #check that this is indeed connected to an airloop.
357
- log << "Found Const Vol Fan #{fan_const.getAttribute("name").get.valueAsString}"
357
+ log << "Found Const Vol Fan #{fan_const.name.get.to_s}"
358
358
  unless fan_const.loop.empty?
359
359
  fan_variable = OpenStudio::Model::FanVariableVolume.new(model,fan_const.availabilitySchedule)
360
360
  #pass information from old fan as much as possible.
@@ -375,13 +375,13 @@ module BTAP
375
375
  fan_variable.addToNode(air_loop.supplyOutletNode())
376
376
  #Remove FanConstantVolume
377
377
  fan_const.remove()
378
- log << "Replaced by Variable Vol Fan #{fan_variable.getAttribute("name").get.valueAsString}"
378
+ log << "Replaced by Variable Vol Fan #{fan_variable.name.get.to_s}"
379
379
  end
380
380
  end
381
381
  when "ConstantVolume"
382
382
  model.getFanVariableVolumes.each do |fan|
383
383
  #check that this is indeed connected to an airloop.
384
- log << "Found Const Vol Fan #{fan.getAttribute("name").get.valueAsString}"
384
+ log << "Found Const Vol Fan #{fan.name.get.to_s}"
385
385
  unless fan.loop.empty?
386
386
  new_fan = OpenStudio::Model::FanConstantVolume.new(model,fan.availabilitySchedule)
387
387
  #pass information from constant speed fan as much as possible.
@@ -396,7 +396,7 @@ module BTAP
396
396
  new_fan.addToNode(air_loop.supplyOutletNode())
397
397
  #Remove FanConstantVolume
398
398
  fan.remove()
399
- log << "Replaced by Constant Vol Fan #{new_fan.getAttribute("name").get.valueAsString}"
399
+ log << "Replaced by Constant Vol Fan #{new_fan.name.get.to_s}"
400
400
  end
401
401
  end
402
402
  when nil
@@ -427,7 +427,7 @@ module BTAP
427
427
  model.getPumpVariableSpeeds.each do |pump|
428
428
  pump.setMotorEfficiency( @pump_motor_eff.to_f ) unless @pump_motor_eff.nil?
429
429
  pump.setPumpControlType( @pump_control_type ) unless @pump_control_type.nil?
430
- log << pump.getAttribute("name").get.valueAsString << ",#{pump.motorEfficiency}\n"
430
+ log << pump.name.get.to_s << ",#{pump.motorEfficiency}\n"
431
431
  end
432
432
  end
433
433
  unless model.getPumpConstantSpeeds.empty?
@@ -435,7 +435,7 @@ module BTAP
435
435
  model.getPumpConstantSpeeds.each do |pump|
436
436
  pump.setMotorEfficiency( @pump_motor_eff.to_f ) unless @pump_motor_eff.nil?
437
437
  pump.setPumpControlType( @pump_control_type ) unless @pump_control_type.nil?
438
- log << pump.getAttribute("name").get.valueAsString << ",#{pump.motorEfficiency}\n"
438
+ log << pump.name.get.to_s << ",#{pump.motorEfficiency}\n"
439
439
  end
440
440
  end
441
441
 
@@ -443,7 +443,7 @@ module BTAP
443
443
  case @pump_speed_type
444
444
  when "VariableSpeed"
445
445
  model.getPumpConstantSpeeds.each do |pump_const|
446
- log << "Found Const Vol Fan #{pump_const.getAttribute("name").get.valueAsString}"
446
+ log << "Found Const Vol Fan #{pump_const.name.get.to_s}"
447
447
  #check that this is indeed connected to an plant loop.
448
448
  unless pump_const.plantLoop.empty?
449
449
  pump_variable = OpenStudio::Model::PumpVariableSpeed.new(model)
@@ -463,12 +463,12 @@ module BTAP
463
463
  pump_const.remove()
464
464
  #add
465
465
  pump_variable.addToNode(hw_loop.supplyInletNode)
466
- log << "Replaced by Variable Vol Pump #{pump_variable.getAttribute("name").get.valueAsString}"
466
+ log << "Replaced by Variable Vol Pump #{pump_variable.name.get.to_s}"
467
467
  end
468
468
  end #end loop PumpConstantSpeeds
469
469
  when "ConstantSpeed"
470
470
  model.getPumpVariableSpeeds.each do |pump|
471
- log << "Found Variable Speed Pump #{pump.getAttribute("name").get.valueAsString}"
471
+ log << "Found Variable Speed Pump #{pump.name.get.to_s}"
472
472
  #check that this is indeed connected to an plant loop.
473
473
  unless pump.plantLoop.empty?
474
474
  new_pump = OpenStudio::Model::PumpVariableSpeed.new(model)
@@ -489,7 +489,7 @@ module BTAP
489
489
  #add the pump to loop.
490
490
  new_pump.addToNode(hw_loop.supplyInletNode)
491
491
 
492
- log << "Replaced by constant speed Pump #{new_pump.getAttribute("name").get.valueAsString}"
492
+ log << "Replaced by constant speed Pump #{new_pump.name.get.to_s}"
493
493
  end
494
494
  end #end loop Pump variable Speeds
495
495
  when nil
@@ -521,7 +521,7 @@ module BTAP
521
521
  cooling_coil.setRatedCOP( OpenStudio::OptionalDouble.new( @cop ) ) unless @cop.nil?
522
522
  cop = "NA"
523
523
  cop = cooling_coil.ratedCOP.get unless cooling_coil.ratedCOP.empty?
524
- log << cooling_coil.getAttribute("name").get.valueAsString << ",#{cop}\n"
524
+ log << cooling_coil.name.get.to_s << ",#{cop}\n"
525
525
 
526
526
  end
527
527
  end
@@ -535,7 +535,7 @@ module BTAP
535
535
  cop_high = cooling_coil.ratedHighSpeedCOP.get unless cooling_coil.ratedHighSpeedCOP.empty?
536
536
  cop_low = "NA"
537
537
  cop_low = cooling_coil.ratedLowSpeedCOP.get unless cooling_coil.ratedLowSpeedCOP.empty?
538
- log << cooling_coil.getAttribute("name").get.valueAsString << ",#{cop_high},#{cop_low}\n"
538
+ log << cooling_coil.name.get.to_s << ",#{cop_high},#{cop_low}\n"
539
539
  end
540
540
  end
541
541
  return log
@@ -631,7 +631,7 @@ module BTAP
631
631
  end
632
632
  item.setHeaterFuelType(@shw_heater_fuel_type) unless @shw_heater_fuel_type.nil?
633
633
  item.setHeaterThermalEfficiency(@shw_thermal_eff) unless @shw_thermal_eff.nil?
634
- log << item.getAttribute("name").get.valueAsString << ",#{item.setpointTemperatureSchedule},#{item.heaterFuelType},#{item.getHeaterThermalEfficiency.get}\n"
634
+ log << item.name.get.to_s << ",#{item.setpointTemperatureSchedule},#{item.heaterFuelType},#{item.getHeaterThermalEfficiency.get}\n"
635
635
  end
636
636
  return log
637
637
  end
@@ -739,7 +739,7 @@ module BTAP
739
739
  oar_stpt_manager.setSetpointatOutdoorLowTemperature(@hw_boiler_reset_highsupplytemp) unless @hw_boiler_reset_highsupplytemp.nil?
740
740
  oar_stpt_manager.setOutdoorLowTemperature(@hw_boiler_reset_outsidehighsupplytemp) unless @hw_boiler_reset_outsidehighsupplytemp.nil?
741
741
  end
742
- table << boiler.getAttribute("name").get.valueAsString << ","
742
+ table << boiler.name.get.to_s << ","
743
743
  boiler.designWaterOutletTemperature.empty? ? dowt = "NA" : dowt = boiler.designWaterOutletTemperature.get
744
744
  table << "#{dowt},#{boiler.fuelType},#{boiler.nominalThermalEfficiency}\n"
745
745
  end
@@ -568,7 +568,7 @@ module BTAP
568
568
  end
569
569
  end
570
570
  if construction.insulation.empty? and construction.isOpaque
571
- raise ("construction #{construction.getAttribute("name").get.to_s} insulation layer could not be set!. This occurs when a insulation layer is duplicated in the construction.")
571
+ raise ("construction #{construction.name.get.to_s} insulation layer could not be set!. This occurs when a insulation layer is duplicated in the construction.")
572
572
  end
573
573
 
574
574
  insulating_layers << return_material
@@ -459,7 +459,7 @@ module BTAP
459
459
  BTAP::runner_register("Info", "Thermal Zone contains a NO-SHAPE space named. OS does not support no shape spaces. Thermal Zone will not be created.",runner)
460
460
  else
461
461
  os_zone = OpenStudio::Model::ThermalZone.new(model)
462
- os_zone.setAttribute("name", self.name)
462
+ os_zone.setName(self.name)
463
463
  #set space to thermal zone
464
464
  OpenStudio::Model::getSpaceByName(model,self.space.name).get.setThermalZone(os_zone)
465
465
  BTAP::runner_register("Info", "\tThermalZone: " + self.name + " created",runner)
@@ -825,7 +825,7 @@ module BTAP
825
825
 
826
826
  os_surface = OpenStudio::Model::Surface.new(surface_points, model)
827
827
  #set the name of the surface.
828
- os_surface.setAttribute("name", self.name)
828
+ os_surface.setName(self.name)
829
829
  case self.commandName
830
830
  #Set the surface boundary condition if it is a ground surface.
831
831
 
@@ -854,7 +854,7 @@ module BTAP
854
854
  new_array.insert(0,first).reverse!
855
855
  #...then add the reverse surface to the model and assign the name with a mirror suffix.
856
856
  os_surface_mirror = OpenStudio::Model::Surface.new(new_array, model)
857
- os_surface_mirror.setAttribute("name", self.name + "-mirror" )
857
+ os_surface_mirror.setName(self.name + "-mirror" )
858
858
  #Assign the mirror surface to the parent space that is NEXT-TO
859
859
  os_surface_mirror.setSpace(OpenStudio::Model::getSpaceByName(model,get_keyword_value("NEXT-TO")).get)
860
860
  #output to console for debugging.
@@ -898,14 +898,14 @@ module BTAP
898
898
  #Debug subsurface
899
899
  os_sub_surface = OpenStudio::Model::Surface.new(surface_points, model)
900
900
  #set the name of the surface.
901
- os_sub_surface.setAttribute("name", child.name)
901
+ os_sub_surface.setName(child.name)
902
902
  #Add to parent space that was already created.
903
903
  os_sub_surface.setSpace(OpenStudio::Model::getSpaceByName( model,self.get_parent("SPACE").name).get )
904
904
  else
905
905
  #Add the subsurface to the new openstudio model.
906
906
  os_sub_surface = OpenStudio::Model::SubSurface.new(surface_points, model)
907
907
  #set the name of the surface.
908
- os_sub_surface.setAttribute("name", child.name )
908
+ os_sub_surface.setName(child.name)
909
909
  #Add to parent space that was already created.
910
910
  os_sub_surface.setSurface(os_surface)
911
911
  #output to console for debugging.
@@ -1677,7 +1677,7 @@ module BTAP
1677
1677
  BTAP::runner_register("Info", "OpenStudio does not support NO-SHAPE SPACE definitions currently. Not importing the space #{self.name}.",runner)
1678
1678
  else
1679
1679
  os_space = OpenStudio::Model::Space.new(model)
1680
- os_space.setAttribute("name", self.name)
1680
+ os_space.setName(self.name)
1681
1681
  #set floor
1682
1682
  os_space.setBuildingStory(OpenStudio::Model::getBuildingStoryByName(model,self.get_parent("FLOOR").name).get)
1683
1683
  BTAP::runner_register("Info", "\tSpace: " + self.name + " created",runner)
@@ -1761,7 +1761,7 @@ module BTAP
1761
1761
 
1762
1762
  def convert_to_openstudio(model,runner = nil)
1763
1763
  floor = OpenStudio::Model::BuildingStory.new(model)
1764
- floor.setAttribute("name", self.name)
1764
+ floor.setName(self.name)
1765
1765
  BTAP::runner_register("Info", "\tBuildingStory: " + self.name + " created",runner)
1766
1766
  end
1767
1767
 
@@ -46,8 +46,8 @@ module BTAP
46
46
  # @author Phylroy A. Lopez
47
47
  # @return [String] the name of the model.
48
48
  def self.get_name(model)
49
- unless model.building.get.getAttribute("name").empty?
50
- return model.building.get.getAttribute("name").get.valueAsString
49
+ unless model.building.get.name.empty?
50
+ return model.building.get.name.get.to_s
51
51
  else
52
52
  return ""
53
53
  end
@@ -2601,7 +2601,7 @@ module BTAP
2601
2601
  surfaces.each do |surface|
2602
2602
  result = surface.setWindowToWallRatio(ratio,offset,height_offset_from_floor)
2603
2603
  raise( "Unable to set FWR for surface " +
2604
- surface.getAttribute("name").to_s +
2604
+ surface.name.get.to_s +
2605
2605
  " . Possible reasons are if the surface is not a wall, if the surface
2606
2606
  is not rectangular in face coordinates, if requested ratio is too large
2607
2607
  (window area ~= surface area) or too small (min dimension of window < 1 foot),
@@ -799,7 +799,7 @@ module BTAP
799
799
  model.getFanVariableVolumes.each do |fan|
800
800
  fan.setFanEfficiency( @fan_total_eff ) unless @fan_total_eff.nil?
801
801
  fan.setMotorEfficiency( @fan_motor_eff ) unless @fan_motor_eff.nil?
802
- log << fan.getAttribute("name").get.valueAsString << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
802
+ log << fan.name.get.to_s << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
803
803
  end
804
804
  end
805
805
 
@@ -808,7 +808,7 @@ module BTAP
808
808
  model.getFanConstantVolumes.each do |fan|
809
809
  fan.setFanEfficiency( @fan_total_eff ) unless @fan_total_eff.nil?
810
810
  fan.setMotorEfficiency( @fan_motor_eff ) unless @fan_motor_eff.nil?
811
- log << fan.getAttribute("name").get.valueAsString << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
811
+ log << fan.name.get.to_s << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
812
812
  end
813
813
 
814
814
  end
@@ -818,7 +818,7 @@ module BTAP
818
818
  when "VariableVolume"
819
819
  model.getFanConstantVolumes.each do |fan_const|
820
820
  #check that this is indeed connected to an airloop.
821
- log << "Found Const Vol Fan #{fan_const.getAttribute("name").get.valueAsString}"
821
+ log << "Found Const Vol Fan #{fan_const.name.get.to_s}"
822
822
  unless fan_const.loop.empty?
823
823
  fan_variable = OpenStudio::Model::FanVariableVolume.new(model,fan_const.availabilitySchedule)
824
824
  #pass information from old fan as much as possible.
@@ -839,13 +839,13 @@ module BTAP
839
839
  fan_variable.addToNode(air_loop.supplyOutletNode())
840
840
  #Remove FanConstantVolume
841
841
  fan_const.remove()
842
- log << "Replaced by Variable Vol Fan #{fan_variable.getAttribute("name").get.valueAsString}"
842
+ log << "Replaced by Variable Vol Fan #{fan_variable.name.get.to_s}"
843
843
  end
844
844
  end
845
845
  when "ConstantVolume"
846
846
  model.getFanVariableVolumes.each do |fan|
847
847
  #check that this is indeed connected to an airloop.
848
- log << "Found Const Vol Fan #{fan.getAttribute("name").get.valueAsString}"
848
+ log << "Found Const Vol Fan #{fan.name.get.to_s}"
849
849
  unless fan.loop.empty?
850
850
  new_fan = OpenStudio::Model::FanConstantVolume.new(model,fan.availabilitySchedule)
851
851
  #pass information from constant speed fan as much as possible.
@@ -860,7 +860,7 @@ module BTAP
860
860
  new_fan.addToNode(air_loop.supplyOutletNode())
861
861
  #Remove FanConstantVolume
862
862
  fan.remove()
863
- log << "Replaced by Constant Vol Fan #{new_fan.getAttribute("name").get.valueAsString}"
863
+ log << "Replaced by Constant Vol Fan #{new_fan.name.get.to_s}"
864
864
  end
865
865
  end
866
866
  when nil
@@ -885,7 +885,7 @@ module BTAP
885
885
  model.getPumpVariableSpeeds.each do |pump|
886
886
  pump.setMotorEfficiency( @pump_motor_eff.to_f ) unless @pump_motor_eff.nil?
887
887
  pump.setPumpControlType( @pump_control_type ) unless @pump_control_type.nil?
888
- log << pump.getAttribute("name").get.valueAsString << ",#{pump.motorEfficiency}\n"
888
+ log << pump.name.get.to_s << ",#{pump.motorEfficiency}\n"
889
889
  end
890
890
  end
891
891
  unless model.getPumpConstantSpeeds.empty?
@@ -893,7 +893,7 @@ module BTAP
893
893
  model.getPumpConstantSpeeds.each do |pump|
894
894
  pump.setMotorEfficiency( @pump_motor_eff.to_f ) unless @pump_motor_eff.nil?
895
895
  pump.setPumpControlType( @pump_control_type ) unless @pump_control_type.nil?
896
- log << pump.getAttribute("name").get.valueAsString << ",#{pump.motorEfficiency}\n"
896
+ log << pump.name.get.to_s << ",#{pump.motorEfficiency}\n"
897
897
  end
898
898
  end
899
899
 
@@ -901,7 +901,7 @@ module BTAP
901
901
  case @pump_speed_type
902
902
  when "VariableSpeed"
903
903
  model.getPumpConstantSpeeds.each do |pump_const|
904
- log << "Found Const Vol Fan #{pump_const.getAttribute("name").get.valueAsString}"
904
+ log << "Found Const Vol Fan #{pump_const.name.get.to_s}"
905
905
  #check that this is indeed connected to an plant loop.
906
906
  unless pump_const.plantLoop.empty?
907
907
  pump_variable = OpenStudio::Model::PumpVariableSpeed.new(model)
@@ -921,12 +921,12 @@ module BTAP
921
921
  pump_const.remove()
922
922
  #add
923
923
  pump_variable.addToNode(hw_loop.supplyInletNode)
924
- log << "Replaced by Variable Vol Pump #{pump_variable.getAttribute("name").get.valueAsString}"
924
+ log << "Replaced by Variable Vol Pump #{pump_variable.name.get.to_s}"
925
925
  end
926
926
  end #end loop PumpConstantSpeeds
927
927
  when "ConstantSpeed"
928
928
  model.getPumpVariableSpeeds.each do |pump|
929
- log << "Found Variable Speed Pump #{pump.getAttribute("name").get.valueAsString}"
929
+ log << "Found Variable Speed Pump #{pump.name.get.to_s}"
930
930
  #check that this is indeed connected to an plant loop.
931
931
  unless pump.plantLoop.empty?
932
932
  new_pump = OpenStudio::Model::PumpVariableSpeed.new(model)
@@ -947,7 +947,7 @@ module BTAP
947
947
  #add the pump to loop.
948
948
  new_pump.addToNode(hw_loop.supplyInletNode)
949
949
 
950
- log << "Replaced by constant speed Pump #{new_pump.getAttribute("name").get.valueAsString}"
950
+ log << "Replaced by constant speed Pump #{new_pump.name.get.to_s}"
951
951
  end
952
952
  end #end loop Pump variable Speeds
953
953
  when nil
@@ -975,7 +975,7 @@ module BTAP
975
975
  cooling_coil.setRatedCOP( OpenStudio::OptionalDouble.new( @cop ) ) unless @cop.nil?
976
976
  cop = "NA"
977
977
  cop = cooling_coil.ratedCOP.get unless cooling_coil.ratedCOP.empty?
978
- log << cooling_coil.getAttribute("name").get.valueAsString << ",#{cop}\n"
978
+ log << cooling_coil.name.get.to_s << ",#{cop}\n"
979
979
 
980
980
  end
981
981
  end
@@ -989,7 +989,7 @@ module BTAP
989
989
  cop_high = cooling_coil.ratedHighSpeedCOP.get unless cooling_coil.ratedHighSpeedCOP.empty?
990
990
  cop_low = "NA"
991
991
  cop_low = cooling_coil.ratedLowSpeedCOP.get unless cooling_coil.ratedLowSpeedCOP.empty?
992
- log << cooling_coil.getAttribute("name").get.valueAsString << ",#{cop_high},#{cop_low}\n"
992
+ log << cooling_coil.name.get.to_s << ",#{cop_high},#{cop_low}\n"
993
993
  end
994
994
  end
995
995
  return log
@@ -1071,7 +1071,7 @@ module BTAP
1071
1071
  end
1072
1072
  item.setHeaterFuelType(@shw_heater_fuel_type) unless @shw_heater_fuel_type.nil?
1073
1073
  item.setHeaterThermalEfficiency(@shw_thermal_eff) unless @shw_thermal_eff.nil?
1074
- log << item.getAttribute("name").get.valueAsString << ",#{item.setpointTemperatureSchedule},#{item.heaterFuelType},#{item.getHeaterThermalEfficiency.get}\n"
1074
+ log << item.name.get.to_s << ",#{item.setpointTemperatureSchedule},#{item.heaterFuelType},#{item.getHeaterThermalEfficiency.get}\n"
1075
1075
  end
1076
1076
  return log
1077
1077
  end
@@ -1174,7 +1174,7 @@ module BTAP
1174
1174
  oar_stpt_manager.setSetpointatOutdoorLowTemperature(@hw_boiler_reset_highsupplytemp) unless @hw_boiler_reset_highsupplytemp.nil?
1175
1175
  oar_stpt_manager.setOutdoorLowTemperature(@hw_boiler_reset_outsidehighsupplytemp) unless @hw_boiler_reset_outsidehighsupplytemp.nil?
1176
1176
  end
1177
- table << boiler.getAttribute("name").get.valueAsString << ","
1177
+ table << boiler.name.get.to_s << ","
1178
1178
  boiler.designWaterOutletTemperature.empty? ? dowt = "NA" : dowt = boiler.designWaterOutletTemperature.get
1179
1179
  table << "#{dowt},#{boiler.fuelType},#{boiler.nominalThermalEfficiency}\n"
1180
1180
  end
@@ -253,7 +253,7 @@ module BTAP
253
253
 
254
254
  # GBase no hvac
255
255
  gbaseModel = BTAP::FileIO::deep_copy(model)
256
- gbaseModel.building.get.setAttribute("name","Gbase")
256
+ gbaseModel.building.get.setName("Gbase")
257
257
  BTAP::Site::set_weather_file(gbaseModel, @original_file)
258
258
  BTAP::Resources::HVAC::clear_all_hvac_from_model(gbaseModel)
259
259
  gbaseModel.getThermalZones.each do |thermalzone|
@@ -266,7 +266,7 @@ module BTAP
266
266
 
267
267
  # Gfloating
268
268
  gfloatModel = BTAP::FileIO::deep_copy(model)
269
- gfloatModel.building.get.setAttribute("name","Gfloating")
269
+ gfloatModel.building.get.setName("Gfloating")
270
270
  BTAP::Site::set_weather_file(gfloatModel, @original_file)
271
271
  BTAP::Resources::HVAC::clear_all_hvac_from_model(gfloatModel)
272
272
  gfloatModel.getThermalZones.each do |thermalzone|
@@ -282,7 +282,7 @@ module BTAP
282
282
 
283
283
  # # Gideal
284
284
  # gidealModel = BTAP::FileIO::deep_copy(model)
285
- # gidealModel.building.get.setAttribute("name","Gideal")
285
+ # gidealModel.building.get.setName("Gideal")
286
286
  # BTAP::Site::set_weather_file(gidealModel, @original_file)
287
287
  # gidealModel.getThermalZones.each do |thermalzone|
288
288
  # thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)
@@ -295,7 +295,7 @@ module BTAP
295
295
  #
296
296
  # # Gadiabatic
297
297
  # gadiabaticModel = BTAP::FileIO::deep_copy(model)
298
- # gadiabaticModel.building.get.setAttribute("name","Gadiabatic")
298
+ # gadiabaticModel.building.get.setName("Gadiabatic")
299
299
  # BTAP::Site::set_weather_file(gadiabaticModel, @original_file)
300
300
  # gadiabaticModel.getThermalZones.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)}
301
301
  # self.set_internal_gains_to_zero(gadiabaticModel)
@@ -308,7 +308,7 @@ module BTAP
308
308
  #
309
309
  # # Gsteadystate
310
310
  # gsteadystateModel = BTAP::FileIO::deep_copy(model)
311
- # gsteadystateModel.building.get.setAttribute("name","Gsteadystate")
311
+ # gsteadystateModel.building.get.setName("Gsteadystate")
312
312
  # BTAP::Site::set_weather_file(gsteadystateModel, @all_off)
313
313
  # self.set_internal_gains_to_zero(gsteadystateModel)
314
314
  # gsteadystateModel.getThermalZones.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)}
@@ -319,7 +319,7 @@ module BTAP
319
319
  #
320
320
  # # Gig
321
321
  # gigModel = BTAP::FileIO::deep_copy(model)
322
- # gigModel.building.get.setAttribute("name","Gig")
322
+ # gigModel.building.get.setName("Gig")
323
323
  # BTAP::Site::set_weather_file(gigModel, @all_off)
324
324
  # gigModel.getThermalZones.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
325
325
  # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gigModel.getSurfaces, ["Ground"] )
@@ -329,7 +329,7 @@ module BTAP
329
329
  #
330
330
  # # Gsg
331
331
  # gsgModel = BTAP::FileIO::deep_copy(model)
332
- # gsgModel.building.get.setAttribute("name","Gsg")
332
+ # gsgModel.building.get.setName("Gsg")
333
333
  # BTAP::Site::set_weather_file( gsgModel,@solar_radiation_only_temp_constant)
334
334
  # self.set_internal_gains_to_zero(gsgModel)
335
335
  # gsgModel.getThermalZones.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
@@ -340,7 +340,7 @@ module BTAP
340
340
  #
341
341
  # # Gext
342
342
  # gextModel = BTAP::FileIO::deep_copy(model)
343
- # gextModel.building.get.setAttribute("name","Gext")
343
+ # gextModel.building.get.setName("Gext")
344
344
  # BTAP::Site::set_weather_file( gextModel,@solar_radiation_off_temp_normal )
345
345
  # self.set_internal_gains_to_zero(gextModel)
346
346
  # gextModel.getThermalZones.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
@@ -350,7 +350,7 @@ module BTAP
350
350
  #
351
351
  # # Gh
352
352
  # ghModel = BTAP::FileIO::deep_copy(model)
353
- # ghModel.building.get.setAttribute("name","Gh")
353
+ # ghModel.building.get.setName("Gh")
354
354
  # BTAP::Site::set_weather_file(ghModel,@all_off )
355
355
  # self.set_internal_gains_to_zero(ghModel)
356
356
  # ghModel.getThermalZones.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_cooling)}
@@ -360,7 +360,7 @@ module BTAP
360
360
  #
361
361
  # # Gc
362
362
  # gcModel = BTAP::FileIO::deep_copy(model)
363
- # gcModel.building.get.setAttribute("name","Gc")
363
+ # gcModel.building.get.setName("Gc")
364
364
  # BTAP::Site::set_weather_file(gcModel,@solar_radiation_off_temp_normal)
365
365
  # self.set_internal_gains_to_zero(gcModel)
366
366
  # gcModel.getThermalZones.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heating)}
@@ -370,7 +370,7 @@ module BTAP
370
370
  #
371
371
  # # Goff
372
372
  # goffModel = BTAP::FileIO::deep_copy(model)
373
- # goffModel.building.get.setAttribute("name","Goff")
373
+ # goffModel.building.get.setName("Goff")
374
374
  # BTAP::Site::set_weather_file(goffModel,@all_off)
375
375
  # self.set_internal_gains_to_zero(goffModel)
376
376
  # BTAP::Resources::SpaceLoads::ScaleLoads::scale_inflitration_loads(goffModel, 0.0)
@@ -462,7 +462,7 @@ module BTAP
462
462
  # # Gsg Solar gains
463
463
  # gsgModel = BTAP::FileIO::deep_copy(model)
464
464
  # thermal_zones = gsgModel.getThermalZones
465
- # gsgModel.building.get.setAttribute("name","Gsg-" + thermal_zones[zone_number].name.get)
465
+ # gsgModel.building.get.setName("Gsg-" + thermal_zones[zone_number].name.get)
466
466
  # BTAP::Site::set_weather_file(gsgModel,@solar_radiation_only_temp_constant )
467
467
  # self.set_internal_gains_to_zero(gsgModel)
468
468
  # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
@@ -475,7 +475,7 @@ module BTAP
475
475
  # # Gig - internal gains
476
476
  # gigModel = BTAP::FileIO::deep_copy(model)
477
477
  # thermal_zones = gigModel.getThermalZones
478
- # gigModel.building.get.setAttribute("name","Gig-" + thermal_zones[zone_number].name.get)
478
+ # gigModel.building.get.setName("Gig-" + thermal_zones[zone_number].name.get)
479
479
  # BTAP::Site::set_weather_file(gigModel,@all_off )
480
480
  # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
481
481
  # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
@@ -487,7 +487,7 @@ module BTAP
487
487
  # # Gext external gains
488
488
  # gextModel = BTAP::FileIO::deep_copy(model)
489
489
  # thermal_zones = gextModel.getThermalZones
490
- # gextModel.building.get.setAttribute("name","Gext-" + thermal_zones[zone_number].name.get)
490
+ # gextModel.building.get.setName("Gext-" + thermal_zones[zone_number].name.get)
491
491
  # BTAP::Site::set_weather_file(gextModel,@solar_radiation_off_temp_normal )
492
492
  # self.set_internal_gains_to_zero(gextModel)
493
493
  # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
@@ -499,7 +499,7 @@ module BTAP
499
499
  # # Gh - no cooling
500
500
  # ghModel = BTAP::FileIO::deep_copy(model)
501
501
  # thermal_zones = ghModel.getThermalZones
502
- # ghModel.building.get.setAttribute("name","Gh-" + thermal_zones[zone_number].name.get)
502
+ # ghModel.building.get.setName("Gh-" + thermal_zones[zone_number].name.get)
503
503
  # BTAP::Site::set_weather_file(ghModel,@all_off )
504
504
  # self.set_internal_gains_to_zero(ghModel)
505
505
  # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_cooling)
@@ -511,7 +511,7 @@ module BTAP
511
511
  # # Gc no heating
512
512
  # gcModel = BTAP::FileIO::deep_copy(model)
513
513
  # thermal_zones = gcModel.getThermalZones
514
- # gcModel.building.get.setAttribute("name","Gc-" + thermal_zones[zone_number].name.get)
514
+ # gcModel.building.get.setName("Gc-" + thermal_zones[zone_number].name.get)
515
515
  # BTAP::Site::set_weather_file(gcModel, @solar_radiation_off_temp_normal)
516
516
  # self.set_internal_gains_to_zero(gcModel)
517
517
  # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heating)
@@ -523,7 +523,7 @@ module BTAP
523
523
  # # Gideal
524
524
  # gidealModel = BTAP::FileIO::deep_copy(model)
525
525
  # thermal_zones = gidealModel.getThermalZones
526
- # gidealModel.building.get.setAttribute("name","Gideal-" + thermal_zones[zone_number].name.get)
526
+ # gidealModel.building.get.setName("Gideal-" + thermal_zones[zone_number].name.get)
527
527
  # BTAP::Site::set_weather_file( gidealModel, @original_file )
528
528
  # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)
529
529
  # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
@@ -534,7 +534,7 @@ module BTAP
534
534
  # # Gfloating
535
535
  # gfloatModel = BTAP::FileIO::deep_copy(model)
536
536
  # thermal_zones = gfloatModel.getThermalZones
537
- # gfloatModel.building.get.setAttribute("name","Gfloating-" + thermal_zones[zone_number].name.get)
537
+ # gfloatModel.building.get.setName("Gfloating-" + thermal_zones[zone_number].name.get)
538
538
  # BTAP::Site::set_weather_file(gfloatModel, @original_file)
539
539
  # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
540
540
  # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gfloatModel.getSurfaces, ["Ground"] )