lib/openstudio-standards/standards/Standards.Model.rb in openstudio-standards-0.2.7 vs lib/openstudio-standards/standards/Standards.Model.rb in openstudio-standards-0.2.8

- old
+ new

@@ -1862,11 +1862,11 @@ # Find all the schedule rules that match the name rules = model_find_objects(standards_data['schedules'], 'name' => schedule_name) if rules.size.zero? OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Cannot find data for schedule: #{schedule_name}, will not be created.") - return false + return model.alwaysOnDiscreteSchedule end # Make a schedule ruleset sch_ruleset = OpenStudio::Model::ScheduleRuleset.new(model) sch_ruleset.setName(schedule_name.to_s) @@ -2739,10 +2739,14 @@ result = 11_345 elsif building_type == 'LargeOffice' # 498,600 ft^2 result = 46_320 elsif building_type == 'MediumOffice' # 53,600 ft^2 result = 4982 + elsif building_type == 'LargeOfficeDetailed' # 498,600 ft^2 + result = 46_320 + elsif building_type == 'MediumOfficeDetailed' # 53,600 ft^2 + result = 4982 elsif building_type == 'MidriseApartment' # 33,700 ft^2 result = 3135 elsif building_type == 'Office' result = nil # TODO: - there shouldn't be a prototype building for this OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', 'Measures calling this should choose between SmallOffice, MediumOffice, and LargeOffice') @@ -2758,10 +2762,12 @@ result = 19_592 elsif building_type == 'SmallHotel' # 43,200 ft^2 result = 4014 elsif building_type == 'SmallOffice' # 5500 ft^2 result = 511 + elsif building_type == 'SmallOfficeDetailed' # 5500 ft^2 + result = 511 elsif building_type == 'StripMall' # 22,500 ft^2 result = 2090 elsif building_type == 'SuperMarket' # 45,002 ft2 (from legacy reference idf file) result = 4181 elsif building_type == 'Warehouse' # 49,495 ft^2 (legacy ref shows 52,045, but I wil calc using 49,495) @@ -3639,11 +3645,11 @@ result << { units: 'unit', block: 20, max_hourly: 12.0, max_daily: 80.0, avg_day_unit: 42.0 } result << { units: 'unit', block: 50, max_hourly: 10.0, max_daily: 73.0, avg_day_unit: 40.0 } result << { units: 'unit', block: 75, max_hourly: 8.5, max_daily: 66.0, avg_day_unit: 38.0 } result << { units: 'unit', block: 100, max_hourly: 7.0, max_daily: 60.0, avg_day_unit: 37.0 } result << { units: 'unit', block: 200, max_hourly: 5.0, max_daily: 50.0, avg_day_unit: 35.0 } - elsif ['Office', 'LargeOffice', 'MediumOffice', 'SmallOffice'].include? building_type + elsif ['Office', 'LargeOffice', 'MediumOffice', 'SmallOffice','LargeOfficeDetailed', 'MediumOfficeDetailed', 'SmallOfficeDetailed'].include? building_type result << { units: 'person', block: nil, max_hourly: 0.4, max_daily: 2.0, avg_day_unit: 1.0 } elsif building_type == 'Outpatient' OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "No SWH rules of thumbs for #{building_type}.") elsif building_type == 'PrimarySchool' result << { units: 'student', block: nil, max_hourly: 0.6, max_daily: 1.5, avg_day_unit: 0.6 } @@ -4125,11 +4131,11 @@ return true end # Converts the climate zone in the model into the format used # by the openstudio-standards lookup tables. For example: - # institution: ASHRAE, value: 6A becomes: ASHRAE 169-2006-6A. + # institution: ASHRAE, value: 6A becomes: ASHRAE 169-2013-6A. # institution: CEC, value: 3 becomes: CEC T24-CEC3. # # @param model [OpenStudio::Model::Model] the model # @return [String] the string representation of the climate zone, # empty string if no climate zone is present in the model. @@ -4137,13 +4143,13 @@ climate_zone = '' model.getClimateZones.climateZones.each do |cz| if cz.institution == 'ASHRAE' next if cz.value == '' # Skip blank ASHRAE climate zones put in by OpenStudio Application climate_zone = if cz.value == '7' || cz.value == '8' - "ASHRAE 169-2006-#{cz.value}A" + "ASHRAE 169-2013-#{cz.value}A" else - "ASHRAE 169-2006-#{cz.value}" + "ASHRAE 169-2013-#{cz.value}" end elsif cz.institution == 'CEC' next if cz.value == '' # Skip blank ASHRAE climate zones put in by OpenStudio Application climate_zone = "CEC T24-CEC#{cz.value}" end @@ -4156,17 +4162,19 @@ # in the format used by the openstudio-standards lookups. # Clears out any climate zones previously added to the model. # # @param model [OpenStudio::Model::Model] the model # @param climate_zone [String] the climate zone in openstudio-standards format. - # For example: ASHRAE 169-2006-2A, CEC T24-CEC3 + # For example: ASHRAE 169-2013-2A, CEC T24-CEC3 # @return [Boolean] returns true if successful, false if not def model_set_climate_zone(model, climate_zone) # Remove previous climate zones from the model model.getClimateZones.clear # Split the string into the correct institution and value if climate_zone.include? 'ASHRAE 169-2006-' model.getClimateZones.setClimateZone('ASHRAE', climate_zone.gsub('ASHRAE 169-2006-', '')) + elsif climate_zone.include? 'ASHRAE 169-2013-' + model.getClimateZones.setClimateZone('ASHRAE', climate_zone.gsub('ASHRAE 169-2013-', '')) elsif climate_zone.include? 'CEC T24-CEC' model.getClimateZones.setClimateZone('CEC', climate_zone.gsub('CEC T24-CEC', '')) end return true