class DOERefPre1980PrimarySchool

This class represents a prototypical DOERefPre1980 PrimarySchool.

Attributes

building_story_map[RW]
geometry_file[RW]
lookup_building_type[RW]
prototype_database[RW]
prototype_input[RW]
space_type_map[RW]
system_to_space_map[RW]

Public Class Methods

new() click to toggle source
Calls superclass method DOERefPre1980::new
# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27436
def initialize
  super()
  @instvarbuilding_type = @@building_type
  @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
  if @prototype_input.nil?
    OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
    raise("Could not find prototype inputs for DOERefPre1980PrimarySchool, cannot create model.")
    return false
  end
  @lookup_building_type = self.model_get_lookup_name(@@building_type)
  #ideally we should map the data required to a instance variable.
  @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
  hvac_map_file =  'geometry/' + @prototype_input['hvac_json']
  @system_to_space_map = load_hvac_map(hvac_map_file)
  self.set_variables()
end

Public Instance Methods

define_building_story_map(building_type, climate_zone) click to toggle source

Returns the mapping between the names of the spaces in the geometry .osm file and the building story that they are located on.

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27476
def define_building_story_map(building_type, climate_zone)
   return @building_story_map
end
define_hvac_system_map(building_type, climate_zone) click to toggle source

Returns the mapping between the names of the spaces in the geometry .osm file and the HVAC system that will be applied to those spaces.

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27470
def define_hvac_system_map(building_type, climate_zone)
  return @system_to_space_map
end
define_space_type_map(building_type, climate_zone) click to toggle source

Returns the mapping between the names of the spaces in the geometry .osm file and the space types available for this particular Standard.

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27464
def define_space_type_map(building_type, climate_zone)
  return @space_type_map
end
model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input) click to toggle source

daylighting adjustments specific to the prototype model

@param model [OpenStudio::Model::Model] OpenStudio model object @param building_type [String] the building type @param climate_zone [String] ASHRAE climate zone, e.g. ‘ASHRAE 169-2013-4A’ @param prototype_input [Hash] hash of prototype inputs @return [Boolean] returns true if successful, false if not

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27534
def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
  return true
end
model_get_lookup_name(building_type) click to toggle source

Get the name of the building type used in lookups

@param building_type [String] the building type @return [String] returns the lookup name as a string @todo Unify the lookup names and eliminate this method

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27502
def model_get_lookup_name(building_type)
  lookup_name = building_type
  case building_type
    when 'SmallOffice'
      lookup_name = 'Office'
    when 'MediumOffice'
      lookup_name = 'Office'
    when 'LargeOffice'
      lookup_name = 'Office'
    when 'SmallOfficeDetailed'
      lookup_name = 'Office'
    when 'MediumOfficeDetailed'
      lookup_name = 'Office'
        when 'LargeOfficeDetailed'
      lookup_name = 'Office'
    when 'RetailStandalone'
      lookup_name = 'Retail'
    when 'RetailStripmall'
      lookup_name = 'StripMall'
    when 'Office'
      lookup_name = 'Office'
  end
  return lookup_name
end
model_modify_oa_controller(model) click to toggle source

Does nothing unless implmented by the specific standard

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27480
def model_modify_oa_controller(model)
end
model_reset_or_room_vav_minimum_damper(prototype_input, model) click to toggle source

Does nothing unless implmented by the specific standard

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27483
def model_reset_or_room_vav_minimum_damper(prototype_input, model)
end
model_update_exhaust_fan_efficiency(model) click to toggle source

update exhuast fan efficiency

@param model [OpenStudio::Model::Model] OpenStudio model object @return [Boolean] returns true if successful, false if not

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27490
def model_update_exhaust_fan_efficiency(model)
  return true
end
model_update_fan_efficiency(model) click to toggle source

Does nothing unless implmented by the specific standard

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27495
def model_update_fan_efficiency(model)
end
set_variables() click to toggle source

This method is used to extend the class with building-type-specific methods, as defined in Prototype.SomeBuildingType.rb. Each building type has its own set of methods that change things which are not common across all prototype buildings, even within a given Standard.

# File lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb, line 27456
def set_variables()
  # Will be overwritten in class reopen file.
  # add all building methods for now.
  self.extend(PrimarySchool) unless @template == 'NECB 2011'
end