Top Level Namespace
Defined Under Namespace
Modules: EnergyPlus, OpenStudio, OsLib_CreateResults, OsLib_QAQC, OsLib_Reporting, OsLib_ReportingHeatGainLoss, OsLib_Reporting_example, THREE Classes: AddCostPerAreaToConstruction, AddCostPerAreaToUnusedConstruction, AddCostPerFloorAreaToBuilding, AddCostPerFloorAreaToElectricEquipment, AddCostPerFloorAreaToLights, AddCostPerFloorAreaToUnusedLights, AddCostToSupplySideHVACComponentByAirLoop, AddEMSEmissionsReporting, AddEMSToControlEVCharging, AddEVLoad, AddExteriorLights, AddMeter, AddOutputDiagnostics, AddOutputVariable, AddRooftopPV, AddSimplePvToShadingSurfacesByType, AddThermalComfortModelTypes, AddZoneMixingObject, AddZoneVentilationDesignFlowRateObject, AdjustSystemEfficiencies, AdjustThermostatSetpointsByDegrees, AirWallZoneMixing, ChangeBuildingLocation, CreateCSVOutput, EnableIdealAirLoadsForAllZones, EnvelopeAndInternalLoadBreakdown, ExampleReport, ExportScheduleCSV, GemEnvironmentReport, GenericQAQC, GetSiteFromBuildingComponentLibrary, HVACPsychrometricChart, ImportEnvelopeAndInternalLoadsFromIdf, InjectIDFObjects, MeterFloodPlot, ModifyEnergyPlusCoilCoolingDXSingleSpeedObjects, ModifyEnergyPlusFanVariableVolumeObjects, OpenStudioResults, PredictedMeanVote, RemoveInternalLoadsDirectlyAssignedToSpaces, RemoveOrphanObjectsAndUnusedResources, RemoveUnusedDefaultProfiles, ReplaceExteriorWindowConstruction, ReplaceModel, ReplaceThermostatSchedules, ReportModelChanges, RunPeriod, RunPeriodMultiple, ServerDirectoryCleanup, SetCOPforSingleSpeedDXCoolingUnits, SetCOPforTwoSpeedDXCoolingUnits, SetElectricEquipmentLoadsByEPD, SetEnergyPlusInfiltrationFlowRatePerFloorArea, SetEnergyPlusLightObjectsLPD, SetEnergyPlusMinimumOutdoorAirFlowRate, SetExteriorWallsAndFloorsToAdiabatic, SetGasBurnerEfficiency, SetLifecycleCostParameters, SetLightingLoadsByLPD, SetRunPeriod, SetSpaceInfiltrationByExteriorSurfaceArea, SetSpaceInfiltrationPerExteriorArea, SetThermostatSchedules, ShadowCalculation, ShiftScheduleProfileTime, SimulationControl, Struct, SwapLightsDefinition, TariffSelectionBlock, TariffSelectionFlat, TariffSelectionGeneric, TariffSelectionTimeAndDateDependant, UnmetLoadHoursTroubleshooting, VA3C, VentilationQAQC, ViewData, ViewModel, XcelEDAReportingandQAQC, XcelEDATariffSelectionandModelSetup, ZoneReport
Instance Method Summary collapse
-
#gem_env_information ⇒ Hash
Reports out information about the gem path and gems that are available and loaded.
-
#get_cooling_coil_cooling_fuel(cooling_coil) ⇒ Object
check the cooling fuel type of a cooling coil.
-
#get_heating_coil_heating_fuel(heating_coil) ⇒ Object
check the heating fuel type of a heating coil.
-
#get_zone_airloop_cooling_fuels(zone) ⇒ Object
check the cooling fuels for a zones airloop.
-
#get_zone_airloop_heating_fuels(zone) ⇒ Object
check the heating fuels for a zones airloop.
-
#get_zone_cooling_fuels(zone) ⇒ Object
check the cooling fuels for a zone.
-
#get_zone_heating_fuels(zone) ⇒ Object
check the heating fuels for a zone.
-
#heat_cool_fuel_swap_check(base_model, base_sql, prop_model, prop_sql) ⇒ Object
heating & cooling primary fuel swap.
-
#openstudio_information ⇒ Array<String>
Reports out information about the OpenStudio environment.
-
#plant_loop_cooling_fuel(plant_loop) ⇒ Object
check the cooling fuel type of a plant loop.
-
#plant_loop_heating_fuel(plant_loop) ⇒ Object
check the heating fuel type of a plant loop.
-
#reheat_terminal_heating_fuel(reheat_terminal) ⇒ Object
check the heating fuel type of a reheat terminal.
Instance Method Details
#gem_env_information ⇒ Hash
Reports out information about the gem path and gems that are available and loaded. Used for debugging different runtime environments. Messages are put to stdout and returned in a hash.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/measures/gem_env_report/resources/gem_env_info.rb', line 10 def gem_env_information require 'json' result = {} # Environment variables result[:env] = {} ENV.each do |k, v| vals = [] v.split(';').each do |sub_v| vals << sub_v end result[:env][k] = vals end # Ruby executable require 'rbconfig' result[:rb_config] = RbConfig::CONFIG # Rubygems info require 'rubygems' require 'rubygems/version' result[:gem] = {} result[:gem][:version] = Gem::VERSION # result[:gem][:config_file] = Gem.config_file # result[:gem][:default_bindir] = Gem.default_bindir # result[:gem][:default_cert_path] = Gem.default_cert_path # result[:gem][:default_dir] = Gem.default_dir # result[:gem][:default_exec_format] = Gem.default_exec_format # result[:gem][:default_key_path] = Gem.default_key_path # result[:gem][:default_path] = Gem.default_path # result[:gem][:default_rubygems_dirs] = Gem.default_rubygems_dirs # result[:gem][:default_sources] = Gem.default_sources result[:gem][:dir] = Gem.dir # result[:gem][:host] = Gem.host result[:gem][:path] = Gem.path # result[:gem][:path_separator] = Gem.path_separator # result[:gem][:platforms] = Gem.platforms # result[:gem][:ruby] = Gem.ruby # result[:gem][:ruby_engine] = Gem.ruby_engine # result[:gem][:ruby_version] = Gem.ruby_version # result[:gem][:rubygems_version] = Gem.rubygems_version # result[:gem][:sources] = Gem.sources # result[:gem][:suffix_pattern] = Gem.suffix_pattern # result[:gem][:suffixes] = Gem.suffixes result[:gem][:user_dir] = Gem.user_dir result[:gem][:user_home] = Gem.user_home # result[:gem][:win_platform] = Gem.win_platform? # Available Gems result[:gem_specs_in_path] = {} local_gems = Gem::Specification.sort_by { |g| [g.name.downcase, g.version] }.group_by(&:name) local_gems.each do |name, specs| versions = [] specs.sort.each do |spec| versions << "- #{spec.version} from #{spec.spec_dir}" end result[:gem_specs_in_path][name] = versions end # Loaded Gems result[:gem_specs_loaded] = {} loaded_gems = Gem.loaded_specs.sort_by { |g| g[0] } loaded_gems.each do |name, spec| result[:gem_specs_loaded][name] = ["- #{spec.version} from #{spec.spec_dir}"] end pretty_result = JSON.pretty_generate(result) puts pretty_result return result end |
#get_cooling_coil_cooling_fuel(cooling_coil) ⇒ Object
check the cooling fuel type of a cooling coil
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 114 def get_cooling_coil_cooling_fuel(cooling_coil) debug_puts(" looking for cooling coil cooling fuel for #{cooling_coil.name}") # create an array to hold all the heating fuels in the terminal cooling_coil_cooling_fuels = [] if cooling_coil.to_CoilCoolingDXSingleSpeed.empty? == false cooling_coil_cooling_fuels << 'Electricity' elsif cooling_coil.to_CoilCoolingDXTwoSpeed.empty? == false cooling_coil_cooling_fuels << 'Electricity' elsif cooling_coil.to_EvaporativeCoolerDirectResearchSpecial.empty? == false cooling_coil_cooling_fuels << 'Electricity' elsif cooling_coil.to_CoilCoolingWater.empty? == false # need to check what the cooling fuel for the plant loop is cooling_coil = cooling_coil.to_CoilCoolingWater.get plant_loop = cooling_coil.plantLoop.get cooling_coil_cooling_fuels += plant_loop_cooling_fuel(plant_loop) end return cooling_coil_cooling_fuels end |
#get_heating_coil_heating_fuel(heating_coil) ⇒ Object
check the heating fuel type of a heating coil
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 92 def get_heating_coil_heating_fuel(heating_coil) debug_puts(" looking for heating coil heating fuel for #{heating_coil.name}") # create an array to hold all the heating fuels in the terminal heating_coil_heating_fuels = [] # get the reheat coil if heating_coil.to_CoilHeatingDXSingleSpeed.empty? == false heating_coil_heating_fuels << 'Electricity' elsif heating_coil.to_CoilHeatingElectric.empty? == false heating_coil_heating_fuels << 'Electricity' elsif heating_coil.to_CoilHeatingGas.empty? == false heating_coil_heating_fuels << 'Natural Gas' elsif heating_coil.to_CoilHeatingWater.empty? == false # need to check what the heating fuel for the plant loop is heating_coil = heating_coil.to_CoilHeatingWater.get plant_loop = heating_coil.plantLoop.get reheat_coil_fuels = plant_loop_heating_fuel(plant_loop) heating_coil_heating_fuels += reheat_coil_fuels end return heating_coil_heating_fuels end |
#get_zone_airloop_cooling_fuels(zone) ⇒ Object
check the cooling fuels for a zones airloop
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 191 def get_zone_airloop_cooling_fuels(zone) # create an array to hold the results airloop_cooling_fuels = [] if zone.airLoopHVAC.empty? #== false debug_puts(' This zone is not connected to an airloop.') return airloop_cooling_fuels else zone.airLoopHVAC.get.supplyComponents.each do |supply_component| if supply_component.to_CoilCoolingDXSingleSpeed.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) elsif supply_component.to_CoilCoolingDXTwoSpeed.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) elsif supply_component.to_EvaporativeCoolerDirectResearchSpecial.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) elsif supply_component.to_CoilCoolingWater.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) end end end return airloop_cooling_fuels.uniq.sort end |
#get_zone_airloop_heating_fuels(zone) ⇒ Object
check the heating fuels for a zones airloop
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 168 def get_zone_airloop_heating_fuels(zone) # create an array to hold the results airloop_heating_fuels = [] if zone.airLoopHVAC.empty? #== false debug_puts(' This zone is not connected to an airloop.') return airloop_heating_fuels else zone.airLoopHVAC.get.supplyComponents.each do |supply_component| if supply_component.to_CoilHeatingDXSingleSpeed.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) elsif supply_component.to_CoilHeatingElectric.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) elsif supply_component.to_CoilHeatingGas.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) elsif supply_component.to_CoilHeatingWater.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) end end end return airloop_heating_fuels.uniq.sort end |
#get_zone_cooling_fuels(zone) ⇒ Object
check the cooling fuels for a zone
154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 154 def get_zone_cooling_fuels(zone) # create an array to hold the results equipment_cooling_fuels = [] zone.equipment.each do |equipment| # TODO: Enumerable and code blocks and collect or select methods debug_puts(" #{equipment.name}") if equipment.to_ZoneHVACPackagedTerminalAirConditioner.empty? == false equipment_cooling_fuels << 'Electricity' end end return equipment_cooling_fuels.uniq.sort end |
#get_zone_heating_fuels(zone) ⇒ Object
check the heating fuels for a zone
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 134 def get_zone_heating_fuels(zone) # create an array to hold the results equipment_heating_fuels = [] zone.equipment.each do |equipment| # TODO: Enumerable and code blocks and collect or select methods debug_puts(" #{equipment.name}") if equipment.to_AirTerminalSingleDuctParallelPIUReheat.empty? == false terminal = equipment.to_AirTerminalSingleDuctParallelPIUReheat.get equipment_heating_fuels += reheat_terminal_heating_fuel(terminal) elsif equipment.to_AirTerminalSingleDuctVAVReheat.empty? == false terminal = equipment.to_AirTerminalSingleDuctVAVReheat.get equipment_heating_fuels += reheat_terminal_heating_fuel(terminal) elsif equipment.to_ZoneHVACPackagedTerminalHeatPump.empty? == false equipment_heating_fuels << 'Electricity' end end return equipment_heating_fuels.uniq.sort end |
#heat_cool_fuel_swap_check(base_model, base_sql, prop_model, prop_sql) ⇒ Object
heating & cooling primary fuel swap
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 13 def heat_cool_fuel_swap_check(base_model, base_sql, prop_model, prop_sql) heat_cool_fuel_swap_check = Check.new heat_cool_fuel_swap_check.name = 'Fuel Swap Check' heat_cool_fuel_swap_check.category = 'Xcel EDA' heat_cool_fuel_swap_check.description = 'Check that the baseline and the design alternative use the same fuels.' # make a hash to hold the results zone_fuels = Hash.new { |h, k| h[k] = {} } # get the zones from both models baseline_zones = base_model.getThermalZones proposed_zones = prop_model.getThermalZones # get zone names from both models. will be used as basis of fuel comparison baseline_zone_names = [] proposed_zone_names = [] # make arrays of the zone names from each model baseline_zones.each do |baseline_zone| baseline_zone_names << baseline_zone.name.get end proposed_zones.each do |proposed_zone| proposed_zone_names << proposed_zone.name.get end # output the sorted zone name lists debug_puts('**baseline**') debug_puts(baseline_zone_names.sort) debug_puts('**proposed**') debug_puts(proposed_zone_names.sort) # check the heating fuel type of a plant loop def plant_loop_heating_fuel(plant_loop) debug_puts(" looking for plant loop heating fuel for #{plant_loop.name}") # create an array to hold all the heating fuels on the plant loop plant_loop_heating_fuels = [] # loop throug all the supply components and check heating fuel for each one plant_loop.supplyComponents.each do |supply_component| if supply_component.to_DistrictHeating.empty? == false plant_loop_heating_fuels << 'District Heating' elsif supply_component.to_BoilerHotWater.empty? == false boiler_hot_water = supply_component.to_BoilerHotWater.get plant_loop_heating_fuels << boiler_hot_water.fuelType end end return plant_loop_heating_fuels.uniq end # check the cooling fuel type of a plant loop def plant_loop_cooling_fuel(plant_loop) debug_puts(" looking for plant loop heating fuel for #{plant_loop.name}") # create an array to hold all the heating fuels on the plant loop plant_loop_cooling_fuels = [] # loop throug all the supply components and check heating fuel for each one plant_loop.supplyComponents.each do |supply_component| if supply_component.to_DistrictCooling.empty? == false plant_loop_cooling_fuels << 'District Cooling' elsif supply_component.to_ChillerElectricEIR.empty? == false plant_loop_cooling_fuels << 'Electricity' end end return plant_loop_cooling_fuels.uniq end # check the heating fuel type of a reheat terminal def reheat_terminal_heating_fuel(reheat_terminal) debug_puts(" looking for reheat terminal heating fuel for #{reheat_terminal.name}") # create an array to hold all the heating fuels in the terminal reheat_terminal_heating_fuels = [] # get the reheat coil heating_coil = reheat_terminal.reheatCoil if heating_coil.to_CoilHeatingDXSingleSpeed.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) elsif heating_coil.to_CoilHeatingElectric.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) elsif heating_coil.to_CoilHeatingGas.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) elsif heating_coil.to_CoilHeatingWater.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) end return reheat_terminal_heating_fuels.uniq end # check the heating fuel type of a heating coil def get_heating_coil_heating_fuel(heating_coil) debug_puts(" looking for heating coil heating fuel for #{heating_coil.name}") # create an array to hold all the heating fuels in the terminal heating_coil_heating_fuels = [] # get the reheat coil if heating_coil.to_CoilHeatingDXSingleSpeed.empty? == false heating_coil_heating_fuels << 'Electricity' elsif heating_coil.to_CoilHeatingElectric.empty? == false heating_coil_heating_fuels << 'Electricity' elsif heating_coil.to_CoilHeatingGas.empty? == false heating_coil_heating_fuels << 'Natural Gas' elsif heating_coil.to_CoilHeatingWater.empty? == false # need to check what the heating fuel for the plant loop is heating_coil = heating_coil.to_CoilHeatingWater.get plant_loop = heating_coil.plantLoop.get reheat_coil_fuels = plant_loop_heating_fuel(plant_loop) heating_coil_heating_fuels += reheat_coil_fuels end return heating_coil_heating_fuels end # check the cooling fuel type of a cooling coil def get_cooling_coil_cooling_fuel(cooling_coil) debug_puts(" looking for cooling coil cooling fuel for #{cooling_coil.name}") # create an array to hold all the heating fuels in the terminal cooling_coil_cooling_fuels = [] if cooling_coil.to_CoilCoolingDXSingleSpeed.empty? == false cooling_coil_cooling_fuels << 'Electricity' elsif cooling_coil.to_CoilCoolingDXTwoSpeed.empty? == false cooling_coil_cooling_fuels << 'Electricity' elsif cooling_coil.to_EvaporativeCoolerDirectResearchSpecial.empty? == false cooling_coil_cooling_fuels << 'Electricity' elsif cooling_coil.to_CoilCoolingWater.empty? == false # need to check what the cooling fuel for the plant loop is cooling_coil = cooling_coil.to_CoilCoolingWater.get plant_loop = cooling_coil.plantLoop.get cooling_coil_cooling_fuels += plant_loop_cooling_fuel(plant_loop) end return cooling_coil_cooling_fuels end # check the heating fuels for a zone def get_zone_heating_fuels(zone) # create an array to hold the results equipment_heating_fuels = [] zone.equipment.each do |equipment| # TODO: Enumerable and code blocks and collect or select methods debug_puts(" #{equipment.name}") if equipment.to_AirTerminalSingleDuctParallelPIUReheat.empty? == false terminal = equipment.to_AirTerminalSingleDuctParallelPIUReheat.get equipment_heating_fuels += reheat_terminal_heating_fuel(terminal) elsif equipment.to_AirTerminalSingleDuctVAVReheat.empty? == false terminal = equipment.to_AirTerminalSingleDuctVAVReheat.get equipment_heating_fuels += reheat_terminal_heating_fuel(terminal) elsif equipment.to_ZoneHVACPackagedTerminalHeatPump.empty? == false equipment_heating_fuels << 'Electricity' end end return equipment_heating_fuels.uniq.sort end # check the cooling fuels for a zone def get_zone_cooling_fuels(zone) # create an array to hold the results equipment_cooling_fuels = [] zone.equipment.each do |equipment| # TODO: Enumerable and code blocks and collect or select methods debug_puts(" #{equipment.name}") if equipment.to_ZoneHVACPackagedTerminalAirConditioner.empty? == false equipment_cooling_fuels << 'Electricity' end end return equipment_cooling_fuels.uniq.sort end # check the heating fuels for a zones airloop def get_zone_airloop_heating_fuels(zone) # create an array to hold the results airloop_heating_fuels = [] if zone.airLoopHVAC.empty? #== false debug_puts(' This zone is not connected to an airloop.') return airloop_heating_fuels else zone.airLoopHVAC.get.supplyComponents.each do |supply_component| if supply_component.to_CoilHeatingDXSingleSpeed.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) elsif supply_component.to_CoilHeatingElectric.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) elsif supply_component.to_CoilHeatingGas.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) elsif supply_component.to_CoilHeatingWater.empty? == false airloop_heating_fuels += get_heating_coil_heating_fuel(supply_component) end end end return airloop_heating_fuels.uniq.sort end # check the cooling fuels for a zones airloop def get_zone_airloop_cooling_fuels(zone) # create an array to hold the results airloop_cooling_fuels = [] if zone.airLoopHVAC.empty? #== false debug_puts(' This zone is not connected to an airloop.') return airloop_cooling_fuels else zone.airLoopHVAC.get.supplyComponents.each do |supply_component| if supply_component.to_CoilCoolingDXSingleSpeed.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) elsif supply_component.to_CoilCoolingDXTwoSpeed.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) elsif supply_component.to_EvaporativeCoolerDirectResearchSpecial.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) elsif supply_component.to_CoilCoolingWater.empty? == false airloop_cooling_fuels += get_cooling_coil_cooling_fuel(supply_component) end end end return airloop_cooling_fuels.uniq.sort end # loop through all thermal zones, comparing fuels for heating and cooling baseline_zone_names.sort.each do |baseline_zone_name| # first, make sure the zone exists in both models. use names to compare. if !proposed_zone_names.include?(baseline_zone_name) heat_cool_fuel_swap_check.add_flag(Flag.new($eda, "The zone called #{baseline_zone_name} exists in the baseline model, but not the proposed model, therfore the check for switching of primary heating and cooling fuels could not be run for this zone")) debug_puts "The zone called #{baseline_zone_name} exists in the baseline model, but not the proposed model, therfore the check for switching of primary heating and cooling fuels could not be run for this zone" next end debug_puts('****') debug_puts("Zone name = #{baseline_zone_name}") # default heating and cooling sources to "Unknown" for all zones baseline_zone_hvac_heating = 'Unknown' baseline_zone_hvac_cooling = 'Unknown' baseline_airloop_heating = 'Unknown' baseline_airloop_cooling = 'Unknown' proposed_zone_hvac_heating = 'Unknown' proposed_zone_hvac_cooling = 'Unknown' proposed_airloop_heating = 'Unknown' proposed_airloop_cooling = 'Unknown' # since zone exists in both models, get each zone by name baseline_zone = base_model.getObjectsByName(baseline_zone_name)[0].to_ThermalZone.get proposed_zone = prop_model.getObjectsByName(baseline_zone_name)[0].to_ThermalZone.get # check the zone hvac heating fuel(s) debug_puts("checking the zone-level equipment's heating fuel(s)") baseline_zone_hvac_heating = get_zone_heating_fuels(baseline_zone) proposed_zone_hvac_heating = get_zone_heating_fuels(proposed_zone) # throw a flag if different if baseline_zone_hvac_heating != proposed_zone_hvac_heating heat_cool_fuel_swap_check.add_flag(Flag.new($eda, "Zone-level heating fuel switching: zone name = #{baseline_zone_name}; baseline_zone_hvac_heating = #{baseline_zone_hvac_heating}; proposed_zone_hvac_heating = #{proposed_zone_hvac_heating}")) end # check the zone hvac cooling fuel(s) debug_puts("checking the zone-level equipment's cooling fuel(s)") baseline_zone_hvac_cooling = get_zone_cooling_fuels(baseline_zone) proposed_zone_hvac_cooling = get_zone_cooling_fuels(proposed_zone) # throw a flag if different if baseline_zone_hvac_cooling != proposed_zone_hvac_cooling heat_cool_fuel_swap_check.add_flag(Flag.new($eda, "Zone-level cooling fuel switching: zone name = #{baseline_zone_name}; baseline_zone_hvac_cooling = #{baseline_zone_hvac_cooling}; proposed_zone_hvac_cooling = #{proposed_zone_hvac_cooling}")) end # check the zone airloop heating fuel(s) debug_puts("checking the zone's airloop's heating fuel(s)") baseline_airloop_heating = get_zone_airloop_heating_fuels(baseline_zone) proposed_airloop_heating = get_zone_airloop_heating_fuels(proposed_zone) # throw a flag if different if baseline_airloop_heating != proposed_airloop_heating heat_cool_fuel_swap_check.add_flag(Flag.new($eda, "Airloop heating fuel switching: zone name = #{baseline_zone_name}; baseline_airloop_heating = #{baseline_airloop_heating}; proposed_airloop_heating = #{proposed_airloop_heating}")) end # check the zone airloop cooling fuel(s) debug_puts("checking the zone's airloop's cooling fuel(s)") baseline_airloop_cooling = get_zone_airloop_cooling_fuels(baseline_zone) proposed_airloop_cooling = get_zone_airloop_cooling_fuels(proposed_zone) # throw a flag if different if baseline_airloop_cooling != proposed_airloop_cooling heat_cool_fuel_swap_check.add_flag(Flag.new($eda, "Airloop cooling fuel switching: zone name = #{baseline_zone_name}; baseline_airloop_cooling = #{baseline_airloop_cooling}; proposed_airloop_cooling = #{proposed_airloop_cooling}")) end end debug_puts heat_cool_fuel_swap_check.inspect return heat_cool_fuel_swap_check end |
#openstudio_information ⇒ Array<String>
Reports out information about the OpenStudio environment. Used for debugging different runtime environments. Messages are put to stdout and returned in an array.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/measures/gem_env_report/resources/openstudio_info.rb', line 10 def openstudio_information require 'json' result = {} result[:openstudio] = {} begin require 'openstudio' result[:openstudio]['openStudioVersion'] = OpenStudio.openStudioVersion.to_s result[:openstudio]['openStudioLongVersion'] = OpenStudio.openStudioLongVersion.to_s result[:openstudio]['getOpenStudioModule'] = OpenStudio.getOpenStudioModule.to_s result[:openstudio]['getOpenStudioCLI'] = OpenStudio.getOpenStudioCLI.to_s result[:openstudio]['getEnergyPlusExecutable'] = OpenStudio.getEnergyPlusExecutable.to_s result[:openstudio]['getRadianceDirectory'] = OpenStudio.getRadianceDirectory.to_s result[:openstudio]['getPerlExecutable'] = OpenStudio.getPerlExecutable.to_s rescue StandardError => exception result[:openstudio][:error] = exception.backtrace pretty_result = JSON.pretty_generate(result) puts pretty_result return result end pretty_result = JSON.pretty_generate(result) puts pretty_result return result end |
#plant_loop_cooling_fuel(plant_loop) ⇒ Object
check the cooling fuel type of a plant loop
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 57 def plant_loop_cooling_fuel(plant_loop) debug_puts(" looking for plant loop heating fuel for #{plant_loop.name}") # create an array to hold all the heating fuels on the plant loop plant_loop_cooling_fuels = [] # loop throug all the supply components and check heating fuel for each one plant_loop.supplyComponents.each do |supply_component| if supply_component.to_DistrictCooling.empty? == false plant_loop_cooling_fuels << 'District Cooling' elsif supply_component.to_ChillerElectricEIR.empty? == false plant_loop_cooling_fuels << 'Electricity' end end return plant_loop_cooling_fuels.uniq end |
#plant_loop_heating_fuel(plant_loop) ⇒ Object
check the heating fuel type of a plant loop
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 40 def plant_loop_heating_fuel(plant_loop) debug_puts(" looking for plant loop heating fuel for #{plant_loop.name}") # create an array to hold all the heating fuels on the plant loop plant_loop_heating_fuels = [] # loop throug all the supply components and check heating fuel for each one plant_loop.supplyComponents.each do |supply_component| if supply_component.to_DistrictHeating.empty? == false plant_loop_heating_fuels << 'District Heating' elsif supply_component.to_BoilerHotWater.empty? == false boiler_hot_water = supply_component.to_BoilerHotWater.get plant_loop_heating_fuels << boiler_hot_water.fuelType end end return plant_loop_heating_fuels.uniq end |
#reheat_terminal_heating_fuel(reheat_terminal) ⇒ Object
check the heating fuel type of a reheat terminal
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/measures/XcelEDAReportingandQAQC/resources/FuelSwap.rb', line 73 def reheat_terminal_heating_fuel(reheat_terminal) debug_puts(" looking for reheat terminal heating fuel for #{reheat_terminal.name}") # create an array to hold all the heating fuels in the terminal reheat_terminal_heating_fuels = [] # get the reheat coil heating_coil = reheat_terminal.reheatCoil if heating_coil.to_CoilHeatingDXSingleSpeed.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) elsif heating_coil.to_CoilHeatingElectric.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) elsif heating_coil.to_CoilHeatingGas.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) elsif heating_coil.to_CoilHeatingWater.empty? == false reheat_terminal_heating_fuels += get_heating_coil_heating_fuel(heating_coil) end return reheat_terminal_heating_fuels.uniq end |