Class: OpenStudio::Model::HVACComponent

Inherits:
Object
  • Object
show all
Defined in:
lib/openstudio-standards/hvac_sizing/Siz.HVACComponent.rb

Overview

IMPORTANT NOTE ###### These methods should be done via extension to OS model objects directly in the C++ SDK. IMPORTANT NOTE ######

Instance Method Summary collapse

Instance Method Details

#component_quantityInteger

Returns the number of individual pieces of equipment represented by a particular HVAC component. Pulls from the additionalProperties object attached to the component. This can be used during the application of efficiency levels that are based on component capacities, flowrates, etc.

Returns:

  • (Integer)

    the number of components, 1 if not set



14
15
16
17
18
19
20
21
22
23
# File 'lib/openstudio-standards/hvac_sizing/Siz.HVACComponent.rb', line 14

def component_quantity
  addl_props = self.additionalProperties
  if addl_props.getFeatureAsInteger('component_quantity').is_initialized
    comp_qty = addl_props.getFeatureAsInteger('component_quantity').get
  else
    comp_qty = 1
  end

  return comp_qty
end

#set_component_quantity(comp_qty) ⇒ Bool

Sets the number of individual pieces of equipment represented by a particular HVAC component. Uses the additionalProperties object attached to the component. This can be used during the application of efficiency levels that are based on component capacities, flowrates, etc. represented by this HVAC component

Parameters:

  • comp_qty (Integer)

    the number of individual pieces of equipment

Returns:

  • (Bool)

    true if successful, false if not



33
34
35
# File 'lib/openstudio-standards/hvac_sizing/Siz.HVACComponent.rb', line 33

def set_component_quantity(comp_qty)
  return self.additionalProperties.setFeature('component_quantity', comp_qty)
end