Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space type names fix #150

Merged
merged 3 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions lib/openstudio/extension/core/os_lib_model_generation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def get_space_types_from_building_type(building_type, template, whole_building =
hash['Cafe'] = { ratio: 0.0103, space_type_gen: true, default: false }
hash['CleanWork'] = { ratio: 0.0071, space_type_gen: true, default: false }
hash['Conference'] = { ratio: 0.0082, space_type_gen: true, default: false }
hash['DresingRoom'] = { ratio: 0.0021, space_type_gen: true, default: false }
hash['DressingRoom'] = { ratio: 0.0021, space_type_gen: true, default: false }
hash['Elec/MechRoom'] = { ratio: 0.0109, space_type_gen: true, default: false }
hash['ElevatorPumpRoom'] = { ratio: 0.0022, space_type_gen: true, default: false }
hash['Exam'] = { ratio: 0.1029, space_type_gen: true, default: true }
Expand Down Expand Up @@ -3439,9 +3439,6 @@ def wizard(model, runner, user_arguments)
# mapping building_type name is needed for a few methods
lookup_building_type = standard.model_get_lookup_name(building_type)

# remap small medium and large office to office
if building_type.include?('Office') then building_type = 'Office' end

# get array of new space types
space_types_new = []

Expand All @@ -3457,14 +3454,14 @@ def wizard(model, runner, user_arguments)

# create space type
space_type = OpenStudio::Model::SpaceType.new(model)
space_type.setStandardsBuildingType(building_type)
space_type.setStandardsBuildingType(lookup_building_type)
space_type.setStandardsSpaceType(space_type_name)
space_type.setName("#{building_type} #{space_type_name}")
space_type.setName("#{lookup_building_type} #{space_type_name}")

# add to array of new space types
space_types_new << space_type

# add internal loads (the nil check isn't ncessary, but I will keep it in as a warning instad of an error)
# add internal loads (the nil check isn't necessary, but I will keep it in as a warning instad of an error)
test = standard.space_type_apply_internal_loads(space_type, true, true, true, true, true, true)
if test.nil?
runner.registerWarning("Could not add loads for #{space_type.name}. Not expected for #{template} #{lookup_building_type}")
Expand Down
Loading