lib/openstudio-standards/standards/necb/BTAP1980TO2010/btap_1980to2010.rb in openstudio-standards-0.2.14 vs lib/openstudio-standards/standards/necb/BTAP1980TO2010/btap_1980to2010.rb in openstudio-standards-0.2.15.pre.rc1
- old
+ new
@@ -1,21 +1,19 @@
# This class holds methods that apply BTAP19802010 rules.
# @ref [References::BTAP19802010]
class BTAP1980TO2010 < BTAPPRE1980
- @template = self.new.class.name # rubocop:disable Style/ClassVars
+ @template = new.class.name
register_standard(@template)
-
def initialize
super()
- @template = self.class.name
- @standards_data = self.load_standards_database_new()
- self.corrupt_standards_database()
+ @standards_data = load_standards_database_new
+ corrupt_standards_database
end
- def load_standards_database_new()
- #load BTAP19802010 data.
+ def load_standards_database_new
+ # load BTAP19802010 data.
super()
if __dir__[0] == ':' # Running from OpenStudio CLI
embedded_files_relative('data/', /.*\.json/).each do |file|
data = JSON.parse(EmbeddedScripting.getFileAsString(file))
@@ -40,33 +38,13 @@
end
end
end
# Write database to file.
# File.open(File.join(File.dirname(__FILE__), '..', 'NECB2017.json'), 'w') {|f| f.write(JSON.pretty_generate(@standards_data))}
-
return @standards_data
end
-
-
- #occupancy sensor control applied using lighting schedule, see apply_lighting_schedule method
+ # occupancy sensor control applied using lighting schedule, see apply_lighting_schedule method
def set_occ_sensor_spacetypes(model, space_type_map)
return true
end
-
-=begin
- def apply_loop_pump_power(model:, sizing_run_dir:)
- # NECB2015 Custom code
- # Do another sizing run to take into account adjustments to equipment efficiency etc. on capacities. This was done primarily
- # because the cooling tower loop capacity is affected by the chiller COP. If the chiller COP is not properly set then
- # the cooling tower loop capacity can be significantly off which will affect the NECB 2015 maximum loop pump capacity. Found
- # all sizing was off somewhat if the additional sizing run was not done.
- if model_run_sizing_run(model, "#{sizing_run_dir}/SR2") == false
- raise("sizing run 2 failed!")
- end
- # Apply maxmimum loop pump power normalized by peak demand by served spaces as per NECB2015 5.2.6.3.(1)
- apply_maximum_loop_pump_power(model)
- #model = BTAP::FileIO::remove_duplicate_materials_and_constructions(model)
- return model
- end
-=end
end