lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb in openstudio-standards-0.3.0 vs lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb in openstudio-standards-0.3.1.rc1
- old
+ new
@@ -54,20 +54,20 @@
BTAP.runner_register('Error', 'Weather file is not defined. Please ensure the weather file is defined and exists.', runner)
return false
end
- # hdd required to get correct conductance values from the json file.
+ # hdd required to get correct conductance values from the json file.
hdd = get_necb_hdd18(model)
# Lambdas are preferred over methods in methods for small utility methods.
correct_cond = lambda do |conductivity, surface_type|
- return conductivity.nil? || conductivity.to_f <= 0.0 || conductivity == 'NECB_Default' ? eval(model_find_objects(@standards_data['surface_thermal_transmittance'], surface_type)[0]['formula']) : conductivity.to_f
+ return conductivity.nil? || conductivity.to_f <= 0.0 || conductivity == "NECB_Default" ? eval(model_find_objects(@standards_data['surface_thermal_transmittance'], surface_type)[0]['formula']) : conductivity.to_f
end
# Converts trans and vis to nil if requesting default.. or casts the string to a float.
correct_vis_trans = lambda do |value|
- return value.nil? || value.to_f <= 0.0 || value == 'NECB_Default' ? nil : value.to_f
+ return value.nil? || value.to_f <= 0.0 || value == "NECB_Default" ? nil : value.to_f
end
BTAP::Resources::Envelope::ConstructionSets.customize_default_surface_construction_set!(model: model,
name: "#{default_surface_construction_set.name.get} at hdd = #{hdd}",
default_surface_construction_set: default_surface_construction_set,