Module: BTAP::ActivityData
- Included in:
- Activity
- Defined in:
- lib/openstudio-standards/btap/activity.rb
Constant Summary collapse
- @@data =
@author: Denis Bourgeois
BTAP module/class for general purpose 'activities' and building 'categories' - more abstract than NECB-specific building/space types.
Consider the following: the NECB2011 designates as "Parking garage" (building type) what subsequent NECB editions refer to as "Storage garage". From the NECB2020 definitions:
'Storage garage' means a building or part thereof intended for the storage or parking of motor vehicles and containing no provision for the repair or servicing of such vehicles.This mismatch, and other related issues of a similar nature, make it challenging to cross-compare NECB editions for instance. The 'exact' NECB spacetype strings shouldn't matter - they almost always reference the same building 'activity' (e.g. a facility where vehicles are parked/stored). BTAP should instead rely on abstract 'activity' designations, e.g. 'parking'. This requires module/class methods to extract specific keywords embedded in existing BTAP NECB building/space type datasets - see below.
Once 'activity' assignments are completed (for spaces and building), building 'categories' are auto-assigned (e.g. "housing" vs "industry"). For instance, multi-unit residential buildings (MURBs), university/school dormitories and long-term care facilities are all grouped under "housing", which in turn sets building-wide 'structural' options, e.g. wood-framed (small-scale "housing") vs reinforced concrete flat slab & post-beam (mid- & large-scale "housing"). See lib/openstudio-standards/btap/structure.rb.
{bldg: {}, space: {}, ancillaries: [], auxiliaries: []}
Class Method Summary collapse
Instance Method Summary collapse
-
#ancillary?(activity = "") ⇒ Boolean
Validates whether an activity is 'ancillary' to other(s).
-
#auxiliary?(activity = "") ⇒ Boolean
Validates whether an activity is 'auxiliary' to the building activity.
-
#data ⇒ Hash
Returns BTAP Activity data.
-
#occsensing_deprecated?(space = nil) ⇒ Boolean
Validates whether a space is targeted for occupancy-sensing lighting control, per NECB2011.
-
#rp28?(space = nil) ⇒ Boolean
Validates whether a space is targeted by ANSI/IES Recommended Practice RP28 2007 - see store.accuristech.com/standards/ies-rp-28-07?product_id=1555565.
-
#wet?(activity = "") ⇒ Boolean
Validates whether an activity is considered 'wet', e.g.
Class Method Details
.extended(base) ⇒ Object
411 412 413 |
# File 'lib/openstudio-standards/btap/activity.rb', line 411 def self.extended(base) base.send(:include, self) end |
Instance Method Details
#ancillary?(activity = "") ⇒ Boolean
Validates whether an activity is 'ancillary' to other(s). See relevant comments above, and note to Table A-8.4.3.3.(2)B. (1).
262 263 264 265 266 267 268 269 |
# File 'lib/openstudio-standards/btap/activity.rb', line 262 def ancillary?(activity = "") return false unless activity.respond_to?(:to_sym) activity = activity.to_s.strip.downcase return true if @@data[:ancillaries].include?(activity) false end |
#auxiliary?(activity = "") ⇒ Boolean
Validates whether an activity is 'auxiliary' to the building activity. 'Auxiliary' spaces differ from NECB 'ancillary' spaces. If requested by the user (in the .osm file), the former may adopt the dominant building activity schedule set, instead of the NECB suggested one. Examples include a school's gymnasium, cafeteria or auditorium.
281 282 283 284 285 286 287 288 |
# File 'lib/openstudio-standards/btap/activity.rb', line 281 def auxiliary?(activity = "") return false unless activity.respond_to?(:to_sym) activity = activity.to_s.strip.downcase return true if @@data[:auxiliaries].include?(activity) false end |
#data ⇒ Hash
Returns BTAP Activity data.
407 408 409 |
# File 'lib/openstudio-standards/btap/activity.rb', line 407 def data @@data end |
#occsensing_deprecated?(space = nil) ⇒ Boolean
Validates whether a space is targeted for occupancy-sensing lighting control, per NECB2011.
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/openstudio-standards/btap/activity.rb', line 360 def occsensing_deprecated?(space = nil) return false unless space.is_a?(OpenStudio::Model::Space) # First check AdditionalProperty. tag = "occsensing" osns = space.additionalProperties.getFeatureAsBoolean(tag) return osns.get unless osns.empty? # Check spacetype strings. variants = ["occ sens", "occ-sens", "occsens"] unless space.spaceType.empty? type = space.spaceType.get tID = type.nameString.downcase if variants.any? { |variant| tID.include?(variant) } space.additionalProperties.setFeature(tag, true) return true end unless type.standardsSpaceType.empty? stype = type.standardsSpaceType.get.downcase if variants.any? { |variant| stype.include?(variant) } space.additionalProperties.setFeature(tag, true) return true end end end # Check space identifier. sID = space.nameString.downcase if variants.any? { |variant| sID.include?(variant) } space.additionalProperties.setFeature(tag, true) return true end space.additionalProperties.setFeature(tag, false) false end |
#rp28?(space = nil) ⇒ Boolean
Validates whether a space is targeted by ANSI/IES Recommended Practice RP28 2007 - see store.accuristech.com/standards/ies-rp-28-07?product_id=1555565.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/openstudio-standards/btap/activity.rb', line 313 def rp28?(space = nil) return false unless space.is_a?(OpenStudio::Model::Space) # First check AdditionalProperty. tag = "rp28" rp28 = space.additionalProperties.getFeatureAsBoolean(tag) return rp28.get unless rp28.empty? # Check spacetype strings. variants = ["rp28", "rp-28", "rp_28", "rp 28"] unless space.spaceType.empty? type = space.spaceType.get tID = type.nameString.downcase if variants.any? { |variant| tID.include?(variant) } return space.additionalProperties.setFeature(tag, true) end unless type.standardsSpaceType.empty? stype = type.standardsSpaceType.get.downcase if variants.any? { |variant| stype.include?(variant) } return space.additionalProperties.setFeature(tag, true) end end end # Check space identifier. sID = space.nameString.downcase if variants.any? { |variant| sID.include?(variant) } return space.additionalProperties.setFeature(tag, true) end space.additionalProperties.setFeature(tag, false) false end |
#wet?(activity = "") ⇒ Boolean
Validates whether an activity is considered 'wet', e.g. locker room.
296 297 298 299 300 301 302 303 304 |
# File 'lib/openstudio-standards/btap/activity.rb', line 296 def wet?(activity = "") return false unless activity.respond_to?(:to_sym) activity = activity.to_s.strip.downcase return true if activity.include?("locker") return true if activity.include?("washroom") false end |