Skip to content

create_bar cannot handle >1 num_stories_below_grade when story_multiplier_method is Basements Ground Mid Top #2032

Description

@haneslinger

to recreate, run and osw with num_stories_below_grade set to 2

heres an example stacktrace, on tag v0.7.1

Traceback (most recent call last):
/Users/heslinge/Repos/openstudio-standards/lib/openstudio-standards/geometry/create_bar.rb:842:in `block in create_bar'
/Users/heslinge/Repos/openstudio-standards/lib/openstudio-standards/geometry/create_bar.rb:840:in `each'
/Users/heslinge/Repos/openstudio-standards/lib/openstudio-standards/geometry/create_bar.rb:840:in `each_with_index'
/Users/heslinge/Repos/openstudio-standards/lib/openstudio-standards/geometry/create_bar.rb:840:in `create_bar'
/Users/heslinge/Repos/openstudio-standards/lib/openstudio-standards/geometry/create_bar.rb:1151:in `bar_hash_setup_run'
/Users/heslinge/Repos/openstudio-standards/lib/openstudio-standards/geometry/create_bar.rb:1767:in `create_bar_from_args_and_building_type_hash'
/Users/heslinge/Repos/openstudio-standards/lib/openstudio-standards/geometry/create_bar.rb:2130:in `create_bar_from_building_type_ratios'
/Users/heslinge/Repos/openstudio-standards/ruby/3.2.0/gems/openstudio-model-articulation-0.11.1/lib/measures/create_bar_from_building_type_ratios/measure.rb:435:in `run']'

this happens because this for loop excepts sorted_stories and stories_flat to be the same length, but this if else that populates stories_flat skips any basement story but the first to multiply the first.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions