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

Initializes nrcan_446 branch: skylights & wells #1854

Open
wants to merge 10 commits into
base: nrcan
Choose a base branch
from
2 changes: 1 addition & 1 deletion Gemfile.lock.3.7.0
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ GEM
stringio (3.1.2)
tbd (3.4.4)
json-schema (~> 4)
osut (0.3.0)
osut (0.6.0)
topolys (0.6.2)
thor (1.3.2)
tilt (2.4.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ def load_standards_database_new
# <-3.1: Remove all the windows/skylights
# > 1: Do nothing
#
# By default, :osut is set to 'false'. If :osut is set to 'true', SRR is
# instead met using OSut's addSkylights (:srr_set numeric values may apply).
def apply_fdwr_srr_daylighting(model:, fdwr_set: -2.0, srr_set: -2.0, necb_hdd: true, osut: false)
# By default, :srr_opt is an empty string (" "). If set to "osut", SRR is
# instead met using OSut's 'addSkylights' (:srr_set numeric values may apply).
def apply_fdwr_srr_daylighting(model:, fdwr_set: -2.0, srr_set: -2.0, necb_hdd: true, srr_opt: '')
fdwr_set = -2.0 if (fdwr_set == 'NECB_default') || fdwr_set.nil? || (fdwr_set.to_f.round(0) == -1.0)
srr_set = -2.0 if (srr_set == 'NECB_default') || srr_set.nil? || (srr_set.to_f.round(0) == -1.0)
fdwr_set = fdwr_set.to_f
srr_set = srr_set.to_f
apply_standard_window_to_wall_ratio(model: model, fdwr_set: fdwr_set, necb_hdd: true)
apply_standard_skylight_to_roof_ratio(model: model, srr_set: srr_set, osut: osut)
apply_standard_skylight_to_roof_ratio(model: model, srr_set: srr_set, srr_opt: srr_opt)
# model_add_daylighting_controls(model) # to be removed after refactor.
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def apply_standard_window_to_wall_ratio(model:, fdwr_set: -1.0, necb_hdd: true)

# Reduces the SRR to the values specified by the PRM. SRR reduction
# will be done by shrinking vertices toward the centroid.
#
def apply_standard_skylight_to_roof_ratio(model:, srr_set: -1.0, osut: false)
def apply_standard_skylight_to_roof_ratio(model:, srr_set: -1.0, srr_opt: '')
# If srr_set is between 1.0 and 1.2 set it to the maximum allowed by the NECB. If srr_set is between 0.0 and 1.0
# apply whatever was passed. If srr_set >= 1.2 then set the existing srr of the building to be the necb maximum
# only if the the srr exceeds this maximum (otherwise leave it to be whatever was modeled).
Expand All @@ -38,10 +37,10 @@ def apply_standard_skylight_to_roof_ratio(model:, srr_set: -1.0, osut: false)
# <-3.1: Remove all skylights
# > 1: Do nothing
#
# By default, :osut is set to 'false'. If :osut is set to 'true', SRR is
# instead met using OSut's addSkylights (:srr_set numeric values may apply). @todo
# By default, :srr_opt is an empty string (" "). If set to "osut", SRR is
# instead met using OSut's addSkylights (:srr_set numeric values may apply).
return if srr_set.to_f > 1.0
return apply_max_srr_nrcan(model: model, srr_lim: srr_set.to_f) if srr_set.to_f >= 0.0 && srr_set <= 1.0
return apply_max_srr_nrcan(model: model, srr_lim: srr_set.to_f, srr_opt: srr_opt) if srr_set.to_f >= 0.0 && srr_set <= 1.0

# No skylights set for BTAPPRE1980 buildings.
return if srr_set.to_f >= -1.1 && srr_set <= -0.9
Expand Down
2 changes: 1 addition & 1 deletion openstudio-standards.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rubyXL', '~> 3.4'
spec.add_development_dependency 'simplecov', '0.22.0'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_runtime_dependency 'tbd'
spec.add_runtime_dependency 'tbd', '~> 3.4.4'
Copy link
Collaborator Author

@brgix brgix Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The autozone sizing runs rely on an older OpenStudio linking to a much older OSut gem:

osut (0.2.8) ':/ruby/2.7.0/gems/osut-0.2.8'

Updating the gemspec and Gemfile.lock files to set the minimum TBD & OSut gem versions. This is not fixing the observed issue, yet keeping it here as a reminder.


EDIT: mainly a local gem management issue - fixed. That said, OpenStudio & Standards would be better off with:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See here- good!

spec.add_development_dependency 'aws-sdk-s3'
spec.add_development_dependency 'git-revision'
spec.add_development_dependency 'bundler-audit'
Expand Down