lib/openstudio-standards/standards/deer/deer.AirLoopHVAC.rb in openstudio-standards-0.2.12 vs lib/openstudio-standards/standards/deer/deer.AirLoopHVAC.rb in openstudio-standards-0.2.13.rc3

- old
+ new

@@ -27,15 +27,13 @@ # 'ElectronicEnthalpy' # 'DifferentialDryBulbAndEnthalpy' # Get the OA system and OA controller oa_sys = air_loop_hvac.airLoopHVACOutdoorAirSystem - if oa_sys.is_initialized - oa_sys = oa_sys.get - else - return true # No OA system - end + return true unless oa_sys.is_initialized # No OA system + + oa_sys = oa_sys.get oa_control = oa_sys.getControllerOutdoorAir economizer_type = oa_control.getEconomizerControlType # Return true if one of the valid choices is used, false otherwise case economizer_type @@ -54,15 +52,13 @@ enthalpy_limit_btu_per_lb = nil dewpoint_limit_f = nil # Get the OA system and OA controller oa_sys = air_loop_hvac.airLoopHVACOutdoorAirSystem - if oa_sys.is_initialized - oa_sys = oa_sys.get - else - return [nil, nil, nil] # No OA system - end + return [nil, nil, nil] unless oa_sys.is_initialized # No OA system + + oa_sys = oa_sys.get oa_control = oa_sys.getControllerOutdoorAir economizer_type = oa_control.getEconomizerControlType case economizer_type when 'NoEconomizer' @@ -73,11 +69,11 @@ when 'CEC T24-CEC7' drybulb_limit_f = 69 when 'CEC T24-CEC1', 'CEC T24-CEC3', 'CEC T24-CEC5' - drybulb_limit_f = 70 + drybulb_limit_f = 70 when 'CEC T24-CEC6', 'CEC T24-CEC8', 'CEC T24-CEC9' drybulb_limit_f = 71 when 'CEC T24-CEC2', @@ -94,7 +90,6 @@ end end return [drybulb_limit_f, enthalpy_limit_btu_per_lb, dewpoint_limit_f] end - -end \ No newline at end of file +end