From e563a704ec63dce3ee04a15e9075f48c9c07a67d Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 14:25:27 -0700 Subject: [PATCH 01/14] add hvac topology selector --- docs/scenario_workflow_translation_plan.md | 4 +- lib/BOSS/hvac_topology_selector.rb | 684 ++++++++++++++++++ .../tests/unit/hvac_topology_selector_spec.rb | 250 +++++++ 3 files changed, 937 insertions(+), 1 deletion(-) create mode 100644 lib/BOSS/hvac_topology_selector.rb create mode 100644 spec/tests/unit/hvac_topology_selector_spec.rb diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 13495ea..366b040 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -278,12 +278,14 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a ### PR 14B: HVAC Selection Contract -- Status: Planned +- Status: In progress - Delivered by: - - Depends on: Can run in parallel with PR 14A. - Scope: Read detailed HVAC data (sources, deliveries, plants, condensers, other HVAC systems, linked premises) and select topologies with the upstream guide's predicates. Shared by baseline and scenario workflows. Keep `get_principal_HVAC_system_type` for the existing baseline path. - Done when: Table-driven tests cover exact matches and separate results for missing input, conflicting input, mapping gaps, and configurations with no gem measure. - Avoid: Inferring topology from `MeasureName` or principal label alone, or dropping HVAC constituents silently. +- Implementation: `BOSS::HvacTopologySelector` (`lib/BOSS/hvac_topology_selector.rb`) returns one result per conditioning `Delivery` and per `OtherHVACSystem`, with status `match`, `mapping_gap`, `not_mappable`, `missing_input`, `conflicting_input`, or `no_hvac`, the `LinkedPremises` references, and a `group_key` (delivery, cooling source, plant tuple, or other-system ID). Family-only `PrincipalHVACSystemType` data returns `missing_input`. +- Deferred to later steps: guards comparing `Quantity` with zone counts and the premises-containment checks need the model crosswalk (PR 14C). Group-member consistency, zone-overlap checks, plant-binding limits, call ordering, and scenario `@Status` record selection belong to call construction (PR 14D/14E). `DuctSystems` checks are not implemented yet. ### PR 14C: Model Target Binding diff --git a/lib/BOSS/hvac_topology_selector.rb b/lib/BOSS/hvac_topology_selector.rb new file mode 100644 index 0000000..7001214 --- /dev/null +++ b/lib/BOSS/hvac_topology_selector.rb @@ -0,0 +1,684 @@ +# frozen_string_literal: true + +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. +# BuildingSync(R), Copyright (c) Alliance for Energy Innovation, LLC. +# See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md +# ******************************************************************************* + +require 'rexml/document' + +module BOSS + # Selects split HVAC topology measures from detailed BuildingSync HVACSystem data using + # the predicates in buildingsync-measures-gem docs/HVAC_MAPPING_AND_MIGRATION.md. + # + # Every conditioning Delivery and every OtherHVACSystem yields exactly one Result, so no + # constituent is dropped. Model zone resolution, call grouping, and quantity-vs-zone-count + # guards need the model crosswalk and are left to later steps; results carry the + # LinkedPremises references and a group_key for that work. + class HvacTopologySelector + STATUSES = [:match, :mapping_gap, :not_mappable, :missing_input, :conflicting_input, :no_hvac].freeze + + Result = Struct.new(:status, :configuration, :measure, :hvac_system_id, :record_ids, :premises, + :group_key, :messages, keyword_init: true) + + # Element accessors and predicates for one Delivery. Paths are '/'-separated local names, + # so namespace prefixes do not matter. + class Context + attr_reader :sys, :d, :hs, :cs, :conflicts + + def initialize(sys, delivery, index) + @sys = sys + @d = delivery + @index = index + @conflicts = [] + @hs = resolve_one(delivery, 'HeatingSourceID', :heating_source) + @cs = resolve_one(delivery, 'CoolingSourceID', :cooling_source) + end + + def self.nodes(el, path) + return [] if el.nil? + + path.split('/').reduce([el]) do |current, name| + current.flat_map { |node| node.elements.to_a.select { |child| child.name == name } } + end + end + + def self.texts(el, path) + nodes(el, path).map { |node| node.text.to_s.strip } + end + + def nodes(el, path) = self.class.nodes(el, path) + def node(el, path) = nodes(el, path).first + def exists(el, path) = !nodes(el, path).empty? + def absent(el, path) = nodes(el, path).empty? + + def eq(el, path, value) + values = self.class.texts(el, path) + !values.empty? && values.all? { |v| v == value } + end + + def one_of(el, path, allowed) + values = self.class.texts(el, path) + !values.empty? && values.all? { |v| allowed.include?(v) } + end + + # Guards are optional: they pass when the element is absent. + def guard(el, path, allowed) + values = self.class.texts(el, path) + values.empty? || values.all? { |v| Array(allowed).include?(v) } + end + + def quantity_guard(el, path) + values = self.class.texts(el, path) + values.empty? || values.all? { |v| Integer(v, exception: false) == 1 } + end + + def ref_ids(el, path) + nodes(el, path).map { |n| n.attributes['IDref'] } + end + + # Exactly one reference resolving to a record of the given kind, else nil plus a conflict. + def resolve_one(el, path, kind) + ids = ref_ids(el, path) + return nil if ids.empty? + + if ids.length > 1 + @conflicts << "#{el.attributes['ID'] || el.name}/#{path} has #{ids.length} references; expected one" + return nil + end + record = @index.dig(kind, ids.first) + @conflicts << "#{el.attributes['ID'] || el.name}/#{path} '#{ids.first}' does not resolve to a #{kind}" if record.nil? + record + end + + def hc = node(@sys, 'HeatingAndCoolingSystems') + def z = node(@d, 'DeliveryType/ZoneEquipment') + def a = node(@d, 'DeliveryType/CentralAirDistribution') + def h = node(@hs, 'HeatingSourceType') + def c = node(@cs, 'CoolingSourceType') + def dx = node(c, 'DX') + def fc = node(z, 'FanBased/FanBasedDistributionType/FanCoil') + def mv(other) = node(other, 'OtherHVACType/MechanicalVentilation') + + def hp = memo(:hp) { h && resolve_one(h, 'SourceHeatingPlantID', :heating_plant) } + def cp = memo(:cp) { c && resolve_one(c, 'CoolingPlantID', :cooling_plant) } + def cn_dx = memo(:cn_dx) { dx && resolve_one(dx, 'CondenserPlantIDs/CondenserPlantID', :condenser_plant) } + + def cn_chiller + memo(:cn_chiller) do + chiller = node(cp, 'Chiller') + chiller && resolve_one(chiller, 'CondenserPlantIDs/CondenserPlantID', :condenser_plant) + end + end + + # Resolves each reference once so a broken reference is reported once. + def memo(key) + @memo ||= {} + @memo[key] = yield unless @memo.key?(key) + @memo[key] + end + + def cs_id = @cs&.attributes&.[]('ID') + + def heat_pump_shares_cs + ids = ref_ids(h, 'HeatPump/CoolingSourceID') + ids.length == 1 && !cs_id.nil? && ids.first == cs_id + end + + def air_cooled_dx + cn = cn_dx + !cn.nil? && exists(cn, 'AirCooled') && absent(cn, 'AirCooled/EvaporativelyCooledCondenser') + end + + def gas_hot_water_plant + eq(hs, 'HeatingMedium', 'Hot water') && !hp.nil? && + eq(hp, 'Boiler/BoilerType', 'Hot water') && eq(hp, 'PrimaryFuel', 'Natural gas') + end + + def tower_chiller_plant + eq(cs, 'CoolingMedium', 'Chilled water') && !cp.nil? && + eq(cp, 'Chiller/ChillerType', 'Vapor compression') && + eq(cp, 'Chiller/ChillerCompressorDriver', 'Electric Motor') && !cn_chiller.nil? && + eq(cn_chiller, 'WaterCooled/WaterCooledCondenserType', 'Cooling tower') && + absent(cn_chiller, 'WaterCooled/WaterSideEconomizer') + end + + def single_zone_cav + exists(@d, 'DeliveryType/CentralAirDistribution') && eq(a, 'AirDeliveryType', 'Central fan') && + eq(a, 'TerminalUnit', 'CAV terminal box no reheat') && eq(a, 'ReheatSource', 'None') && + eq(hc, 'ZoningSystemType', 'Single zone') + end + + def multizone_vav(terminal, reheat) + exists(@d, 'DeliveryType/CentralAirDistribution') && eq(a, 'AirDeliveryType', 'Central fan') && + eq(a, 'TerminalUnit', terminal) && eq(hc, 'ZoningSystemType', 'Multi zone') && + eq(a, 'ReheatSource', reheat) + end + + def zone_equipment_only + !z.nil? && ['Convection', 'Radiant', 'Other'].all? { |n| absent(z, n) } + end + + def plant_quantities_one(*plants) + plants.compact.all? do |plant| + quantity_guard(plant, 'Quantity') && ['Boiler', 'Chiller'].all? { |eq_name| quantity_guard(plant, "#{eq_name}/Quantity") } + end + end + + def conditioned + ['ElectricResistance', 'Furnace', 'HeatPump', 'SourceHeatingPlantID'].any? { |n| exists(h, n) } || + ['DX', 'CoolingPlantID', 'EvaporativeCooler'].any? { |n| exists(c, n) } + end + end + + ELECTRIC = 'Electricity' + AIR_REFRIGERANT = ['Air', 'Refrigerant'].freeze + + # Exact rows and mapping-gap rows. :required, :absent, and :guards take a Context. + # :absent and :guards return descriptions of failed checks. + DELIVERY_RULES = [ + { + configuration: 'Packaged Terminal Air Conditioner', measure: 'hvac_ptac', status: :match, group: :delivery, + required: lambda { |x| + x.zone_equipment_only && x.exists(x.h, 'ElectricResistance') && + x.eq(x.dx, 'DXSystemType', 'Packaged terminal air conditioner (PTAC)') && x.air_cooled_dx + }, + absent: ->(x) { x.exists(x.z, 'FanBased/FanBasedDistributionType') ? ['Z/FanBased/FanBasedDistributionType'] : [] }, + guards: lambda { |x| + [ + ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', ELECTRIC)], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', 'Air')], + ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)] + ] + } + }, + { + configuration: 'Four Pipe Fan Coil Unit', measure: 'hvac_four_pipe_fan_coil', status: :match, group: :plants, + required: lambda { |x| + x.zone_equipment_only && x.eq(x.fc, 'FanCoilType', 'Fan coil 4 pipe') && + x.gas_hot_water_plant && x.tower_chiller_plant + }, + absent: ->(_x) { [] }, + guards: lambda { |x| + [ + ['FC/HVACPipeConfiguration', x.guard(x.fc, 'HVACPipeConfiguration', '4 pipe')], + ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', 'Natural gas')], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['CP/PrimaryFuel', x.guard(x.cp, 'PrimaryFuel', ELECTRIC)], + ['CP/CondenserType', x.guard(x.cp, 'CondenserType', 'Water Cooled')], + ['plant quantities', x.plant_quantities_one(x.hp, x.cp, x.cn_chiller)] + ] + } + }, + { + configuration: 'Packaged Terminal Heat Pump', measure: 'hvac_pthp', status: :match, group: :delivery, + required: lambda { |x| + x.zone_equipment_only && x.eq(x.h, 'HeatPump/HeatPumpType', 'Packaged Terminal') && x.heat_pump_shares_cs && + x.eq(x.h, 'HeatPump/HeatPumpBackupSystemFuel', ELECTRIC) && x.absent(x.h, 'HeatPump/LinkedHeatingPlantID') && + x.eq(x.dx, 'DXSystemType', 'Packaged terminal heat pump (PTHP)') && x.air_cooled_dx + }, + absent: ->(x) { x.exists(x.z, 'FanBased/FanBasedDistributionType') ? ['Z/FanBased/FanBasedDistributionType'] : [] }, + guards: lambda { |x| + [ + ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', ELECTRIC)], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', AIR_REFRIGERANT)], + ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)] + ] + } + }, + { + configuration: 'Packaged Rooftop Air Conditioner', measure: 'hvac_packaged_rooftop_ac', status: :match, group: :delivery, + required: lambda { |x| + x.single_zone_cav && x.eq(x.h, 'Furnace/FurnaceType', 'Warm air') && x.eq(x.hs, 'PrimaryFuel', 'Natural gas') && + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.air_cooled_dx + }, + absent: ->(x) { central_air_absent(x) }, + guards: lambda { |x| + [ + ['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', 'Air')], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)] + ] + } + }, + { + configuration: 'Packaged Rooftop Heat Pump', measure: 'hvac_packaged_rooftop_heat_pump', status: :match, group: :delivery, + required: lambda { |x| + x.single_zone_cav && x.eq(x.h, 'HeatPump/HeatPumpType', 'Packaged Unitary') && x.heat_pump_shares_cs && + x.eq(x.h, 'HeatPump/HeatPumpBackupSystemFuel', ELECTRIC) && x.absent(x.h, 'HeatPump/LinkedHeatingPlantID') && + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary heat pump') && x.air_cooled_dx + }, + absent: ->(x) { central_air_absent(x) }, + guards: lambda { |x| + [ + ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', ELECTRIC)], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', AIR_REFRIGERANT)], + ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)] + ] + } + }, + { + configuration: 'Packaged Rooftop VAV with Hot Water Reheat', measure: 'hvac_packaged_rooftop_vav_hw_reheat', + status: :match, group: :cooling_source, + required: lambda { |x| + x.multizone_vav('VAV terminal box not fan powered with reheat', 'Heating plant') && x.gas_hot_water_plant && + x.ref_ids(x.a, 'ReheatPlantID') == [x.hp.attributes['ID']] && + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.air_cooled_dx && + x.eq(x.cs, 'Quantity', '1') + }, + absent: ->(x) { x.exists(x.a, 'FanBased/FanBasedDistributionType') ? ['A/FanBased/FanBasedDistributionType'] : [] }, + guards: lambda { |x| + [ + ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', 'Natural gas')], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)], + ['plant quantities', x.plant_quantities_one(x.hp)] + ] + } + }, + { + configuration: 'Packaged Rooftop VAV with Electric Reheat', measure: 'hvac_packaged_rooftop_vav_electric_reheat', + status: :mapping_gap, group: :cooling_source, + gap: 'The terminal enum combines parallel and series fan-powered boxes; the measure builds only parallel boxes.', + required: lambda { |x| + x.multizone_vav('VAV terminal box fan powered with reheat', 'Local electric resistance') && + x.exists(x.h, 'ElectricResistance') && + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.air_cooled_dx + } + }, + { + configuration: 'VAV with Hot Water Reheat', measure: 'hvac_vav_hw_reheat', status: :match, group: :cooling_source, + required: lambda { |x| + x.multizone_vav('VAV terminal box not fan powered with reheat', 'Heating plant') && x.gas_hot_water_plant && + x.ref_ids(x.a, 'ReheatPlantID') == [x.hp.attributes['ID']] && x.tower_chiller_plant && + x.eq(x.cs, 'Quantity', '1') + }, + absent: ->(x) { x.exists(x.a, 'FanBased/FanBasedDistributionType') ? ['A/FanBased/FanBasedDistributionType'] : [] }, + guards: lambda { |x| + [ + ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', 'Natural gas')], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['CP/PrimaryFuel', x.guard(x.cp, 'PrimaryFuel', ELECTRIC)], + ['CP/CondenserType', x.guard(x.cp, 'CondenserType', 'Water Cooled')], + ['plant quantities', x.plant_quantities_one(x.hp, x.cp, x.cn_chiller)] + ] + } + }, + { + configuration: 'VAV with Electric Reheat', measure: 'hvac_vav_electric_reheat', status: :mapping_gap, group: :cooling_source, + gap: 'The terminal enum combines parallel and series fan-powered boxes; the measure builds only parallel boxes.', + required: lambda { |x| + x.multizone_vav('VAV terminal box fan powered with reheat', 'Local electric resistance') && + x.exists(x.h, 'ElectricResistance') && x.tower_chiller_plant + } + }, + { + configuration: 'Warm Air Furnace', measure: 'hvac_warm_air_furnace', status: :match, group: :delivery, + required: lambda { |x| + x.single_zone_cav && x.eq(x.h, 'Furnace/FurnaceType', 'Warm air') && x.eq(x.hs, 'PrimaryFuel', 'Natural gas') && + x.exists(x.c, 'NoCooling') + }, + absent: ->(x) { central_air_absent(x) }, + guards: ->(x) { [['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', 'Air')]] } + }, + { + configuration: 'Water Loop Heat Pump', measure: 'hvac_water_loop_heat_pump', status: :mapping_gap, group: :delivery, + gap: 'BuildingSync does not uniquely encode the generated terminal, shared loop, and fluid-cooler arrangement.', + required: lambda { |x| + !x.z.nil? && x.exists(x.h, 'HeatPump') && x.heat_pump_shares_cs && !x.dx.nil? && + !x.cn_dx.nil? && x.exists(x.cn_dx, 'WaterCooled') + } + }, + { + configuration: 'Ground Source Heat Pump', measure: 'hvac_ground_source_heat_pump', status: :mapping_gap, group: :delivery, + gap: 'The measure approximates the ground loop and creates no well or borefield geometry.', + required: lambda { |x| + !x.z.nil? && x.exists(x.h, 'HeatPump') && x.heat_pump_shares_cs && !x.cn_dx.nil? && + x.exists(x.cn_dx, 'GroundSource') + } + }, + { + configuration: 'VRF Terminal Unit', measure: 'hvac_vrf', status: :match, group: :cooling_source, + required: lambda { |x| + x.zone_equipment_only && x.eq(x.fc, 'FanCoilType', 'VRF terminal units') && x.exists(x.h, 'HeatPump') && + x.heat_pump_shares_cs && x.absent(x.h, 'HeatPump/LinkedHeatingPlantID') && + x.absent(x.h, 'HeatPump/HeatPumpBackupSystemFuel') && + x.eq(x.dx, 'DXSystemType', 'Variable refrigerant flow') && x.air_cooled_dx && x.eq(x.cs, 'Quantity', '1') + }, + absent: ->(x) { x.exists(x.fc, 'HVACPipeConfiguration') ? ['FC/HVACPipeConfiguration'] : [] }, + guards: lambda { |x| + [ + ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', ELECTRIC)], + ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', AIR_REFRIGERANT)], + ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)] + ] + } + }, + { + configuration: 'Chilled Beam', measure: 'hvac_chilled_beam', status: :mapping_gap, group: :plants, + gap: 'BuildingSync has no active/passive or beam pipe-arrangement selector; the measure builds active four-pipe beams.', + required: lambda { |x| + x.eq(x.z, 'Convection/ConvectionType', 'Chilled beam') && x.gas_hot_water_plant && x.tower_chiller_plant + } + }, + { + configuration: 'Hydronic radiant floor / ceiling', measure: 'hvac_radiant', status: :mapping_gap, group: :plants, + gap: 'BuildingSync combines floor and ceiling radiant; the measure builds floors only.', + required: lambda { |x| + x.eq(x.z, 'Radiant/RadiantType', 'Radiant floor or ceiling') && x.gas_hot_water_plant && x.tower_chiller_plant + } + } + ].freeze + + # Configurations the gem cannot generate. Each takes a Context and returns true on a hit. + NOT_MAPPABLE_DELIVERY = [ + ['Split DX air conditioner', ->(x) { x.eq(x.dx, 'DXSystemType', 'Split DX air conditioner') }], + ['Split / mini-split / multi-split heat pump', lambda { |x| + x.eq(x.dx, 'DXSystemType', 'Split heat pump') || x.one_of(x.fc, 'FanCoilType', ['Mini-split', 'Multi-split']) + }], + ['Single-package vertical AC / heat pump', lambda { |x| + x.one_of(x.dx, 'DXSystemType', ['Single package vertical air conditioner', 'Single package vertical heat pump']) + }], + ['Field-assembled DX system', ->(x) { x.eq(x.dx, 'DXSystemType', 'Field-assembled DX system') }], + ['Two-pipe / changeover fan coil', lambda { |x| + x.eq(x.fc, 'FanCoilType', 'Fan coil 2 pipe') || + (x.eq(x.fc, 'HVACPipeConfiguration', '2 pipe') && + (x.eq(x.hs, 'HeatingMedium', 'Hot water') || x.eq(x.cs, 'CoolingMedium', 'Chilled water'))) + }], + ['Baseboard / radiator', lambda { |x| + x.eq(x.z, 'Convection/ConvectionType', 'Perimeter baseboard') || x.eq(x.z, 'Radiant/RadiantType', 'Radiator') + }], + ['Heating-only or cooling-only paired system', lambda { |x| + paired = x.eq(x.dx, 'DXSystemType', 'Packaged terminal air conditioner (PTAC)') || + x.one_of(x.fc, 'FanCoilType', ['Fan coil 4 pipe', 'VRF terminal units']) || + x.eq(x.z, 'Radiant/RadiantType', 'Radiant floor or ceiling') + hydronic = x.eq(x.fc, 'FanCoilType', 'Fan coil 4 pipe') || x.eq(x.z, 'Radiant/RadiantType', 'Radiant floor or ceiling') + (x.exists(x.h, 'NoHeating') && paired) || (x.exists(x.c, 'NoCooling') && hydronic) + }], + ['Multizone CAV / CAV with terminal reheat', lambda { |x| + x.eq(x.a, 'TerminalUnit', 'CAV terminal box with reheat') || + (x.eq(x.hc, 'ZoningSystemType', 'Multi zone') && x.eq(x.a, 'TerminalUnit', 'CAV terminal box no reheat') && x.conditioned) + }], + ['VAV without terminal reheat', lambda { |x| + x.one_of(x.a, 'TerminalUnit', ['VAV terminal box fan powered no reheat', 'VAV terminal box not fan powered no reheat']) + }], + ['Unsupported VAV terminal / reheat pairing', lambda { |x| + (x.eq(x.a, 'TerminalUnit', 'VAV terminal box not fan powered with reheat') && + x.one_of(x.a, 'ReheatSource', ['Local electric resistance', 'Local gas'])) || + (x.eq(x.a, 'TerminalUnit', 'VAV terminal box fan powered with reheat') && + x.one_of(x.a, 'ReheatSource', ['Heating plant', 'Local gas'])) + }], + ['Underfloor air distribution', ->(x) { x.eq(x.a, 'AirDeliveryType', 'Low pressure under floor') }], + ['Evaporative cooling', lambda { |x| + x.one_of(x.c, 'EvaporativeCooler/EvaporativeCoolingType', ['Direct', 'Direct indirect', 'Indirect', 'Other']) + }], + ['Steam / district / solar-thermal heating', lambda { |x| + !x.hp.nil? && (x.eq(x.hp, 'Boiler/BoilerType', 'Steam') || x.exists(x.hp, 'DistrictHeating') || x.exists(x.hp, 'SolarThermal')) + }], + ['Absorption / non-electric chiller or district cooling', lambda { |x| + !x.cp.nil? && (x.eq(x.cp, 'Chiller/ChillerType', 'Absorption') || + x.one_of(x.cp, 'Chiller/ChillerCompressorDriver', ['Steam', 'Gas Turbine', 'Gas Engine']) || + x.exists(x.cp, 'DistrictChilledWater')) + }], + ['Air-cooled chiller', ->(x) { !x.cn_chiller.nil? && x.exists(x.cn_chiller, 'AirCooled') }] + ].freeze + + NOT_MAPPABLE_OTHER = { + 'Heat recovery ventilator' => 'Heat-recovery / energy-recovery ventilation', + 'Energy recovery ventilator' => 'Heat-recovery / energy-recovery ventilation', + 'Exhaust only' => 'Exhaust-only / spot exhaust' + }.freeze + + OTHER_EQUIPMENT_NOT_MAPPABLE = { + 'SpotExhaust' => 'Exhaust-only / spot exhaust', + 'Humidifier' => 'Humidification / dehumidification / air cleaning', + 'Dehumidifier' => 'Humidification / dehumidification / air cleaning', + 'AirCleaner' => 'Humidification / dehumidification / air cleaning', + 'NaturalVentilation' => 'Natural ventilation' + }.freeze + + VENTILATION_MEASURES = { + 'Supply only' => ['Ventilation Only', 'hvac_ventilation_only'], + 'Dedicated outdoor air system' => ['Dedicated Outdoor Air System', 'hvac_doas'] + }.freeze + + def self.central_air_absent(x) + ['ReheatPlantID', 'FanBased/FanBasedDistributionType'].select { |p| x.exists(x.a, p) }.map { |p| "A/#{p}" } + end + + # @param hvac_systems [REXML::Element] an HVACSystems element (or any parent of HVACSystem elements) + # @return [Array] + def select(hvac_systems) + Context.nodes(hvac_systems, 'HVACSystem').flat_map { |sys| _select_system(sys) } + end + + private + + def _select_system(sys) + index, duplicates = _index(sys) + sys_id = sys.attributes['ID'] + deliveries = Context.nodes(sys, 'HeatingAndCoolingSystems/Deliveries/Delivery') + others = Context.nodes(sys, 'OtherHVACSystems/OtherHVACSystem') + + if deliveries.empty? && others.empty? + principal = Context.texts(sys, 'PrimaryHVACSystemType') + Context.texts(sys, 'PrincipalHVACSystemType') + message = if principal.empty? + 'HVACSystem has no Delivery or OtherHVACSystem records.' + else + "Only family-level data (#{principal.join(', ')}); detailed records are required to select a topology." + end + return [_result(:missing_input, sys_id, [sys_id], [], nil, [message])] + end + + unless duplicates.empty? + return [_result(:conflicting_input, sys_id, [sys_id], [], nil, ["Duplicate IDs: #{duplicates.join(', ')}"])] + end + + ventilation_links = Hash.new { |h, k| h[k] = [] } + others.each do |other| + Context.nodes(other, 'LinkedDeliveryIDs/LinkedDeliveryID').each do |link| + ventilation_links[link.attributes['IDref']] << other.attributes['ID'] + end + end + + results = deliveries.reject { |d| ventilation_links.key?(d.attributes['ID']) }.map do |delivery| + _select_delivery(sys, delivery, index) + end + results + others.map { |other| _select_other(sys, other, index, ventilation_links) } + end + + def _index(sys) + kinds = { + delivery: 'HeatingAndCoolingSystems/Deliveries/Delivery', + heating_source: 'HeatingAndCoolingSystems/HeatingSources/HeatingSource', + cooling_source: 'HeatingAndCoolingSystems/CoolingSources/CoolingSource', + heating_plant: 'Plants/HeatingPlants/HeatingPlant', + cooling_plant: 'Plants/CoolingPlants/CoolingPlant', + condenser_plant: 'Plants/CondenserPlants/CondenserPlant', + other: 'OtherHVACSystems/OtherHVACSystem' + } + seen = Hash.new(0) + index = kinds.transform_values do |path| + Context.nodes(sys, path).each_with_object({}) do |el, by_id| + id = el.attributes['ID'] + next if id.nil? + + seen[id] += 1 + by_id[id] = el + end + end + [index, seen.select { |_, count| count > 1 }.keys] + end + + def _select_delivery(sys, delivery, index) + x = Context.new(sys, delivery, index) + ids = [delivery, x.hs, x.cs].compact.map { |el| el.attributes['ID'] } + premises = _premises(delivery) + + missing = [] + missing << 'Delivery/HeatingSourceID' if x.ref_ids(delivery, 'HeatingSourceID').empty? + missing << 'Delivery/CoolingSourceID' if x.ref_ids(delivery, 'CoolingSourceID').empty? + missing << 'Delivery/LinkedPremises' if premises.empty? + return _result(:conflicting_input, sys.attributes['ID'], ids, premises, nil, x.conflicts) unless x.conflicts.empty? + return _result(:missing_input, sys.attributes['ID'], ids, premises, nil, missing.map { |m| "Missing #{m}" }) unless missing.empty? + + hits = DELIVERY_RULES.select { |rule| rule[:required].call(x) } + not_mappable = NOT_MAPPABLE_DELIVERY.select { |_, test| test.call(x) }.map(&:first) + return _result(:conflicting_input, sys.attributes['ID'], ids, premises, nil, x.conflicts) unless x.conflicts.empty? + + if hits.length + not_mappable.length > 1 + names = hits.map { |r| r[:configuration] } + not_mappable + return _result(:conflicting_input, sys.attributes['ID'], ids, premises, nil, + ["Delivery matches more than one configuration: #{names.join(', ')}"]) + end + + if not_mappable.length == 1 + return _result(:not_mappable, sys.attributes['ID'], ids, premises, nil, + ["#{not_mappable.first}: no buildingsync-measures-gem measure for this configuration."], + configuration: not_mappable.first) + end + + rule = hits.first + if rule.nil? + return _result(:missing_input, sys.attributes['ID'], ids, premises, nil, + ['Detailed HVAC data does not identify a supported or known configuration.']) + end + + group_key = _group_key(rule[:group], x) + if rule[:status] == :mapping_gap + return _result(:mapping_gap, sys.attributes['ID'], ids, premises, group_key, [rule[:gap]], + configuration: rule[:configuration], measure: rule[:measure]) + end + + failures = rule[:absent].call(x).map { |p| "#{p} must be absent" } + + rule[:guards].call(x).reject { |_, ok| ok }.map { |name, _| "Guard failed: #{name}" } + unless failures.empty? + return _result(:conflicting_input, sys.attributes['ID'], ids, premises, group_key, failures, + configuration: rule[:configuration]) + end + + _result(:match, sys.attributes['ID'], ids, premises, group_key, [], + configuration: rule[:configuration], measure: rule[:measure]) + end + + def _select_other(sys, other, index, ventilation_links) + sys_id = sys.attributes['ID'] + other_id = other.attributes['ID'] + linked_ids = Context.nodes(other, 'LinkedDeliveryIDs/LinkedDeliveryID').map { |l| l.attributes['IDref'] } + ids = [other_id] + linked_ids + premises = _premises(other) + type_node = Context.nodes(other, 'OtherHVACType').first + equipment = type_node.nil? ? [] : type_node.elements.to_a.map(&:name) + + unsupported = equipment.filter_map { |name| OTHER_EQUIPMENT_NOT_MAPPABLE[name] }.uniq + unless unsupported.empty? + return _result(:not_mappable, sys_id, ids, premises, nil, + unsupported.map { |c| "#{c}: no buildingsync-measures-gem measure for this configuration." }, + configuration: unsupported.join(', ')) + end + + x_probe = Context.new(sys, other, index) + ventilation_type = Context.texts(x_probe.mv(other), 'VentilationType') + if ventilation_type.empty? + return _result(:missing_input, sys_id, ids, premises, nil, + ['OtherHVACSystem does not identify a supported ventilation configuration.']) + end + if ventilation_type.length > 1 + return _result(:conflicting_input, sys_id, ids, premises, nil, ['Multiple VentilationType values.']) + end + + ventilation_type = ventilation_type.first + if NOT_MAPPABLE_OTHER.key?(ventilation_type) + configuration = NOT_MAPPABLE_OTHER[ventilation_type] + return _result(:not_mappable, sys_id, ids, premises, nil, + ["#{configuration}: no buildingsync-measures-gem measure creates this equipment."], + configuration: configuration) + end + + return _result(:missing_input, sys_id, ids, premises, nil, ['Missing LinkedDeliveryIDs.']) if linked_ids.empty? + + shared = linked_ids.select { |id| ventilation_links[id].length > 1 } + broken = linked_ids.reject { |id| index[:delivery].key?(id) } + conflicts = broken.map { |id| "LinkedDeliveryID '#{id}' does not resolve to a Delivery" } + + shared.map { |id| "Delivery '#{id}' is linked by more than one OtherHVACSystem" } + return _result(:conflicting_input, sys_id, ids, premises, nil, conflicts) unless conflicts.empty? + + contexts = linked_ids.map { |id| Context.new(sys, index[:delivery][id], index) } + linked_conflicts = contexts.flat_map(&:conflicts) + return _result(:conflicting_input, sys_id, ids, premises, nil, linked_conflicts) unless linked_conflicts.empty? + + if ventilation_type == 'None' + explicit = contexts.all? do |x| + x.exists(x.h, 'NoHeating') && x.exists(x.c, 'NoCooling') && x.absent(x.d, 'DeliveryType') + end + return _result(:no_hvac, sys_id, ids, premises, nil, [], configuration: 'Explicitly no HVAC') if explicit + + return _result(:missing_input, sys_id, ids, premises, nil, + ['VentilationType None requires linked deliveries with NoHeating, NoCooling, and no DeliveryType.']) + end + + configuration, measure = VENTILATION_MEASURES[ventilation_type] + if configuration.nil? + return _result(:missing_input, sys_id, ids, premises, nil, + ["VentilationType '#{ventilation_type}' does not identify a supported configuration."]) + end + + if contexts.any?(&:conditioned) + return _result(:not_mappable, sys_id, ids, premises, nil, + ['Conditioned DOAS / makeup-air unit: neither ventilation measure creates conditioning coils.'], + configuration: 'Conditioned DOAS / heated or cooled makeup-air unit') + end + + required = contexts.all? do |x| + x.exists(x.d, 'DeliveryType/CentralAirDistribution') && x.eq(x.a, 'AirDeliveryType', 'Central fan') && + x.eq(x.a, 'TerminalUnit', 'CAV terminal box no reheat') && x.eq(x.a, 'ReheatSource', 'None') && + x.exists(x.h, 'NoHeating') && x.exists(x.c, 'NoCooling') + end && Context.texts(other, 'Integration') == ['Stand-alone'] + unless required + return _result(:missing_input, sys_id, ids, premises, nil, + ["#{configuration} requires Stand-alone integration and unconditioned single-duct CAV deliveries."]) + end + + mv = x_probe.mv(other) + failures = contexts.flat_map { |x| self.class.central_air_absent(x) }.uniq.map { |p| "#{p} must be absent" } + failures += ['MakeupAirSourceID', 'VentilationControlMethods', 'VentilationZoneControl'] + .select { |p| x_probe.exists(mv, p) }.map { |p| "MV/#{p} must be absent" } + failures << 'Guard failed: MV/DemandControlVentilation' unless x_probe.guard(mv, 'DemandControlVentilation', ['false', '0']) + failures << 'Guard failed: O/PrimaryFuel' unless x_probe.guard(other, 'PrimaryFuel', ELECTRIC) + failures << 'Guard failed: O/Quantity' unless x_probe.quantity_guard(other, 'Quantity') + return _result(:conflicting_input, sys_id, ids, premises, nil, failures, configuration: configuration) unless failures.empty? + + _result(:match, sys_id, ids, premises, [:other, other_id], [], configuration: configuration, measure: measure) + end + + def _group_key(group, x) + case group + when :delivery then [:delivery, x.d.attributes['ID']] + when :cooling_source then [:cooling_source, x.cs_id] + when :plants then [:plants, x.hp&.attributes&.[]('ID'), x.cp&.attributes&.[]('ID'), x.cn_chiller&.attributes&.[]('ID')] + end + end + + # LinkedPremises references as [{ type: 'ThermalZone', id: 'ThermalZone-1' }, ...]. + def _premises(record) + Context.nodes(record, 'LinkedPremises').flat_map do |linked| + linked.elements.to_a.flat_map do |premise_type| + premise_type.elements.to_a.filter_map do |link| + id = link.attributes['IDref'] + { type: premise_type.name, id: id } if id + end + end + end + end + + def _result(status, sys_id, ids, premises, group_key, messages, configuration: nil, measure: nil) + Result.new(status: status, configuration: configuration, measure: measure, hvac_system_id: sys_id, + record_ids: ids.compact.uniq, premises: premises, group_key: group_key, messages: messages) + end + end +end diff --git a/spec/tests/unit/hvac_topology_selector_spec.rb b/spec/tests/unit/hvac_topology_selector_spec.rb new file mode 100644 index 0000000..b7b1fef --- /dev/null +++ b/spec/tests/unit/hvac_topology_selector_spec.rb @@ -0,0 +1,250 @@ +# frozen_string_literal: true + +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. +# BuildingSync(R), Copyright (c) Alliance for Energy Innovation, LLC. +# See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md +# ******************************************************************************* + +require 'rexml/document' +require 'BOSS/hvac_topology_selector' + +RSpec.describe BOSS::HvacTopologySelector do + dx = lambda do |type, condenser = 'CN-AIR'| + "#{type}" \ + "" + end + heat_pump = lambda do |type, backup = 'Electricity'| + backup_xml = backup ? "#{backup}" : '' + "#{type ? "#{type}" : ''}" \ + "#{backup_xml}" + end + central_air = lambda do |terminal, reheat, extra = ''| + "Central fan#{terminal}" \ + "#{reheat}#{extra}" + end + + electric_resistance = '' + gas_furnace = 'Natural gasWarm air' + hot_water = 'Hot water' + chilled_water = 'Chilled water' + no_cooling = '' + no_heating = '' + single_zone_cav = central_air.call('CAV terminal box no reheat', 'None') + vav_hw = central_air.call('VAV terminal box not fan powered with reheat', 'Heating plant', '') + fan_coil = ->(type) { "#{type}" } + + air_condenser = '' + hydronic_plants = 'Hot water' \ + 'Natural gas' \ + 'Vapor compression' \ + 'Electric Motor' \ + '' \ + '' \ + 'Cooling tower' + all_plants = hydronic_plants + air_condenser + premises = '' + + # One HVACSystem with a single HS/CS/Delivery triple plus optional plants and other systems. + system_xml = lambda do |delivery:, heating:, cooling:, zoning: nil, plants: all_plants, others: '', delivery_refs: nil, + delivery_premises: premises, cooling_extra: ''| + refs = delivery_refs || '' + zoning_xml = zoning ? "#{zoning}" : '' + '' \ + "#{zoning_xml}#{heating}" \ + "#{cooling}#{cooling_extra}" \ + "#{delivery_premises}#{delivery}#{refs}" \ + "#{plants}#{others}" + end + + def select_from(body, prefix: nil) + ns = prefix ? "xmlns:#{prefix}=\"http://buildingsync.net/schemas/bedes-auc/2019\"" : '' + xml = "#{body}" + xml = xml.gsub(%r{<(/?)([A-Za-z])}, "<\\1#{prefix}:\\2") if prefix + doc = REXML::Document.new(xml) + described_class.new.select(doc.root.elements.to_a.first) + end + + exact_cases = { + 'Packaged Terminal Air Conditioner' => ['hvac_ptac', { delivery: '', heating: electric_resistance, + cooling: dx.call('Packaged terminal air conditioner (PTAC)') }], + 'Packaged Terminal Heat Pump' => ['hvac_pthp', { delivery: '', heating: heat_pump.call('Packaged Terminal'), + cooling: dx.call('Packaged terminal heat pump (PTHP)') }], + 'Packaged Rooftop Air Conditioner' => ['hvac_packaged_rooftop_ac', { delivery: single_zone_cav, heating: gas_furnace, + cooling: dx.call('Packaged/unitary direct expansion/RTU'), + zoning: 'Single zone' }], + 'Packaged Rooftop Heat Pump' => ['hvac_packaged_rooftop_heat_pump', { delivery: single_zone_cav, + heating: heat_pump.call('Packaged Unitary'), + cooling: dx.call('Packaged/unitary heat pump'), + zoning: 'Single zone' }], + 'Warm Air Furnace' => ['hvac_warm_air_furnace', { delivery: single_zone_cav, heating: gas_furnace, cooling: no_cooling, + zoning: 'Single zone' }], + 'Four Pipe Fan Coil Unit' => ['hvac_four_pipe_fan_coil', { delivery: fan_coil.call('Fan coil 4 pipe'), heating: hot_water, + cooling: chilled_water }], + 'VAV with Hot Water Reheat' => ['hvac_vav_hw_reheat', { delivery: vav_hw, heating: hot_water, cooling: chilled_water, + zoning: 'Multi zone', cooling_extra: '1' }], + 'Packaged Rooftop VAV with Hot Water Reheat' => ['hvac_packaged_rooftop_vav_hw_reheat', { + delivery: vav_hw, heating: hot_water, cooling: dx.call('Packaged/unitary direct expansion/RTU'), zoning: 'Multi zone', + cooling_extra: '1' + }], + 'VRF Terminal Unit' => ['hvac_vrf', { delivery: fan_coil.call('VRF terminal units'), heating: heat_pump.call(nil, nil), + cooling: dx.call('Variable refrigerant flow'), cooling_extra: '1' }] + } + + describe 'exact matches' do + exact_cases.each do |configuration, (measure, args)| + it "selects #{measure} for #{configuration}" do + results = select_from(system_xml.call(**args)) + expect(results.length).to eq(1) + result = results.first + expect(result.messages).to eq([]) + expect(result).to have_attributes(status: :match, configuration: configuration, measure: measure, + hvac_system_id: 'HVAC-1', premises: [{ type: 'ThermalZone', id: 'TZ-1' }]) + end + end + + it 'groups VAV by cooling source and fan coils by plant tuple' do + vav = select_from(system_xml.call(**exact_cases['VAV with Hot Water Reheat'][1])).first + fcu = select_from(system_xml.call(**exact_cases['Four Pipe Fan Coil Unit'][1])).first + expect(vav.group_key).to eq([:cooling_source, 'CS-1']) + expect(fcu.group_key).to eq([:plants, 'HP-1', 'CP-1', 'CN-TOWER']) + end + + it 'ignores namespace prefixes' do + result = select_from(system_xml.call(**exact_cases['Packaged Terminal Air Conditioner'][1]), prefix: 'auc').first + expect(result).to have_attributes(status: :match, measure: 'hvac_ptac') + end + end + + describe 'non-match results' do + { + 'mapping gap for fan-powered VAV with electric reheat' => [ + :mapping_gap, 'hvac_packaged_rooftop_vav_electric_reheat', + { delivery: central_air.call('VAV terminal box fan powered with reheat', 'Local electric resistance'), + heating: electric_resistance, cooling: dx.call('Packaged/unitary direct expansion/RTU'), zoning: 'Multi zone' } + ], + 'mapping gap for ground source heat pump' => [ + :mapping_gap, 'hvac_ground_source_heat_pump', + { delivery: '', heating: heat_pump.call(nil, nil), cooling: dx.call('Other', 'CN-G'), + plants: '' } + ], + 'not mappable for split DX' => [ + :not_mappable, nil, + { delivery: single_zone_cav, heating: gas_furnace, cooling: dx.call('Split DX air conditioner'), zoning: 'Single zone' } + ], + 'not mappable for two-pipe fan coil' => [ + :not_mappable, nil, { delivery: fan_coil.call('Fan coil 2 pipe'), heating: hot_water, cooling: chilled_water } + ], + 'not mappable for air-cooled chiller' => [ + :not_mappable, nil, + { delivery: fan_coil.call('Fan coil 4 pipe'), heating: hot_water, cooling: chilled_water, + plants: all_plants.sub('Cooling tower', + '') } + ], + 'missing input when the cooling source reference is absent' => [ + :missing_input, nil, + { delivery: '', heating: electric_resistance, cooling: dx.call('Packaged terminal air conditioner (PTAC)'), + delivery_refs: '' } + ], + 'missing input when the delivery has no linked premises' => [ + :missing_input, nil, + { delivery: '', heating: electric_resistance, cooling: dx.call('Packaged terminal air conditioner (PTAC)'), + delivery_premises: '' } + ], + 'missing input when detailed data identifies no configuration' => [ + :missing_input, nil, { delivery: '', heating: electric_resistance, cooling: no_cooling } + ], + 'conflicting input for a broken condenser reference' => [ + :conflicting_input, nil, + { delivery: '', heating: electric_resistance, + cooling: dx.call('Packaged terminal air conditioner (PTAC)', 'CN-MISSING') } + ], + 'conflicting input for a failed fuel guard' => [ + :conflicting_input, nil, + { delivery: '', heating: "Natural gas#{electric_resistance}", + cooling: dx.call('Packaged terminal air conditioner (PTAC)') } + ], + 'conflicting input for a required-absent element' => [ + :conflicting_input, nil, + { delivery: ''.sub('/>', '>'), + heating: electric_resistance, cooling: dx.call('Packaged terminal air conditioner (PTAC)') } + ], + 'conflicting input for four-pipe fan coil with 2 pipe configuration' => [ + :conflicting_input, nil, + { delivery: fan_coil.call('Fan coil 4 pipe').sub('', '2 pipe'), + heating: hot_water, cooling: chilled_water } + ] + }.each do |description, (status, measure, args)| + it "reports #{description}" do + results = select_from(system_xml.call(**args)) + expect(results.length).to eq(1) + expect(results.first.status).to eq(status) + expect(results.first.measure).to eq(measure) + expect(results.first.messages).not_to be_empty + end + end + + it 'reports family-only data as missing input' do + result = select_from('Packaged Rooftop Air Conditioner').first + expect(result.status).to eq(:missing_input) + expect(result.messages.first).to include('family-level data') + end + + it 'reports duplicate IDs as conflicting input' do + body = system_xml.call(**exact_cases['Packaged Terminal Air Conditioner'][1]).sub('CN-AIR">', 'HS-1">') + expect(select_from(body).first.status).to eq(:conflicting_input) + end + end + + describe 'ventilation and other HVAC systems' do + ventilation_delivery = "#{premises}#{single_zone_cav}" \ + '' + other = lambda do |type_xml, links: ''| + "#{type_xml}" \ + "Stand-alone#{links}" + end + mechanical = ->(type) { "#{type}" } + + with_ventilation = lambda do |others, ventilation_heating: no_heating| + system_xml.call(**exact_cases['Packaged Terminal Air Conditioner'][1], others: others) + .sub('', "#{ventilation_heating}") + .sub('', "#{no_cooling}") + .sub('', "#{ventilation_delivery}") + end + + it 'selects PTAC plus DOAS as separate results' do + results = select_from(with_ventilation.call(other.call(mechanical.call('Dedicated outdoor air system')))) + expect(results.map { |r| [r.status, r.measure] }).to eq([[:match, 'hvac_ptac'], [:match, 'hvac_doas']]) + expect(results.last.group_key).to eq([:other, 'O-1']) + expect(results.last.record_ids).to eq(['O-1', 'D-V']) + end + + it 'selects ventilation only for supply-only ventilation' do + results = select_from(with_ventilation.call(other.call(mechanical.call('Supply only')))) + expect(results.last).to have_attributes(status: :match, measure: 'hvac_ventilation_only') + end + + it 'reports conditioned DOAS as not mappable' do + results = select_from(with_ventilation.call(other.call(mechanical.call('Dedicated outdoor air system')), + ventilation_heating: electric_resistance)) + expect(results.last.status).to eq(:not_mappable) + end + + it 'reports energy recovery ventilation as not mappable without dropping it' do + results = select_from(with_ventilation.call(other.call(mechanical.call('Energy recovery ventilator')))) + expect(results.map(&:status)).to eq([:match, :not_mappable]) + end + + it 'reports humidifiers as not mappable' do + results = select_from(with_ventilation.call(other.call('', links: ''))) + expect(results.last).to have_attributes(status: :not_mappable, + configuration: 'Humidification / dehumidification / air cleaning') + end + + it 'reports a broken linked delivery as conflicting input' do + links = '' + results = select_from(with_ventilation.call(other.call(mechanical.call('Supply only'), links: links))) + expect(results.last.status).to eq(:conflicting_input) + end + end +end From cb2200a9c6a17fba8ae81158260d7a993bcf7d5b Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 15:01:11 -0700 Subject: [PATCH 02/14] add target binder work with the companion added measure in bs-measure-gem --- docs/scenario_workflow_translation_plan.md | 5 +- lib/BOSS/hvac_target_binder.rb | 60 +++++++++++++++++ spec/tests/unit/hvac_target_binder_spec.rb | 78 ++++++++++++++++++++++ 3 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 lib/BOSS/hvac_target_binder.rb create mode 100644 spec/tests/unit/hvac_target_binder_spec.rb diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 366b040..e309c43 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -289,12 +289,15 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a ### PR 14C: Model Target Binding -- Status: Planned +- Status: In progress - Delivered by: - - Depends on: PR 14B. - Scope: Bind selected BuildingSync premises to the actual OpenStudio zone and equipment names the topology and modifier measures need. OSWs are written before the model exists, so this step must prove how names are resolved at run time. A new runtime measure belongs in `buildingsync-measures-gem`, not BOSS. - Done when: A model-based test proves exact zone/object binding, full shared-system scope for `replace`, and self-contained scenario OSWs. - Avoid: Placeholder or guessed names, blank `target_zone_names` defaults, or making scenarios wait on baseline runs. +- Findings: BOSS baseline zones come from `create_bar_from_building_type_ratios` and carry no BuildingSync IDs, and no v2.7.0 fixture links premises on HVAC deliveries. A probe workflow showed that a measure cannot change a later OSW step's arguments at run time. +- Decision: bind whole-building premises only (`Building`, `Site`, `Facility`). `BOSS::HvacTargetBinder` (`lib/BOSS/hvac_target_binder.rb`) emits an `apply_hvac_topology_to_zone_scope` step with `zone_scope = all_model_zones`; zone, space, and section links return `missing_input`. The new upstream measure resolves every model zone by exact name at run time and runs the selected topology measure, so `replace` always gets the full zone list and scenario OSWs do not depend on a baseline run. Its Minitest suite (`apply_hvac_topology_to_zone_scope_test.rb`) covers create, full-scope replace of a shared air loop, topology safety checks, and an empty model. +- Remaining: commit and merge `apply_hvac_topology_to_zone_scope` upstream, then bump the CI checkout ref in `.github/workflows/ci.yml` (still `c7efd32`). Modifier object binding (`modify_existing_*`) waits for PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. ### PR 14D: Baseline HVAC Integration diff --git a/lib/BOSS/hvac_target_binder.rb b/lib/BOSS/hvac_target_binder.rb new file mode 100644 index 0000000..96298c0 --- /dev/null +++ b/lib/BOSS/hvac_target_binder.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. +# BuildingSync(R), Copyright (c) Alliance for Energy Innovation, LLC. +# See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md +# ******************************************************************************* + +module BOSS + # Binds a matched HvacTopologySelector result to model zones. + # + # BOSS baseline geometry is generated (create_bar_from_building_type_ratios), so model zones + # have no BuildingSync IDs. Only whole-building premises can be bound; they resolve to every + # model zone at run time through buildingsync-measures-gem apply_hvac_topology_to_zone_scope. + # Zone, space, and section links return :missing_input. + class HvacTargetBinder + BINDING_MEASURE = 'apply_hvac_topology_to_zone_scope' + WHOLE_BUILDING_PREMISES = ['Building', 'Site', 'Facility'].freeze + STANDARDS_TEMPLATES = ['90.1-2013', '90.1-2016', '90.1-2019'].freeze + OPERATIONS = ['create', 'replace'].freeze + + Binding = Struct.new(:status, :step, :messages, keyword_init: true) + + # @param result [HvacTopologySelector::Result] + # @param operation [String] 'create' or 'replace' + # @param standards_template [String] one of STANDARDS_TEMPLATES + # @return [Binding] status :bound with an OSW step spec, or the reason it cannot bind + def bind(result, operation:, standards_template:) + raise ArgumentError, "Unsupported operation '#{operation}'" if !OPERATIONS.include?(operation) + if !STANDARDS_TEMPLATES.include?(standards_template) + raise ArgumentError, "Unsupported standards_template '#{standards_template}'" + end + return Binding.new(status: result.status, step: nil, messages: result.messages) if result.status != :match + + unbound = result.premises.reject { |premise| WHOLE_BUILDING_PREMISES.include?(premise[:type]) } + if result.premises.empty? || !unbound.empty? + refs = unbound.map { |premise| "#{premise[:type]} #{premise[:id]}" } + return Binding.new( + status: :missing_input, step: nil, + messages: ["#{result.configuration} links #{refs.empty? ? 'no premises' : refs.join(', ')}; " \ + 'only whole-building premises can be bound to generated baseline zones.'] + ) + end + + Binding.new( + status: :bound, + step: { + measure_dir_name: BINDING_MEASURE, + arguments: { + topology_measure: result.measure, + operation: operation, + zone_scope: 'all_model_zones', + standards_template: standards_template + } + }, + messages: [] + ) + end + end +end diff --git a/spec/tests/unit/hvac_target_binder_spec.rb b/spec/tests/unit/hvac_target_binder_spec.rb new file mode 100644 index 0000000..109eb2e --- /dev/null +++ b/spec/tests/unit/hvac_target_binder_spec.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. +# BuildingSync(R), Copyright (c) Alliance for Energy Innovation, LLC. +# See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md +# ******************************************************************************* + +require 'json' +require 'BOSS/constants' +require 'BOSS/external_measure_repo_manager' +require 'BOSS/hvac_topology_selector' +require 'BOSS/hvac_target_binder' + +RSpec.describe BOSS::HvacTargetBinder do + def match_result(premises, measure: 'hvac_ptac') + BOSS::HvacTopologySelector::Result.new( + status: :match, configuration: 'Packaged Terminal Air Conditioner', measure: measure, + hvac_system_id: 'HVAC-1', record_ids: ['D-1'], premises: premises, group_key: [:delivery, 'D-1'], messages: [] + ) + end + + let(:binder) { described_class.new } + + ['Building', 'Site', 'Facility'].each do |type| + it "binds #{type} premises to all model zones through the runtime binding measure" do + binding = binder.bind(match_result([{ type: type, id: "#{type}-1" }]), + operation: 'replace', standards_template: '90.1-2016') + expect(binding.status).to eq(:bound) + expect(binding.step).to eq( + measure_dir_name: 'apply_hvac_topology_to_zone_scope', + arguments: { topology_measure: 'hvac_ptac', operation: 'replace', zone_scope: 'all_model_zones', + standards_template: '90.1-2016' } + ) + end + end + + it 'returns missing input for zone or space premises instead of guessing names' do + premises = [{ type: 'Building', id: 'B-1' }, { type: 'ThermalZone', id: 'TZ-1' }] + binding = binder.bind(match_result(premises), operation: 'create', standards_template: '90.1-2019') + expect(binding.status).to eq(:missing_input) + expect(binding.step).to be_nil + expect(binding.messages.first).to include('ThermalZone TZ-1') + end + + it 'returns missing input when no premises are linked' do + binding = binder.bind(match_result([]), operation: 'create', standards_template: '90.1-2019') + expect(binding.status).to eq(:missing_input) + end + + it 'passes non-match selector results through unchanged' do + result = match_result([{ type: 'Building', id: 'B-1' }]).dup + result.status = :mapping_gap + result.messages = ['gap'] + binding = binder.bind(result, operation: 'create', standards_template: '90.1-2019') + expect(binding).to have_attributes(status: :mapping_gap, step: nil, messages: ['gap']) + end + + it 'rejects templates and operations the topology measures do not support' do + result = match_result([{ type: 'Building', id: 'B-1' }]) + expect { binder.bind(result, operation: 'create', standards_template: 'DOE Ref Pre-1980') } + .to raise_error(ArgumentError, /standards_template/) + expect { binder.bind(result, operation: 'delete', standards_template: '90.1-2019') } + .to raise_error(ArgumentError, /operation/) + end + + it 'matches the binding measure arguments in the configured measure source' do + dirs = BOSS::ExternalMeasureRepoManager.new.resolved_measure_directories(include_scenario_only: true) + xml_path = dirs.map { |dir| File.join(dir, described_class::BINDING_MEASURE, 'measure.xml') }.find { |p| File.file?(p) } + skip 'apply_hvac_topology_to_zone_scope is not in the configured measure source' if xml_path.nil? + + doc = REXML::Document.new(File.read(xml_path)) + names = doc.get_elements('measure/arguments/argument/name').map(&:text) + expect(names).to eq(['topology_measure', 'operation', 'zone_scope', 'standards_template']) + topologies = doc.get_elements("measure/arguments/argument[name='topology_measure']/choices/choice/value").map(&:text) + expect(topologies).to include('hvac_ptac', 'hvac_doas', 'hvac_vav_hw_reheat') + end +end From abc752492a13c03603b69fd9d395847664f8cbc6 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 15:57:32 -0700 Subject: [PATCH 03/14] add baseline hvac planner integrate topology selector and target binder --- docs/scenario_workflow_translation_plan.md | 6 +- lib/BOSS/baseline_hvac_planner.rb | 85 +++++++++++++++++++ lib/BOSS/boss.rb | 15 +++- .../buildingsync_reader.rb | 5 ++ lib/BOSS/osw_arg_populator.rb | 6 +- spec/tests/unit/baseline_hvac_planner_spec.rb | 74 ++++++++++++++++ spec/tests/unit/boss_spec.rb | 18 ++++ 7 files changed, 203 insertions(+), 6 deletions(-) create mode 100644 lib/BOSS/baseline_hvac_planner.rb create mode 100644 spec/tests/unit/baseline_hvac_planner_spec.rb diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index e309c43..c5dd38b 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -301,12 +301,16 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a ### PR 14D: Baseline HVAC Integration -- Status: Planned +- Status: In progress - Delivered by: - - Depends on: PR 14A-14C. - Scope: For exact-match files, run `create_typical_building_from_model` with `add_hvac: false`, then the split topology `create` steps. `add_hvac: false` also skips standards sizing and HVAC efficiency steps, so this PR must account for them. Otherwise keep the current baseline and warn (missing or family-only HVAC data, or templates other than 90.1-2013/2016/2019). - Done when: Exact-match baselines simulate with the expected HVAC; fallback files keep their current steps and log why; baseline-only and scenario-writer baselines match. - Avoid: Mapping DOE Ref, older 90.1, or DEER templates to 90.1-2019, or adding HVAC on top of `add_hvac: true`. +- Findings: with `add_hvac: false`, openstudio-standards 0.8.2 `create_typical_building_from_model` skips PRM sizing parameters, the sizing run, multizone VAV outdoor-air sizing, prototype HVAC assumptions, the HVAC efficiency standard, and NIST infiltration schedules; its night-cycle thermostat change then finds no managers. Topology measures do none of these. No existing measure runs this tail alone. +- Decision: `BOSS::BaselineHvacPlanner` (`lib/BOSS/baseline_hvac_planner.rb`) plans topology HVAC only when every selector result is `:match`, binds to whole-building premises, the template is 90.1-2013/2016/2019, and there is exactly one conditioning configuration plus at most one ventilation configuration (ventilation only with zone-equipment topologies, since DOAS `create` rejects air-loop zones). Steps go right after `create_typical_building_from_model`: conditioning, then ventilation, then the new upstream measure `apply_standard_hvac_sizing_and_efficiency`, which mirrors the skipped tail. Otherwise `build_baseline_osw` keeps `add_hvac: true` and logs each reason. When topology steps are used, the baseline adds the scenario-only `buildingsync-measures-gem` measure path. Baseline-only and scenario writers share `build_baseline_osw`. +- Current fixture effect: none. No v2.7.0 fixture links whole-building premises on deliveries, so every fixture falls back and existing baselines are unchanged. +- Remaining: commit and merge `apply_standard_hvac_sizing_and_efficiency` upstream (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus) and bump the CI ref. Add an exact-match fixture and a baseline simulation check to meet "simulate with the expected HVAC". ### PR 14E: Scenario HVAC Mappings diff --git a/lib/BOSS/baseline_hvac_planner.rb b/lib/BOSS/baseline_hvac_planner.rb new file mode 100644 index 0000000..fa788fd --- /dev/null +++ b/lib/BOSS/baseline_hvac_planner.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. +# BuildingSync(R), Copyright (c) Alliance for Energy Innovation, LLC. +# See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md +# ******************************************************************************* + +require 'BOSS/hvac_topology_selector' +require 'BOSS/hvac_target_binder' + +module BOSS + # Decides whether the baseline builds HVAC from split topology measures or keeps + # create_typical_building_from_model HVAC. + # + # Every binder step resolves to all model zones, so a topology plan allows one + # conditioning configuration plus, for zone-equipment configurations only, one + # ventilation configuration (DOAS create rejects zones already on an air loop). + class BaselineHvacPlanner + SIZING_MEASURE = 'apply_standard_hvac_sizing_and_efficiency' + VENTILATION_MEASURES = HvacTopologySelector::VENTILATION_MEASURES.values.map(&:last).freeze + ZONE_EQUIPMENT_MEASURES = ['hvac_ptac', 'hvac_pthp', 'hvac_four_pipe_fan_coil', 'hvac_vrf'].freeze + + Plan = Struct.new(:status, :steps, :messages, keyword_init: true) do + def topology? = status == :topology + end + + def initialize(selector: HvacTopologySelector.new, binder: HvacTargetBinder.new) + @selector = selector + @binder = binder + end + + # @param hvac_systems [REXML::Element, nil] the facility HVACSystems element + # @param standards_template [String] baseline create_typical template + # @return [Plan] :topology with ordered OSW steps, or :fallback with the reasons + def plan(hvac_systems, standards_template) + return fallback(['No HVACSystems in the facility.']) if hvac_systems.nil? + + if !HvacTargetBinder::STANDARDS_TEMPLATES.include?(standards_template) + return fallback(["Template '#{standards_template}' is not supported by the split HVAC measures " \ + "(#{HvacTargetBinder::STANDARDS_TEMPLATES.join(', ')})."]) + end + + results = @selector.select(hvac_systems) + return fallback(['No HVACSystem records.']) if results.empty? + + unmatched = results.reject { |result| result.status == :match } + return fallback(unmatched.map { |result| describe(result, result.status, result.messages) }) if !unmatched.empty? + + groups = results.uniq(&:group_key) + ventilation, conditioning = groups.partition { |result| VENTILATION_MEASURES.include?(result.measure) } + problems = [] + if conditioning.length != 1 + problems << "Expected one conditioning configuration, found #{conditioning.length}; " \ + 'zone-level binding is not supported.' + end + problems << "Expected at most one ventilation configuration, found #{ventilation.length}." if ventilation.length > 1 + if !ventilation.empty? && conditioning.length == 1 && !ZONE_EQUIPMENT_MEASURES.include?(conditioning.first.measure) + problems << "#{ventilation.first.configuration} cannot be added to zones served by " \ + "#{conditioning.first.configuration} air loops." + end + return fallback(problems) if !problems.empty? + + bindings = (conditioning + ventilation).map do |result| + [result, @binder.bind(result, operation: 'create', standards_template:)] + end + unbound = bindings.reject { |_, binding| binding.status == :bound } + return fallback(unbound.map { |result, binding| describe(result, binding.status, binding.messages) }) if !unbound.empty? + + sizing_step = { measure_dir_name: SIZING_MEASURE, arguments: { standards_template: } } + Plan.new(status: :topology, steps: bindings.map { |_, binding| binding.step } + [sizing_step], messages: []) + end + + private + + def fallback(messages) + Plan.new(status: :fallback, steps: [], messages:) + end + + def describe(result, status, messages) + label = result.configuration || result.hvac_system_id || 'HVACSystem' + "#{label} (#{status}): #{messages.join(' ')}" + end + end +end diff --git a/lib/BOSS/boss.rb b/lib/BOSS/boss.rb index cabeb5f..e0cbec0 100644 --- a/lib/BOSS/boss.rb +++ b/lib/BOSS/boss.rb @@ -11,6 +11,7 @@ require 'BOSS/osw_arg_populator' require 'BOSS/external_measure_repo_manager' require 'BOSS/scenario_measure_mapper' +require 'BOSS/baseline_hvac_planner' require 'openstudio/common_measures' require 'openstudio/model_articulation' @@ -201,7 +202,16 @@ def build_baseline_osw(bsync_reader) OSWArgPopulator::populate_change_building_location_args(baseline_osw, bsync_reader) OSWArgPopulator::populate_create_bar_from_building_type_ratios_args(baseline_osw, bsync_reader) - OSWArgPopulator::populate_create_typical_building_from_model_args(baseline_osw, bsync_reader) + hvac_plan = BaselineHvacPlanner.new.plan(bsync_reader.get_hvac_systems_xml, bsync_reader.get_standard_template) + OSWArgPopulator::populate_create_typical_building_from_model_args(baseline_osw, bsync_reader, + add_hvac: !hvac_plan.topology?) + if hvac_plan.topology? + hvac_plan.steps.each { |step| OSWArgPopulator.append_step(baseline_osw, step) } + else + hvac_plan.messages.each do |message| + BOSS.BOSS_logger.warn("BOSS.Boss: Keeping create_typical_building_from_model HVAC: #{message}") + end + end OSWArgPopulator::populate_set_lighting_loads_by_LPD_args(baseline_osw, bsync_reader) OSWArgPopulator::populate_set_electric_equipment_loads_by_epd_args(baseline_osw, bsync_reader) @@ -215,7 +225,8 @@ def build_baseline_osw(bsync_reader) # Force ordering: local BOSS measures, extension-discovered (gems), then external repos. manager = ExternalMeasureRepoManager.new local_measure_dirs = manager.local_measure_directories - external_measure_dirs = manager.resolved_measure_directories + # Topology HVAC steps need buildingsync-measures-gem, which is otherwise scenario-only. + external_measure_dirs = manager.resolved_measure_directories(include_scenario_only: hvac_plan.topology?) discovered_measure_dirs = baseline_osw[:measure_paths] || [] discovered_nonlocal_nonexternal = discovered_measure_dirs.reject do |path| diff --git a/lib/BOSS/buildingsync_reader/buildingsync_reader.rb b/lib/BOSS/buildingsync_reader/buildingsync_reader.rb index 021d098..9ddb68d 100644 --- a/lib/BOSS/buildingsync_reader/buildingsync_reader.rb +++ b/lib/BOSS/buildingsync_reader/buildingsync_reader.rb @@ -399,6 +399,11 @@ def get_aspect_ratio return aspect_ratio.to_f end + # @return [REXML::Element, nil] the facility HVACSystems element + def get_hvac_systems_xml + @facility_xml.elements["#{@ns}Systems/#{@ns}HVACSystems"] + end + # get principal hvac system type # @return [String] def get_principal_HVAC_system_type diff --git a/lib/BOSS/osw_arg_populator.rb b/lib/BOSS/osw_arg_populator.rb index b8057bd..b6acea3 100644 --- a/lib/BOSS/osw_arg_populator.rb +++ b/lib/BOSS/osw_arg_populator.rb @@ -145,7 +145,7 @@ def self.populate_create_bar_from_building_type_ratios_args(osw, bsync_reader) BOSS.BOSS_logger.info("") end - def self.populate_create_typical_building_from_model_args(osw, bsync_reader) + def self.populate_create_typical_building_from_model_args(osw, bsync_reader, add_hvac: true) BOSS.BOSS_logger.info("+++++ populating measure create_typical_building_from_model +++++++++++++++") set_measure_argument = step_argument_setter(osw, "create_typical_building_from_model") @@ -183,8 +183,8 @@ def self.populate_create_typical_building_from_model_args(osw, bsync_reader) # add_thermostat # add_hvac BOSS.BOSS_logger.info("|\t- setting arg 'add_hvac'...") - BOSS.BOSS_logger.info("|\t defaults to 'true'") - set_measure_argument.call("add_hvac", true) + BOSS.BOSS_logger.info("|\t set to '#{add_hvac}'") + set_measure_argument.call("add_hvac", add_hvac) # add_refrigeration # modify_wkdy_op_hrs # wkdy_op_hrs_start_time diff --git a/spec/tests/unit/baseline_hvac_planner_spec.rb b/spec/tests/unit/baseline_hvac_planner_spec.rb new file mode 100644 index 0000000..d81921d --- /dev/null +++ b/spec/tests/unit/baseline_hvac_planner_spec.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. +# BuildingSync(R), Copyright (c) Alliance for Energy Innovation, LLC. +# See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md +# ******************************************************************************* + +require 'rexml/document' +require 'BOSS/baseline_hvac_planner' + +RSpec.describe BOSS::BaselineHvacPlanner do + building = [{ type: 'Building', id: 'B-1' }] + result = lambda do |status: :match, measure: 'hvac_ptac', configuration: 'PTAC', group_key: [:delivery, 'D-1'], premises: building, messages: []| + BOSS::HvacTopologySelector::Result.new(status:, configuration:, measure:, hvac_system_id: 'HVAC-1', + record_ids: [], premises:, group_key:, messages:) + end + hvac_systems = REXML::Document.new('').root + + def plan_for(results, systems, template = '90.1-2019') + selector = instance_double(BOSS::HvacTopologySelector, select: results) + described_class.new(selector:).plan(systems, template) + end + + it 'plans whole-building create steps, ventilation last, then sizing' do + doas = result.call(measure: 'hvac_doas', configuration: 'DOAS', group_key: [:other, 'O-1']) + plan = plan_for([doas, result.call, result.call(group_key: [:delivery, 'D-1'])], hvac_systems, '90.1-2016') + + expect(plan.status).to eq(:topology) + expect(plan.steps.map { |step| step[:measure_dir_name] }).to eq( + ['apply_hvac_topology_to_zone_scope', 'apply_hvac_topology_to_zone_scope', 'apply_standard_hvac_sizing_and_efficiency'] + ) + expect(plan.steps.map { |step| step[:arguments][:topology_measure] }.compact).to eq(['hvac_ptac', 'hvac_doas']) + expect(plan.steps.map { |step| step[:arguments][:operation] }.compact).to eq(['create', 'create']) + expect(plan.steps.map { |step| step[:arguments][:standards_template] }.uniq).to eq(['90.1-2016']) + end + + { + 'no HVACSystems' => [[], nil, '90.1-2019', /No HVACSystems/], + 'an unsupported template' => [[], :systems, '90.1-2010', /Template '90.1-2010'/], + 'family-only data' => [[{ status: :missing_input, messages: ['Only family-level data'] }], :systems, '90.1-2019', + /missing_input.*family-level/], + 'two conditioning configurations' => [[{}, { group_key: [:delivery, 'D-2'] }], :systems, '90.1-2019', + /one conditioning configuration, found 2/], + 'ventilation on air-loop HVAC' => [[{ measure: 'hvac_warm_air_furnace', configuration: 'Furnace' }, + { measure: 'hvac_doas', configuration: 'DOAS', group_key: [:other, 'O-1'] }], + :systems, '90.1-2019', /DOAS cannot be added.*Furnace/], + 'zone-linked premises' => [[{ premises: [{ type: 'ThermalZone', id: 'TZ-1' }] }], :systems, '90.1-2019', + /only whole-building premises/] + }.each do |label, (specs, systems, template, message)| + it "falls back for #{label}" do + plan = plan_for(specs.map { |spec| result.call(**spec) }, systems && hvac_systems, template) + + expect(plan.status).to eq(:fallback) + expect(plan.steps).to be_empty + expect(plan.messages.join("\n")).to match(message) + end + end + + it 'plans a building-linked PTAC from BuildingSync XML' do + xml = '' \ + '' \ + 'Packaged terminal air conditioner (PTAC)' \ + '' \ + '' \ + '' \ + '' \ + '' + plan = described_class.new.plan(REXML::Document.new(xml).root, '90.1-2019') + + expect(plan.status).to eq(:topology), plan.messages.join("\n") + expect(plan.steps.first[:arguments][:topology_measure]).to eq('hvac_ptac') + end +end diff --git a/spec/tests/unit/boss_spec.rb b/spec/tests/unit/boss_spec.rb index 2b54652..83c6b8f 100644 --- a/spec/tests/unit/boss_spec.rb +++ b/spec/tests/unit/boss_spec.rb @@ -202,6 +202,24 @@ def common_steps(climate_zone) expect(second[:measure_paths]).not_to include('/mutated') expect(second[:file_paths]).not_to include('/mutated') end + + it 'replaces create_typical HVAC with planned topology steps and adds scenario-only measure paths' do + stub_measure_dirs(local: [LOCAL_MEASURES_DIR], external: [external_measure_dir], discovered: [gem_measure_dir], + scenario_only: ['/bsync/measures']) + steps = [{ measure_dir_name: 'apply_hvac_topology_to_zone_scope', arguments: { topology_measure: 'hvac_ptac' } }, + { measure_dir_name: 'apply_standard_hvac_sizing_and_efficiency', arguments: {} }] + plan = BOSS::BaselineHvacPlanner::Plan.new(status: :topology, steps: steps, messages: []) + allow_any_instance_of(BOSS::BaselineHvacPlanner).to receive(:plan).and_return(plan) + + osw = described_class.send(:build_baseline_osw, build_reader('all_measures_applied_example.xml')) + names = osw[:steps].map { |step| step[:measure_dir_name] } + typical = names.index('create_typical_building_from_model') + + expect(osw[:steps][typical][:arguments][:add_hvac]).to be false + expect(names[typical + 1, 2]).to eq(steps.map { |step| step[:measure_dir_name] }) + expect(names - steps.map { |step| step[:measure_dir_name] }).to eq(all_measures_steps.map { |step| step[:measure_dir_name] }) + expect(osw[:measure_paths]).to include('/bsync/measures') + end end describe '.write_baseline_osw measure_paths ordering' do From 52199d4056238a33ad52aba30e27178e37682de3 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:53:58 -0700 Subject: [PATCH 04/14] update target binder to accept target zones --- .github/workflows/ci.yml | 2 +- docs/scenario_workflow_translation_plan.md | 3 +- lib/BOSS/hvac_target_binder.rb | 40 +++++++++++++--------- spec/tests/unit/hvac_target_binder_spec.rb | 23 ++++++++++++- 4 files changed, 48 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 356f64c..76c34ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@v4 with: repository: BuildingSync/buildingsync-measures-gem - ref: c7efd329ae30b345d238de5c4dcddeceb8ba0298 + ref: bdf14e8e11e9859eb437faa5cd3d15cf18b57ba8 path: buildingsync-measures-gem - name: Setup run: | diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index e309c43..11dc7ba 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -297,7 +297,8 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Avoid: Placeholder or guessed names, blank `target_zone_names` defaults, or making scenarios wait on baseline runs. - Findings: BOSS baseline zones come from `create_bar_from_building_type_ratios` and carry no BuildingSync IDs, and no v2.7.0 fixture links premises on HVAC deliveries. A probe workflow showed that a measure cannot change a later OSW step's arguments at run time. - Decision: bind whole-building premises only (`Building`, `Site`, `Facility`). `BOSS::HvacTargetBinder` (`lib/BOSS/hvac_target_binder.rb`) emits an `apply_hvac_topology_to_zone_scope` step with `zone_scope = all_model_zones`; zone, space, and section links return `missing_input`. The new upstream measure resolves every model zone by exact name at run time and runs the selected topology measure, so `replace` always gets the full zone list and scenario OSWs do not depend on a baseline run. Its Minitest suite (`apply_hvac_topology_to_zone_scope_test.rb`) covers create, full-scope replace of a shared air loop, topology safety checks, and an empty model. -- Remaining: commit and merge `apply_hvac_topology_to_zone_scope` upstream, then bump the CI checkout ref in `.github/workflows/ci.yml` (still `c7efd32`). Modifier object binding (`modify_existing_*`) waits for PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. +- Remaining: merge `apply_hvac_topology_to_zone_scope` upstream; CI now pins the branch commit `bdf14e8`, which must be replaced with the merged commit. Modifier object binding (`modify_existing_*`) waits for PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. +- Explicit zone scope: upstream `apply_hvac_topology_to_zone_scope` now also takes `zone_scope = explicit_zone_names` with `zone_names_json` (a JSON array, so names may contain commas), and topology measures accept JSON `target_zone_names`. `HvacTargetBinder#bind` takes optional `zone_names:` and then emits that scope for any premises. No BOSS caller passes zone names yet: generated baseline zone names are not known when the OSW is written. ### PR 14D: Baseline HVAC Integration diff --git a/lib/BOSS/hvac_target_binder.rb b/lib/BOSS/hvac_target_binder.rb index 96298c0..9d661b0 100644 --- a/lib/BOSS/hvac_target_binder.rb +++ b/lib/BOSS/hvac_target_binder.rb @@ -6,13 +6,15 @@ # See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md # ******************************************************************************* +require 'json' + module BOSS # Binds a matched HvacTopologySelector result to model zones. # # BOSS baseline geometry is generated (create_bar_from_building_type_ratios), so model zones - # have no BuildingSync IDs. Only whole-building premises can be bound; they resolve to every - # model zone at run time through buildingsync-measures-gem apply_hvac_topology_to_zone_scope. - # Zone, space, and section links return :missing_input. + # have no BuildingSync IDs. Whole-building premises resolve to every model zone at run time + # through buildingsync-measures-gem apply_hvac_topology_to_zone_scope. Other premises bind only + # when the caller passes the exact model zone names; otherwise they return :missing_input. class HvacTargetBinder BINDING_MEASURE = 'apply_hvac_topology_to_zone_scope' WHOLE_BUILDING_PREMISES = ['Building', 'Site', 'Facility'].freeze @@ -24,13 +26,19 @@ class HvacTargetBinder # @param result [HvacTopologySelector::Result] # @param operation [String] 'create' or 'replace' # @param standards_template [String] one of STANDARDS_TEMPLATES + # @param zone_names [Array, nil] exact model zone names for the result's premises; + # when given, the step uses zone_scope explicit_zone_names instead of all_model_zones # @return [Binding] status :bound with an OSW step spec, or the reason it cannot bind - def bind(result, operation:, standards_template:) + def bind(result, operation:, standards_template:, zone_names: nil) raise ArgumentError, "Unsupported operation '#{operation}'" if !OPERATIONS.include?(operation) if !STANDARDS_TEMPLATES.include?(standards_template) raise ArgumentError, "Unsupported standards_template '#{standards_template}'" end + if !zone_names.nil? && (zone_names.empty? || !zone_names.all? { |name| name.is_a?(String) && !name.strip.empty? }) + raise ArgumentError, 'zone_names must be a non-empty array of non-empty strings' + end return Binding.new(status: result.status, step: nil, messages: result.messages) if result.status != :match + return Binding.new(status: :bound, step: step(result, operation, standards_template, zone_names), messages: []) if zone_names unbound = result.premises.reject { |premise| WHOLE_BUILDING_PREMISES.include?(premise[:type]) } if result.premises.empty? || !unbound.empty? @@ -42,19 +50,17 @@ def bind(result, operation:, standards_template:) ) end - Binding.new( - status: :bound, - step: { - measure_dir_name: BINDING_MEASURE, - arguments: { - topology_measure: result.measure, - operation: operation, - zone_scope: 'all_model_zones', - standards_template: standards_template - } - }, - messages: [] - ) + Binding.new(status: :bound, step: step(result, operation, standards_template, nil), messages: []) + end + + private + + def step(result, operation, standards_template, zone_names) + scope = zone_names ? { zone_scope: 'explicit_zone_names', zone_names_json: JSON.generate(zone_names.uniq) } : { zone_scope: 'all_model_zones' } + { + measure_dir_name: BINDING_MEASURE, + arguments: { topology_measure: result.measure, operation: operation, **scope, standards_template: standards_template } + } end end end diff --git a/spec/tests/unit/hvac_target_binder_spec.rb b/spec/tests/unit/hvac_target_binder_spec.rb index 109eb2e..969cb09 100644 --- a/spec/tests/unit/hvac_target_binder_spec.rb +++ b/spec/tests/unit/hvac_target_binder_spec.rb @@ -43,6 +43,25 @@ def match_result(premises, measure: 'hvac_ptac') expect(binding.messages.first).to include('ThermalZone TZ-1') end + it 'binds any premises to explicit zone names as a JSON array' do + premises = [{ type: 'ThermalZone', id: 'TZ-1' }] + binding = binder.bind(match_result(premises), operation: 'replace', standards_template: '90.1-2019', + zone_names: ['Office, East', 'Core', 'Core']) + expect(binding.status).to eq(:bound) + expect(binding.step[:arguments]).to eq( + topology_measure: 'hvac_ptac', operation: 'replace', zone_scope: 'explicit_zone_names', + zone_names_json: '["Office, East","Core"]', standards_template: '90.1-2019' + ) + end + + it 'rejects empty or blank explicit zone names' do + result = match_result([{ type: 'Building', id: 'B-1' }]) + [[], [''], [nil]].each do |names| + expect { binder.bind(result, operation: 'create', standards_template: '90.1-2019', zone_names: names) } + .to raise_error(ArgumentError, /zone_names/) + end + end + it 'returns missing input when no premises are linked' do binding = binder.bind(match_result([]), operation: 'create', standards_template: '90.1-2019') expect(binding.status).to eq(:missing_input) @@ -71,7 +90,9 @@ def match_result(premises, measure: 'hvac_ptac') doc = REXML::Document.new(File.read(xml_path)) names = doc.get_elements('measure/arguments/argument/name').map(&:text) - expect(names).to eq(['topology_measure', 'operation', 'zone_scope', 'standards_template']) + expect(names).to eq(['topology_measure', 'operation', 'zone_scope', 'zone_names_json', 'standards_template']) + scopes = doc.get_elements("measure/arguments/argument[name='zone_scope']/choices/choice/value").map(&:text) + expect(scopes).to eq(['all_model_zones', 'explicit_zone_names']) topologies = doc.get_elements("measure/arguments/argument[name='topology_measure']/choices/choice/value").map(&:text) expect(topologies).to include('hvac_ptac', 'hvac_doas', 'hvac_vav_hw_reheat') end From 429adafcfbe46f21fb691002e3e462915c87b3d0 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 17:01:31 -0700 Subject: [PATCH 05/14] Update scenario_workflow_translation_plan.md --- docs/scenario_workflow_translation_plan.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 923af8e..ccc0ac2 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -310,8 +310,9 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Avoid: Mapping DOE Ref, older 90.1, or DEER templates to 90.1-2019, or adding HVAC on top of `add_hvac: true`. - Findings: with `add_hvac: false`, openstudio-standards 0.8.2 `create_typical_building_from_model` skips PRM sizing parameters, the sizing run, multizone VAV outdoor-air sizing, prototype HVAC assumptions, the HVAC efficiency standard, and NIST infiltration schedules; its night-cycle thermostat change then finds no managers. Topology measures do none of these. No existing measure runs this tail alone. - Decision: `BOSS::BaselineHvacPlanner` (`lib/BOSS/baseline_hvac_planner.rb`) plans topology HVAC only when every selector result is `:match`, binds to whole-building premises, the template is 90.1-2013/2016/2019, and there is exactly one conditioning configuration plus at most one ventilation configuration (ventilation only with zone-equipment topologies, since DOAS `create` rejects air-loop zones). Steps go right after `create_typical_building_from_model`: conditioning, then ventilation, then the new upstream measure `apply_standard_hvac_sizing_and_efficiency`, which mirrors the skipped tail. Otherwise `build_baseline_osw` keeps `add_hvac: true` and logs each reason. When topology steps are used, the baseline adds the scenario-only `buildingsync-measures-gem` measure path. Baseline-only and scenario writers share `build_baseline_osw`. -- Current fixture effect: none. No v2.7.0 fixture links whole-building premises on deliveries, so every fixture falls back and existing baselines are unchanged. -- Remaining: commit and merge `apply_standard_hvac_sizing_and_efficiency` upstream (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus) and bump the CI ref. Add an exact-match fixture and a baseline simulation check to meet "simulate with the expected HVAC". +- Current fixture effect: none; every v2.7.0 fixture falls back before premises are checked. Reasons: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER), HVACSystems with no Delivery/OtherHVACSystem (Golden Test File, ASHRAE 211 Export), heat/energy-recovery or natural ventilation `OtherHVACSystem` records (`not_mappable`), and ASHRAE-L2-style files whose `OtherHVACSystem` (`VentilationType None` or no type) links the conditioning deliveries, so those deliveries are consumed as ventilation links. Premises are linked on `HVACSystem`, usually to `Building` plus a `Space function` section, never on `Delivery` and never to a `Whole building` section. +- Follow-up: let deliveries inherit `HVACSystem/LinkedPremises` when they have none, and revisit how `VentilationType None` / untyped `OtherHVACSystem` links consume conditioning deliveries. Both are selector (14B) changes. +- Remaining: commit and merge `apply_standard_hvac_sizing_and_efficiency` upstream (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus); CI pins branch commit `bdf14e8` until it merges. Add an exact-match fixture and a baseline simulation check to meet "simulate with the expected HVAC". ### PR 14E: Scenario HVAC Mappings From 4314b670b9eb3b611f3c54ab7c84941f82c2b116 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 20:20:35 -0700 Subject: [PATCH 06/14] Update scenario_workflow_translation_plan.md --- docs/scenario_workflow_translation_plan.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index ccc0ac2..638dd03 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -118,7 +118,7 @@ Measure source order for new mappings: HVAC mappings follow the upstream [HVAC Mapping and Migration Guide](https://github.com/BuildingSync/buildingsync-measures-gem/blob/develop/docs/HVAC_MAPPING_AND_MIGRATION.md): 17 topology measures (`operation` create/replace, comma-separated `target_zone_names`, `standards_template` 90.1-2013/2016/2019) plus 5 `modify_existing_*` modifiers that take exact OpenStudio object names. Do not map to the deprecated `modify_hvac`. A principal HVAC label alone is family evidence, not an exact match. Do not invent model object or zone names from BuildingSync IDs. -Verify every measure directory and argument against the source BOSS will load: the `BOSS.gemspec` gem versions, or the merged `buildingsync-measures-gem` ref. Do not map to measures that exist only on an unmerged branch. +Verify every measure directory and argument against the source BOSS will load: the `BOSS.gemspec` gem versions, or the `buildingsync-measures-gem` commit pinned in CI. During PR 14A-14E, CI may pin an unmerged `buildingsync-measures-gem` branch commit; the upstream merge and CI ref bump are the last step of PR 14E. Outside that series, do not map to measures that exist only on an unmerged branch. Keep relative-change mappings (for example "reduce by percentage") on relative measures. Do not swap them for absolute-target measures unless the measure skips models that already meet the target. @@ -297,7 +297,7 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Avoid: Placeholder or guessed names, blank `target_zone_names` defaults, or making scenarios wait on baseline runs. - Findings: BOSS baseline zones come from `create_bar_from_building_type_ratios` and carry no BuildingSync IDs, and no v2.7.0 fixture links premises on HVAC deliveries. A probe workflow showed that a measure cannot change a later OSW step's arguments at run time. - Decision: bind whole-building premises only (`Building`, `Site`, `Facility`). `BOSS::HvacTargetBinder` (`lib/BOSS/hvac_target_binder.rb`) emits an `apply_hvac_topology_to_zone_scope` step with `zone_scope = all_model_zones`; zone, space, and section links return `missing_input`. The new upstream measure resolves every model zone by exact name at run time and runs the selected topology measure, so `replace` always gets the full zone list and scenario OSWs do not depend on a baseline run. Its Minitest suite (`apply_hvac_topology_to_zone_scope_test.rb`) covers create, full-scope replace of a shared air loop, topology safety checks, and an empty model. -- Remaining: merge `apply_hvac_topology_to_zone_scope` upstream; CI now pins the branch commit `bdf14e8`, which must be replaced with the merged commit. Modifier object binding (`modify_existing_*`) waits for PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. +- Remaining: CI pins the unmerged branch commit `bdf14e8`; the upstream merge moves to the end of PR 14E. Modifier object binding (`modify_existing_*`) waits for PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. - Explicit zone scope: upstream `apply_hvac_topology_to_zone_scope` now also takes `zone_scope = explicit_zone_names` with `zone_names_json` (a JSON array, so names may contain commas), and topology measures accept JSON `target_zone_names`. `HvacTargetBinder#bind` takes optional `zone_names:` and then emits that scope for any premises. No BOSS caller passes zone names yet: generated baseline zone names are not known when the OSW is written. ### PR 14D: Baseline HVAC Integration @@ -312,7 +312,7 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Decision: `BOSS::BaselineHvacPlanner` (`lib/BOSS/baseline_hvac_planner.rb`) plans topology HVAC only when every selector result is `:match`, binds to whole-building premises, the template is 90.1-2013/2016/2019, and there is exactly one conditioning configuration plus at most one ventilation configuration (ventilation only with zone-equipment topologies, since DOAS `create` rejects air-loop zones). Steps go right after `create_typical_building_from_model`: conditioning, then ventilation, then the new upstream measure `apply_standard_hvac_sizing_and_efficiency`, which mirrors the skipped tail. Otherwise `build_baseline_osw` keeps `add_hvac: true` and logs each reason. When topology steps are used, the baseline adds the scenario-only `buildingsync-measures-gem` measure path. Baseline-only and scenario writers share `build_baseline_osw`. - Current fixture effect: none; every v2.7.0 fixture falls back before premises are checked. Reasons: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER), HVACSystems with no Delivery/OtherHVACSystem (Golden Test File, ASHRAE 211 Export), heat/energy-recovery or natural ventilation `OtherHVACSystem` records (`not_mappable`), and ASHRAE-L2-style files whose `OtherHVACSystem` (`VentilationType None` or no type) links the conditioning deliveries, so those deliveries are consumed as ventilation links. Premises are linked on `HVACSystem`, usually to `Building` plus a `Space function` section, never on `Delivery` and never to a `Whole building` section. - Follow-up: let deliveries inherit `HVACSystem/LinkedPremises` when they have none, and revisit how `VentilationType None` / untyped `OtherHVACSystem` links consume conditioning deliveries. Both are selector (14B) changes. -- Remaining: commit and merge `apply_standard_hvac_sizing_and_efficiency` upstream (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus); CI pins branch commit `bdf14e8` until it merges. Add an exact-match fixture and a baseline simulation check to meet "simulate with the expected HVAC". +- Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the pinned gem branch commit `bdf14e8` (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus); the upstream merge moves to the end of PR 14E. Add an exact-match fixture and a baseline simulation check to meet "simulate with the expected HVAC". ### PR 14E: Scenario HVAC Mappings @@ -322,6 +322,7 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Scope: Map HVAC retrofit measures to topology `replace` steps or `modify_existing_*` steps through the PR 9 result contract. Order conditioning, then DOAS/ventilation, then modifiers. Keep existing economizer, DCV, and thermostat mappings from other gems. - Done when: One topology replacement and one modifier case run end to end, partial shared-system replacement is rejected, and mixed-source packages still write and run. - Avoid: Mapping "Replace boiler" or "Replace burner" to an efficiency edit, guessing values, or partial HVAC graphs. +- Series close: merge the `buildingsync-measures-gem` branch upstream (`apply_hvac_topology_to_zone_scope`, `apply_standard_hvac_sizing_and_efficiency`, and any 14E measures), replace the CI pin `bdf14e8` with the merged commit, and rerun the unit and integration suites. ### PR 15: CLI Command From f509972e2023f2e076d6656ccf131c380ddbfdc0 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 22:30:07 -0700 Subject: [PATCH 07/14] add gap doc --- docs/hvac_mapping_gaps.md | 55 + docs/scenario_workflow_translation_plan.md | 3 + lib/BOSS/hvac_topology_selector.rb | 65 +- .../Reference-PrimarySchool-L200-Audit.xml | 11015 ++++++++++++++++ .../v2.7.0/example-smalloffice-level2.xml | 2733 ++++ .../tests/unit/hvac_topology_selector_spec.rb | 49 +- 6 files changed, 13912 insertions(+), 8 deletions(-) create mode 100644 docs/hvac_mapping_gaps.md create mode 100644 spec/files/v2.7.0/Reference-PrimarySchool-L200-Audit.xml create mode 100644 spec/files/v2.7.0/example-smalloffice-level2.xml diff --git a/docs/hvac_mapping_gaps.md b/docs/hvac_mapping_gaps.md new file mode 100644 index 0000000..b5d135e --- /dev/null +++ b/docs/hvac_mapping_gaps.md @@ -0,0 +1,55 @@ +# HVAC Mapping Gaps Found In BOSS + +Gaps between BuildingSync audit data and the `buildingsync-measures-gem` [HVAC Mapping and Migration Guide](https://github.com/BuildingSync/buildingsync-measures-gem/blob/develop/docs/HVAC_MAPPING_AND_MIGRATION.md), found while running `BOSS::HvacTopologySelector` on BOSS fixtures. To be moved to `buildingsync-measures-gem`. Rows the guide already lists as mapping gaps or not mappable (fan-powered VAV with electric reheat, water-loop and ground-source heat pumps, chilled beam, radiant, ERV/HRV, exhaust, natural ventilation) are not repeated here. + +Fixture paths are under `spec/files/v2.7.0/`. + +## Measure Gaps + +### 1. Packaged unitary heat pump with gas backup + +- Data: `example-smalloffice-level2.xml`, all five deliveries. `HeatPumpType = Packaged Unitary`, `HeatPumpBackupSystemFuel = Natural gas`, single-zone CAV delivery. +- Guide: the Packaged Rooftop Heat Pump row requires `HeatPumpBackupSystemFuel = Electricity`. No row covers gas backup, so the delivery identifies no configuration. +- Measure: `hvac_packaged_rooftop_heat_pump` creates electric supplemental heat only. +- Ask: add a gas-supplemental option to the measure and a guide row, or list gas-backup packaged heat pumps as not mappable. + +### 2. Packaged rooftop AC with `FurnaceType = Other` + +- Data: `Reference-PrimarySchool-L200-Audit.xml`, PSZAC deliveries. Gas furnace (`PrimaryFuel = Natural gas`, `HeatingMedium = Air`) with `FurnaceType = Other`, packaged RTU DX, single-zone CAV. +- Guide: the Packaged Rooftop Air Conditioner and Warm Air Furnace rows require `FurnaceType = Warm air`. +- Ask: decide whether `Other` (or absent) `FurnaceType` with gas fuel and air medium may match, or list it explicitly as missing input. + +## Guide Rule Gaps + +### 3. Empty `FanBased/FanBasedDistributionType` + +- Data: `Reference-PrimarySchool-L200-Audit.xml`, every delivery. `FanBased` holds an empty `` next to `AirSideEconomizer` data. The element is optional in the schema. +- Guide: packaged rooftop, VAV, and PTAC/PTHP rows require `absent(A/FanBased/FanBasedDistributionType)` (or `Z/...`). An empty element fails that check, so economizer data blocks the match. +- Ask: treat an empty `FanBasedDistributionType` as absent, or require "no child elements" instead of "absent". + +### 4. `CS/Quantity = 1` as a required predicate + +- Data: `Reference-PrimarySchool-L200-Audit.xml`, VAV pods. The DX cooling sources omit `Quantity`. +- Guide: Packaged Rooftop VAV with Hot Water Reheat (and VAV with Hot Water Reheat, VRF) list `CS/Quantity = 1` under required cooling predicates, while other `Quantity` checks are guards that pass when absent. +- Ask: make `CS/Quantity` a guard (pass when absent), or confirm it must be supplied. + +### 5. Integrated outdoor-air records + +- Data: `Reference-PrimarySchool-L200-Audit.xml`. Per-zone `OtherHVACSystem` records with `VentilationType = Supply only` and `Integration = Integrated with central air distribution`, several linked to one VAV delivery, plus integrated records on PSZAC deliveries. +- Guide: only Stand-alone ventilation is defined. The guide does not say whether integrated records consume the linked delivery, so multiple records on one delivery read as a conflict, and an integrated record on a conditioned delivery reads as a conditioned DOAS. +- BOSS behavior: records with `Integration` `Integrated with central air distribution` or `Integrated with local air distribution` do not consume deliveries; they return `integrated`, and the linked deliveries are selected as conditioning deliveries. +- Ask: add this rule to the guide. `DemandControlVentilation` and `VentilationRate` on these records may later feed a modifier mapping. + +### 6. `VentilationType None` or untyped ventilation on conditioned deliveries + +- Data: ASHRAE L1/L2 exports (`Chula_Vista_ASHRAE_L*`, `Demo_ASHRAE_L2_Example_Building.xml`, `Example_ASHRAE_L2_Report_-_with_Energy_Use_Data*.xml`, `Example_HOMES_Template_Building.xml`, NYC files). `OtherHVACSystem` with only `MechanicalVentilation` (`VentilationType None` or none, optional `DemandControlVentilation`) links conditioned deliveries. +- Guide: the Explicitly no HVAC row covers only unconditioned deliveries; other cases are undefined. +- BOSS behavior: such records consume deliveries only when all linked deliveries are explicitly unconditioned. Otherwise the deliveries are selected as conditioning deliveries, and the record returns `no_hvac` (`None`) or `missing_input` (no type). +- Ask: add this rule to the guide. + +### 7. Premises linked only on `HVACSystem` + +- Data: every v2.7.0 fixture with detailed records links `LinkedPremises` on `HVACSystem`, not on `Delivery` or `OtherHVACSystem`. +- Guide: `zones(D)` and `zones(O)` come from the record's own links. +- BOSS behavior: a record without its own links inherits the parent `HVACSystem` links. +- Ask: add the fallback to the guide. diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 366b040..c4a92ff 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -286,6 +286,9 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Avoid: Inferring topology from `MeasureName` or principal label alone, or dropping HVAC constituents silently. - Implementation: `BOSS::HvacTopologySelector` (`lib/BOSS/hvac_topology_selector.rb`) returns one result per conditioning `Delivery` and per `OtherHVACSystem`, with status `match`, `mapping_gap`, `not_mappable`, `missing_input`, `conflicting_input`, or `no_hvac`, the `LinkedPremises` references, and a `group_key` (delivery, cooling source, plant tuple, or other-system ID). Family-only `PrincipalHVACSystemType` data returns `missing_input`. - Deferred to later steps: guards comparing `Quantity` with zone counts and the premises-containment checks need the model crosswalk (PR 14C). Group-member consistency, zone-overlap checks, plant-binding limits, call ordering, and scenario `@Status` record selection belong to call construction (PR 14D/14E). `DuctSystems` checks are not implemented yet. +- Fixture follow-ups (found in PR 14D): a `Delivery` or `OtherHVACSystem` without its own `LinkedPremises` inherits the parent `HVACSystem` links (BuildingSync fixtures link premises only there; the upstream guide reads the record's own links). An `OtherHVACSystem` whose only content is `MechanicalVentilation` with `VentilationType` `None` or no type names no ventilation equipment; it owns its linked deliveries only when all of them are explicitly unconditioned. Otherwise those deliveries are selected as conditioning deliveries, and the record returns `no_hvac` (`None`, configuration "No separate ventilation equipment") or `missing_input` (no type). Fixture effect: ASHRAE-L2-style deliveries are now selected but return `conflicting_input`, because their `SourceHeatingPlantID` points to a plant in a different `HVACSystem` (cross-system plant references are not resolved yet). Whether the baseline planner may ignore `no_hvac` records is a PR 14D decision. +- Integrated outdoor air: an `OtherHVACSystem` with `Integration` `Integrated with central air distribution` or `Integrated with local air distribution` describes outdoor air through the linked deliveries' own air system. It does not consume those deliveries and returns the new status `integrated`; ERV, exhaust, and other not-mappable equipment still return `not_mappable`. Whether the planner may ignore `integrated` records is a PR 14D decision. +- L200 fixtures: `example-smalloffice-level2.xml` and `Reference-PrimarySchool-L200-Audit.xml` (copied from `../schema/docs/notebooks/bsync_examples/`) carry full Delivery/source/plant records. Neither matches yet: gas-backup packaged heat pumps, `FurnaceType Other`, empty `FanBasedDistributionType`, and missing `CS/Quantity` are guide or measure gaps recorded in `docs/hvac_mapping_gaps.md` for `buildingsync-measures-gem`. VAV pods 2, 3, and other reference the `Boiler` plant defined in `VAV-Pod1`; resolving plants across `HVACSystem` records is open BOSS selector work. ### PR 14C: Model Target Binding diff --git a/lib/BOSS/hvac_topology_selector.rb b/lib/BOSS/hvac_topology_selector.rb index 7001214..802c20e 100644 --- a/lib/BOSS/hvac_topology_selector.rb +++ b/lib/BOSS/hvac_topology_selector.rb @@ -17,7 +17,7 @@ module BOSS # guards need the model crosswalk and are left to later steps; results carry the # LinkedPremises references and a group_key for that work. class HvacTopologySelector - STATUSES = [:match, :mapping_gap, :not_mappable, :missing_input, :conflicting_input, :no_hvac].freeze + STATUSES = [:match, :mapping_gap, :not_mappable, :missing_input, :conflicting_input, :no_hvac, :integrated].freeze Result = Struct.new(:status, :configuration, :measure, :hvac_system_id, :record_ids, :premises, :group_key, :messages, keyword_init: true) @@ -447,6 +447,8 @@ def conditioned 'Dedicated outdoor air system' => ['Dedicated Outdoor Air System', 'hvac_doas'] }.freeze + INTEGRATED = ['Integrated with central air distribution', 'Integrated with local air distribution'].freeze + def self.central_air_absent(x) ['ReheatPlantID', 'FanBased/FanBasedDistributionType'].select { |p| x.exists(x.a, p) }.map { |p| "A/#{p}" } end @@ -481,6 +483,8 @@ def _select_system(sys) ventilation_links = Hash.new { |h, k| h[k] = [] } others.each do |other| + next unless _consumes_deliveries?(sys, other, index) + Context.nodes(other, 'LinkedDeliveryIDs/LinkedDeliveryID').each do |link| ventilation_links[link.attributes['IDref']] << other.attributes['ID'] end @@ -492,6 +496,37 @@ def _select_system(sys) results + others.map { |other| _select_other(sys, other, index, ventilation_links) } end + # A record whose only content is MechanicalVentilation with VentilationType None or no type + # (optionally DemandControlVentilation) names no ventilation equipment. + def _ventilation_annotation?(other) + type_node = Context.nodes(other, 'OtherHVACType').first + return false if type_node.nil? || type_node.elements.to_a.map(&:name) != ['MechanicalVentilation'] + + mv = type_node.elements.to_a.first + (mv.elements.to_a.map(&:name) - ['VentilationType', 'DemandControlVentilation']).empty? && + [[], ['None']].include?(Context.texts(mv, 'VentilationType')) + end + + # Outdoor air delivered through the linked deliveries' own air system, not separate equipment. + def _integrated?(other) + texts = Context.texts(other, 'Integration') + !texts.empty? && texts.all? { |t| INTEGRATED.include?(t) } + end + + def _explicit_no_hvac?(x) + !x.d.nil? && x.exists(x.h, 'NoHeating') && x.exists(x.c, 'NoCooling') && x.absent(x.d, 'DeliveryType') + end + + # Ventilation annotations own their linked deliveries only when every one is explicitly + # unconditioned; otherwise those deliveries are still evaluated as conditioning deliveries. + def _consumes_deliveries?(sys, other, index) + return false if _integrated?(other) + return true unless _ventilation_annotation?(other) + + ids = Context.nodes(other, 'LinkedDeliveryIDs/LinkedDeliveryID').map { |l| l.attributes['IDref'] } + !ids.empty? && ids.all? { |id| _explicit_no_hvac?(Context.new(sys, index[:delivery][id], index)) } + end + def _index(sys) kinds = { delivery: 'HeatingAndCoolingSystems/Deliveries/Delivery', @@ -518,12 +553,12 @@ def _index(sys) def _select_delivery(sys, delivery, index) x = Context.new(sys, delivery, index) ids = [delivery, x.hs, x.cs].compact.map { |el| el.attributes['ID'] } - premises = _premises(delivery) + premises = _premises(delivery, sys) missing = [] missing << 'Delivery/HeatingSourceID' if x.ref_ids(delivery, 'HeatingSourceID').empty? missing << 'Delivery/CoolingSourceID' if x.ref_ids(delivery, 'CoolingSourceID').empty? - missing << 'Delivery/LinkedPremises' if premises.empty? + missing << 'LinkedPremises on Delivery or HVACSystem' if premises.empty? return _result(:conflicting_input, sys.attributes['ID'], ids, premises, nil, x.conflicts) unless x.conflicts.empty? return _result(:missing_input, sys.attributes['ID'], ids, premises, nil, missing.map { |m| "Missing #{m}" }) unless missing.empty? @@ -571,7 +606,7 @@ def _select_other(sys, other, index, ventilation_links) other_id = other.attributes['ID'] linked_ids = Context.nodes(other, 'LinkedDeliveryIDs/LinkedDeliveryID').map { |l| l.attributes['IDref'] } ids = [other_id] + linked_ids - premises = _premises(other) + premises = _premises(other, sys) type_node = Context.nodes(other, 'OtherHVACType').first equipment = type_node.nil? ? [] : type_node.elements.to_a.map(&:name) @@ -600,6 +635,12 @@ def _select_other(sys, other, index, ventilation_links) configuration: configuration) end + if _integrated?(other) + return _result(:integrated, sys_id, ids, premises, nil, + ['Outdoor air is integrated with the linked deliveries; they are selected as conditioning deliveries.'], + configuration: 'Integrated outdoor air') + end + return _result(:missing_input, sys_id, ids, premises, nil, ['Missing LinkedDeliveryIDs.']) if linked_ids.empty? shared = linked_ids.select { |id| ventilation_links[id].length > 1 } @@ -618,6 +659,12 @@ def _select_other(sys, other, index, ventilation_links) end return _result(:no_hvac, sys_id, ids, premises, nil, [], configuration: 'Explicitly no HVAC') if explicit + if _ventilation_annotation?(other) && contexts.none? { |x| _explicit_no_hvac?(x) } + return _result(:no_hvac, sys_id, ids, premises, nil, + ['VentilationType None names no ventilation equipment; linked deliveries are selected as conditioning deliveries.'], + configuration: 'No separate ventilation equipment') + end + return _result(:missing_input, sys_id, ids, premises, nil, ['VentilationType None requires linked deliveries with NoHeating, NoCooling, and no DeliveryType.']) end @@ -664,8 +711,14 @@ def _group_key(group, x) end end - # LinkedPremises references as [{ type: 'ThermalZone', id: 'ThermalZone-1' }, ...]. - def _premises(record) + # LinkedPremises references as [{ type: 'ThermalZone', id: 'ThermalZone-1' }, ...]. A record + # without its own links inherits the parent HVACSystem's links. + def _premises(record, sys) + own = _linked_premises(record) + own.empty? ? _linked_premises(sys) : own + end + + def _linked_premises(record) Context.nodes(record, 'LinkedPremises').flat_map do |linked| linked.elements.to_a.flat_map do |premise_type| premise_type.elements.to_a.filter_map do |link| diff --git a/spec/files/v2.7.0/Reference-PrimarySchool-L200-Audit.xml b/spec/files/v2.7.0/Reference-PrimarySchool-L200-Audit.xml new file mode 100644 index 0000000..dc9afbb --- /dev/null +++ b/spec/files/v2.7.0/Reference-PrimarySchool-L200-Audit.xml @@ -0,0 +1,11015 @@ + + + + + + + + + Primary School Prototype + Here we record general problems / issues identified in a walkthrough survey. +
+ + + 15013 Denver West Parkway + + + Golden + CO + 80401 +
+ Commercial + Education-Primary + + 1 + 0 + 1 + 0 + true + false + + + Gross + 73960.000000 + + + + + + Conditioned + 73960.000000 + + + + + + 18538.860000 + 0.000000 + 0.350000 + 0.100000 + 2018 + 2018 + 2018 + +
+ Space function + Office work area + Education-Primary + + + Peak total occupants + 23.730000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 4746.880000 + + + Conditioned + 4746.880000 + + + Single zone + 0.000000 + + + A1 + 68.890000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 68.890000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 68.890000 + + + 582.120000 + + + + + 313.450000 + 0.350000 + 0.000000 + + + + + D1 + 68.890000 + + + 582.120000 + + + + + 313.450000 + 0.350000 + 0.000000 + + + + + + + + 4746.880000 + Good + + + + + + + + + + + + + + + + 4747.000000 + + + + + + + + + Office + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Office + Office + + + Student community + Adults + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 15573.915000 + + + Conditioned + 15573.915000 + + + 1764 + + + + +
+
+ Space function + Mechanical room + Education-Primary + + + Peak total occupants + 0.000000 + + + + + 30.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 2712.510000 + + + Conditioned + 2712.510000 + + + Single zone + 0.000000 + + + A1 + 137.790000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 19.690000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 137.790000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 19.690000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 2712.510000 + Good + + + + + + + + + + + + + + + + 2713.000000 + + + + + + + + + Mechanical-Room + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Mechanical-Room + Mechanical room + + + Student community + Adults + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 8899.380000 + + + Conditioned + 8899.380000 + + + 1008 + + + + +
+
+ Space function + Media center + Education-Primary + + + Peak total occupants + 42.900000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 4294.800000 + + + Conditioned + 4294.800000 + + + Single zone + 0.000000 + + + A1 + 68.900000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 62.340000 + + + 526.770000 + + + + + 283.650000 + 0.350000 + 0.000000 + + + + + C1 + 68.900000 + + + 582.120000 + + + + + 313.450000 + 0.350000 + 0.000000 + + + + + D1 + 62.340000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 4294.800000 + Good + + + + + + + + + + + + + + + + 4295.000000 + + + + + + + + + Library + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Library + Media center + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 14090.685000 + + + Conditioned + 14090.685000 + + + 1596 + + + + +
+
+ Space function + Kitchen + Education-Primary + + + Peak total occupants + 27.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 1808.330000 + + + Conditioned + 1808.330000 + + + Single zone + 0.000000 + + + A1 + 26.250000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 68.900000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 26.250000 + + + 221.810000 + + + + + 119.440000 + 0.350000 + 0.000000 + + + + + D1 + 68.900000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 1808.330000 + Good + + + + + + + + + + + + + + + + 1809.000000 + + + + + + + + + Kitchen + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Kitchen + Kitchen + + + Student community + Adults + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5932.920000 + + + Conditioned + 5932.920000 + + + 672 + + + + +
+
+ Space function + Sport play area + Education-Primary + + + Peak total occupants + 115.160000 + + + + + 25.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 3842.710000 + + + Conditioned + 3842.710000 + + + Single zone + 0.000000 + + + A1 + 55.770000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 68.890000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 55.770000 + + + 471.260000 + + + + + 235.750000 + 0.350000 + 0.000000 + + + + + D1 + 68.890000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 3842.710000 + Good + + + + + + + + + + + + + + + + 3843.000000 + + + + + + + + + Gym + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Gym + Sport play area + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 12607.455000 + + + Conditioned + 12607.455000 + + + 1428 + + + + +
+
+ Space function + Dining area + Education-Primary + + + Peak total occupants + 338.700000 + + + + + 30.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 3390.630000 + + + Conditioned + 3390.630000 + + + Single zone + 0.000000 + + + A1 + 49.210000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 68.900000 + + + 582.200000 + + + + + 313.450000 + 0.350000 + 0.000000 + + + + + C1 + 49.210000 + + + 415.820000 + + + + + 223.910000 + 0.350000 + 0.000000 + + + + + D1 + 68.900000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 3390.630000 + Good + + + + + + + + + + + + + + + + 3391.000000 + + + + + + + + + Cafeteria + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Cafeteria + Dining area + + + Student community + Children + 339.000000 + + + + + + + + Low + 27.880000 + + + Gross + 3391.000000 + + + Conditioned + 3391.000000 + + + 44503 + + + + +
+
+ Space function + Restroom + Education-Primary + + + Peak total occupants + 0.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 2045.140000 + + + Conditioned + 2045.140000 + + + Single zone + 0.000000 + + + A1 + 32.810000 + + + 277.240000 + + + + + 149.290000 + 0.350000 + 0.000000 + + + + + B1 + 62.340000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 32.810000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 62.340000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 2045.140000 + Good + + + + + + + + + + + + + + + + 2045.000000 + + + + + + + + + Bathroom + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Bathroom + Restroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 6709.850000 + + + Conditioned + 6709.850000 + + + 760 + + + + +
+
+ Space function + Computer lab + Education-Primary + + + Peak total occupants + 43.640000 + + + + + 65.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 1743.750000 + + + Conditioned + 1743.750000 + + + Single zone + 0.000000 + + + A1 + 29.530000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 59.060000 + + + 499.060000 + + + + + 268.720000 + 0.350000 + 0.000000 + + + + + C1 + 29.530000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 59.060000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 1743.750000 + Good + + + + + + + + + + + + + + + + 1774.000000 + + + + + + + + + Computer-Lab + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Computer-Lab + Computer lab + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5721.030000 + + + Conditioned + 5721.030000 + + + 648 + + + + +
+
+ Space function + Classroom + Education-Primary + + + Peak total occupants + 309.700000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 12400.020000 + + + Conditioned + 12400.020000 + + + Other + 0.000000 + + + A1 + 118.120000 + + + 499.060000 + + + + + 268.720000 + 0.350000 + 0.000000 + + + + + B1 + 419.940000 + + + 1774.250000 + + + + + 956.160000 + 0.350000 + 0.000000 + + + + + C1 + 118.120000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 419.940000 + + + 1774.250000 + + + + + 956.160000 + 0.350000 + 0.000000 + + + + + + + + 12400.020000 + Good + + + + + + + + + + + + + + + + + + + 2067.000000 + + + + + + + + + + + + Classroom-Corner1-Pod1 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Corner1-Pod1 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 1065.626100 + + + Conditioned + 1065.626100 + + + 13984 + + + + + Classroom-Multi1-Pod1 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Multi1-Pod1 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5134.380300 + + + Conditioned + 5134.380300 + + + 67381 + + + + + Classroom-Corner2-Pod1 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Corner2-Pod1 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 1065.626100 + + + Conditioned + 1065.626100 + + + 13984 + + + + + Classroom-Multi2-Pod1 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Multi2-Pod1 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5134.380300 + + + Conditioned + 5134.380300 + + + 67381 + + + + +
+
+ Space function + Classroom + Education-Primary + + + Peak total occupants + 309.700000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 12400.020000 + + + Conditioned + 12400.020000 + + + Other + 0.000000 + + + A1 + 118.120000 + + + 499.060000 + + + + + 268.720000 + 0.350000 + 0.000000 + + + + + B1 + 419.940000 + + + 1774.250000 + + + + + 956.160000 + 0.350000 + 0.000000 + + + + + C1 + 118.120000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 419.940000 + + + 1774.250000 + + + + + 956.160000 + 0.350000 + 0.000000 + + + + + + + + 12400.020000 + Good + + + + + + + + + + + + + + + + + + + 2067.000000 + + + + + + + + + + + + Classroom-Corner1-Pod2 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Corner1-Pod2 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 1065.626100 + + + Conditioned + 1065.626100 + + + 13984 + + + + + Classroom-Multi1-Pod2 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Multi1-Pod2 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5134.380300 + + + Conditioned + 5134.380300 + + + 67381 + + + + + Classroom-Corner2-Pod2 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Corner2-Pod2 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 1065.626100 + + + Conditioned + 1065.626100 + + + 13984 + + + + + Classroom-Multi2-Pod2 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Multi2-Pod2 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5134.380300 + + + Conditioned + 5134.380300 + + + 67381 + + + + +
+
+ Space function + Classroom + Education-Primary + + + Peak total occupants + 266.120000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 10656.270000 + + + Conditioned + 10656.270000 + + + Other + 0.000000 + + + A1 + 118.120000 + + + 499.060000 + + + + + 268.720000 + 0.350000 + 0.000000 + + + + + B1 + 419.940000 + + + 1774.250000 + + + + + 956.160000 + 0.350000 + 0.000000 + + + + + C1 + 118.120000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 419.940000 + + + 1774.250000 + + + + + 956.160000 + 0.350000 + 0.000000 + + + + + + + + 10656.270000 + Good + + + + + + + + + + + + + + + + + + + 2067.000000 + + + + + + + + + + + + Classroom-Corner1-Pod3 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Corner1-Pod3 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 1065.626100 + + + Conditioned + 1065.626100 + + + 13984 + + + + + Classroom-Multi1-Pod3 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Multi1-Pod3 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5134.380300 + + + Conditioned + 5134.380300 + + + 67381 + + + + + Classroom-Corner2-Pod3 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Corner2-Pod3 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 1065.626100 + + + Conditioned + 1065.626100 + + + 13984 + + + + + Classroom-Multi2-Pod3 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Classroom-Multi2-Pod3 + Classroom + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 5134.380300 + + + Conditioned + 5134.380300 + + + 67381 + + + + +
+
+ Space function + Corridor + Education-Primary + + + Peak total occupants + 0.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 2066.670000 + + + Conditioned + 2066.670000 + + + Single zone + 0.000000 + + + A1 + 9.840000 + + + 83.150000 + + + + + 44.770000 + 0.350000 + 0.000000 + + + + + B1 + 209.970000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 9.840000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 209.970000 + + + 209.970000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 2066.670000 + Good + + + + + + + + + + + + + + + + 2067.000000 + + + + + + + + + Corridor-1 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Corridor-1 + Corridor + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 6780.480000 + + + Conditioned + 6780.480000 + + + 768 + + + + +
+
+ Space function + Corridor + Education-Primary + + + Peak total occupants + 0.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 2066.670000 + + + Conditioned + 2066.670000 + + + Single zone + 0.000000 + + + A1 + 9.840000 + + + 83.150000 + + + + + 44.770000 + 0.350000 + 0.000000 + + + + + B1 + 209.970000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 9.840000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 209.970000 + + + 209.970000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 2066.670000 + Good + + + + + + + + + + + + + + + + 2067.000000 + + + + + + + + + Corridor-2 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Corridor-2 + Corridor + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 6780.480000 + + + Conditioned + 6780.480000 + + + 768 + + + + +
+
+ Space function + Corridor + Education-Primary + + + Peak total occupants + 0.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 2066.670000 + + + Conditioned + 2066.670000 + + + Single zone + 0.000000 + + + A1 + 9.840000 + + + 83.150000 + + + + + 44.770000 + 0.350000 + 0.000000 + + + + + B1 + 209.970000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 9.840000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 209.970000 + + + 209.970000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 2066.670000 + Good + + + + + + + + + + + + + + + + 2067.000000 + + + + + + + + + Corridor-3 + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Corridor-3 + Corridor + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 6780.480000 + + + Conditioned + 6780.480000 + + + 768 + + + + +
+
+ Space function + Corridor + Education-Primary + + + Peak total occupants + 0.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 2066.670000 + + + Conditioned + 2066.670000 + + + Single zone + 0.000000 + + + A1 + 137.790000 + + + 249.530000 + + + + + 134.360000 + 0.350000 + 0.000000 + + + + + B1 + 42.650000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 137.790000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 42.650000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + + + + 2066.670000 + Good + + + + + + + + + + + + + + + + 5878.000000 + + + + + + + + + Corridor-Main + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Corridor-Main + Corridor + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 19281.990000 + + + Conditioned + 19281.990000 + + + 2184 + + + + +
+
+ Space function + Lobby + Education-Primary + + + Peak total occupants + 0.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 1840.620000 + + + Conditioned + 1840.620000 + + + Single zone + 0.000000 + + + A1 + 29.530000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + B1 + 62.340000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + C1 + 29.530000 + + + 0.000000 + + + + + 0.000000 + 0.350000 + 0.000000 + + + + + D1 + 62.340000 + + + 526.770000 + + + + + 283.650000 + 0.350000 + 0.000000 + + + + + + + + 1840.620000 + Good + + + + + + + + + + + + + + + + 1841.000000 + + + + + + + + + Lobby + + + + + + + + 70.000000 + 60.000000 + At night + 75.000000 + 80.000000 + At night + + + Lobby + Lobby + + + Student community + Children + 0.000000 + + + + + + + + Low + 27.880000 + + + Gross + 6038.865000 + + + Conditioned + 6038.865000 + + + 684 + + + + +
+
+ Whole building + Education-Primary + + + Peak total occupants + 1849.000000 + + + + + 45.000000 + Hours per week + + + 50.000000 + Weeks per year + + + Rectangular + + + Gross + 73960.000000 + + + Conditioned + 73960.000000 + + + 0.000000 + + + A1 + 398.100000 + + + 3363.900000 + + + + + 1197.500000 + 0.350000 + 0.000000 + + + + + 80.000000 + + + + + B1 + 185.800000 + + + 1570.000000 + + + + + 549.500000 + 0.350000 + 0.000000 + + + + + 80.000000 + + + + + C1 + 398.100000 + + + 3363.900000 + + + + + 1197.500000 + 0.350000 + 0.000000 + + + + + 80.000000 + + + + + D1 + 185.800000 + + + 1570.000000 + + + + + 549.500000 + 0.350000 + 0.000000 + + + + + 80.000000 + + + + + + + + 73960.000000 + Good + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 73960.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ + + + + + + + Hot water + On Off + 1 + Unknown + Variable + 431299.000000 + 323474.000000 + W + 0.750000 + COP + 1.000000 + 0.800000 + 155.000000 + 1 + + Good + 2018 + Natural gas + true + + + + Unknown + + + + + + + + + Variable Volume + 79047.000000 + W + + Good + 2018 + Electricity + true + + + + Unknown + + + + + + + + Multi zone + + + + + + Hot water + 0.750000 + COP + 32036.000000 + 32036.000000 + W + Variable + Natural gas + Good + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + + + + + + + Packaged/unitary direct expansion/RTU + Reciprocating + Multiple discrete stages + + + + + + Refrigerant + 2.960000 + COP + 79047.000000 + W + 2 + 0.330000 + 0.730000 + Good + + + + + + BACnet + + + EMCS + + + + 2018 + + + + + + + Central fan + VAV terminal box not fan powered with reheat + Heating plant + Dual Maximum + + + + + Dry bulb temperature + + 70.000000 + 60.000000 + 50.000000 + + + + + + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + Good + + + + + + Single + Good + 1 + Interior + + + + + + + + + + + + + + + + + + 204.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + Bathroom + 600.000000 + + Scheduled + + + + + + + EMCS + + + + + + + + + + + + + Stand-alone + + + + + Kitchen hood + 3302.000000 + + Scheduled + + + + + + + EMCS + + + + + + + + + + + + + Stand-alone + + + Packaged Rooftop VAV with Hot Water Reheat + +
+ + + + + + + + + + +
+
+
+ + + + + + Variable Volume + 78136.700000 + W + + Good + 2018 + Electricity + true + + + + Unknown + + + + + + + + Multi zone + + + + + + Hot water + 0.750000 + COP + 20828.200000 + 20828.200000 + W + Variable + Natural gas + Good + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + + + + + + + Packaged/unitary direct expansion/RTU + Reciprocating + Multiple discrete stages + + + + + + Refrigerant + 2.960000 + COP + 78136.700000 + W + 2 + 0.330000 + 0.730000 + Good + + + + + + BACnet + + + EMCS + + + + 2018 + + + + + + + Central fan + VAV terminal box not fan powered with reheat + Heating plant + Dual Maximum + + + + + Dry bulb temperature + + 70.000000 + 60.000000 + 50.000000 + + + + + + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + Good + + + + + + Single + Good + 1 + Interior + + + + + + + + + + + + + + + + + + 204.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + Packaged Rooftop VAV with Hot Water Reheat + +
+ + + + + + + + + + +
+
+
+ + + + + + Variable Volume + 73086.700000 + W + + Good + 2018 + Electricity + true + + + + Unknown + + + + + + + + Multi zone + + + + + + Hot water + 0.750000 + COP + 19520.700000 + 19520.700000 + W + Variable + Natural gas + Good + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + + + + + + + Packaged/unitary direct expansion/RTU + Reciprocating + Multiple discrete stages + + + + + + Refrigerant + 3.220000 + COP + 73086.700000 + W + 2 + 0.330000 + 0.730000 + Good + + + + + + BACnet + + + EMCS + + + + 2018 + + + + + + + Central fan + VAV terminal box not fan powered with reheat + Heating plant + Dual Maximum + + + + + Dry bulb temperature + + 70.000000 + 60.000000 + 50.000000 + + + + + + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + Good + + + + + + Single + Good + 1 + Interior + + + + + + + + + + + + + + + + + + 204.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + Packaged Rooftop VAV with Hot Water Reheat + +
+ + + + + + + + + + +
+
+
+ + + + + + Variable Volume + 83569.900000 + W + + Good + 2018 + Electricity + true + + + + Unknown + + + + + + + + Multi zone + + + + + + Hot water + 0.750000 + COP + 28786.600000 + 28786.600000 + W + Variable + Natural gas + Good + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + + + + + + + Packaged/unitary direct expansion/RTU + Reciprocating + Multiple discrete stages + + + + + + Refrigerant + 2.850000 + COP + 83569.900000 + W + 2 + 0.330000 + 0.800000 + Good + + + + + + BACnet + + + EMCS + + + + 2018 + + + + + + + Central fan + VAV terminal box not fan powered with reheat + Heating plant + Dual Maximum + + + + + Dry bulb temperature + + 70.000000 + 60.000000 + 50.000000 + + + + + + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + Good + + + + + + Single + Good + 1 + Interior + + + + + + + + + + + + + + + + + + + + 204.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 420.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 2022.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 0.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + + + 0.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + Packaged Rooftop VAV with Hot Water Reheat + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + Variable Volume + 17300.000000 + W + + Good + 2018 + Electricity + true + + + + Unknown + + + + + + + + Single zone + + + + + Other + + + Air + 0.800000 + COP + 68800.000000 + 55040.000000 + W + Natural gas + Good + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + + + + + + + Packaged/unitary direct expansion/RTU + Reciprocating + Multiple discrete stages + + + + + + Refrigerant + 4.120000 + COP + 17300.000000 + W + 2 + 0.500000 + 0.765700 + Good + + + + + + BACnet + + + EMCS + + + + 2018 + + + + + + + Central fan + CAV terminal box no reheat + None + + + + Dry bulb temperature + + 70.000000 + 60.000000 + 50.000000 + + + + + + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + Good + + + + + + Single + Good + 1 + Interior + + + + + + + + + + + + + + 2273.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + Packaged Rooftop Air Conditioner + +
+ + + + + +
+
+
+ + + + + + Variable Volume + 26540.000000 + W + + Good + 2018 + Electricity + true + + + + Unknown + + + + + + + + Single zone + + + + + Other + + + Air + 0.800000 + COP + 38262.500000 + 30610.000000 + W + Natural gas + Good + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + + + + + + + Packaged/unitary direct expansion/RTU + Reciprocating + Multiple discrete stages + + + + + + Refrigerant + 3.799000 + COP + 26540.000000 + W + 2 + 0.500000 + 0.797900 + Good + + + + + + BACnet + + + EMCS + + + + 2018 + + + + + + + Central fan + CAV terminal box no reheat + None + + + + Dry bulb temperature + + 70.000000 + 60.000000 + 50.000000 + + + + + + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + Good + + + + + + Single + Good + 1 + Interior + + + + + + + + + + + + + + 427.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + Packaged Rooftop Air Conditioner + +
+ + + + + +
+
+
+ + + + + + Variable Volume + 29570.000000 + W + + Good + 2018 + Electricity + true + + + + Unknown + + + + + + + + Single zone + + + + + Other + + + Air + 0.800000 + COP + 138137.500000 + 110510.000000 + W + Natural gas + Good + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + + + + + + + Packaged/unitary direct expansion/RTU + Reciprocating + Multiple discrete stages + + + + + + Refrigerant + 3.799000 + COP + 29570.000000 + W + 2 + 0.500000 + 0.737300 + Good + + + + + + BACnet + + + EMCS + + + + 2018 + + + + + + + Central fan + CAV terminal box no reheat + None + + + + Dry bulb temperature + + 70.000000 + 60.000000 + 50.000000 + + + + + + + + + + + BACnet + + + EMCS + + + + 2018 + 1 + Good + + + + + + Single + Good + 1 + Interior + + + + + + + + + + + + + + 4792.000000 + Supply only + true + + + + + + EMCS + + + + + + + + + + + + + Integrated with central air distribution + + + + + + Packaged Rooftop Air Conditioner + +
+ + + + + +
+
+
+
+ + + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1840.626900 + 32.000000 + 2 + 1.000000 + 28 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1363.987200 + 32.000000 + 2 + 1.000000 + 21 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1363.987200 + 32.000000 + 2 + 1.000000 + 21 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1363.987200 + 32.000000 + 2 + 1.000000 + 21 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 3878.838600 + 32.000000 + 2 + 1.000000 + 60 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 11407.910400 + 32.000000 + 2 + 1.000000 + 178 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 11407.910400 + 32.000000 + 2 + 1.000000 + 178 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 11407.910400 + 32.000000 + 2 + 1.000000 + 178 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1604.237400 + 32.000000 + 2 + 1.000000 + 25 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1736.600000 + 32.000000 + 2 + 1.000000 + 27 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 2136.078000 + 32.000000 + 2 + 1.000000 + 33 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1920.660000 + 32.000000 + 2 + 1.000000 + 30 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 1916.829600 + 32.000000 + 2 + 1.000000 + 29 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 3349.605000 + 32.000000 + 2 + 1.000000 + 52 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 2576.700000 + 32.000000 + 2 + 1.000000 + 40 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + T8 + + + Standard Electronic + + 0.300000 + + 1.000000 + 4414.410000 + 32.000000 + 2 + 1.000000 + 68 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 862.793859 + 15.000000 + 2 + 1.000000 + 28 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 639.369000 + 15.000000 + 2 + 1.000000 + 21 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 639.369000 + 15.000000 + 2 + 1.000000 + 21 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 639.369000 + 15.000000 + 2 + 1.000000 + 21 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 1818.205594 + 15.000000 + 2 + 1.000000 + 60 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 5347.458000 + 15.000000 + 2 + 1.000000 + 178 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 5347.458000 + 15.000000 + 2 + 1.000000 + 178 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 5347.458000 + 15.000000 + 2 + 1.000000 + 178 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 751.986281 + 15.000000 + 2 + 1.000000 + 25 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 814.031250 + 15.000000 + 2 + 1.000000 + 27 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 1001.286562 + 15.000000 + 2 + 1.000000 + 33 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 900.309375 + 15.000000 + 2 + 1.000000 + 30 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 898.513875 + 15.000000 + 2 + 1.000000 + 29 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 1570.127344 + 15.000000 + 2 + 1.000000 + 52 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 1207.828125 + 15.000000 + 2 + 1.000000 + 40 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.300000 + + 1.000000 + 2069.254687 + 15.000000 + 2 + 1.000000 + 68 + false + + + + + + Unknown + + + Photocell + 3 + Stepped Dimming + + + + true + Electricity + Interior + +
+ + + + + + + +
+
+
+
+ + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + 1.000000 + 0.000708 + 0.000708 + Constant Volume + + + + + + + + 0.600600 + 3.580000 + 3.580000 + Supply + Variable Volume + true + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.600600 + 3.480000 + 0.600600 + Supply + Variable Volume + true + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.600600 + 3.260000 + 0.600600 + Supply + Variable Volume + true + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.600600 + 1.960000 + 0.600600 + Supply + Variable Volume + true + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.580000 + 0.960000 + 0.960000 + Supply + Constant Volume + true + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.580000 + 1.470000 + 1.470000 + Supply + Constant Volume + true + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.580000 + 1.490000 + 1.490000 + Supply + Constant Volume + true + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + + + 0.924000 + 1.000000 + Fan + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.924000 + 1.000000 + Fan + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.924000 + 1.000000 + Fan + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.924000 + 1.000000 + Fan + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.890000 + 1.000000 + Fan + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.890000 + 1.000000 + Fan + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + 0.890000 + 1.000000 + Fan + + + + EMCS + + + + 1 + 2018 + Electricity + Interior + + + + + + + + Steel frame + Other + 8.063000 + 0.700000 + 0.900000 + Smooth + + + + + Built up + 15.840000 + 0.770000 + 0.900000 + + + + + + + + + + Uninsulated metal + false + NonSwinging + 0.200000 + + + Clad + true + Tinted plus low e + Air + Double pane + 0.571000 + + + + + Continuous + 3.600000 + None + None + + + Clad + true + Tinted plus low e + Air + Double pane + 0.571000 + + + + + + + + None + Unheated + + + + Carpet + Built up + + + + + Networking + 2018 + Electricity + Interior + +
+ +
+
+
+
+ + + 4.000000 + +
+ + + + + + + +
+
+
+ + 4.000000 + +
+ + + + + + + +
+
+
+ + 4.000000 + +
+ + + + + + + +
+
+
+ + 4.000000 + +
+ + + + + + + +
+
+
+ + 4.000000 + +
+ + + + + + + +
+
+
+ + 15.000000 + +
+ + + + + + + +
+
+
+ + 15.000000 + +
+ + + + + + + +
+
+
+ + 15.000000 + +
+ + + + + + + +
+
+
+ + 20.000000 + +
+ + + + + + + +
+
+
+ + 4.000000 + +
+ + + + + + + +
+
+
+ + 25.390000 + +
+ + + + + + + +
+
+
+ + 5.000000 + +
+ + + + + + + +
+
+
+ + 1630.389300 + +
+ + + + + +
+
+
+ + 15.000000 + +
+ + + + + + + +
+
+
+ + 10.000000 + +
+ + + + + + + +
+
+
+ + 10.800000 + +
+ + + + + + + +
+
+
+
+ + + Walkthrough survey + Average + Checklist + +
+ +
+
+
+
+ + + No infiltrations to report + +
+ +
+
+
+
+
+ + + 2021-01-01 + 2021-06-15 + + + Weekday + Occupied + 08:00:00 + 16:00:00 + 95.000000 + + + Weekday + Occupied + 16:00:00 + 21:00:00 + 15.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ + + + + + + + + + + + +
+
+
+ + 2021-06-16 + 2021-09-15 + + + Weekday + Occupied + 08:00:00 + 21:00:00 + 15.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ + + + + + + + + + + + +
+
+
+ + 2021-09-16 + 2021-12-31 + + + Weekday + Occupied + 08:00:00 + 16:00:00 + 95.000000 + + + Weekday + Occupied + 16:00:00 + 21:00:00 + 15.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ + + + + + + + + + + + +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Occupied + 08:00:00 + 12:00:00 + 95.000000 + + + Weekday + Occupied + 12:00:00 + 13:00:00 + 0.000000 + + + Weekday + Occupied + 13:00:00 + 14:00:00 + 95.000000 + + + Weekday + Occupied + 14:00:00 + 15:00:00 + 0.000000 + + + Weekday + Occupied + 15:00:00 + 17:00:00 + 95.000000 + + + Weekday + Occupied + 17:00:00 + 21:00:00 + 15.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Occupied + 08:00:00 + 11:00:00 + 50.000000 + + + Weekday + Occupied + 11:00:00 + 12:00:00 + 0.000000 + + + Weekday + Occupied + 12:00:00 + 14:00:00 + 50.000000 + + + Weekday + Occupied + 14:00:00 + 15:00:00 + 0.000000 + + + Weekday + Occupied + 15:00:00 + 17:00:00 + 50.000000 + + + Weekday + Occupied + 17:00:00 + 21:00:00 + 15.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Occupied + 08:00:00 + 12:00:00 + 95.000000 + + + Weekday + Occupied + 12:00:00 + 13:00:00 + 0.000000 + + + Weekday + Occupied + 13:00:00 + 14:00:00 + 95.000000 + + + Weekday + Occupied + 14:00:00 + 15:00:00 + 0.000000 + + + Weekday + Occupied + 15:00:00 + 17:00:00 + 95.000000 + + + Weekday + Occupied + 17:00:00 + 21:00:00 + 15.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Occupied + 08:00:00 + 16:00:00 + 35.000000 + + + Weekday + Occupied + 16:00:00 + 21:00:00 + 95.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Occupied + 08:00:00 + 21:00:00 + 35.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Occupied + 08:00:00 + 16:00:00 + 35.000000 + + + Weekday + Occupied + 16:00:00 + 21:00:00 + 95.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Occupied + 09:00:00 + 15:00:00 + 95.000000 + + + Weekday + Occupied + 15:00:00 + 20:00:00 + 35.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Occupied + 09:00:00 + 17:00:00 + 15.000000 + + + Weekday + Occupied + 17:00:00 + 19:00:00 + 35.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Occupied + 09:00:00 + 15:00:00 + 95.000000 + + + Weekday + Occupied + 15:00:00 + 20:00:00 + 35.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Occupied + 08:00:00 + 21:00:00 + 95.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Occupied + 08:00:00 + 21:00:00 + 50.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-06-30 + + + Weekday + Occupied + 08:00:00 + 21:00:00 + 95.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 59.400000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Lighting + 00:00:00 + 08:00:00 + 17.730000 + + + Weekday + Lighting + 08:00:00 + 20:00:00 + 33.000000 + + + Weekday + Lighting + 20:00:00 + 21:00:00 + 11.701800 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 59.400000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 59.829000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Lighting + 00:00:00 + 08:00:00 + 17.730000 + + + Weekday + Lighting + 08:00:00 + 20:00:00 + 33.230000 + + + Weekday + Lighting + 20:00:00 + 21:00:00 + 11.786000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 59.829000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 56.078000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + + +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Lighting + 00:00:00 + 08:00:00 + 17.730000 + + + Weekday + Lighting + 08:00:00 + 20:00:00 + 31.150000 + + + Weekday + Lighting + 20:00:00 + 21:00:00 + 11.047000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + + +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 56.078000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + + +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 88.605000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Lighting + 00:00:00 + 08:00:00 + 17.730000 + + + Weekday + Lighting + 08:00:00 + 20:00:00 + 49.225000 + + + Weekday + Lighting + 20:00:00 + 21:00:00 + 17.450000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 88.605000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 85.500000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Lighting + 00:00:00 + 08:00:00 + 17.730000 + + + Weekday + Lighting + 08:00:00 + 20:00:00 + 47.500000 + + + Weekday + Lighting + 20:00:00 + 21:00:00 + 16.843500 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 85.500000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 75.490000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Lighting + 00:00:00 + 08:00:00 + 17.730000 + + + Weekday + Lighting + 08:00:00 + 20:00:00 + 41.940000 + + + Weekday + Lighting + 20:00:00 + 21:00:00 + 14.900000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 90.000000 + + + Weekday + Lighting + 08:00:00 + 21:00:00 + 75.490000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 21:00:00 + 90.000000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + + + +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Lighting + 00:00:00 + 08:00:00 + 17.730000 + + + Weekday + Lighting + 08:00:00 + 20:00:00 + 50.000000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + + + +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Lighting + 00:00:00 + 07:00:00 + 17.730000 + + + Weekday + Lighting + 07:00:00 + 21:00:00 + 90.000000 + + + Weekday + Lighting + 21:00:00 + 23:59:59 + 17.730000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 17.730000 + + + +
+ + + + + +
+
+
+ + 2021-01-01 + 2021-12-31 + + + Weekday + Cooking equipment + 00:00:00 + 08:00:00 + 10.000000 + + + Weekday + Cooking equipment + 08:00:00 + 10:00:00 + 15.000000 + + + Weekday + Cooking equipment + 10:00:00 + 13:00:00 + 25.000000 + + + Weekday + Cooking equipment + 13:00:00 + 15:00:00 + 15.000000 + + + Weekday + Cooking equipment + 15:00:00 + 23:59:59 + 10.000000 + + + Weekend + Cooking equipment + 00:00:00 + 23:59:59 + 10.000000 + + + Holiday + Cooking equipment + 00:00:00 + 23:59:59 + 10.000000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-12-31 + + + Weekday + Cooking equipment + 00:00:00 + 08:00:00 + 2.000000 + + + Weekday + Cooking equipment + 08:00:00 + 10:00:00 + 15.000000 + + + Weekday + Cooking equipment + 10:00:00 + 13:00:00 + 20.000000 + + + Weekday + Cooking equipment + 13:00:00 + 15:00:00 + 10.000000 + + + Weekday + Cooking equipment + 15:00:00 + 23:59:59 + 2.000000 + + + Weekend + Cooking equipment + 00:00:00 + 23:59:59 + 2.000000 + + + Holiday + Cooking equipment + 00:00:00 + 23:59:59 + 2.000000 + + + +
+ +
+
+
+ + 2021-01-01 + 2021-06-30 + + + Weekday + Miscellaneous equipment + 00:00:00 + 08:00:00 + 27.300000 + + + Weekday + Miscellaneous equipment + 08:00:00 + 17:00:00 + 88.400000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 21:00:00 + 32.570000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 23:59:59 + 27.300000 + + + Weekend + Miscellaneous equipment + 00:00:00 + 23:59:59 + 27.300000 + + + Holiday + Miscellaneous equipment + 00:00:00 + 23:59:59 + 27.300000 + + + +
+ + + + + + + + + + + + + + + +
+
+
+ + 2021-07-01 + 2021-09-01 + + + Weekday + Miscellaneous equipment + 00:00:00 + 08:00:00 + 19.500000 + + + Weekday + Miscellaneous equipment + 08:00:00 + 17:00:00 + 46.500000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 21:00:00 + 23.260000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 23:59:59 + 19.500000 + + + Weekend + Miscellaneous equipment + 00:00:00 + 23:59:59 + 19.500000 + + + Holiday + Miscellaneous equipment + 00:00:00 + 23:59:59 + 19.500000 + + + +
+ + + + + + + + + + + + + + + +
+
+
+ + 2021-09-02 + 2021-12-31 + + + Weekday + Miscellaneous equipment + 00:00:00 + 08:00:00 + 27.300000 + + + Weekday + Miscellaneous equipment + 08:00:00 + 17:00:00 + 88.400000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 21:00:00 + 32.570000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 23:59:59 + 27.300000 + + + Weekend + Miscellaneous equipment + 00:00:00 + 23:59:59 + 27.300000 + + + Holiday + Miscellaneous equipment + 00:00:00 + 23:59:59 + 27.300000 + + + +
+ + + + + + + + + + + + + + + +
+
+
+ + 2021-01-01 + 2021-12-31 + + + Weekday + HVAC equipment + 07:00:00 + 21:00:00 + 100.000000 + + + Weekend + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ + + + + + + + + + + + + + + + +
+
+
+ + 2021-01-01 + 2021-12-31 + + + Weekday + HVAC equipment + 08:00:00 + 21:00:00 + 100.000000 + + + Weekend + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + +
+ + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lighting + + + + Retrofit with light emitting diode technologies + + + + Entire building + This measure is designed to replace all fluorescent bulbs with LEDs + 15 + 995.000000 + 7960.000000 + true + 2022-01-01 + 2022-12-31 + + + + + + + + + + + + + + + + Electricity + This is required for L1 to document irregularities in monthly energy patterns (Std 211 6.1.2.1.j). No irregularities found. + kWh + All end uses + 653761.110000 + 2230.840000 + + + + + + + + + + + + + + + kW + 248431.130000 + 248431.130000 + 16412.130000 + + + + + + Indirect + CO2e + 0.000507 + Utility + 331.236350 + + + + + Natural gas + No irregularities in monthly energy consumption found. + MMBtu + All end uses + 994.950000 + 994.950000 + + + + + + + + + + + + + + + 1152.520000 + + + + + + Indirect + CO2e + 14.430000 + US EPA + 14357.128500 + + + + + + + Total + Energy + 2021-01-01T00:00:00 + 2021-02-01T00:00:00 + 1 + Month + Month + 52651.670000 + + + + Total + Energy + 2021-02-01T00:00:00 + 2021-03-01T00:00:00 + 1 + Month + Month + 46018.330000 + + + + Total + Energy + 2021-03-01T00:00:00 + 2021-04-01T00:00:00 + 1 + Month + Month + 52645.000000 + + + + Total + Energy + 2021-04-01T00:00:00 + 2021-05-01T00:00:00 + 1 + Month + Month + 49929.170000 + + + + Total + Energy + 2021-05-01T00:00:00 + 2021-06-01T00:00:00 + 1 + Month + Month + 58176.390000 + + + + Total + Energy + 2021-06-01T00:00:00 + 2021-07-01T00:00:00 + 1 + Month + Month + 66276.940000 + + + + Total + Energy + 2021-07-01T00:00:00 + 2021-08-01T00:00:00 + 1 + Month + Month + 52738.060000 + + + + Total + Energy + 2021-08-01T00:00:00 + 2021-09-01T00:00:00 + 1 + Month + Month + 56057.780000 + + + + Total + Energy + 2021-09-01T00:00:00 + 2021-10-01T00:00:00 + 1 + Month + Month + 60436.110000 + + + + Total + Energy + 2021-10-01T00:00:00 + 2021-11-01T00:00:00 + 1 + Month + Month + 57091.670000 + + + + Total + Energy + 2021-11-01T00:00:00 + 2021-12-01T00:00:00 + 1 + Month + Month + 51428.890000 + + + + Total + Energy + 2021-12-01T00:00:00 + 2022-01-01T00:00:00 + 1 + Month + Month + 50311.110000 + + + + Total + Energy + 2021-01-01T00:00:00 + 2021-02-01T00:00:00 + 1 + Month + Month + 165.210000 + + + + Total + Energy + 2021-02-01T00:00:00 + 2021-03-01T00:00:00 + 1 + Month + Month + 143.790000 + + + + Total + Energy + 2021-03-01T00:00:00 + 2021-04-01T00:00:00 + 1 + Month + Month + 103.090000 + + + + Total + Energy + 2021-04-01T00:00:00 + 2021-05-01T00:00:00 + 1 + Month + Month + 60.020000 + + + + Total + Energy + 2021-05-01T00:00:00 + 2021-06-01T00:00:00 + 1 + Month + Month + 49.660000 + + + + Total + Energy + 2021-06-01T00:00:00 + 2021-07-01T00:00:00 + 1 + Month + Month + 40.180000 + + + + Total + Energy + 2021-07-01T00:00:00 + 2021-08-01T00:00:00 + 1 + Month + Month + 36.890000 + + + + Total + Energy + 2021-08-01T00:00:00 + 2021-09-01T00:00:00 + 1 + Month + Month + 40.950000 + + + + Total + Energy + 2021-09-01T00:00:00 + 2021-10-01T00:00:00 + 1 + Month + Month + 37.870000 + + + + Total + Energy + 2021-10-01T00:00:00 + 2021-11-01T00:00:00 + 1 + Month + Month + 60.750000 + + + + Total + Energy + 2021-11-01T00:00:00 + 2021-12-01T00:00:00 + 1 + Month + Month + 86.850000 + + + + Total + Energy + 2021-12-01T00:00:00 + 2022-01-01T00:00:00 + 1 + Month + Month + 169.700000 + + + + Peak + Unknown + Power + 2021-01-01T00:00:00 + 2021-02-01T00:00:00 + 1 + Month + Month + 167.374990 + + + + Peak + Unknown + Power + 2021-02-01T00:00:00 + 2021-03-01T00:00:00 + 1 + Month + Month + 155.851460 + + + + Peak + Unknown + Power + 2021-03-01T00:00:00 + 2021-04-01T00:00:00 + 1 + Month + Month + 165.633220 + + + + Peak + Unknown + Power + 2021-04-01T00:00:00 + 2021-05-01T00:00:00 + 1 + Month + Month + 191.066240 + + + + Peak + Unknown + Power + 2021-05-01T00:00:00 + 2021-06-01T00:00:00 + 1 + Month + Month + 219.526400 + + + + Peak + Unknown + Power + 2021-06-01T00:00:00 + 2021-07-01T00:00:00 + 1 + Month + Month + 248.431130 + + + + Peak + Unknown + Power + 2021-07-01T00:00:00 + 2021-08-01T00:00:00 + 1 + Month + Month + 181.331960 + + + + Peak + Unknown + Power + 2021-08-01T00:00:00 + 2021-09-01T00:00:00 + 1 + Month + Month + 178.148530 + + + + Peak + Unknown + Power + 2021-09-01T00:00:00 + 2021-10-01T00:00:00 + 1 + Month + Month + 227.075020 + + + + Peak + Unknown + Power + 2021-10-01T00:00:00 + 2021-11-01T00:00:00 + 1 + Month + Month + 223.758040 + + + + Peak + Unknown + Power + 2021-11-01T00:00:00 + 2021-12-01T00:00:00 + 1 + Month + Month + 194.377020 + + + + Peak + Unknown + Power + 2021-12-01T00:00:00 + 2022-01-01T00:00:00 + 1 + Month + Month + 150.135320 + + + + Cost + Cost + 2021-01-01T00:00:00 + 2021-02-01T00:00:00 + 1 + Month + Month + 1221.220000 + + + + Cost + Cost + 2021-02-01T00:00:00 + 2021-03-01T00:00:00 + 1 + Month + Month + 1125.760000 + + + + Cost + Cost + 2021-03-01T00:00:00 + 2021-04-01T00:00:00 + 1 + Month + Month + 1211.380000 + + + + Cost + Cost + 2021-04-01T00:00:00 + 2021-05-01T00:00:00 + 1 + Month + Month + 1342.050000 + + + + Cost + Cost + 2021-05-01T00:00:00 + 2021-06-01T00:00:00 + 1 + Month + Month + 1540.300000 + + + + Cost + Cost + 2021-06-01T00:00:00 + 2021-07-01T00:00:00 + 1 + Month + Month + 1740.370000 + + + + Cost + Cost + 2021-07-01T00:00:00 + 2021-08-01T00:00:00 + 1 + Month + Month + 1300.190000 + + + + Cost + Cost + 2021-08-01T00:00:00 + 2021-09-01T00:00:00 + 1 + Month + Month + 1297.570000 + + + + Cost + Cost + 2021-09-01T00:00:00 + 2021-10-01T00:00:00 + 1 + Month + Month + 1593.210000 + + + + Cost + Cost + 2021-10-01T00:00:00 + 2021-11-01T00:00:00 + 1 + Month + Month + 1559.120000 + + + + Cost + Cost + 2021-11-01T00:00:00 + 2021-12-01T00:00:00 + 1 + Month + Month + 1367.600000 + + + + Cost + Cost + 2021-12-01T00:00:00 + 2022-01-01T00:00:00 + 1 + Month + Month + 1113.370000 + + + + Cost + Cost + 2021-01-01T00:00:00 + 2021-02-01T00:00:00 + 1 + Month + Month + 191.310000 + + + + Cost + Cost + 2021-02-01T00:00:00 + 2021-03-01T00:00:00 + 1 + Month + Month + 166.500000 + + + + Cost + Cost + 2021-03-01T00:00:00 + 2021-04-01T00:00:00 + 1 + Month + Month + 119.380000 + + + + Cost + Cost + 2021-04-01T00:00:00 + 2021-05-01T00:00:00 + 1 + Month + Month + 69.500000 + + + + Cost + Cost + 2021-05-01T00:00:00 + 2021-06-01T00:00:00 + 1 + Month + Month + 57.500000 + + + + Cost + Cost + 2021-06-01T00:00:00 + 2021-07-01T00:00:00 + 1 + Month + Month + 46.520000 + + + + Cost + Cost + 2021-07-01T00:00:00 + 2021-08-01T00:00:00 + 1 + Month + Month + 42.720000 + + + + Cost + Cost + 2021-08-01T00:00:00 + 2021-09-01T00:00:00 + 1 + Month + Month + 47.430000 + + + + Cost + Cost + 2021-09-01T00:00:00 + 2021-10-01T00:00:00 + 1 + Month + Month + 43.860000 + + + + Cost + Cost + 2021-10-01T00:00:00 + 2021-11-01T00:00:00 + 1 + Month + Month + 70.350000 + + + + Cost + Cost + 2021-11-01T00:00:00 + 2021-12-01T00:00:00 + 1 + Month + Month + 100.580000 + + + + Cost + Cost + 2021-12-01T00:00:00 + 2022-01-01T00:00:00 + 1 + Month + Month + 196.510000 + + + + Load factor + Power Factor + 2021-01-01T00:00:00 + 2021-02-01T00:00:00 + 1 + Month + Month + 0.422813 + + + + Load factor + Power Factor + 2021-02-01T00:00:00 + 2021-03-01T00:00:00 + 1 + Month + Month + 0.439391 + + + + Load factor + Power Factor + 2021-03-01T00:00:00 + 2021-04-01T00:00:00 + 1 + Month + Month + 0.427205 + + + + Load factor + Power Factor + 2021-04-01T00:00:00 + 2021-05-01T00:00:00 + 1 + Month + Month + 0.362943 + + + + Load factor + Power Factor + 2021-05-01T00:00:00 + 2021-06-01T00:00:00 + 1 + Month + Month + 0.356194 + + + + Load factor + Power Factor + 2021-06-01T00:00:00 + 2021-07-01T00:00:00 + 1 + Month + Month + 0.370530 + + + + Load factor + Power Factor + 2021-07-01T00:00:00 + 2021-08-01T00:00:00 + 1 + Month + Month + 0.390910 + + + + Load factor + Power Factor + 2021-08-01T00:00:00 + 2021-09-01T00:00:00 + 1 + Month + Month + 0.422942 + + + + Load factor + Power Factor + 2021-09-01T00:00:00 + 2021-10-01T00:00:00 + 1 + Month + Month + 0.369653 + + + + Load factor + Power Factor + 2021-10-01T00:00:00 + 2021-11-01T00:00:00 + 1 + Month + Month + 0.342942 + + + + Load factor + Power Factor + 2021-11-01T00:00:00 + 2021-12-01T00:00:00 + 1 + Month + Month + 0.367477 + + + + Load factor + Power Factor + 2021-12-01T00:00:00 + 2022-01-01T00:00:00 + 1 + Month + Month + 0.450410 + + + + + + 3236419.050000 + 43.750000 + 8177253.314000 + 110.560000 + 3236419.050000 + 43.750000 + 3236.419050 + 0.000000 + 0.000000 + 0.000000 + 17564.290000 + 0.237500 + + + + + + + + + + + + + + 2021-03-24 + + + Portfolio Manager + 2021 + 69.000000 + + + + + 3236419.050000 + 43.500000 + + + + + + + + + + + + + 67181.500000 + 931 + 70.000000 + + + + + 207643.500000 + 37.800000 + 4451.510000 + 0.810000 + + + + + + + + + + + + + + + + Capital + + Low + Medium + Medium + High + Medium + + 53569.000000 + 1269 + + + Electricity + kWh + 53569.000000 + + + Natural gas + MMBtu + 0.000000 + + + 27.000000 + 872 + 0.000000 + 0.000000 + 0 + 8955.000000 + 0.000000 + 1513.220000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0 + 0 + 3.200000 + 17.390000 + + + + + + + + + + + + + + + + + + --01-01 + --01-01 + --01-01 + --01-01 + 0.004610 + 5.630000 + + + + + https://www.xcelenergy.com/staticfiles/xe/Regulatory/COBusRates.pdf + 36.170000 + + + XCEL Energy + + Some-Number + + some-account-number + School district + + + + + + + + + --01-01 + --01-01 + 1.158000 + + + + + https://www.xcelenergy.com/staticfiles/xe/Regulatory/COBusRates.pdf + + + XCEL Energy + + Another-Number + + some-other-account-number + School district + + + + + + + + + + + + + + Owner + + Bill Dean O'Nerr + ACME + + + bd.onerr@acme.net + + + + + + Energy Auditor + + Odette Or + La Audit Compagnie + + + odette.orr@la-audit-co.fr + + + + +
+
+
diff --git a/spec/files/v2.7.0/example-smalloffice-level2.xml b/spec/files/v2.7.0/example-smalloffice-level2.xml new file mode 100644 index 0000000..c7ef53c --- /dev/null +++ b/spec/files/v2.7.0/example-smalloffice-level2.xml @@ -0,0 +1,2733 @@ + + + + + + + + + Prototype Small Office in Denver + Here we record general problems / issues identified in a walkthrough survey. + + + City Custom Building ID + some ID + + + Custom ID 1 + some other ID + + +
+ + + Some address + + + Denver + CO + 80014 +
+ -104.830000 + 39.660000 + Commercial + Office + + 1 + 0 + 1 + 0 + true + false + + + Gross + 5500.000000 + + + + + + Conditioned + 5500.000000 + + + + + + 6500.000000 + 0.000000 + 0.213300 + 0.050000 + 2000 + 2000 + 2010 + 2020-03-01 + 2000 + +
+ Space function + Office + Office + + + Peak total occupants + 31.000000 + + + + + 40.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 5500.000000 + + + Conditioned + 5500.000000 + + + Single zone +
+
+ Whole building + Rectangular + + + A1 + + + 909.012230 + + + + + 180.187860 + + + + + 42.086890 + + + + + B1 + + + 606.008200 + + + + + 120.125240 + + + + + 0.000000 + + + + + C1 + + + 909.012230 + + + + + 180.187860 + + + + + 0.000000 + + + + + D1 + + + 606.008200 + + + + + 120.125240 + + + + + 0.000000 + + + + + + + + 6444.999000 + Good + + + + + + + 3891.153600 + + + +
+
+ + + + + + + + + + Single zone + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 10311.100000 + 10311.100000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 9801.300000 + 9801.300000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 7858.100000 + 7858.100000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 9067.800000 + 9067.800000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 9855.400000 + 9855.400000 + W + Good + + + + + + + + + + 2000 + + + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 10198.900000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 9847.200000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 7737.100000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 9143.800000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 9847.200000 + W + Good + + + + + + + + + + 2000 + + + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + + Single + Good + + + + + Single + Good + + + + + Single + Good + + + + + Single + Good + + + + + Single + Good + + + + + + Digital + + +
+ + + + + +
+
+
+
+ + + + + T8 + + + Standard Electronic + + 0.200000 + + 100.000000 + 5.500000 + 32.000000 + 4 + 1.000000 + 43 + false + + + + + + + Programmable + + + + false + +
+ + + + + +
+
+
+ + + + T12 + + + Standard Electronic + 100.000000 + 1.582575 + 316.516000 + 1 + 1.000000 + 5 + true + + + + + + + Programmable + + + + false + +
+ + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.100000 + + 100.000000 + 2.752000 + 16.000000 + 4 + 1.000000 + 43 + false + + + + + + + Photocell + Continuous + + + + false + +
+ + + + + +
+
+
+
+ + + + + + + + 40.000000 + 123.000000 + + + Notes + + 1 + 3.600000 + Continuous + 123.000000 + 1.870180 + + Looped + Thermal Efficiency + 1.000000 + 40.000000 + 140.000000 + 1950.520000 + 11722.840000 + W + + + + + + + + + + 2000 + Electricity + Good + + + + +
+ +
+
+ 1 +
+
+ + + 0.536000 + 880.000000 + 880.000000 + Constant Volume + + + + + + 0.536000 + 872.000000 + 872.000000 + Variable Volume + + + + + + 0.536000 + 836.000000 + 836.000000 + Constant Volume + + + + + + 0.536000 + 830.000000 + 830.000000 + Variable Volume + + + + + + 0.536000 + 671.000000 + 671.000000 + Constant Volume + + + + + + 0.536000 + 664.000000 + 664.000000 + Variable Volume + + + + + + 0.536000 + 774.000000 + 774.000000 + Constant Volume + + + + + + 0.536000 + 766.000000 + 766.000000 + Variable Volume + + + + + + 0.536000 + 841.000000 + 841.000000 + Constant Volume + + + + + + 0.536000 + 833.000000 + 833.000000 + Variable Volume + + + + + + + + Wood frame + 0.547000 + + + + + Wood frame + 4.706000 + + + + + + + + Vinyl + Clear uncoated + Single pane + 3.241000 + 0.391000 + 0.391000 + + + + + + Vinyl + Low e + Triple pane + 0.300000 + 0.391000 + 0.391000 + + + + + Insulated metal + 0.500000 + + + Steel + 2.839000 + + + + + + + + 0.345000 + + + + Concrete poured + + + + + Miscellaneous Electric Load + 0.630000 + +
+ + + + + +
+
+
+
+ + + Notes on test + Tight + 0.151000 + ACHnatural + Blower door + +
+ +
+
+
+
+ + + Notes on test + +
+ +
+
+
+
+
+ + + + + Weekday + Occupied + 00:00:00 + 06:00:00 + 0.000000 + + + Weekday + Occupied + 06:00:00 + 07:00:00 + 11.000000 + + + Weekday + Occupied + 07:00:00 + 08:00:00 + 21.000000 + + + Weekday + Occupied + 08:00:00 + 12:00:00 + 100.000000 + + + Weekday + Occupied + 12:00:00 + 13:00:00 + 53.000000 + + + Weekday + Occupied + 13:00:00 + 17:00:00 + 100.000000 + + + Weekday + Occupied + 17:00:00 + 18:00:00 + 32.000000 + + + Weekday + Occupied + 18:00:00 + 22:00:00 + 11.000000 + + + Weekday + Occupied + 22:00:00 + 23:00:00 + 5.000000 + + + Weekday + Occupied + 23:00:00 + 23:59:59 + 0.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + + + + +
+ +
+
+
+ + + + Weekday + Lighting + 00:00:00 + 05:00:00 + 18.000000 + + + Weekday + Lighting + 05:00:00 + 07:00:00 + 23.000000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 42.000000 + + + Weekday + Lighting + 08:00:00 + 12:00:00 + 90.000000 + + + Weekday + Lighting + 12:00:00 + 13:00:00 + 80.000000 + + + Weekday + Lighting + 13:00:00 + 17:00:00 + 90.000000 + + + Weekday + Lighting + 17:00:00 + 18:00:00 + 61.000000 + + + Weekday + Lighting + 18:00:00 + 20:00:00 + 42.000000 + + + Weekday + Lighting + 20:00:00 + 22:00:00 + 32.000000 + + + Weekday + Lighting + 22:00:00 + 23:00:00 + 23.000000 + + + Weekday + Lighting + 23:00:00 + 23:59:59 + 18.000000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 18.000000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 18.000000 + + + + + + + + + + + + Weekday + Miscellaneous equipment + 00:00:00 + 08:00:00 + 50.000000 + + + Weekday + Miscellaneous equipment + 08:00:00 + 12:00:00 + 100.000000 + + + Weekday + Miscellaneous equipment + 12:00:00 + 13:00:00 + 94.000000 + + + Weekday + Miscellaneous equipment + 13:00:00 + 17:00:00 + 100.000000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 18:00:00 + 50.000000 + + + Weekday + Miscellaneous equipment + 18:00:00 + 23:59:59 + 20.000000 + + + Weekend + Miscellaneous equipment + 00:00:00 + 23:59:59 + 20.000000 + + + Holiday + Miscellaneous equipment + 00:00:00 + 23:59:59 + 20.000000 + + + + + + + + + + + + Weekday + HVAC equipment + 00:00:00 + 06:00:00 + 0.000000 + + + Weekday + HVAC equipment + 06:00:00 + 19:00:00 + 100.000000 + + + Weekday + HVAC equipment + 19:00:00 + 23:59:59 + 0.000000 + + + Weekend + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + + + + + + + + + + Weekday + HVAC equipment + 00:00:00 + 06:00:00 + 0.000000 + + + Weekday + HVAC equipment + 06:00:00 + 07:00:00 + 60.000000 + + + Weekday + HVAC equipment + 07:00:00 + 12:00:00 + 100.000000 + + + Weekday + HVAC equipment + 12:00:00 + 13:00:00 + 80.000000 + + + Weekday + HVAC equipment + 13:00:00 + 18:00:00 + 100.000000 + + + Weekday + HVAC equipment + 18:00:00 + 20:00:00 + 60.000000 + + + Weekday + HVAC equipment + 20:00:00 + 23:59:59 + 0.000000 + + + Weekend + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + + + + + + +
+ + + + + + + + + + + Lighting + + + + Retrofit with light emitting diode technologies + + + + Individual system + This measure is designed to replace all fluorescent bulbs with LEDs + 1 + 50.000000 + 774.000000 + true + 2021-01-01 + 2021-12-30 + + + + + + + + + + + Fan + + + + Add VSD motor controller + + + + Individual system + This measure is designed to retrofit all RTU fans with a VSD + 1 + 750.000000 + 1250.000000 + true + 2021-01-01 + 2021-12-30 + + + + + + + + + + + + + + + + Electricity + This is required to document irregularities in monthly energy patterns (Std 211 6.1.2.1.j). No irregularities found. + kWh + All end uses + 67334.150000 + 229.753657 + + + + + + + + + + + + + + + kW + 26.040000 + 26.040000 + 4613.820000 + + + + + + Natural gas + No irregularities in monthly energy consumption found. + MMBtu + All end uses + 8.720000 + 8.720000 + + + + + + + + + + + + + + + 540.830000 + + + + + + Electricity + kWh + Interior lighting + 28.705000 + 20062.690000 + 68.453898 + + + + Electricity + kWh + Heating + 6.722000 + 4698.230000 + 16.030361 + + + + Electricity + kWh + Cooling + 8.769000 + 6128.870000 + 20.911704 + + + + Electricity + kWh + Domestic hot water + 10.281000 + 7185.370000 + 24.516482 + + + + Electricity + kWh + Plug load + 21.379000 + 14942.150000 + 50.982616 + + + + + + Total + Energy + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 5933.100000 + + + + Total + Energy + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 5446.100000 + + + + Total + Energy + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 5736.490000 + + + + Total + Energy + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 4980.500000 + + + + Total + Energy + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 5187.210000 + + + + Total + Energy + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 5842.950000 + + + + Total + Energy + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 5801.730000 + + + + Total + Energy + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 6220.160000 + + + + Total + Energy + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 5682.870000 + + + + Total + Energy + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 5571.930000 + + + + Total + Energy + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 5525.150000 + + + + Total + Energy + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 5405.940000 + + + + Total + Energy + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 1.720000 + + + + Total + Energy + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 1.250000 + + + + Total + Energy + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 0.410000 + + + + Total + Energy + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 0.430000 + + + + Total + Energy + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 0.010000 + + + + Total + Energy + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 0.000000 + + + + Total + Energy + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 0.000000 + + + + Total + Energy + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 0.000000 + + + + Total + Energy + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 0.000000 + + + + Total + Energy + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 0.200000 + + + + Total + Energy + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 0.400000 + + + + Total + Energy + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 4.300000 + + + + Peak + On-peak + Power + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 23.580000 + + + + Peak + On-peak + Power + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 25.380000 + + + + Peak + On-peak + Power + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 26.040000 + + + + Peak + On-peak + Power + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 24.450000 + + + + Peak + On-peak + Power + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 17.030000 + + + + Peak + On-peak + Power + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 22.710000 + + + + Peak + On-peak + Power + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 22.010000 + + + + Peak + On-peak + Power + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 21.810000 + + + + Peak + On-peak + Power + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 20.630000 + + + + Peak + On-peak + Power + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 21.870000 + + + + Peak + On-peak + Power + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 21.630000 + + + + Peak + On-peak + Power + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 21.780000 + + + + Load factor + Power + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 0.340000 + + + + Load factor + Power + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 0.320000 + + + + Load factor + Power + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 0.300000 + + + + Load factor + Power + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 0.280000 + + + + Load factor + Power + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 0.410000 + + + + Load factor + Power + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 0.360000 + + + + Load factor + Power + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 0.350000 + + + + Load factor + Power + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 0.380000 + + + + Load factor + Power + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 0.380000 + + + + Load factor + Power + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 0.340000 + + + + Load factor + Power + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 0.350000 + + + + Load factor + Power + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 0.330000 + + + + Cost + Cost + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 332.160000 + + + + Cost + Cost + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 306.290000 + + + + Cost + Cost + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 321.720000 + + + + Cost + Cost + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 281.540000 + + + + Cost + Cost + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 292.530000 + + + + Cost + Cost + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 534.100000 + + + + Cost + Cost + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 530.450000 + + + + Cost + Cost + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 567.490000 + + + + Cost + Cost + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 519.930000 + + + + Cost + Cost + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 312.970000 + + + + Cost + Cost + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 310.490000 + + + + Cost + Cost + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 304.150000 + + + + Cost + Cost + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 46.690000 + + + + Cost + Cost + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 45.930000 + + + + Cost + Cost + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 44.550000 + + + + Cost + Cost + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 44.580000 + + + + Cost + Cost + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 43.900000 + + + + Cost + Cost + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 44.210000 + + + + Cost + Cost + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 44.530000 + + + + Cost + Cost + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 50.920000 + + + + + + 238473.656550 + 43.358800 + 737088.900000 + 134.000000 + 238473.656550 + 43.358800 + 238.473657 + 0.000000 + 0.000000 + 0.000000 + 4952.480000 + 0.900000 + + + + + + + + + + + + + + 2022-06-01 + + + Portfolio Manager + 2019 + 80.000000 + + + + + 238473.656550 + 43.358800 + 4952.480000 + + + + + + + + + + + + + 39070.530000 + 995 + 89.000000 + + + + + 190348.600000 + 34.600000 + 4846.040000 + 0.881000 + + + + + + + + + + + + + + TMY3 + Finished + + + + + + + Electricity + kWh + All end uses + 67334.150000 + 229.753657 + kW + 26.040000 + 26.040000 + + + Natural gas + MMBtu + All end uses + 8.720000 + 8.720000 + + + + + + + + + + POM-LEDs + + + + + + + Capital + 35.713000 + 772 + + + Electricity + kWh + 11524.540000 + + + Natural gas + MMBtu + 0.000000 + + + 3.220000 + 0 + 0.000000 + 0.000000 + 1 + 824.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0 + 0 + 1.070000 + 0.000000 + + + + + + + + + + POM-VSDs + + + + + + + Capital + 5.175000 + 9 + + + Electricity + kWh + 207.240000 + + + Natural gas + MMBtu + 4.460000 + + + 0.420000 + 0 + 0.000000 + 0.000000 + 1 + 2000.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0 + 0 + 230.150000 + 0.000000 + + + + + + + + + + POM-LEDs-VSDs + + + + + + + + Capital + 41.827000 + 781 + + + Electricity + kWh + 11701.620000 + + + Natural gas + MMBtu + 1.890000 + + + 4.700000 + 0 + 0.000000 + 0.000000 + 1 + 2824.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0 + 0 + 3.620000 + 0.000000 + + + + + + + + + + Level 2: Energy Survey and Analysis + + + + + + + + + --06-01 + --09-30 + --06-01 + --09-30 + 0.088520 + 0.000000 + + + --01-01 + --05-31 + --01-01 + --05-31 + 0.053140 + 0.000000 + + + --10-01 + --12-31 + --10-01 + --12-31 + 0.053140 + 0.000000 + + + + + https://www.xcelenergy.com/company/rates_and_regulations/rates/rate_books + 16.880000 + + + 12345 + Xcel Energy + + Some-meter-ID + + some-account-number + Building Owner + + + + + + + + + --01-01 + --12-31 + 0.163600 + + + + + https://www.xcelenergy.com/company/rates_and_regulations/rates/rate_books + 43.880000 + + + Xcel Energy + + Some-meter-ID + + some-other-account-number + Building Owner + + + + + + + + + + + + + + Owner + + The dude + Some big company + + + 123-456-7890 + + + + + the.dude@somebigco.net + + + + + + Energy Auditor + + The lady + Auditeers + + + 123-456-7890 + + + + + the.lady@the-three-auditeers.com + + + + + + + diff --git a/spec/tests/unit/hvac_topology_selector_spec.rb b/spec/tests/unit/hvac_topology_selector_spec.rb index b7b1fef..8365981 100644 --- a/spec/tests/unit/hvac_topology_selector_spec.rb +++ b/spec/tests/unit/hvac_topology_selector_spec.rb @@ -194,14 +194,27 @@ def select_from(body, prefix: nil) body = system_xml.call(**exact_cases['Packaged Terminal Air Conditioner'][1]).sub('CN-AIR">', 'HS-1">') expect(select_from(body).first.status).to eq(:conflicting_input) end + + it 'inherits HVACSystem linked premises when the delivery has none' do + system_premises = '' + body = system_xml.call(**exact_cases['Packaged Terminal Air Conditioner'][1], delivery_premises: '') + system_premises + expect(select_from(body).first).to have_attributes(status: :match, premises: [{ type: 'Building', id: 'B-1' }]) + end + + it 'keeps delivery linked premises over HVACSystem linked premises' do + system_premises = '' + body = system_xml.call(**exact_cases['Packaged Terminal Air Conditioner'][1]) + system_premises + expect(select_from(body).first.premises).to eq([{ type: 'ThermalZone', id: 'TZ-1' }]) + end end describe 'ventilation and other HVAC systems' do ventilation_delivery = "#{premises}#{single_zone_cav}" \ '' - other = lambda do |type_xml, links: ''| + other = lambda do |type_xml, links: '', + integration: 'Stand-alone'| "#{type_xml}" \ - "Stand-alone#{links}" + "#{integration}#{links}" end mechanical = ->(type) { "#{type}" } @@ -246,5 +259,37 @@ def select_from(body, prefix: nil) results = select_from(with_ventilation.call(other.call(mechanical.call('Supply only'), links: links))) expect(results.last.status).to eq(:conflicting_input) end + + conditioning_link = '' + + it 'still selects conditioning deliveries linked by VentilationType None' do + results = select_from(with_ventilation.call(other.call(mechanical.call('None'), links: conditioning_link))) + expect(results.map(&:status)).to eq([:match, :missing_input, :no_hvac]) + expect(results.first.measure).to eq('hvac_ptac') + expect(results.last.configuration).to eq('No separate ventilation equipment') + end + + it 'still selects conditioning deliveries linked by an untyped ventilation record' do + untyped = 'false' + results = select_from(with_ventilation.call(other.call(untyped, links: conditioning_link))) + expect(results.first).to have_attributes(status: :match, measure: 'hvac_ptac') + expect(results.last.status).to eq(:missing_input) + end + + it 'still selects conditioning deliveries linked by integrated outdoor air records' do + integrated = other.call(mechanical.call('Supply only'), links: conditioning_link, + integration: 'Integrated with central air distribution') + second = integrated[%r{}].sub('O-1', 'O-2') + results = select_from(with_ventilation.call(integrated.sub('', "#{second}"))) + expect(results.map(&:status)).to eq([:match, :missing_input, :integrated, :integrated]) + expect(results.first.measure).to eq('hvac_ptac') + end + + it 'lets VentilationType None own explicitly unconditioned deliveries' do + body = with_ventilation.call(other.call(mechanical.call('None'))).sub("#{single_zone_cav}", '') + results = select_from(body) + expect(results.map(&:status)).to eq([:match, :no_hvac]) + expect(results.last.configuration).to eq('Explicitly no HVAC') + end end end From afc6a73744d5ecc096bae98d2f25fe3bd4acf1fe Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Thu, 12 Nov 2026 23:38:36 -0700 Subject: [PATCH 08/14] add binder for modifier measures --- docs/scenario_workflow_translation_plan.md | 5 +- lib/BOSS/hvac_target_binder.rb | 64 ++++++++++++++++++ spec/tests/unit/hvac_target_binder_spec.rb | 76 ++++++++++++++++++++++ 3 files changed, 143 insertions(+), 2 deletions(-) diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 2206c30..a119c3b 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -300,7 +300,8 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Avoid: Placeholder or guessed names, blank `target_zone_names` defaults, or making scenarios wait on baseline runs. - Findings: BOSS baseline zones come from `create_bar_from_building_type_ratios` and carry no BuildingSync IDs, and no v2.7.0 fixture links premises on HVAC deliveries. A probe workflow showed that a measure cannot change a later OSW step's arguments at run time. - Decision: bind whole-building premises only (`Building`, `Site`, `Facility`). `BOSS::HvacTargetBinder` (`lib/BOSS/hvac_target_binder.rb`) emits an `apply_hvac_topology_to_zone_scope` step with `zone_scope = all_model_zones`; zone, space, and section links return `missing_input`. The new upstream measure resolves every model zone by exact name at run time and runs the selected topology measure, so `replace` always gets the full zone list and scenario OSWs do not depend on a baseline run. Its Minitest suite (`apply_hvac_topology_to_zone_scope_test.rb`) covers create, full-scope replace of a shared air loop, topology safety checks, and an empty model. -- Remaining: merge `apply_hvac_topology_to_zone_scope` upstream; CI now pins the branch commit `bdf14e8`, which must be replaced with the merged commit. Modifier object binding (`modify_existing_*`) waits for PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. +- Modifier object binding: upstream `apply_hvac_modifier_to_object_scope` runs one `modify_existing_*` measure on object names resolved at run time. `object_scope = all_matching_objects` takes every object the modifier and setting can change (efficiency metric picks the coil or VRF type, `boiler_*`/`chiller_*` property picks boilers or chillers, `plant_loop_type` picks Heating/Cooling/Condenser loops); `explicit_object_names` takes `object_names_json`. Other modifier arguments pass as `modifier_arguments_json`. It fails when nothing matches and rejects names containing commas, because the modifiers split target names on commas. `HvacTargetBinder#bind_modifier` emits this step: whole-building premises give `all_matching_objects`, explicit `object_names:` give `explicit_object_names`, other premises and plant-loop changes without a loop type return `missing_input`. +- Remaining: CI pins the unmerged gem branch commit `bdf14e8`; bump it to the commit that adds `apply_hvac_modifier_to_object_scope`. The upstream merge moves to the end of PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. - Explicit zone scope: upstream `apply_hvac_topology_to_zone_scope` now also takes `zone_scope = explicit_zone_names` with `zone_names_json` (a JSON array, so names may contain commas), and topology measures accept JSON `target_zone_names`. `HvacTargetBinder#bind` takes optional `zone_names:` and then emits that scope for any premises. No BOSS caller passes zone names yet: generated baseline zone names are not known when the OSW is written. ### PR 14D: Baseline HVAC Integration @@ -317,7 +318,7 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Status: Planned - Delivered by: - - Depends on: PR 14D. -- Scope: Map HVAC retrofit measures to topology `replace` steps or `modify_existing_*` steps through the PR 9 result contract. Order conditioning, then DOAS/ventilation, then modifiers. Keep existing economizer, DCV, and thermostat mappings from other gems. +- Scope: Map HVAC retrofit measures onto the steps `HvacTargetBinder` already produces (`bind` for topology `replace`, `bind_modifier` for `modify_existing_*`) through the PR 9 result contract. No new binding work belongs here. Order conditioning, then DOAS/ventilation, then modifiers. Keep existing economizer, DCV, and thermostat mappings from other gems. - Done when: One topology replacement and one modifier case run end to end, partial shared-system replacement is rejected, and mixed-source packages still write and run. - Avoid: Mapping "Replace boiler" or "Replace burner" to an efficiency edit, guessing values, or partial HVAC graphs. diff --git a/lib/BOSS/hvac_target_binder.rb b/lib/BOSS/hvac_target_binder.rb index 9d661b0..bd1cab7 100644 --- a/lib/BOSS/hvac_target_binder.rb +++ b/lib/BOSS/hvac_target_binder.rb @@ -15,8 +15,20 @@ module BOSS # have no BuildingSync IDs. Whole-building premises resolve to every model zone at run time # through buildingsync-measures-gem apply_hvac_topology_to_zone_scope. Other premises bind only # when the caller passes the exact model zone names; otherwise they return :missing_input. + # bind_modifier does the same for modify_existing_* measures through + # apply_hvac_modifier_to_object_scope, which resolves model object names at run time. class HvacTargetBinder BINDING_MEASURE = 'apply_hvac_topology_to_zone_scope' + MODIFIER_BINDING_MEASURE = 'apply_hvac_modifier_to_object_scope' + # Modifier measure => its target-names argument, which the binding measure fills. + MODIFIER_TARGETS = { + 'modify_existing_air_loop_controls' => 'target_air_loop_names', + 'modify_existing_heat_recovery' => 'target_heat_exchanger_names', + 'modify_existing_hvac_equipment_efficiencies' => 'target_object_names', + 'modify_existing_plant_equipment' => 'target_plant_equipment_names', + 'modify_existing_plant_loop_temperatures' => 'target_plant_loop_names' + }.freeze + PLANT_LOOP_TYPES = ['Heating', 'Cooling', 'Condenser'].freeze WHOLE_BUILDING_PREMISES = ['Building', 'Site', 'Facility'].freeze STANDARDS_TEMPLATES = ['90.1-2013', '90.1-2016', '90.1-2019'].freeze OPERATIONS = ['create', 'replace'].freeze @@ -53,6 +65,58 @@ def bind(result, operation:, standards_template:, zone_names: nil) Binding.new(status: :bound, step: step(result, operation, standards_template, nil), messages: []) end + # @param modifier_measure [String] one of MODIFIER_TARGETS keys + # @param modifier_arguments [Hash] the modifier's arguments other than its target-names argument + # @param premises [Array] BuildingSync premises ({ type:, id: }) the change applies to + # @param object_names [Array, nil] exact model object names; when given, the step uses + # object_scope explicit_object_names instead of all_matching_objects + # @param plant_loop_type [String, nil] Heating, Cooling, or Condenser; required for + # modify_existing_plant_loop_temperatures without object_names + # @return [Binding] status :bound with an OSW step spec, or :missing_input + def bind_modifier(modifier_measure:, modifier_arguments:, premises:, object_names: nil, plant_loop_type: nil) + target_key = MODIFIER_TARGETS[modifier_measure] + raise ArgumentError, "Unsupported modifier_measure '#{modifier_measure}'" if target_key.nil? + raise ArgumentError, 'modifier_arguments must be a Hash' if !modifier_arguments.is_a?(Hash) + if modifier_arguments.key?(target_key) || modifier_arguments.key?(target_key.to_sym) + raise ArgumentError, "modifier_arguments must not set #{target_key}" + end + if !plant_loop_type.nil? && !PLANT_LOOP_TYPES.include?(plant_loop_type) + raise ArgumentError, "Unsupported plant_loop_type '#{plant_loop_type}'" + end + if !object_names.nil? && (object_names.empty? || !object_names.all? { |name| name.is_a?(String) && !name.strip.empty? }) + raise ArgumentError, 'object_names must be a non-empty array of non-empty strings' + end + + if object_names.nil? + unbound = premises.reject { |premise| WHOLE_BUILDING_PREMISES.include?(premise[:type]) } + if premises.empty? || !unbound.empty? + refs = unbound.map { |premise| "#{premise[:type]} #{premise[:id]}" } + return Binding.new( + status: :missing_input, step: nil, + messages: ["#{modifier_measure} links #{refs.empty? ? 'no premises' : refs.join(', ')}; " \ + 'only whole-building premises can be bound to generated baseline objects.'] + ) + end + if modifier_measure == 'modify_existing_plant_loop_temperatures' && plant_loop_type.nil? + return Binding.new(status: :missing_input, step: nil, + messages: ["#{modifier_measure} needs a plant_loop_type to bind to all matching loops."]) + end + end + + scope = if object_names + { object_scope: 'explicit_object_names', object_names_json: JSON.generate(object_names.uniq) } + else + { object_scope: 'all_matching_objects' } + end + scope[:plant_loop_type] = plant_loop_type if plant_loop_type + step = { + measure_dir_name: MODIFIER_BINDING_MEASURE, + arguments: { modifier_measure: modifier_measure, **scope, + modifier_arguments_json: JSON.generate(modifier_arguments) } + } + Binding.new(status: :bound, step: step, messages: []) + end + private def step(result, operation, standards_template, zone_names) diff --git a/spec/tests/unit/hvac_target_binder_spec.rb b/spec/tests/unit/hvac_target_binder_spec.rb index 969cb09..22689f5 100644 --- a/spec/tests/unit/hvac_target_binder_spec.rb +++ b/spec/tests/unit/hvac_target_binder_spec.rb @@ -96,4 +96,80 @@ def match_result(premises, measure: 'hvac_ptac') topologies = doc.get_elements("measure/arguments/argument[name='topology_measure']/choices/choice/value").map(&:text) expect(topologies).to include('hvac_ptac', 'hvac_doas', 'hvac_vav_hw_reheat') end + + describe '#bind_modifier' do + let(:efficiency) { { efficiency_metric: 'dx_cooling_cop', efficiency_value: 4.0 } } + + it 'binds whole-building premises to all matching objects' do + binding = binder.bind_modifier(modifier_measure: 'modify_existing_hvac_equipment_efficiencies', + modifier_arguments: efficiency, premises: [{ type: 'Building', id: 'B-1' }]) + expect(binding.status).to eq(:bound) + expect(binding.step).to eq( + measure_dir_name: 'apply_hvac_modifier_to_object_scope', + arguments: { modifier_measure: 'modify_existing_hvac_equipment_efficiencies', object_scope: 'all_matching_objects', + modifier_arguments_json: '{"efficiency_metric":"dx_cooling_cop","efficiency_value":4.0}' } + ) + end + + it 'binds any premises to explicit object names' do + binding = binder.bind_modifier(modifier_measure: 'modify_existing_heat_recovery', + modifier_arguments: { effectiveness: 0.7 }, + premises: [{ type: 'ThermalZone', id: 'TZ-1' }], object_names: ['ERV 1', 'ERV 1']) + expect(binding.step[:arguments]).to include(object_scope: 'explicit_object_names', object_names_json: '["ERV 1"]') + end + + it 'returns missing input for non-whole-building premises or unscoped plant loops' do + zone = binder.bind_modifier(modifier_measure: 'modify_existing_heat_recovery', modifier_arguments: {}, + premises: [{ type: 'ThermalZone', id: 'TZ-1' }]) + expect(zone.status).to eq(:missing_input) + expect(zone.messages.first).to include('ThermalZone TZ-1') + loops = binder.bind_modifier(modifier_measure: 'modify_existing_plant_loop_temperatures', + modifier_arguments: { design_loop_exit_temperature_c: 60.0 }, + premises: [{ type: 'Building', id: 'B-1' }]) + expect(loops.status).to eq(:missing_input) + heating = binder.bind_modifier(modifier_measure: 'modify_existing_plant_loop_temperatures', + modifier_arguments: { design_loop_exit_temperature_c: 60.0 }, + premises: [{ type: 'Building', id: 'B-1' }], plant_loop_type: 'Heating') + expect(heating.step[:arguments]).to include(object_scope: 'all_matching_objects', plant_loop_type: 'Heating') + end + + it 'rejects unsupported modifiers, target-name arguments, and bad inputs' do + building = [{ type: 'Building', id: 'B-1' }] + expect { binder.bind_modifier(modifier_measure: 'hvac_ptac', modifier_arguments: {}, premises: building) } + .to raise_error(ArgumentError, /modifier_measure/) + expect do + binder.bind_modifier(modifier_measure: 'modify_existing_heat_recovery', + modifier_arguments: { 'target_heat_exchanger_names' => 'X' }, premises: building) + end.to raise_error(ArgumentError, /target_heat_exchanger_names/) + expect do + binder.bind_modifier(modifier_measure: 'modify_existing_heat_recovery', modifier_arguments: {}, + premises: building, object_names: ['']) + end.to raise_error(ArgumentError, /object_names/) + expect do + binder.bind_modifier(modifier_measure: 'modify_existing_plant_loop_temperatures', modifier_arguments: {}, + premises: building, plant_loop_type: 'Steam') + end.to raise_error(ArgumentError, /plant_loop_type/) + end + + it 'matches the modifier binding measure arguments in the configured measure source' do + dirs = BOSS::ExternalMeasureRepoManager.new.resolved_measure_directories(include_scenario_only: true) + xml_path = dirs.map { |dir| File.join(dir, described_class::MODIFIER_BINDING_MEASURE, 'measure.xml') } + .find { |p| File.file?(p) } + skip 'apply_hvac_modifier_to_object_scope is not in the configured measure source' if xml_path.nil? + + doc = REXML::Document.new(File.read(xml_path)) + names = doc.get_elements('measure/arguments/argument/name').map(&:text) + expect(names).to eq(['modifier_measure', 'object_scope', 'object_names_json', 'plant_loop_type', 'modifier_arguments_json']) + choices = ->(arg) { doc.get_elements("measure/arguments/argument[name='#{arg}']/choices/choice/value").map(&:text) } + expect(choices.call('modifier_measure')).to match_array(described_class::MODIFIER_TARGETS.keys) + expect(choices.call('object_scope')).to eq(['all_matching_objects', 'explicit_object_names']) + expect(choices.call('plant_loop_type')).to include(*described_class::PLANT_LOOP_TYPES) + + described_class::MODIFIER_TARGETS.each do |modifier, target_key| + modifier_xml = File.join(File.dirname(xml_path, 2), modifier, 'measure.xml') + modifier_args = REXML::Document.new(File.read(modifier_xml)).get_elements('measure/arguments/argument/name').map(&:text) + expect(modifier_args).to include(target_key) + end + end + end end From fe222760bde9ce0c6ea207a21e8410764cf685ba Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:06:28 -0700 Subject: [PATCH 09/14] Update scenario_workflow_translation_plan.md --- docs/scenario_workflow_translation_plan.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 18bd5fc..360bfdc 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -314,8 +314,8 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Avoid: Mapping DOE Ref, older 90.1, or DEER templates to 90.1-2019, or adding HVAC on top of `add_hvac: true`. - Findings: with `add_hvac: false`, openstudio-standards 0.8.2 `create_typical_building_from_model` skips PRM sizing parameters, the sizing run, multizone VAV outdoor-air sizing, prototype HVAC assumptions, the HVAC efficiency standard, and NIST infiltration schedules; its night-cycle thermostat change then finds no managers. Topology measures do none of these. No existing measure runs this tail alone. - Decision: `BOSS::BaselineHvacPlanner` (`lib/BOSS/baseline_hvac_planner.rb`) plans topology HVAC only when every selector result is `:match`, binds to whole-building premises, the template is 90.1-2013/2016/2019, and there is exactly one conditioning configuration plus at most one ventilation configuration (ventilation only with zone-equipment topologies, since DOAS `create` rejects air-loop zones). Steps go right after `create_typical_building_from_model`: conditioning, then ventilation, then the new upstream measure `apply_standard_hvac_sizing_and_efficiency`, which mirrors the skipped tail. Otherwise `build_baseline_osw` keeps `add_hvac: true` and logs each reason. When topology steps are used, the baseline adds the scenario-only `buildingsync-measures-gem` measure path. Baseline-only and scenario writers share `build_baseline_osw`. -- Current fixture effect: none; every v2.7.0 fixture falls back before premises are checked. Reasons: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER), HVACSystems with no Delivery/OtherHVACSystem (Golden Test File, ASHRAE 211 Export), heat/energy-recovery or natural ventilation `OtherHVACSystem` records (`not_mappable`), and ASHRAE-L2-style files whose `OtherHVACSystem` (`VentilationType None` or no type) links the conditioning deliveries, so those deliveries are consumed as ventilation links. Premises are linked on `HVACSystem`, usually to `Building` plus a `Space function` section, never on `Delivery` and never to a `Whole building` section. -- Follow-up: let deliveries inherit `HVACSystem/LinkedPremises` when they have none, and revisit how `VentilationType None` / untyped `OtherHVACSystem` links consume conditioning deliveries. Both are selector (14B) changes. +- Current fixture effect (after the 14B selector follow-ups): none; every v2.7.0 fixture still falls back. Many also fail the template gate first (`DOE Ref`, `90.1-2007`, or no standard). With the template gate bypassed, the first HVAC reason is: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER); HVACSystems the selector sees without Delivery/OtherHVACSystem records (most ASHRAE-L2-style, Chula Vista, NYC, San Francisco, HOMES, Golden Test File, ASHRAE 211 Export); heat/energy-recovery ventilation (`not_mappable`: BuildingEQ, `Example_ASHRAE_L2_Report`); and detailed data that matches no known configuration (`example-smalloffice-level2`, `Reference-PrimarySchool-L200-Audit`, `Example_NYC_Energy_Efficiency_Report_Property_2`). The gaps behind these are listed in `docs/hvac_mapping_gaps.md`. +- Follow-up: delivery premises inheritance and `None`/untyped ventilation handling landed in 14B and did not unlock a fixture. An exact-match fixture still has to be authored. - Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the pinned gem branch commit `bdf14e8` (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus); the upstream merge moves to the end of PR 14E. Add an exact-match fixture and a baseline simulation check to meet "simulate with the expected HVAC". ### PR 14E: Scenario HVAC Mappings From 70f38db88d98ae091b313b178911ddd819571ec6 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:28:35 -0700 Subject: [PATCH 10/14] Squashed commit of the following: commit f06a81bed33b946991db9e38f7ea0fc892462aae Author: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri Nov 13 11:28:03 2026 -0700 update binder for gas backup commit e4356d33065757acb4c0bf17216d4fb2d0ef1eee Author: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri Nov 13 02:13:00 2026 -0700 Squashed commit of the following: commit 570bb7d1b2023eb3caef2ee7efaa3099ac7e053b Author: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri Nov 13 02:12:01 2026 -0700 relax condenser rule commit f19809ae9c7122269d65689b96369d5dee51cfd4 Author: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri Nov 13 01:54:34 2026 -0700 update selector rules to from updated measures-gem --- .github/workflows/ci.yml | 2 +- docs/hvac_mapping_gaps.md | 11 +++ docs/scenario_workflow_translation_plan.md | 7 +- lib/BOSS/hvac_target_binder.rb | 8 +- lib/BOSS/hvac_topology_selector.rb | 80 +++++++++++++------ spec/tests/unit/hvac_target_binder_spec.rb | 10 ++- .../tests/unit/hvac_topology_selector_spec.rb | 44 +++++++++- 7 files changed, 126 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76c34ec..7c139b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@v4 with: repository: BuildingSync/buildingsync-measures-gem - ref: bdf14e8e11e9859eb437faa5cd3d15cf18b57ba8 + ref: 30cdd344db06a8708b79946b1a8b904fe9c3d6c4 path: buildingsync-measures-gem - name: Setup run: | diff --git a/docs/hvac_mapping_gaps.md b/docs/hvac_mapping_gaps.md index b5d135e..7081ffc 100644 --- a/docs/hvac_mapping_gaps.md +++ b/docs/hvac_mapping_gaps.md @@ -4,6 +4,8 @@ Gaps between BuildingSync audit data and the `buildingsync-measures-gem` [HVAC M Fixture paths are under `spec/files/v2.7.0/`. +Status: gaps 1-7 were resolved upstream in buildingsync-measures-gem `e1b2f33` and gap 8 in `5e775a6`; all are adopted in `BOSS::HvacTopologySelector`. + ## Measure Gaps ### 1. Packaged unitary heat pump with gas backup @@ -53,3 +55,12 @@ Fixture paths are under `spec/files/v2.7.0/`. - Guide: `zones(D)` and `zones(O)` come from the record's own links. - BOSS behavior: a record without its own links inherits the parent `HVACSystem` links. - Ask: add the fallback to the guide. + +## Resolved Later + +### 8. DX cooling source without a condenser plant + +- Data: `example-smalloffice-level2.xml`, all five DX sources (`DXSystemType = Packaged/unitary heat pump`) omit `CondenserPlantIDs`. +- Guide: packaged and PTAC/PTHP/VRF rows require the DX condenser to resolve to an `AirCooled` condenser plant, so these deliveries identify no configuration. +- Ask: decide whether a packaged or terminal DX source without a condenser reference may be treated as air-cooled, or confirm it stays missing input. +- Resolution: packaged and terminal DX rows (PTAC, PTHP, packaged rooftop AC/HP/VAV) read an omitted `DX/CondenserPlantIDs` as air-cooled; a supplied reference must still resolve to a non-evaporative `AirCooled` condenser. VRF still requires the reference. diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 360bfdc..c2f5ca5 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -288,7 +288,9 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Deferred to later steps: guards comparing `Quantity` with zone counts and the premises-containment checks need the model crosswalk (PR 14C). Group-member consistency, zone-overlap checks, plant-binding limits, call ordering, and scenario `@Status` record selection belong to call construction (PR 14D/14E). `DuctSystems` checks are not implemented yet. - Fixture follow-ups (found in PR 14D): a `Delivery` or `OtherHVACSystem` without its own `LinkedPremises` inherits the parent `HVACSystem` links (BuildingSync fixtures link premises only there; the upstream guide reads the record's own links). An `OtherHVACSystem` whose only content is `MechanicalVentilation` with `VentilationType` `None` or no type names no ventilation equipment; it owns its linked deliveries only when all of them are explicitly unconditioned. Otherwise those deliveries are selected as conditioning deliveries, and the record returns `no_hvac` (`None`, configuration "No separate ventilation equipment") or `missing_input` (no type). Fixture effect: ASHRAE-L2-style deliveries are now selected but return `conflicting_input`, because their `SourceHeatingPlantID` points to a plant in a different `HVACSystem` (cross-system plant references are not resolved yet). Whether the baseline planner may ignore `no_hvac` records is a PR 14D decision. - Integrated outdoor air: an `OtherHVACSystem` with `Integration` `Integrated with central air distribution` or `Integrated with local air distribution` describes outdoor air through the linked deliveries' own air system. It does not consume those deliveries and returns the new status `integrated`; ERV, exhaust, and other not-mappable equipment still return `not_mappable`. Whether the planner may ignore `integrated` records is a PR 14D decision. -- L200 fixtures: `example-smalloffice-level2.xml` and `Reference-PrimarySchool-L200-Audit.xml` (copied from `../schema/docs/notebooks/bsync_examples/`) carry full Delivery/source/plant records. Neither matches yet: gas-backup packaged heat pumps, `FurnaceType Other`, empty `FanBasedDistributionType`, and missing `CS/Quantity` are guide or measure gaps recorded in `docs/hvac_mapping_gaps.md` for `buildingsync-measures-gem`. VAV pods 2, 3, and other reference the `Boiler` plant defined in `VAV-Pod1`; resolving plants across `HVACSystem` records is open BOSS selector work. +- Upstream guide rules adopted (buildingsync-measures-gem `e1b2f33`): Packaged Rooftop AC and Warm Air Furnace require a gas, air-medium `Furnace` and accept `FurnaceType` `Warm air`, `Other`, or absent. Packaged Rooftop Heat Pump accepts `HeatPumpBackupSystemFuel` `Electricity` or `Natural gas` and returns it in `Result#measure_arguments` as `supplemental_heating_fuel` (`Electricity`/`NaturalGas`). An empty `FanBasedDistributionType` counts as absent. `CS/Quantity` is a guard on the VAV and VRF rows. From `5e775a6`: packaged and terminal DX rows read an omitted `DX/CondenserPlantIDs` as air-cooled (VRF still requires it). +- L200 fixtures: `example-smalloffice-level2.xml` and `Reference-PrimarySchool-L200-Audit.xml` (copied from `../schema/docs/notebooks/bsync_examples/`) carry full Delivery/source/plant records. The L200 school now matches one Packaged Rooftop VAV with Hot Water Reheat and three Packaged Rooftop AC deliveries; VAV pods 2, 3, and other still return `conflicting_input` because they reference the `Boiler` plant defined in `VAV-Pod1` (resolving plants across `HVACSystem` records is open BOSS selector work). `example-smalloffice-level2.xml` now matches five Packaged Rooftop Heat Pump deliveries with `supplemental_heating_fuel` `NaturalGas`. +- Follow-up for PR 14C (done in PR 14C): the binder and wrapper forward `Result#measure_arguments` (for example `supplemental_heating_fuel`). ### PR 14C: Model Target Binding @@ -301,8 +303,9 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Findings: BOSS baseline zones come from `create_bar_from_building_type_ratios` and carry no BuildingSync IDs, and no v2.7.0 fixture links premises on HVAC deliveries. A probe workflow showed that a measure cannot change a later OSW step's arguments at run time. - Decision: bind whole-building premises only (`Building`, `Site`, `Facility`). `BOSS::HvacTargetBinder` (`lib/BOSS/hvac_target_binder.rb`) emits an `apply_hvac_topology_to_zone_scope` step with `zone_scope = all_model_zones`; zone, space, and section links return `missing_input`. The new upstream measure resolves every model zone by exact name at run time and runs the selected topology measure, so `replace` always gets the full zone list and scenario OSWs do not depend on a baseline run. Its Minitest suite (`apply_hvac_topology_to_zone_scope_test.rb`) covers create, full-scope replace of a shared air loop, topology safety checks, and an empty model. - Modifier object binding: upstream `apply_hvac_modifier_to_object_scope` runs one `modify_existing_*` measure on object names resolved at run time. `object_scope = all_matching_objects` takes every object the modifier and setting can change (efficiency metric picks the coil or VRF type, `boiler_*`/`chiller_*` property picks boilers or chillers, `plant_loop_type` picks Heating/Cooling/Condenser loops); `explicit_object_names` takes `object_names_json`. Other modifier arguments pass as `modifier_arguments_json`. It fails when nothing matches and rejects names containing commas, because the modifiers split target names on commas. `HvacTargetBinder#bind_modifier` emits this step: whole-building premises give `all_matching_objects`, explicit `object_names:` give `explicit_object_names`, other premises and plant-loop changes without a loop type return `missing_input`. -- Remaining: CI pins the unmerged gem branch commit `bdf14e8`; bump it to the commit that adds `apply_hvac_modifier_to_object_scope`. The upstream merge moves to the end of PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. +- Remaining: CI pins the unmerged gem branch commit `30cdd34`, which adds `apply_hvac_modifier_to_object_scope` and `topology_arguments_json`. The upstream merge moves to the end of PR 14E. Quantity-versus-zone-count guards cannot run for whole-building scope before the model exists. - Explicit zone scope: upstream `apply_hvac_topology_to_zone_scope` now also takes `zone_scope = explicit_zone_names` with `zone_names_json` (a JSON array, so names may contain commas), and topology measures accept JSON `target_zone_names`. `HvacTargetBinder#bind` takes optional `zone_names:` and then emits that scope for any premises. No BOSS caller passes zone names yet: generated baseline zone names are not known when the OSW is written. +- Data-derived topology arguments: upstream `apply_hvac_topology_to_zone_scope` takes an optional `topology_arguments_json` (a JSON object of string values) and passes it to the topology measure. It rejects keys the wrapper sets itself (`operation`, `target_zone_names`, `standards_template`) and arguments the topology measure does not define. `HvacTargetBinder#bind` writes non-empty `Result#measure_arguments` there, so a gas-backup packaged heat pump gets `{"supplemental_heating_fuel":"NaturalGas"}`. The CI pin must move to the gem commit that adds this argument. ### PR 14D: Baseline HVAC Integration diff --git a/lib/BOSS/hvac_target_binder.rb b/lib/BOSS/hvac_target_binder.rb index bd1cab7..75f77d6 100644 --- a/lib/BOSS/hvac_target_binder.rb +++ b/lib/BOSS/hvac_target_binder.rb @@ -121,10 +121,10 @@ def bind_modifier(modifier_measure:, modifier_arguments:, premises:, object_name def step(result, operation, standards_template, zone_names) scope = zone_names ? { zone_scope: 'explicit_zone_names', zone_names_json: JSON.generate(zone_names.uniq) } : { zone_scope: 'all_model_zones' } - { - measure_dir_name: BINDING_MEASURE, - arguments: { topology_measure: result.measure, operation: operation, **scope, standards_template: standards_template } - } + arguments = { topology_measure: result.measure, operation: operation, **scope, standards_template: standards_template } + extra = result.measure_arguments || {} + arguments[:topology_arguments_json] = JSON.generate(extra) if !extra.empty? + { measure_dir_name: BINDING_MEASURE, arguments: arguments } end end end diff --git a/lib/BOSS/hvac_topology_selector.rb b/lib/BOSS/hvac_topology_selector.rb index 802c20e..a3dc8f1 100644 --- a/lib/BOSS/hvac_topology_selector.rb +++ b/lib/BOSS/hvac_topology_selector.rb @@ -19,8 +19,10 @@ module BOSS class HvacTopologySelector STATUSES = [:match, :mapping_gap, :not_mappable, :missing_input, :conflicting_input, :no_hvac, :integrated].freeze + # measure_arguments holds topology-measure arguments derived from the data (beyond operation, + # zones, and template), e.g. { 'supplemental_heating_fuel' => 'NaturalGas' }. Result = Struct.new(:status, :configuration, :measure, :hvac_system_id, :record_ids, :premises, - :group_key, :messages, keyword_init: true) + :group_key, :messages, :measure_arguments, keyword_init: true) # Element accessors and predicates for one Delivery. Paths are '/'-separated local names, # so namespace prefixes do not matter. @@ -131,6 +133,12 @@ def air_cooled_dx !cn.nil? && exists(cn, 'AirCooled') && absent(cn, 'AirCooled/EvaporativelyCooledCondenser') end + # Packaged and terminal DX units are self-contained air-cooled units, so an omitted + # condenser reference reads as air-cooled. VRF keeps the strict air_cooled_dx check. + def packaged_air_cooled_dx + absent(dx, 'CondenserPlantIDs') || air_cooled_dx + end + def gas_hot_water_plant eq(hs, 'HeatingMedium', 'Hot water') && !hp.nil? && eq(hp, 'Boiler/BoilerType', 'Hot water') && eq(hp, 'PrimaryFuel', 'Natural gas') @@ -156,6 +164,15 @@ def multizone_vav(terminal, reheat) eq(a, 'ReheatSource', reheat) end + # An empty FanBasedDistributionType (no child elements) counts as absent. + def fan_based_distribution(el) + nodes(el, 'FanBased/FanBasedDistributionType').any? { |n| !n.elements.to_a.empty? } + end + + def gas_air_furnace + exists(h, 'Furnace') && eq(hs, 'PrimaryFuel', 'Natural gas') && eq(hs, 'HeatingMedium', 'Air') + end + def zone_equipment_only !z.nil? && ['Convection', 'Radiant', 'Other'].all? { |n| absent(z, n) } end @@ -174,6 +191,9 @@ def conditioned ELECTRIC = 'Electricity' AIR_REFRIGERANT = ['Air', 'Refrigerant'].freeze + FURNACE_TYPES = ['Warm air', 'Other'].freeze + # HeatPumpBackupSystemFuel => hvac_packaged_rooftop_heat_pump supplemental_heating_fuel + BACKUP_FUELS = { 'Electricity' => 'Electricity', 'Natural gas' => 'NaturalGas' }.freeze # Exact rows and mapping-gap rows. :required, :absent, and :guards take a Context. # :absent and :guards return descriptions of failed checks. @@ -182,9 +202,9 @@ def conditioned configuration: 'Packaged Terminal Air Conditioner', measure: 'hvac_ptac', status: :match, group: :delivery, required: lambda { |x| x.zone_equipment_only && x.exists(x.h, 'ElectricResistance') && - x.eq(x.dx, 'DXSystemType', 'Packaged terminal air conditioner (PTAC)') && x.air_cooled_dx + x.eq(x.dx, 'DXSystemType', 'Packaged terminal air conditioner (PTAC)') && x.packaged_air_cooled_dx }, - absent: ->(x) { x.exists(x.z, 'FanBased/FanBasedDistributionType') ? ['Z/FanBased/FanBasedDistributionType'] : [] }, + absent: ->(x) { x.fan_based_distribution(x.z) ? ['Z/FanBased/FanBasedDistributionType'] : [] }, guards: lambda { |x| [ ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', ELECTRIC)], @@ -217,9 +237,9 @@ def conditioned required: lambda { |x| x.zone_equipment_only && x.eq(x.h, 'HeatPump/HeatPumpType', 'Packaged Terminal') && x.heat_pump_shares_cs && x.eq(x.h, 'HeatPump/HeatPumpBackupSystemFuel', ELECTRIC) && x.absent(x.h, 'HeatPump/LinkedHeatingPlantID') && - x.eq(x.dx, 'DXSystemType', 'Packaged terminal heat pump (PTHP)') && x.air_cooled_dx + x.eq(x.dx, 'DXSystemType', 'Packaged terminal heat pump (PTHP)') && x.packaged_air_cooled_dx }, - absent: ->(x) { x.exists(x.z, 'FanBased/FanBasedDistributionType') ? ['Z/FanBased/FanBasedDistributionType'] : [] }, + absent: ->(x) { x.fan_based_distribution(x.z) ? ['Z/FanBased/FanBasedDistributionType'] : [] }, guards: lambda { |x| [ ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', ELECTRIC)], @@ -232,13 +252,13 @@ def conditioned { configuration: 'Packaged Rooftop Air Conditioner', measure: 'hvac_packaged_rooftop_ac', status: :match, group: :delivery, required: lambda { |x| - x.single_zone_cav && x.eq(x.h, 'Furnace/FurnaceType', 'Warm air') && x.eq(x.hs, 'PrimaryFuel', 'Natural gas') && - x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.air_cooled_dx + x.single_zone_cav && x.gas_air_furnace && + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.packaged_air_cooled_dx }, absent: ->(x) { central_air_absent(x) }, guards: lambda { |x| [ - ['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', 'Air')], + ['H/Furnace/FurnaceType', x.guard(x.h, 'Furnace/FurnaceType', FURNACE_TYPES)], ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)] ] @@ -248,8 +268,12 @@ def conditioned configuration: 'Packaged Rooftop Heat Pump', measure: 'hvac_packaged_rooftop_heat_pump', status: :match, group: :delivery, required: lambda { |x| x.single_zone_cav && x.eq(x.h, 'HeatPump/HeatPumpType', 'Packaged Unitary') && x.heat_pump_shares_cs && - x.eq(x.h, 'HeatPump/HeatPumpBackupSystemFuel', ELECTRIC) && x.absent(x.h, 'HeatPump/LinkedHeatingPlantID') && - x.eq(x.dx, 'DXSystemType', 'Packaged/unitary heat pump') && x.air_cooled_dx + x.one_of(x.h, 'HeatPump/HeatPumpBackupSystemFuel', BACKUP_FUELS.keys) && + x.absent(x.h, 'HeatPump/LinkedHeatingPlantID') && + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary heat pump') && x.packaged_air_cooled_dx + }, + arguments: lambda { |x| + { 'supplemental_heating_fuel' => BACKUP_FUELS[x.class.texts(x.h, 'HeatPump/HeatPumpBackupSystemFuel').first] } }, absent: ->(x) { central_air_absent(x) }, guards: lambda { |x| @@ -267,15 +291,15 @@ def conditioned required: lambda { |x| x.multizone_vav('VAV terminal box not fan powered with reheat', 'Heating plant') && x.gas_hot_water_plant && x.ref_ids(x.a, 'ReheatPlantID') == [x.hp.attributes['ID']] && - x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.air_cooled_dx && - x.eq(x.cs, 'Quantity', '1') + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.packaged_air_cooled_dx }, - absent: ->(x) { x.exists(x.a, 'FanBased/FanBasedDistributionType') ? ['A/FanBased/FanBasedDistributionType'] : [] }, + absent: ->(x) { x.fan_based_distribution(x.a) ? ['A/FanBased/FanBasedDistributionType'] : [] }, guards: lambda { |x| [ ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', 'Natural gas')], ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)], + ['CS/Quantity', x.quantity_guard(x.cs, 'Quantity')], ['plant quantities', x.plant_quantities_one(x.hp)] ] } @@ -287,21 +311,21 @@ def conditioned required: lambda { |x| x.multizone_vav('VAV terminal box fan powered with reheat', 'Local electric resistance') && x.exists(x.h, 'ElectricResistance') && - x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.air_cooled_dx + x.eq(x.dx, 'DXSystemType', 'Packaged/unitary direct expansion/RTU') && x.packaged_air_cooled_dx } }, { configuration: 'VAV with Hot Water Reheat', measure: 'hvac_vav_hw_reheat', status: :match, group: :cooling_source, required: lambda { |x| x.multizone_vav('VAV terminal box not fan powered with reheat', 'Heating plant') && x.gas_hot_water_plant && - x.ref_ids(x.a, 'ReheatPlantID') == [x.hp.attributes['ID']] && x.tower_chiller_plant && - x.eq(x.cs, 'Quantity', '1') + x.ref_ids(x.a, 'ReheatPlantID') == [x.hp.attributes['ID']] && x.tower_chiller_plant }, - absent: ->(x) { x.exists(x.a, 'FanBased/FanBasedDistributionType') ? ['A/FanBased/FanBasedDistributionType'] : [] }, + absent: ->(x) { x.fan_based_distribution(x.a) ? ['A/FanBased/FanBasedDistributionType'] : [] }, guards: lambda { |x| [ ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', 'Natural gas')], ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], + ['CS/Quantity', x.quantity_guard(x.cs, 'Quantity')], ['CP/PrimaryFuel', x.guard(x.cp, 'PrimaryFuel', ELECTRIC)], ['CP/CondenserType', x.guard(x.cp, 'CondenserType', 'Water Cooled')], ['plant quantities', x.plant_quantities_one(x.hp, x.cp, x.cn_chiller)] @@ -319,11 +343,10 @@ def conditioned { configuration: 'Warm Air Furnace', measure: 'hvac_warm_air_furnace', status: :match, group: :delivery, required: lambda { |x| - x.single_zone_cav && x.eq(x.h, 'Furnace/FurnaceType', 'Warm air') && x.eq(x.hs, 'PrimaryFuel', 'Natural gas') && - x.exists(x.c, 'NoCooling') + x.single_zone_cav && x.gas_air_furnace && x.exists(x.c, 'NoCooling') }, absent: ->(x) { central_air_absent(x) }, - guards: ->(x) { [['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', 'Air')]] } + guards: ->(x) { [['H/Furnace/FurnaceType', x.guard(x.h, 'Furnace/FurnaceType', FURNACE_TYPES)]] } }, { configuration: 'Water Loop Heat Pump', measure: 'hvac_water_loop_heat_pump', status: :mapping_gap, group: :delivery, @@ -347,7 +370,7 @@ def conditioned x.zone_equipment_only && x.eq(x.fc, 'FanCoilType', 'VRF terminal units') && x.exists(x.h, 'HeatPump') && x.heat_pump_shares_cs && x.absent(x.h, 'HeatPump/LinkedHeatingPlantID') && x.absent(x.h, 'HeatPump/HeatPumpBackupSystemFuel') && - x.eq(x.dx, 'DXSystemType', 'Variable refrigerant flow') && x.air_cooled_dx && x.eq(x.cs, 'Quantity', '1') + x.eq(x.dx, 'DXSystemType', 'Variable refrigerant flow') && x.air_cooled_dx }, absent: ->(x) { x.exists(x.fc, 'HVACPipeConfiguration') ? ['FC/HVACPipeConfiguration'] : [] }, guards: lambda { |x| @@ -355,7 +378,8 @@ def conditioned ['HS/PrimaryFuel', x.guard(x.hs, 'PrimaryFuel', ELECTRIC)], ['CS/PrimaryFuel', x.guard(x.cs, 'PrimaryFuel', ELECTRIC)], ['HS/HeatingMedium', x.guard(x.hs, 'HeatingMedium', AIR_REFRIGERANT)], - ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)] + ['CS/CoolingMedium', x.guard(x.cs, 'CoolingMedium', AIR_REFRIGERANT)], + ['CS/Quantity', x.quantity_guard(x.cs, 'Quantity')] ] } }, @@ -450,7 +474,9 @@ def conditioned INTEGRATED = ['Integrated with central air distribution', 'Integrated with local air distribution'].freeze def self.central_air_absent(x) - ['ReheatPlantID', 'FanBased/FanBasedDistributionType'].select { |p| x.exists(x.a, p) }.map { |p| "A/#{p}" } + failed = x.exists(x.a, 'ReheatPlantID') ? ['A/ReheatPlantID'] : [] + failed << 'A/FanBased/FanBasedDistributionType' if x.fan_based_distribution(x.a) + failed end # @param hvac_systems [REXML::Element] an HVACSystems element (or any parent of HVACSystem elements) @@ -598,7 +624,8 @@ def _select_delivery(sys, delivery, index) end _result(:match, sys.attributes['ID'], ids, premises, group_key, [], - configuration: rule[:configuration], measure: rule[:measure]) + configuration: rule[:configuration], measure: rule[:measure], + measure_arguments: rule[:arguments] ? rule[:arguments].call(x) : {}) end def _select_other(sys, other, index, ventilation_links) @@ -729,9 +756,10 @@ def _linked_premises(record) end end - def _result(status, sys_id, ids, premises, group_key, messages, configuration: nil, measure: nil) + def _result(status, sys_id, ids, premises, group_key, messages, configuration: nil, measure: nil, measure_arguments: {}) Result.new(status: status, configuration: configuration, measure: measure, hvac_system_id: sys_id, - record_ids: ids.compact.uniq, premises: premises, group_key: group_key, messages: messages) + record_ids: ids.compact.uniq, premises: premises, group_key: group_key, messages: messages, + measure_arguments: measure_arguments) end end end diff --git a/spec/tests/unit/hvac_target_binder_spec.rb b/spec/tests/unit/hvac_target_binder_spec.rb index 22689f5..3c618e0 100644 --- a/spec/tests/unit/hvac_target_binder_spec.rb +++ b/spec/tests/unit/hvac_target_binder_spec.rb @@ -62,6 +62,13 @@ def match_result(premises, measure: 'hvac_ptac') end end + it 'forwards selector measure arguments as topology_arguments_json' do + result = match_result([{ type: 'Building', id: 'B-1' }], measure: 'hvac_packaged_rooftop_heat_pump') + result.measure_arguments = { 'supplemental_heating_fuel' => 'NaturalGas' } + binding = binder.bind(result, operation: 'create', standards_template: '90.1-2019') + expect(binding.step[:arguments][:topology_arguments_json]).to eq('{"supplemental_heating_fuel":"NaturalGas"}') + end + it 'returns missing input when no premises are linked' do binding = binder.bind(match_result([]), operation: 'create', standards_template: '90.1-2019') expect(binding.status).to eq(:missing_input) @@ -90,7 +97,8 @@ def match_result(premises, measure: 'hvac_ptac') doc = REXML::Document.new(File.read(xml_path)) names = doc.get_elements('measure/arguments/argument/name').map(&:text) - expect(names).to eq(['topology_measure', 'operation', 'zone_scope', 'zone_names_json', 'standards_template']) + expect(names).to eq(['topology_measure', 'operation', 'zone_scope', 'zone_names_json', 'standards_template', + 'topology_arguments_json']) scopes = doc.get_elements("measure/arguments/argument[name='zone_scope']/choices/choice/value").map(&:text) expect(scopes).to eq(['all_model_zones', 'explicit_zone_names']) topologies = doc.get_elements("measure/arguments/argument[name='topology_measure']/choices/choice/value").map(&:text) diff --git a/spec/tests/unit/hvac_topology_selector_spec.rb b/spec/tests/unit/hvac_topology_selector_spec.rb index 8365981..cad4f29 100644 --- a/spec/tests/unit/hvac_topology_selector_spec.rb +++ b/spec/tests/unit/hvac_topology_selector_spec.rb @@ -25,7 +25,7 @@ end electric_resistance = '' - gas_furnace = 'Natural gasWarm air' + gas_furnace = 'Natural gasAirWarm air' hot_water = 'Hot water' chilled_water = 'Chilled water' no_cooling = '' @@ -110,6 +110,46 @@ def select_from(body, prefix: nil) expect(fcu.group_key).to eq([:plants, 'HP-1', 'CP-1', 'CN-TOWER']) end + it 'treats an empty FanBasedDistributionType as absent' do + args = exact_cases['Packaged Terminal Air Conditioner'][1] + delivery = '' + expect(select_from(system_xml.call(**args, delivery:)).first.status).to eq(:match) + end + + it 'accepts FurnaceType Other or absent and rejects other furnace types' do + args = exact_cases['Warm Air Furnace'][1] + other = select_from(system_xml.call(**args, heating: gas_furnace.sub('Warm air', 'Other'))).first + absent = select_from(system_xml.call(**args, heating: gas_furnace.sub('Warm air', ''))).first + steam = select_from(system_xml.call(**args, heating: gas_furnace.sub('Warm air', 'Steam'))).first + expect([other.status, absent.status, steam.status]).to eq([:match, :match, :conflicting_input]) + end + + it 'passes the heat pump backup fuel as a measure argument' do + args = exact_cases['Packaged Rooftop Heat Pump'][1] + electric = select_from(system_xml.call(**args)).first + gas = select_from(system_xml.call(**args, heating: heat_pump.call('Packaged Unitary', 'Natural gas'))).first + expect(electric.measure_arguments).to eq('supplemental_heating_fuel' => 'Electricity') + expect(gas).to have_attributes(status: :match, measure_arguments: { 'supplemental_heating_fuel' => 'NaturalGas' }) + end + + it 'treats CS/Quantity as a guard on VAV and VRF rows' do + ['VAV with Hot Water Reheat', 'VRF Terminal Unit'].each do |configuration| + args = exact_cases[configuration][1] + expect(select_from(system_xml.call(**args, cooling_extra: '')).first.status).to eq(:match) + expect(select_from(system_xml.call(**args, cooling_extra: '2')).first.status).to eq(:conflicting_input) + end + end + + it 'reads an omitted condenser reference as air-cooled for packaged DX but not VRF' do + strip = ->(xml) { xml.sub(%r{.*?}, '') } + ['Packaged Terminal Air Conditioner', 'Packaged Rooftop Heat Pump', 'Packaged Rooftop VAV with Hot Water Reheat'].each do |configuration| + args = exact_cases[configuration][1] + expect(select_from(system_xml.call(**args, cooling: strip.call(args[:cooling]))).first.status).to eq(:match) + end + vrf = exact_cases['VRF Terminal Unit'][1] + expect(select_from(system_xml.call(**vrf, cooling: strip.call(vrf[:cooling]))).first.status).not_to eq(:match) + end + it 'ignores namespace prefixes' do result = select_from(system_xml.call(**exact_cases['Packaged Terminal Air Conditioner'][1]), prefix: 'auc').first expect(result).to have_attributes(status: :match, measure: 'hvac_ptac') @@ -166,7 +206,7 @@ def select_from(body, prefix: nil) ], 'conflicting input for a required-absent element' => [ :conflicting_input, nil, - { delivery: ''.sub('/>', '>'), + { delivery: fan_coil.call('Fan coil 4 pipe'), heating: electric_resistance, cooling: dx.call('Packaged terminal air conditioner (PTAC)') } ], 'conflicting input for four-pipe fan coil with 2 pipe configuration' => [ From e0475d6d705c7e477c4629f9ede525c60bd2b863 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri, 13 Nov 2026 12:24:03 -0700 Subject: [PATCH 11/14] resolve multi-scale section conflicts --- docs/scenario_workflow_translation_plan.md | 8 +- lib/BOSS/baseline_hvac_planner.rb | 38 +- .../example-smalloffice-level2-built-2012.xml | 2733 +++++++++++++++++ spec/tests/unit/baseline_hvac_planner_spec.rb | 54 +- 4 files changed, 2828 insertions(+), 5 deletions(-) create mode 100644 spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index c2f5ca5..71bcd68 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -317,9 +317,11 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Avoid: Mapping DOE Ref, older 90.1, or DEER templates to 90.1-2019, or adding HVAC on top of `add_hvac: true`. - Findings: with `add_hvac: false`, openstudio-standards 0.8.2 `create_typical_building_from_model` skips PRM sizing parameters, the sizing run, multizone VAV outdoor-air sizing, prototype HVAC assumptions, the HVAC efficiency standard, and NIST infiltration schedules; its night-cycle thermostat change then finds no managers. Topology measures do none of these. No existing measure runs this tail alone. - Decision: `BOSS::BaselineHvacPlanner` (`lib/BOSS/baseline_hvac_planner.rb`) plans topology HVAC only when every selector result is `:match`, binds to whole-building premises, the template is 90.1-2013/2016/2019, and there is exactly one conditioning configuration plus at most one ventilation configuration (ventilation only with zone-equipment topologies, since DOAS `create` rejects air-loop zones). Steps go right after `create_typical_building_from_model`: conditioning, then ventilation, then the new upstream measure `apply_standard_hvac_sizing_and_efficiency`, which mirrors the skipped tail. Otherwise `build_baseline_osw` keeps `add_hvac: true` and logs each reason. When topology steps are used, the baseline adds the scenario-only `buildingsync-measures-gem` measure path. Baseline-only and scenario writers share `build_baseline_osw`. -- Current fixture effect (after the 14B selector follow-ups): none; every v2.7.0 fixture still falls back. Many also fail the template gate first (`DOE Ref`, `90.1-2007`, or no standard). With the template gate bypassed, the first HVAC reason is: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER); HVACSystems the selector sees without Delivery/OtherHVACSystem records (most ASHRAE-L2-style, Chula Vista, NYC, San Francisco, HOMES, Golden Test File, ASHRAE 211 Export); heat/energy-recovery ventilation (`not_mappable`: BuildingEQ, `Example_ASHRAE_L2_Report`); and detailed data that matches no known configuration (`example-smalloffice-level2`, `Reference-PrimarySchool-L200-Audit`, `Example_NYC_Energy_Efficiency_Report_Property_2`). The gaps behind these are listed in `docs/hvac_mapping_gaps.md`. -- Follow-up: delivery premises inheritance and `None`/untyped ventilation handling landed in 14B and did not unlock a fixture. An exact-match fixture still has to be authored. -- Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the pinned gem branch commit `bdf14e8` (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus); the upstream merge moves to the end of PR 14E. Add an exact-match fixture and a baseline simulation check to meet "simulate with the expected HVAC". +- Current fixture effect (after the 14B selector follow-ups): none; every v2.7.0 fixture still falls back. Many also fail the template gate first (`DOE Ref`, `90.1-2007`, or no standard). With the template gate bypassed, the first HVAC reason is: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER); HVACSystems the selector sees without Delivery/OtherHVACSystem records (most ASHRAE-L2-style, Chula Vista, NYC, San Francisco, HOMES, Golden Test File, ASHRAE 211 Export); heat/energy-recovery ventilation (`not_mappable`: BuildingEQ, `Example_ASHRAE_L2_Report`); and detailed data that matches no known configuration (`Reference-PrimarySchool-L200-Audit`, `Example_NYC_Energy_Efficiency_Report_Property_2`). `example-smalloffice-level2` now fails only the template gate (see below). The gaps behind these are listed in `docs/hvac_mapping_gaps.md`. +- Follow-up: delivery premises inheritance and `None`/untyped ventilation handling landed in 14B and did not unlock a fixture. +- Configuration merging: the planner treats results with the same measure and `measure_arguments` as one configuration, whatever their group keys. Its premises count as whole-building (one `apply_hvac_topology_to_zone_scope` step with `all_model_zones`) when every link is a `Section` of the single `Building` and the links include its `Whole building` section or every other non-empty section. Partial section coverage still returns `missing_input`. +- First topology fixture: `example-smalloffice-level2` now plans topology HVAC except for the template gate (built 2000, so `DOE Ref 1980-2004`). The test-only copy `spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml` sets `YearOfConstruction` and `YearOfLastMajorRemodel` to 2012 (`90.1-2013`, the oldest supported template). It plans one Packaged Rooftop Heat Pump step with `{"supplemental_heating_fuel":"NaturalGas"}`, then the sizing step. Future work: resolve every construction year, not just 2010 and later, instead of relying on the copy. +- Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the pinned gem branch commit `30cdd34` (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus); the upstream merge moves to the end of PR 14E. Add a baseline simulation check on the 2012 copy to meet "simulate with the expected HVAC". ### PR 14E: Scenario HVAC Mappings diff --git a/lib/BOSS/baseline_hvac_planner.rb b/lib/BOSS/baseline_hvac_planner.rb index fa788fd..371ef55 100644 --- a/lib/BOSS/baseline_hvac_planner.rb +++ b/lib/BOSS/baseline_hvac_planner.rb @@ -6,6 +6,7 @@ # See also https://github.com/BuildingSync/BOSS/blob/develop/LICENSE.md # ******************************************************************************* +require 'rexml/document' require 'BOSS/hvac_topology_selector' require 'BOSS/hvac_target_binder' @@ -16,6 +17,8 @@ module BOSS # Every binder step resolves to all model zones, so a topology plan allows one # conditioning configuration plus, for zone-equipment configurations only, one # ventilation configuration (DOAS create rejects zones already on an air loop). + # Results with the same measure and measure arguments are one configuration. Its + # Section links count as whole-building when they cover the building's sections. class BaselineHvacPlanner SIZING_MEASURE = 'apply_standard_hvac_sizing_and_efficiency' VENTILATION_MEASURES = HvacTopologySelector::VENTILATION_MEASURES.values.map(&:last).freeze @@ -47,7 +50,8 @@ def plan(hvac_systems, standards_template) unmatched = results.reject { |result| result.status == :match } return fallback(unmatched.map { |result| describe(result, result.status, result.messages) }) if !unmatched.empty? - groups = results.uniq(&:group_key) + groups = results.group_by { |result| [result.measure, result.measure_arguments || {}] }.values + .map { |members| merge(members, hvac_systems) } ventilation, conditioning = groups.partition { |result| VENTILATION_MEASURES.include?(result.measure) } problems = [] if conditioning.length != 1 @@ -73,6 +77,38 @@ def plan(hvac_systems, standards_template) private + def merge(members, hvac_systems) + merged = members.first.dup + merged.premises = members.flat_map { |member| member.premises || [] }.uniq + building_id = covered_building_id(merged.premises, hvac_systems) + merged.premises = [{ type: 'Building', id: building_id }] if building_id + merged + end + + # @return [String, nil] the building ID when every premise is a Section of the one + # building and they include its 'Whole building' section or all of its other + # non-empty sections + def covered_building_id(premises, hvac_systems) + return nil if premises.empty? || !premises.all? { |premise| premise[:type] == 'Section' } + + buildings = REXML::XPath.match(hvac_systems.document, "//*[local-name()='Building'][@ID]") + return nil if buildings.length != 1 + + sections = REXML::XPath.match(buildings.first, "*[local-name()='Sections']/*[local-name()='Section'][@ID]") + section_ids = sections.map { |section| section.attributes['ID'] } + linked = premises.map { |premise| premise[:id] } + return nil if !(linked - section_ids).empty? + + whole, parts = sections.partition do |section| + REXML::XPath.first(section, "*[local-name()='SectionType']")&.text == 'Whole building' + end + whole_linked = whole.any? { |section| linked.include?(section.attributes['ID']) } + parts_linked = !parts.empty? && parts.all? do |section| + section.elements.empty? || linked.include?(section.attributes['ID']) + end + whole_linked || parts_linked ? buildings.first.attributes['ID'] : nil + end + def fallback(messages) Plan.new(status: :fallback, steps: [], messages:) end diff --git a/spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml b/spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml new file mode 100644 index 0000000..5af7ad4 --- /dev/null +++ b/spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml @@ -0,0 +1,2733 @@ + + + + + + + + + Prototype Small Office in Denver + Here we record general problems / issues identified in a walkthrough survey. + + + City Custom Building ID + some ID + + + Custom ID 1 + some other ID + + +
+ + + Some address + + + Denver + CO + 80014 +
+ -104.830000 + 39.660000 + Commercial + Office + + 1 + 0 + 1 + 0 + true + false + + + Gross + 5500.000000 + + + + + + Conditioned + 5500.000000 + + + + + + 6500.000000 + 0.000000 + 0.213300 + 0.050000 + 2012 + 2000 + 2010 + 2020-03-01 + 2012 + +
+ Space function + Office + Office + + + Peak total occupants + 31.000000 + + + + + 40.000000 + Hours per week + + + 50.000000 + Weeks per year + + + + + Gross + 5500.000000 + + + Conditioned + 5500.000000 + + + Single zone +
+
+ Whole building + Rectangular + + + A1 + + + 909.012230 + + + + + 180.187860 + + + + + 42.086890 + + + + + B1 + + + 606.008200 + + + + + 120.125240 + + + + + 0.000000 + + + + + C1 + + + 909.012230 + + + + + 180.187860 + + + + + 0.000000 + + + + + D1 + + + 606.008200 + + + + + 120.125240 + + + + + 0.000000 + + + + + + + + 6444.999000 + Good + + + + + + + 3891.153600 + + + +
+
+ + + + + + + + + + Single zone + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 10311.100000 + 10311.100000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 9801.300000 + 9801.300000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 7858.100000 + 7858.100000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 9067.800000 + 9067.800000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged Unitary + Natural gas + 0.000000 + + + + 3.010000 + COP + 9855.400000 + 9855.400000 + W + Good + + + + + + + + + + 2000 + + + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 10198.900000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 9847.200000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 7737.100000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 9143.800000 + W + Good + + + + + + + + + + 2000 + + + + + Packaged/unitary heat pump + Reciprocating + Single stage + + + 2.610000 + COP + 9847.200000 + W + Good + + + + + + + + + + 2000 + + + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + Central fan + CAV terminal box no reheat + None + + + None + Fixed + + + + + + + + + + + + + + + + 2000 + 1 + Good + + + + + + Single + Good + + + + + Single + Good + + + + + Single + Good + + + + + Single + Good + + + + + Single + Good + + + + + + Digital + + +
+ + + + + +
+
+
+
+ + + + + T8 + + + Standard Electronic + + 0.200000 + + 100.000000 + 5.500000 + 32.000000 + 4 + 1.000000 + 43 + false + + + + + + + Programmable + + + + false + +
+ + + + + +
+
+
+ + + + T12 + + + Standard Electronic + 100.000000 + 1.582575 + 316.516000 + 1 + 1.000000 + 5 + true + + + + + + + Programmable + + + + false + +
+ + + + + +
+
+
+ + + + LED + + + Standard Electronic + + 0.100000 + + 100.000000 + 2.752000 + 16.000000 + 4 + 1.000000 + 43 + false + + + + + + + Photocell + Continuous + + + + false + +
+ + + + + +
+
+
+
+ + + + + + + + 40.000000 + 123.000000 + + + Notes + + 1 + 3.600000 + Continuous + 123.000000 + 1.870180 + + Looped + Thermal Efficiency + 1.000000 + 40.000000 + 140.000000 + 1950.520000 + 11722.840000 + W + + + + + + + + + + 2000 + Electricity + Good + + + + +
+ +
+
+ 1 +
+
+ + + 0.536000 + 880.000000 + 880.000000 + Constant Volume + + + + + + 0.536000 + 872.000000 + 872.000000 + Variable Volume + + + + + + 0.536000 + 836.000000 + 836.000000 + Constant Volume + + + + + + 0.536000 + 830.000000 + 830.000000 + Variable Volume + + + + + + 0.536000 + 671.000000 + 671.000000 + Constant Volume + + + + + + 0.536000 + 664.000000 + 664.000000 + Variable Volume + + + + + + 0.536000 + 774.000000 + 774.000000 + Constant Volume + + + + + + 0.536000 + 766.000000 + 766.000000 + Variable Volume + + + + + + 0.536000 + 841.000000 + 841.000000 + Constant Volume + + + + + + 0.536000 + 833.000000 + 833.000000 + Variable Volume + + + + + + + + Wood frame + 0.547000 + + + + + Wood frame + 4.706000 + + + + + + + + Vinyl + Clear uncoated + Single pane + 3.241000 + 0.391000 + 0.391000 + + + + + + Vinyl + Low e + Triple pane + 0.300000 + 0.391000 + 0.391000 + + + + + Insulated metal + 0.500000 + + + Steel + 2.839000 + + + + + + + + 0.345000 + + + + Concrete poured + + + + + Miscellaneous Electric Load + 0.630000 + +
+ + + + + +
+
+
+
+ + + Notes on test + Tight + 0.151000 + ACHnatural + Blower door + +
+ +
+
+
+
+ + + Notes on test + +
+ +
+
+
+
+
+ + + + + Weekday + Occupied + 00:00:00 + 06:00:00 + 0.000000 + + + Weekday + Occupied + 06:00:00 + 07:00:00 + 11.000000 + + + Weekday + Occupied + 07:00:00 + 08:00:00 + 21.000000 + + + Weekday + Occupied + 08:00:00 + 12:00:00 + 100.000000 + + + Weekday + Occupied + 12:00:00 + 13:00:00 + 53.000000 + + + Weekday + Occupied + 13:00:00 + 17:00:00 + 100.000000 + + + Weekday + Occupied + 17:00:00 + 18:00:00 + 32.000000 + + + Weekday + Occupied + 18:00:00 + 22:00:00 + 11.000000 + + + Weekday + Occupied + 22:00:00 + 23:00:00 + 5.000000 + + + Weekday + Occupied + 23:00:00 + 23:59:59 + 0.000000 + + + Weekend + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + Occupied + 00:00:00 + 23:59:59 + 0.000000 + + + + + + +
+ +
+
+
+ + + + Weekday + Lighting + 00:00:00 + 05:00:00 + 18.000000 + + + Weekday + Lighting + 05:00:00 + 07:00:00 + 23.000000 + + + Weekday + Lighting + 07:00:00 + 08:00:00 + 42.000000 + + + Weekday + Lighting + 08:00:00 + 12:00:00 + 90.000000 + + + Weekday + Lighting + 12:00:00 + 13:00:00 + 80.000000 + + + Weekday + Lighting + 13:00:00 + 17:00:00 + 90.000000 + + + Weekday + Lighting + 17:00:00 + 18:00:00 + 61.000000 + + + Weekday + Lighting + 18:00:00 + 20:00:00 + 42.000000 + + + Weekday + Lighting + 20:00:00 + 22:00:00 + 32.000000 + + + Weekday + Lighting + 22:00:00 + 23:00:00 + 23.000000 + + + Weekday + Lighting + 23:00:00 + 23:59:59 + 18.000000 + + + Weekend + Lighting + 00:00:00 + 23:59:59 + 18.000000 + + + Holiday + Lighting + 00:00:00 + 23:59:59 + 18.000000 + + + + + + + + + + + + Weekday + Miscellaneous equipment + 00:00:00 + 08:00:00 + 50.000000 + + + Weekday + Miscellaneous equipment + 08:00:00 + 12:00:00 + 100.000000 + + + Weekday + Miscellaneous equipment + 12:00:00 + 13:00:00 + 94.000000 + + + Weekday + Miscellaneous equipment + 13:00:00 + 17:00:00 + 100.000000 + + + Weekday + Miscellaneous equipment + 17:00:00 + 18:00:00 + 50.000000 + + + Weekday + Miscellaneous equipment + 18:00:00 + 23:59:59 + 20.000000 + + + Weekend + Miscellaneous equipment + 00:00:00 + 23:59:59 + 20.000000 + + + Holiday + Miscellaneous equipment + 00:00:00 + 23:59:59 + 20.000000 + + + + + + + + + + + + Weekday + HVAC equipment + 00:00:00 + 06:00:00 + 0.000000 + + + Weekday + HVAC equipment + 06:00:00 + 19:00:00 + 100.000000 + + + Weekday + HVAC equipment + 19:00:00 + 23:59:59 + 0.000000 + + + Weekend + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + + + + + + + + + + Weekday + HVAC equipment + 00:00:00 + 06:00:00 + 0.000000 + + + Weekday + HVAC equipment + 06:00:00 + 07:00:00 + 60.000000 + + + Weekday + HVAC equipment + 07:00:00 + 12:00:00 + 100.000000 + + + Weekday + HVAC equipment + 12:00:00 + 13:00:00 + 80.000000 + + + Weekday + HVAC equipment + 13:00:00 + 18:00:00 + 100.000000 + + + Weekday + HVAC equipment + 18:00:00 + 20:00:00 + 60.000000 + + + Weekday + HVAC equipment + 20:00:00 + 23:59:59 + 0.000000 + + + Weekend + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + Holiday + HVAC equipment + 00:00:00 + 23:59:59 + 0.000000 + + + + + + + + +
+ + + + + + + + + + + Lighting + + + + Retrofit with light emitting diode technologies + + + + Individual system + This measure is designed to replace all fluorescent bulbs with LEDs + 1 + 50.000000 + 774.000000 + true + 2021-01-01 + 2021-12-30 + + + + + + + + + + + Fan + + + + Add VSD motor controller + + + + Individual system + This measure is designed to retrofit all RTU fans with a VSD + 1 + 750.000000 + 1250.000000 + true + 2021-01-01 + 2021-12-30 + + + + + + + + + + + + + + + + Electricity + This is required to document irregularities in monthly energy patterns (Std 211 6.1.2.1.j). No irregularities found. + kWh + All end uses + 67334.150000 + 229.753657 + + + + + + + + + + + + + + + kW + 26.040000 + 26.040000 + 4613.820000 + + + + + + Natural gas + No irregularities in monthly energy consumption found. + MMBtu + All end uses + 8.720000 + 8.720000 + + + + + + + + + + + + + + + 540.830000 + + + + + + Electricity + kWh + Interior lighting + 28.705000 + 20062.690000 + 68.453898 + + + + Electricity + kWh + Heating + 6.722000 + 4698.230000 + 16.030361 + + + + Electricity + kWh + Cooling + 8.769000 + 6128.870000 + 20.911704 + + + + Electricity + kWh + Domestic hot water + 10.281000 + 7185.370000 + 24.516482 + + + + Electricity + kWh + Plug load + 21.379000 + 14942.150000 + 50.982616 + + + + + + Total + Energy + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 5933.100000 + + + + Total + Energy + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 5446.100000 + + + + Total + Energy + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 5736.490000 + + + + Total + Energy + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 4980.500000 + + + + Total + Energy + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 5187.210000 + + + + Total + Energy + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 5842.950000 + + + + Total + Energy + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 5801.730000 + + + + Total + Energy + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 6220.160000 + + + + Total + Energy + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 5682.870000 + + + + Total + Energy + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 5571.930000 + + + + Total + Energy + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 5525.150000 + + + + Total + Energy + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 5405.940000 + + + + Total + Energy + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 1.720000 + + + + Total + Energy + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 1.250000 + + + + Total + Energy + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 0.410000 + + + + Total + Energy + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 0.430000 + + + + Total + Energy + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 0.010000 + + + + Total + Energy + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 0.000000 + + + + Total + Energy + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 0.000000 + + + + Total + Energy + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 0.000000 + + + + Total + Energy + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 0.000000 + + + + Total + Energy + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 0.200000 + + + + Total + Energy + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 0.400000 + + + + Total + Energy + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 4.300000 + + + + Peak + On-peak + Power + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 23.580000 + + + + Peak + On-peak + Power + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 25.380000 + + + + Peak + On-peak + Power + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 26.040000 + + + + Peak + On-peak + Power + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 24.450000 + + + + Peak + On-peak + Power + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 17.030000 + + + + Peak + On-peak + Power + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 22.710000 + + + + Peak + On-peak + Power + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 22.010000 + + + + Peak + On-peak + Power + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 21.810000 + + + + Peak + On-peak + Power + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 20.630000 + + + + Peak + On-peak + Power + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 21.870000 + + + + Peak + On-peak + Power + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 21.630000 + + + + Peak + On-peak + Power + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 21.780000 + + + + Load factor + Power + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 0.340000 + + + + Load factor + Power + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 0.320000 + + + + Load factor + Power + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 0.300000 + + + + Load factor + Power + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 0.280000 + + + + Load factor + Power + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 0.410000 + + + + Load factor + Power + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 0.360000 + + + + Load factor + Power + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 0.350000 + + + + Load factor + Power + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 0.380000 + + + + Load factor + Power + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 0.380000 + + + + Load factor + Power + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 0.340000 + + + + Load factor + Power + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 0.350000 + + + + Load factor + Power + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 0.330000 + + + + Cost + Cost + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 332.160000 + + + + Cost + Cost + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 306.290000 + + + + Cost + Cost + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 321.720000 + + + + Cost + Cost + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 281.540000 + + + + Cost + Cost + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 292.530000 + + + + Cost + Cost + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 534.100000 + + + + Cost + Cost + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 530.450000 + + + + Cost + Cost + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 567.490000 + + + + Cost + Cost + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 519.930000 + + + + Cost + Cost + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 312.970000 + + + + Cost + Cost + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 310.490000 + + + + Cost + Cost + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 304.150000 + + + + Cost + Cost + 2019-01-01T00:00:00 + 2019-02-01T00:00:00 + 31 + Day + Month + 46.690000 + + + + Cost + Cost + 2019-02-01T00:00:00 + 2019-03-01T00:00:00 + 28 + Day + Month + 45.930000 + + + + Cost + Cost + 2019-03-01T00:00:00 + 2019-04-01T00:00:00 + 31 + Day + Month + 44.550000 + + + + Cost + Cost + 2019-04-01T00:00:00 + 2019-05-01T00:00:00 + 30 + Day + Month + 44.580000 + + + + Cost + Cost + 2019-05-01T00:00:00 + 2019-06-01T00:00:00 + 31 + Day + Month + 43.900000 + + + + Cost + Cost + 2019-06-01T00:00:00 + 2019-07-01T00:00:00 + 30 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-07-01T00:00:00 + 2019-08-01T00:00:00 + 31 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-08-01T00:00:00 + 2019-09-01T00:00:00 + 31 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-09-01T00:00:00 + 2019-10-01T00:00:00 + 30 + Day + Month + 43.880000 + + + + Cost + Cost + 2019-10-01T00:00:00 + 2019-11-01T00:00:00 + 31 + Day + Month + 44.210000 + + + + Cost + Cost + 2019-11-01T00:00:00 + 2019-12-01T00:00:00 + 30 + Day + Month + 44.530000 + + + + Cost + Cost + 2019-12-01T00:00:00 + 2020-01-01T00:00:00 + 31 + Day + Month + 50.920000 + + + + + + 238473.656550 + 43.358800 + 737088.900000 + 134.000000 + 238473.656550 + 43.358800 + 238.473657 + 0.000000 + 0.000000 + 0.000000 + 4952.480000 + 0.900000 + + + + + + + + + + + + + + 2022-06-01 + + + Portfolio Manager + 2019 + 80.000000 + + + + + 238473.656550 + 43.358800 + 4952.480000 + + + + + + + + + + + + + 39070.530000 + 995 + 89.000000 + + + + + 190348.600000 + 34.600000 + 4846.040000 + 0.881000 + + + + + + + + + + + + + + TMY3 + Finished + + + + + + + Electricity + kWh + All end uses + 67334.150000 + 229.753657 + kW + 26.040000 + 26.040000 + + + Natural gas + MMBtu + All end uses + 8.720000 + 8.720000 + + + + + + + + + + POM-LEDs + + + + + + + Capital + 35.713000 + 772 + + + Electricity + kWh + 11524.540000 + + + Natural gas + MMBtu + 0.000000 + + + 3.220000 + 0 + 0.000000 + 0.000000 + 1 + 824.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0 + 0 + 1.070000 + 0.000000 + + + + + + + + + + POM-VSDs + + + + + + + Capital + 5.175000 + 9 + + + Electricity + kWh + 207.240000 + + + Natural gas + MMBtu + 4.460000 + + + 0.420000 + 0 + 0.000000 + 0.000000 + 1 + 2000.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0 + 0 + 230.150000 + 0.000000 + + + + + + + + + + POM-LEDs-VSDs + + + + + + + + Capital + 41.827000 + 781 + + + Electricity + kWh + 11701.620000 + + + Natural gas + MMBtu + 1.890000 + + + 4.700000 + 0 + 0.000000 + 0.000000 + 1 + 2824.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0.000000 + 0 + 0 + 3.620000 + 0.000000 + + + + + + + + + + Level 2: Energy Survey and Analysis + + + + + + + + + --06-01 + --09-30 + --06-01 + --09-30 + 0.088520 + 0.000000 + + + --01-01 + --05-31 + --01-01 + --05-31 + 0.053140 + 0.000000 + + + --10-01 + --12-31 + --10-01 + --12-31 + 0.053140 + 0.000000 + + + + + https://www.xcelenergy.com/company/rates_and_regulations/rates/rate_books + 16.880000 + + + 12345 + Xcel Energy + + Some-meter-ID + + some-account-number + Building Owner + + + + + + + + + --01-01 + --12-31 + 0.163600 + + + + + https://www.xcelenergy.com/company/rates_and_regulations/rates/rate_books + 43.880000 + + + Xcel Energy + + Some-meter-ID + + some-other-account-number + Building Owner + + + + + + + + + + + + + + Owner + + The dude + Some big company + + + 123-456-7890 + + + + + the.dude@somebigco.net + + + + + + Energy Auditor + + The lady + Auditeers + + + 123-456-7890 + + + + + the.lady@the-three-auditeers.com + + + + + + + diff --git a/spec/tests/unit/baseline_hvac_planner_spec.rb b/spec/tests/unit/baseline_hvac_planner_spec.rb index d81921d..ec33944 100644 --- a/spec/tests/unit/baseline_hvac_planner_spec.rb +++ b/spec/tests/unit/baseline_hvac_planner_spec.rb @@ -8,6 +8,8 @@ require 'rexml/document' require 'BOSS/baseline_hvac_planner' +require 'BOSS/boss_logger' +require 'BOSS/buildingsync_reader/buildingsync_reader' RSpec.describe BOSS::BaselineHvacPlanner do building = [{ type: 'Building', id: 'B-1' }] @@ -40,7 +42,7 @@ def plan_for(results, systems, template = '90.1-2019') 'an unsupported template' => [[], :systems, '90.1-2010', /Template '90.1-2010'/], 'family-only data' => [[{ status: :missing_input, messages: ['Only family-level data'] }], :systems, '90.1-2019', /missing_input.*family-level/], - 'two conditioning configurations' => [[{}, { group_key: [:delivery, 'D-2'] }], :systems, '90.1-2019', + 'two conditioning configurations' => [[{}, { measure: 'hvac_pthp', group_key: [:delivery, 'D-2'] }], :systems, '90.1-2019', /one conditioning configuration, found 2/], 'ventilation on air-loop HVAC' => [[{ measure: 'hvac_warm_air_furnace', configuration: 'Furnace' }, { measure: 'hvac_doas', configuration: 'DOAS', group_key: [:other, 'O-1'] }], @@ -71,4 +73,54 @@ def plan_for(results, systems, template = '90.1-2019') expect(plan.status).to eq(:topology), plan.messages.join("\n") expect(plan.steps.first[:arguments][:topology_measure]).to eq('hvac_ptac') end + + sectioned = REXML::Document.new( + '' \ + '
Space function
' \ + '
Space function
' \ + '
' + ) + sectioned_systems = REXML::XPath.first(sectioned, '//HVACSystems') + section = ->(id) { [{ type: 'Section', id: }] } + + it 'merges same-configuration deliveries whose Section links cover the building' do + results = [result.call(premises: section.call('S-1')), + result.call(premises: section.call('S-2'), group_key: [:delivery, 'D-2'])] + plan = plan_for(results, sectioned_systems) + + expect(plan.status).to eq(:topology), plan.messages.join("\n") + expect(plan.steps.map { |step| step[:arguments][:topology_measure] }.compact).to eq(['hvac_ptac']) + expect(plan.steps.first[:arguments][:zone_scope]).to eq('all_model_zones') + end + + it 'falls back when Section links leave part of the building unserved' do + plan = plan_for([result.call(premises: section.call('S-1'))], sectioned_systems) + + expect(plan.status).to eq(:fallback) + expect(plan.messages.join("\n")).to match(/Section S-1.*only whole-building premises/) + end + + it 'keeps different measure arguments as separate configurations' do + results = [['D-1', 'NaturalGas'], ['D-2', 'Electricity']].map do |id, fuel| + result.call(measure: 'hvac_packaged_rooftop_heat_pump', group_key: [:delivery, id]) + .tap { |r| r.measure_arguments = { 'supplemental_heating_fuel' => fuel } } + end + plan = plan_for(results, hvac_systems) + + expect(plan.messages.join("\n")).to match(/one conditioning configuration, found 2/) + end + + it 'plans topology HVAC for the 2012 small-office level 2 copy' do + path = File.expand_path('../../files/v2.7.0/example-smalloffice-level2-built-2012.xml', __dir__) + doc = REXML::Document.new(File.read(path), ignore_whitespace_nodes: :all) + reader = BOSS::BuildingSyncReader.new(doc, nil, ASHRAE90_1) + plan = described_class.new.plan(reader.get_hvac_systems_xml, reader.get_standard_template) + + expect(plan.status).to eq(:topology), plan.messages.join("\n") + step = plan.steps.first[:arguments] + expect(step).to include(topology_measure: 'hvac_packaged_rooftop_heat_pump', zone_scope: 'all_model_zones', + standards_template: '90.1-2013', + topology_arguments_json: '{"supplemental_heating_fuel":"NaturalGas"}') + expect(plan.steps.last[:measure_dir_name]).to eq('apply_standard_hvac_sizing_and_efficiency') + end end From 78a1aaa89759a398c5f18bcd4c9486602f4bb54e Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:38:08 -0700 Subject: [PATCH 12/14] add Integration spec for baseline --- Gemfile.lock | 5 +---- docs/scenario_workflow_translation_plan.md | 4 +++- .../integration/write_and_run_osws_spec.rb | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9f58992..f55db6f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,6 @@ GEM uuid (~> 2.3.9) yamler (= 0.1.0) zliby (= 0.0.5) - bigdecimal (4.1.2) builder (3.2.4) coderay (1.1.3) csv (3.3.5) @@ -64,7 +63,6 @@ GEM csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - json (2.19.9) json-schema (4.3.1) addressable (>= 2.8) macaddr (1.7.2) @@ -80,7 +78,6 @@ GEM minitest (>= 5.0) ruby-progressbar multi_xml (0.9.1) - bigdecimal (>= 3.1, < 5) multipart-post (2.4.0) octokit (4.18.0) faraday (>= 0.9) @@ -147,7 +144,6 @@ GEM rspec-support (~> 3.13.0) rspec-support (3.13.7) rubocop (1.50.0) - json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) @@ -190,6 +186,7 @@ PLATFORMS arm64-darwin-24 ruby x64-mingw-ucrt + x64-mingw32 DEPENDENCIES BOSS! diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index 71bcd68..aea3970 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -321,7 +321,9 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Follow-up: delivery premises inheritance and `None`/untyped ventilation handling landed in 14B and did not unlock a fixture. - Configuration merging: the planner treats results with the same measure and `measure_arguments` as one configuration, whatever their group keys. Its premises count as whole-building (one `apply_hvac_topology_to_zone_scope` step with `all_model_zones`) when every link is a `Section` of the single `Building` and the links include its `Whole building` section or every other non-empty section. Partial section coverage still returns `missing_input`. - First topology fixture: `example-smalloffice-level2` now plans topology HVAC except for the template gate (built 2000, so `DOE Ref 1980-2004`). The test-only copy `spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml` sets `YearOfConstruction` and `YearOfLastMajorRemodel` to 2012 (`90.1-2013`, the oldest supported template). It plans one Packaged Rooftop Heat Pump step with `{"supplemental_heating_fuel":"NaturalGas"}`, then the sizing step. Future work: resolve every construction year, not just 2010 and later, instead of relying on the copy. -- Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the pinned gem branch commit `30cdd34` (its Minitest covers arguments and input checks only; the sizing path needs EnergyPlus); the upstream merge moves to the end of PR 14E. Add a baseline simulation check on the 2012 copy to meet "simulate with the expected HVAC". +- Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the pinned gem branch commit `30cdd34`; its Minitest covers arguments and input checks only, and the BOSS integration spec below exercises the sizing path. The upstream merge moves to the end of PR 14E. Support for templates older than 90.1-2013 is tracked as a separate issue. +- Manual baseline run (OpenStudio 3.10.0, San Francisco TMY3): `boss write_baseline_osw` on the 2012 copy wrote the topology steps, and every step succeeded. The model has 9 single-zone PSZ-HP air loops with gas backup coils, 90.1-2013 efficiencies (14 SEER / 8.0 HSPF), 25.5 h heating and 25 h cooling setpoints not met, and EnergyPlus had 0 severe errors. The run log also shows one `Step already started` OSRunner error, apparently from the sizing step, which still succeeds; the cause is not investigated. +- Integration check: `spec/tests/integration/write_and_run_osws_spec.rb` writes and runs the 2012 copy's baseline. It asserts `add_hvac: false`, a successful topology step that reports PSZ-HP loops with NaturalGas supplemental heat at 90.1-2013, and a successful sizing step (about 1.5 minutes locally). ### PR 14E: Scenario HVAC Mappings diff --git a/spec/tests/integration/write_and_run_osws_spec.rb b/spec/tests/integration/write_and_run_osws_spec.rb index d45b4c3..0f2f6d7 100644 --- a/spec/tests/integration/write_and_run_osws_spec.rb +++ b/spec/tests/integration/write_and_run_osws_spec.rb @@ -63,5 +63,22 @@ end end + + it 'write and run a topology HVAC baseline. File: example-smalloffice-level2-built-2012.xml' do + xml_path = File.join(SPEC_FILES_DIR, 'v2.7.0', 'example-smalloffice-level2-built-2012.xml') + output_path = File.join(SPEC_OUTPUT_DIR, 'v2.7.0', 'write_and_run_baseline_osw', 'smalloffice_l2_topology') + + BOSS::Boss.write_baseline_osw(xml_path, output_path, nil, ASHRAE90_1) + BOSS::Boss.run_baseline_osw(output_path) + + out_osw = JSON.parse(File.read(File.join(output_path, 'baseline', 'out.osw')), symbolize_names: true) + expect(out_osw[:completed_status]).to eq 'Success' + steps = out_osw[:steps].to_h { |step| [step[:measure_dir_name], step] } + expect(steps['create_typical_building_from_model'][:arguments][:add_hvac]).to be false + topology = steps['apply_hvac_topology_to_zone_scope'] + expect(topology[:result][:step_result]).to eq 'Success' + expect(topology[:result][:step_final_condition]).to match(/Created \d+ PSZ-HP loops \(NaturalGas supplemental heat\).*90\.1-2013/) + expect(steps['apply_standard_hvac_sizing_and_efficiency'][:result][:step_result]).to eq 'Success' + end end end From 6553159c41ad0cf9d99331818c30c8be5538db26 Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Fri, 13 Nov 2026 15:20:33 -0700 Subject: [PATCH 13/14] expand template mapping, 14D done --- .github/workflows/ci.yml | 2 +- docs/scenario_workflow_translation_plan.md | 19 +++++------ lib/BOSS/hvac_target_binder.rb | 3 +- .../integration/write_and_run_osws_spec.rb | 32 +++++++++++-------- spec/tests/unit/baseline_hvac_planner_spec.rb | 32 +++++++++++-------- spec/tests/unit/hvac_target_binder_spec.rb | 2 +- 6 files changed, 52 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c139b8..5a799b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@v4 with: repository: BuildingSync/buildingsync-measures-gem - ref: 30cdd344db06a8708b79946b1a8b904fe9c3d6c4 + ref: 789bd50ec0ba42559f85e5cac23fcbbf8f9bdfbe path: buildingsync-measures-gem - name: Setup run: | diff --git a/docs/scenario_workflow_translation_plan.md b/docs/scenario_workflow_translation_plan.md index aea3970..8a24232 100644 --- a/docs/scenario_workflow_translation_plan.md +++ b/docs/scenario_workflow_translation_plan.md @@ -116,7 +116,7 @@ Measure source order for new mappings: `buildingsync-measures-gem` is not released as a gem. BOSS loads it from a local sibling checkout (`../buildingsync-measures-gem`) configured in `config/external_measure_repos.yml`. Other sources keep their current install path. -HVAC mappings follow the upstream [HVAC Mapping and Migration Guide](https://github.com/BuildingSync/buildingsync-measures-gem/blob/develop/docs/HVAC_MAPPING_AND_MIGRATION.md): 17 topology measures (`operation` create/replace, comma-separated `target_zone_names`, `standards_template` 90.1-2013/2016/2019) plus 5 `modify_existing_*` modifiers that take exact OpenStudio object names. Do not map to the deprecated `modify_hvac`. A principal HVAC label alone is family evidence, not an exact match. Do not invent model object or zone names from BuildingSync IDs. +HVAC mappings follow the upstream [HVAC Mapping and Migration Guide](https://github.com/BuildingSync/buildingsync-measures-gem/blob/develop/docs/HVAC_MAPPING_AND_MIGRATION.md): 17 topology measures (`operation` create/replace, comma-separated `target_zone_names`, `standards_template` DOE Ref Pre-1980, DOE Ref 1980-2004, or 90.1-2004 through 90.1-2019) plus 5 `modify_existing_*` modifiers that take exact OpenStudio object names. Do not map to the deprecated `modify_hvac`. A principal HVAC label alone is family evidence, not an exact match. Do not invent model object or zone names from BuildingSync IDs. Verify every measure directory and argument against the source BOSS will load: the `BOSS.gemspec` gem versions, or the `buildingsync-measures-gem` commit pinned in CI. During PR 14A-14E, CI may pin an unmerged `buildingsync-measures-gem` branch commit; the upstream merge and CI ref bump are the last step of PR 14E. Outside that series, do not map to measures that exist only on an unmerged branch. @@ -309,21 +309,22 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a ### PR 14D: Baseline HVAC Integration -- Status: In progress +- Status: Done - Delivered by: - - Depends on: PR 14A-14C. -- Scope: For exact-match files, run `create_typical_building_from_model` with `add_hvac: false`, then the split topology `create` steps. `add_hvac: false` also skips standards sizing and HVAC efficiency steps, so this PR must account for them. Otherwise keep the current baseline and warn (missing or family-only HVAC data, or templates other than 90.1-2013/2016/2019). +- Scope: For exact-match files, run `create_typical_building_from_model` with `add_hvac: false`, then the split topology `create` steps. `add_hvac: false` also skips standards sizing and HVAC efficiency steps, so this PR must account for them. Otherwise keep the current baseline and warn (missing or family-only HVAC data, or templates the split measures do not accept, such as DEER). - Done when: Exact-match baselines simulate with the expected HVAC; fallback files keep their current steps and log why; baseline-only and scenario-writer baselines match. - Avoid: Mapping DOE Ref, older 90.1, or DEER templates to 90.1-2019, or adding HVAC on top of `add_hvac: true`. - Findings: with `add_hvac: false`, openstudio-standards 0.8.2 `create_typical_building_from_model` skips PRM sizing parameters, the sizing run, multizone VAV outdoor-air sizing, prototype HVAC assumptions, the HVAC efficiency standard, and NIST infiltration schedules; its night-cycle thermostat change then finds no managers. Topology measures do none of these. No existing measure runs this tail alone. -- Decision: `BOSS::BaselineHvacPlanner` (`lib/BOSS/baseline_hvac_planner.rb`) plans topology HVAC only when every selector result is `:match`, binds to whole-building premises, the template is 90.1-2013/2016/2019, and there is exactly one conditioning configuration plus at most one ventilation configuration (ventilation only with zone-equipment topologies, since DOAS `create` rejects air-loop zones). Steps go right after `create_typical_building_from_model`: conditioning, then ventilation, then the new upstream measure `apply_standard_hvac_sizing_and_efficiency`, which mirrors the skipped tail. Otherwise `build_baseline_osw` keeps `add_hvac: true` and logs each reason. When topology steps are used, the baseline adds the scenario-only `buildingsync-measures-gem` measure path. Baseline-only and scenario writers share `build_baseline_osw`. -- Current fixture effect (after the 14B selector follow-ups): none; every v2.7.0 fixture still falls back. Many also fail the template gate first (`DOE Ref`, `90.1-2007`, or no standard). With the template gate bypassed, the first HVAC reason is: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER); HVACSystems the selector sees without Delivery/OtherHVACSystem records (most ASHRAE-L2-style, Chula Vista, NYC, San Francisco, HOMES, Golden Test File, ASHRAE 211 Export); heat/energy-recovery ventilation (`not_mappable`: BuildingEQ, `Example_ASHRAE_L2_Report`); and detailed data that matches no known configuration (`Reference-PrimarySchool-L200-Audit`, `Example_NYC_Energy_Efficiency_Report_Property_2`). `example-smalloffice-level2` now fails only the template gate (see below). The gaps behind these are listed in `docs/hvac_mapping_gaps.md`. +- Decision: `BOSS::BaselineHvacPlanner` (`lib/BOSS/baseline_hvac_planner.rb`) plans topology HVAC only when every selector result is `:match`, binds to whole-building premises, the template is in `HvacTargetBinder::STANDARDS_TEMPLATES` (DOE Ref Pre-1980, DOE Ref 1980-2004, 90.1-2004 through 90.1-2019), and there is exactly one conditioning configuration plus at most one ventilation configuration (ventilation only with zone-equipment topologies, since DOAS `create` rejects air-loop zones). Steps go right after `create_typical_building_from_model`: conditioning, then ventilation, then the new upstream measure `apply_standard_hvac_sizing_and_efficiency`, which mirrors the skipped tail. Otherwise `build_baseline_osw` keeps `add_hvac: true` and logs each reason. When topology steps are used, the baseline adds the scenario-only `buildingsync-measures-gem` measure path. Baseline-only and scenario writers share `build_baseline_osw`. +- Current fixture effect: `example-smalloffice-level2` (and its 2012 copy) plan topology HVAC; every other v2.7.0 fixture falls back. Files with no standard or a DEER template fail the template gate. The first HVAC reason for the rest is: family-only `PrincipalHVACSystemType` data (L100 files, `building_151_level1`, `example-smalloffice-level1`, `all_measures_applied_example`, BETTER); HVACSystems the selector sees without Delivery/OtherHVACSystem records (most ASHRAE-L2-style, Chula Vista, NYC, San Francisco, HOMES, Golden Test File, ASHRAE 211 Export); heat/energy-recovery ventilation (`not_mappable`: BuildingEQ, `Example_ASHRAE_L2_Report`); and detailed data that matches no known configuration (`Reference-PrimarySchool-L200-Audit`, `Example_NYC_Energy_Efficiency_Report_Property_2`). The gaps behind these are listed in `docs/hvac_mapping_gaps.md`. - Follow-up: delivery premises inheritance and `None`/untyped ventilation handling landed in 14B and did not unlock a fixture. - Configuration merging: the planner treats results with the same measure and `measure_arguments` as one configuration, whatever their group keys. Its premises count as whole-building (one `apply_hvac_topology_to_zone_scope` step with `all_model_zones`) when every link is a `Section` of the single `Building` and the links include its `Whole building` section or every other non-empty section. Partial section coverage still returns `missing_input`. -- First topology fixture: `example-smalloffice-level2` now plans topology HVAC except for the template gate (built 2000, so `DOE Ref 1980-2004`). The test-only copy `spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml` sets `YearOfConstruction` and `YearOfLastMajorRemodel` to 2012 (`90.1-2013`, the oldest supported template). It plans one Packaged Rooftop Heat Pump step with `{"supplemental_heating_fuel":"NaturalGas"}`, then the sizing step. Future work: resolve every construction year, not just 2010 and later, instead of relying on the copy. -- Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the pinned gem branch commit `30cdd34`; its Minitest covers arguments and input checks only, and the BOSS integration spec below exercises the sizing path. The upstream merge moves to the end of PR 14E. Support for templates older than 90.1-2013 is tracked as a separate issue. +- First topology fixture: `example-smalloffice-level2` (built 2000, `DOE Ref 1980-2004`) plans one Packaged Rooftop Heat Pump step with `{"supplemental_heating_fuel":"NaturalGas"}`, then the sizing step. The test-only copy `spec/files/v2.7.0/example-smalloffice-level2-built-2012.xml` sets `YearOfConstruction` and `YearOfLastMajorRemodel` to 2012 and covers the same plan at `90.1-2013`. +- Older templates: the gem branch widened `standards_template` on every topology measure, the wrapper, and the sizing measure to DOE Ref Pre-1980, DOE Ref 1980-2004, and 90.1-2004 through 90.1-2019, and its shared topology test creates each measure's system at every older template. BOSS's reader never emits `90.1-2004` (2004-2006 maps to `90.1-2007`); changing that year mapping is out of scope. +- Remaining: `apply_standard_hvac_sizing_and_efficiency` is on the gem branch; CI now pins `789bd50`, which also adds older-template support. Its Minitest covers arguments and input checks only, and the BOSS integration spec below exercises the sizing path. The upstream merge moves to the end of PR 14E. - Manual baseline run (OpenStudio 3.10.0, San Francisco TMY3): `boss write_baseline_osw` on the 2012 copy wrote the topology steps, and every step succeeded. The model has 9 single-zone PSZ-HP air loops with gas backup coils, 90.1-2013 efficiencies (14 SEER / 8.0 HSPF), 25.5 h heating and 25 h cooling setpoints not met, and EnergyPlus had 0 severe errors. The run log also shows one `Step already started` OSRunner error, apparently from the sizing step, which still succeeds; the cause is not investigated. -- Integration check: `spec/tests/integration/write_and_run_osws_spec.rb` writes and runs the 2012 copy's baseline. It asserts `add_hvac: false`, a successful topology step that reports PSZ-HP loops with NaturalGas supplemental heat at 90.1-2013, and a successful sizing step (about 1.5 minutes locally). +- Integration check: `spec/tests/integration/write_and_run_osws_spec.rb` writes and runs the baseline for `example-smalloffice-level2` (`DOE Ref 1980-2004`) and its 2012 copy (`90.1-2013`). Each asserts `add_hvac: false`, a successful topology step that reports PSZ-HP loops with NaturalGas supplemental heat at the expected template, and a successful sizing step (about 1.5 minutes each locally). ### PR 14E: Scenario HVAC Mappings @@ -333,7 +334,7 @@ Use this roadmap as the tracker. Keep `Status` and `Delivered by` current when a - Scope: Map HVAC retrofit measures onto the steps `HvacTargetBinder` already produces (`bind` for topology `replace`, `bind_modifier` for `modify_existing_*`) through the PR 9 result contract. No new binding work belongs here. Order conditioning, then DOAS/ventilation, then modifiers. Keep existing economizer, DCV, and thermostat mappings from other gems. - Done when: One topology replacement and one modifier case run end to end, partial shared-system replacement is rejected, and mixed-source packages still write and run. - Avoid: Mapping "Replace boiler" or "Replace burner" to an efficiency edit, guessing values, or partial HVAC graphs. -- Series close: merge the `buildingsync-measures-gem` branch upstream (`apply_hvac_topology_to_zone_scope`, `apply_standard_hvac_sizing_and_efficiency`, and any 14E measures), replace the CI pin `bdf14e8` with the merged commit, and rerun the unit and integration suites. +- Series close: merge the `buildingsync-measures-gem` branch upstream (`apply_hvac_topology_to_zone_scope`, `apply_standard_hvac_sizing_and_efficiency`, and any 14E measures), replace the CI branch-commit pin with the merged commit, and rerun the unit and integration suites. ### PR 15: CLI Command diff --git a/lib/BOSS/hvac_target_binder.rb b/lib/BOSS/hvac_target_binder.rb index 75f77d6..e0e4f02 100644 --- a/lib/BOSS/hvac_target_binder.rb +++ b/lib/BOSS/hvac_target_binder.rb @@ -30,7 +30,8 @@ class HvacTargetBinder }.freeze PLANT_LOOP_TYPES = ['Heating', 'Cooling', 'Condenser'].freeze WHOLE_BUILDING_PREMISES = ['Building', 'Site', 'Facility'].freeze - STANDARDS_TEMPLATES = ['90.1-2013', '90.1-2016', '90.1-2019'].freeze + STANDARDS_TEMPLATES = ['DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004', '90.1-2007', '90.1-2010', + '90.1-2013', '90.1-2016', '90.1-2019'].freeze OPERATIONS = ['create', 'replace'].freeze Binding = Struct.new(:status, :step, :messages, keyword_init: true) diff --git a/spec/tests/integration/write_and_run_osws_spec.rb b/spec/tests/integration/write_and_run_osws_spec.rb index 0f2f6d7..308a4e0 100644 --- a/spec/tests/integration/write_and_run_osws_spec.rb +++ b/spec/tests/integration/write_and_run_osws_spec.rb @@ -64,21 +64,27 @@ end - it 'write and run a topology HVAC baseline. File: example-smalloffice-level2-built-2012.xml' do - xml_path = File.join(SPEC_FILES_DIR, 'v2.7.0', 'example-smalloffice-level2-built-2012.xml') - output_path = File.join(SPEC_OUTPUT_DIR, 'v2.7.0', 'write_and_run_baseline_osw', 'smalloffice_l2_topology') + { + 'example-smalloffice-level2.xml' => ['smalloffice_l2_topology_doe_ref', 'DOE Ref 1980-2004'], + 'example-smalloffice-level2-built-2012.xml' => ['smalloffice_l2_topology', '90.1-2013'] + }.each do |file_name, (output_name, template)| + it "write and run a topology HVAC baseline. File: #{file_name}, Template: #{template}" do + xml_path = File.join(SPEC_FILES_DIR, 'v2.7.0', file_name) + output_path = File.join(SPEC_OUTPUT_DIR, 'v2.7.0', 'write_and_run_baseline_osw', output_name) - BOSS::Boss.write_baseline_osw(xml_path, output_path, nil, ASHRAE90_1) - BOSS::Boss.run_baseline_osw(output_path) + BOSS::Boss.write_baseline_osw(xml_path, output_path, nil, ASHRAE90_1) + BOSS::Boss.run_baseline_osw(output_path) - out_osw = JSON.parse(File.read(File.join(output_path, 'baseline', 'out.osw')), symbolize_names: true) - expect(out_osw[:completed_status]).to eq 'Success' - steps = out_osw[:steps].to_h { |step| [step[:measure_dir_name], step] } - expect(steps['create_typical_building_from_model'][:arguments][:add_hvac]).to be false - topology = steps['apply_hvac_topology_to_zone_scope'] - expect(topology[:result][:step_result]).to eq 'Success' - expect(topology[:result][:step_final_condition]).to match(/Created \d+ PSZ-HP loops \(NaturalGas supplemental heat\).*90\.1-2013/) - expect(steps['apply_standard_hvac_sizing_and_efficiency'][:result][:step_result]).to eq 'Success' + out_osw = JSON.parse(File.read(File.join(output_path, 'baseline', 'out.osw')), symbolize_names: true) + expect(out_osw[:completed_status]).to eq 'Success' + steps = out_osw[:steps].to_h { |step| [step[:measure_dir_name], step] } + expect(steps['create_typical_building_from_model'][:arguments][:add_hvac]).to be false + topology = steps['apply_hvac_topology_to_zone_scope'] + expect(topology[:result][:step_result]).to eq 'Success' + expect(topology[:result][:step_final_condition]) + .to match(/Created \d+ PSZ-HP loops \(NaturalGas supplemental heat\).*#{Regexp.escape(template)}/) + expect(steps['apply_standard_hvac_sizing_and_efficiency'][:result][:step_result]).to eq 'Success' + end end end end diff --git a/spec/tests/unit/baseline_hvac_planner_spec.rb b/spec/tests/unit/baseline_hvac_planner_spec.rb index ec33944..099dae0 100644 --- a/spec/tests/unit/baseline_hvac_planner_spec.rb +++ b/spec/tests/unit/baseline_hvac_planner_spec.rb @@ -39,7 +39,7 @@ def plan_for(results, systems, template = '90.1-2019') { 'no HVACSystems' => [[], nil, '90.1-2019', /No HVACSystems/], - 'an unsupported template' => [[], :systems, '90.1-2010', /Template '90.1-2010'/], + 'an unsupported template' => [[], :systems, 'DEER 2017', /Template 'DEER 2017'/], 'family-only data' => [[{ status: :missing_input, messages: ['Only family-level data'] }], :systems, '90.1-2019', /missing_input.*family-level/], 'two conditioning configurations' => [[{}, { measure: 'hvac_pthp', group_key: [:delivery, 'D-2'] }], :systems, '90.1-2019', @@ -110,17 +110,23 @@ def plan_for(results, systems, template = '90.1-2019') expect(plan.messages.join("\n")).to match(/one conditioning configuration, found 2/) end - it 'plans topology HVAC for the 2012 small-office level 2 copy' do - path = File.expand_path('../../files/v2.7.0/example-smalloffice-level2-built-2012.xml', __dir__) - doc = REXML::Document.new(File.read(path), ignore_whitespace_nodes: :all) - reader = BOSS::BuildingSyncReader.new(doc, nil, ASHRAE90_1) - plan = described_class.new.plan(reader.get_hvac_systems_xml, reader.get_standard_template) - - expect(plan.status).to eq(:topology), plan.messages.join("\n") - step = plan.steps.first[:arguments] - expect(step).to include(topology_measure: 'hvac_packaged_rooftop_heat_pump', zone_scope: 'all_model_zones', - standards_template: '90.1-2013', - topology_arguments_json: '{"supplemental_heating_fuel":"NaturalGas"}') - expect(plan.steps.last[:measure_dir_name]).to eq('apply_standard_hvac_sizing_and_efficiency') + { + 'example-smalloffice-level2.xml' => 'DOE Ref 1980-2004', + 'example-smalloffice-level2-built-2012.xml' => '90.1-2013' + }.each do |file_name, template| + it "plans topology HVAC for #{file_name} with #{template}" do + path = File.expand_path("../../files/v2.7.0/#{file_name}", __dir__) + doc = REXML::Document.new(File.read(path), ignore_whitespace_nodes: :all) + reader = BOSS::BuildingSyncReader.new(doc, nil, ASHRAE90_1) + plan = described_class.new.plan(reader.get_hvac_systems_xml, reader.get_standard_template) + + expect(plan.status).to eq(:topology), plan.messages.join("\n") + step = plan.steps.first[:arguments] + expect(step).to include(topology_measure: 'hvac_packaged_rooftop_heat_pump', zone_scope: 'all_model_zones', + standards_template: template, + topology_arguments_json: '{"supplemental_heating_fuel":"NaturalGas"}') + expect(plan.steps.last).to eq(measure_dir_name: 'apply_standard_hvac_sizing_and_efficiency', + arguments: { standards_template: template }) + end end end diff --git a/spec/tests/unit/hvac_target_binder_spec.rb b/spec/tests/unit/hvac_target_binder_spec.rb index 3c618e0..074123d 100644 --- a/spec/tests/unit/hvac_target_binder_spec.rb +++ b/spec/tests/unit/hvac_target_binder_spec.rb @@ -84,7 +84,7 @@ def match_result(premises, measure: 'hvac_ptac') it 'rejects templates and operations the topology measures do not support' do result = match_result([{ type: 'Building', id: 'B-1' }]) - expect { binder.bind(result, operation: 'create', standards_template: 'DOE Ref Pre-1980') } + expect { binder.bind(result, operation: 'create', standards_template: 'DEER 2017') } .to raise_error(ArgumentError, /standards_template/) expect { binder.bind(result, operation: 'delete', standards_template: '90.1-2019') } .to raise_error(ArgumentError, /operation/) From adda0955aa3028fa62ea8d950da63547823e8a6a Mon Sep 17 00:00:00 2001 From: JieXiong9119 <69597597+JieXiong9119@users.noreply.github.com> Date: Tue, 17 Nov 2026 14:22:50 -0700 Subject: [PATCH 14/14] restore Gemfile.lock from local change --- Gemfile.lock | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f55db6f..9f58992 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,6 +29,7 @@ GEM uuid (~> 2.3.9) yamler (= 0.1.0) zliby (= 0.0.5) + bigdecimal (4.1.2) builder (3.2.4) coderay (1.1.3) csv (3.3.5) @@ -63,6 +64,7 @@ GEM csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) + json (2.19.9) json-schema (4.3.1) addressable (>= 2.8) macaddr (1.7.2) @@ -78,6 +80,7 @@ GEM minitest (>= 5.0) ruby-progressbar multi_xml (0.9.1) + bigdecimal (>= 3.1, < 5) multipart-post (2.4.0) octokit (4.18.0) faraday (>= 0.9) @@ -144,6 +147,7 @@ GEM rspec-support (~> 3.13.0) rspec-support (3.13.7) rubocop (1.50.0) + json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) @@ -186,7 +190,6 @@ PLATFORMS arm64-darwin-24 ruby x64-mingw-ucrt - x64-mingw32 DEPENDENCIES BOSS!