diff --git a/lib/measures/tbd/measure.xml b/lib/measures/tbd/measure.xml index b3f705d..9422f0f 100644 --- a/lib/measures/tbd/measure.xml +++ b/lib/measures/tbd/measure.xml @@ -3,8 +3,8 @@ 3.1 tbd_measure 8890787b-8c25-4dc8-8641-b6be1b6c2357 - 4934dc58-443d-436f-9358-2d221b4de65a - 2026-04-17T10:47:02Z + 51c8811e-5901-4d36-a106-9bd4e377d0bb + 2026-08-27T12:41:28Z 99772807 TBDMeasure Thermal Bridging and Derating - TBD @@ -499,7 +499,7 @@ geo.rb rb resource - AD9546E1 + 16067F9B geometry.rb @@ -523,7 +523,7 @@ psi.rb rb resource - 9F7B97ED + 7AE7FE72 tbd.rb @@ -541,13 +541,13 @@ ua.rb rb resource - 0FB3F654 + 666C0F59 utils.rb rb resource - 26EC8C4F + 61243A64 version.rb diff --git a/lib/measures/tbd/resources/geo.rb b/lib/measures/tbd/resources/geo.rb index 905bade..f39c168 100644 --- a/lib/measures/tbd/resources/geo.rb +++ b/lib/measures/tbd/resources/geo.rb @@ -38,7 +38,6 @@ def matches?(e1 = {}, e2 = {}, tol = TOL) a = false return mismatch("e1", e1, Hash, mth, DBG, a) unless e1.is_a?(Hash) return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash) - return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash) return hashkey("e1", e1, :v0, mth, DBG, a) unless e1.key?(:v0) return hashkey("e1", e1, :v1, mth, DBG, a) unless e1.key?(:v1) @@ -644,8 +643,8 @@ def concave?(s1 = nil, s2 = nil) valid1 = s1[:angle].is_a?(Numeric) valid2 = s2[:angle].is_a?(Numeric) - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1 - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2 + return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1 + return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2 angle = 0 angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle] @@ -687,8 +686,8 @@ def convex?(s1 = nil, s2 = nil) valid1 = s1[:angle].is_a?(Numeric) valid2 = s2[:angle].is_a?(Numeric) - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1 - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2 + return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1 + return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2 angle = 0 angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle] @@ -761,8 +760,8 @@ def resetKIVA(model = nil, boundary = "Foundation") # boundary conditions. # # @param model [OpenStudio::Model::Model] a model - # @param floors [Hash] TBD floors # @param walls [Hash] TBD walls + # @param floors [Hash] TBD floors # @param edges [Hash] TBD edges (many linking floors & walls # # @return [Bool] true if Kiva foundations are successfully generated diff --git a/lib/measures/tbd/resources/psi.rb b/lib/measures/tbd/resources/psi.rb index dba602b..2450e86 100644 --- a/lib/measures/tbd/resources/psi.rb +++ b/lib/measures/tbd/resources/psi.rb @@ -542,7 +542,7 @@ def gen(id = "") h[:partyconcave ] = @set[id].key?(:partyconcave) h[:partyconvex ] = @set[id].key?(:partyconvex) h[:parapet ] = @set[id].key?(:parapet) - h[:partyconcave ] = @set[id].key?(:parapetconcave) + h[:parapetconcave ] = @set[id].key?(:parapetconcave) h[:parapetconvex ] = @set[id].key?(:parapetconvex) h[:roof ] = @set[id].key?(:roof) h[:roofconcave ] = @set[id].key?(:roofconcave) @@ -557,10 +557,10 @@ def gen(id = "") h[:balconyconcave ] = @set[id].key?(:balconyconcave) h[:balconyconvex ] = @set[id].key?(:balconyconvex) h[:balconysill ] = @set[id].key?(:balconysill) - h[:balconysillconcave ] = @set[id].key?(:balconysillconvex) + h[:balconysillconcave ] = @set[id].key?(:balconysillconcave) h[:balconysillconvex ] = @set[id].key?(:balconysillconvex) h[:balconydoorsill ] = @set[id].key?(:balconydoorsill) - h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconvex) + h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconcave) h[:balconydoorsillconvex ] = @set[id].key?(:balconydoorsillconvex) h[:rimjoist ] = @set[id].key?(:rimjoist) h[:rimjoistconcave ] = @set[id].key?(:rimjoistconcave) @@ -572,10 +572,10 @@ def gen(id = "") v[:head ] = 0; v[:headconcave ] = 0; v[:headconvex ] = 0 v[:sill ] = 0; v[:sillconcave ] = 0; v[:sillconvex ] = 0 v[:jamb ] = 0; v[:jambconcave ] = 0; v[:jambconvex ] = 0 - v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorconvex ] = 0 + v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorheadconvex ] = 0 v[:doorsill ] = 0; v[:doorsillconcave ] = 0; v[:doorsillconvex ] = 0 v[:doorjamb ] = 0; v[:doorjambconcave ] = 0; v[:doorjambconvex ] = 0 - v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightconvex ] = 0 + v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightheadconvex ] = 0 v[:skylightsill ] = 0; v[:skylightsillconcave ] = 0; v[:skylightsillconvex ] = 0 v[:skylightjamb ] = 0; v[:skylightjambconcave ] = 0; v[:skylightjambconvex ] = 0 v[:spandrel ] = 0; v[:spandrelconcave ] = 0; v[:spandrelconvex ] = 0 @@ -712,7 +712,7 @@ def gen(id = "") v[:roofconcave ] = @set[id][:parapet ] if h[:parapet ] v[:roofconvex ] = @set[id][:parapet ] if h[:parapet ] v[:roofconcave ] = @set[id][:parapetconcave ] if h[:parapetconcave ] - v[:roofconvex ] = @set[id][:parapetxonvex ] if h[:parapetconvex ] + v[:roofconvex ] = @set[id][:parapetconvex ] if h[:parapetconvex ] v[:roof ] = @set[id][:roof ] if h[:roof ] v[:roofconcave ] = @set[id][:roof ] if h[:roof ] v[:roofconvex ] = @set[id][:roof ] if h[:roof ] @@ -758,12 +758,12 @@ def gen(id = "") v[:balconysillconcave ] = @set[id][:balcony ] if h[:balcony ] v[:balconysillconvex ] = @set[id][:balcony ] if h[:balcony ] v[:balconysillconcave ] = @set[id][:balconyconcave ] if h[:balconyconcave ] - v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ] + v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ] v[:balconydoorsill ] = @set[id][:balcony ] if h[:balcony ] v[:balconydoorsillconcave] = @set[id][:balcony ] if h[:balcony ] v[:balconydoorsillconvex ] = @set[id][:balcony ] if h[:balcony ] v[:balconydoorsillconcave] = @set[id][:balconyconcave ] if h[:balconyconcave ] - v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ] + v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ] v[:balconysill ] = @set[id][:balconysill ] if h[:balconysill ] v[:balconysillconcave ] = @set[id][:balconysill ] if h[:balconysill ] v[:balconysillconvex ] = @set[id][:balconysill ] if h[:balconysill ] @@ -786,10 +786,10 @@ def gen(id = "") v[:rimjoistconvex ] = @set[id][:rimjoistconvex ] if h[:rimjoistconvex ] max = [v[:parapetconcave], v[:parapetconvex]].max - v[:parapet] = max unless @has[:parapet] + v[:parapet] = max unless h[:parapet] max = [v[:roofconcave], v[:roofconvex]].max - v[:roof] = max unless @has[:roof] + v[:roof] = max unless h[:roof] @val[id] = v @@ -982,7 +982,7 @@ def shorthands(id = "") mth = "TBD::#{__callee__}" sh = { has: {}, val: {} } id = trim(id) - return mismatch("set ID", id, String, mth, ERR, a) if id.empty? + return mismatch("set ID", id, String, mth, ERR, sh) if id.empty? return hashkey(id, @set , id, mth, ERR, sh) unless @set.key?(id) return hashkey(id, @has , id, mth, ERR, sh) unless @has.key?(id) return hashkey(id, @val , id, mth, ERR, sh) unless @val.key?(id) @@ -1736,9 +1736,9 @@ def process(model = nil, argh = {}) next unless point_V_mag > TOL next unless point_V_mag > farthest_mag - farthest = point - farthest_V = origin_point_V - fathest_mag = point_V_mag + farthest = point + farthest_V = origin_point_V + farthest_mag = point_V_mag end angle = reference_V.angle(farthest_V) diff --git a/lib/measures/tbd/resources/ua.rb b/lib/measures/tbd/resources/ua.rb index 994d0b5..50cdcff 100644 --- a/lib/measures/tbd/resources/ua.rb +++ b/lib/measures/tbd/resources/ua.rb @@ -1002,7 +1002,7 @@ def ua_md(ua = {}, lang = :en) model = "* modèle : #{ua[:file]}" if ua.key?(:file) && lang == :fr model += " (v#{ua[:version]})" if ua.key?(:version) report << model unless model.empty? - report << "* TBD : v3.6.0" + report << "* TBD : v3.6.1" report << "* date : #{ua[:date]}" if lang == :en diff --git a/lib/measures/tbd/resources/utils.rb b/lib/measures/tbd/resources/utils.rb index 4857661..cd6d6d0 100644 --- a/lib/measures/tbd/resources/utils.rb +++ b/lib/measures/tbd/resources/utils.rb @@ -204,8 +204,8 @@ module OSut # returned if a valid surface tilt [0, PI] is provided. Otherwise, generic # tilt-independent air film resistances are returned instead. # - # @param [:to_sym] surface type, e.g. :roof, :wall, :partition, :ceiling - # @param [Numeric] surface tilt (in rad), optional + # @param type [:to_sym] surface type, e.g. :roof, :wall, :partition, :ceiling + # @param tilt [Numeric] surface tilt (in rad), optional # # @return [Float] surface air film resistance(s) # @return [0.0] if invalid input (see logs) @@ -587,7 +587,7 @@ def resetUo(lc = nil, film = nil, index = nil, uo = nil, uniq = false) mt.setName(id) unless mt.setThermalResistance(r) - return invalid("Failed #{id}: RSi#{r.round(2)}", mth) + return invalid("Failed #{id}: RSi#{r.round(2)}", mth, 0, DBG, 0.0) end lc.setLayer(index, mt) @@ -621,11 +621,11 @@ def resetUo(lc = nil, film = nil, index = nil, uo = nil, uniq = false) mt.setName(id) unless mt.setThermalConductivity(k) - return invalid("Failed #{id}: K#{k.round(3)}", mth) + return invalid("Failed #{id}: K#{k.round(3)}", mth, 0, DBG, 0.0) end unless mt.setThickness(d) - return invalid("Failed #{id}: #{(d*1000).to_i}mm", mth) + return invalid("Failed #{id}: #{(d*1000).to_i}mm", mth, 0, DBG, 0.0) end lc.setLayer(index, mt) diff --git a/lib/tbd/geo.rb b/lib/tbd/geo.rb index 905bade..f39c168 100644 --- a/lib/tbd/geo.rb +++ b/lib/tbd/geo.rb @@ -38,7 +38,6 @@ def matches?(e1 = {}, e2 = {}, tol = TOL) a = false return mismatch("e1", e1, Hash, mth, DBG, a) unless e1.is_a?(Hash) return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash) - return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash) return hashkey("e1", e1, :v0, mth, DBG, a) unless e1.key?(:v0) return hashkey("e1", e1, :v1, mth, DBG, a) unless e1.key?(:v1) @@ -644,8 +643,8 @@ def concave?(s1 = nil, s2 = nil) valid1 = s1[:angle].is_a?(Numeric) valid2 = s2[:angle].is_a?(Numeric) - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1 - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2 + return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1 + return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2 angle = 0 angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle] @@ -687,8 +686,8 @@ def convex?(s1 = nil, s2 = nil) valid1 = s1[:angle].is_a?(Numeric) valid2 = s2[:angle].is_a?(Numeric) - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1 - return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2 + return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1 + return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2 angle = 0 angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle] @@ -761,8 +760,8 @@ def resetKIVA(model = nil, boundary = "Foundation") # boundary conditions. # # @param model [OpenStudio::Model::Model] a model - # @param floors [Hash] TBD floors # @param walls [Hash] TBD walls + # @param floors [Hash] TBD floors # @param edges [Hash] TBD edges (many linking floors & walls # # @return [Bool] true if Kiva foundations are successfully generated diff --git a/lib/tbd/psi.rb b/lib/tbd/psi.rb index dba602b..2450e86 100644 --- a/lib/tbd/psi.rb +++ b/lib/tbd/psi.rb @@ -542,7 +542,7 @@ def gen(id = "") h[:partyconcave ] = @set[id].key?(:partyconcave) h[:partyconvex ] = @set[id].key?(:partyconvex) h[:parapet ] = @set[id].key?(:parapet) - h[:partyconcave ] = @set[id].key?(:parapetconcave) + h[:parapetconcave ] = @set[id].key?(:parapetconcave) h[:parapetconvex ] = @set[id].key?(:parapetconvex) h[:roof ] = @set[id].key?(:roof) h[:roofconcave ] = @set[id].key?(:roofconcave) @@ -557,10 +557,10 @@ def gen(id = "") h[:balconyconcave ] = @set[id].key?(:balconyconcave) h[:balconyconvex ] = @set[id].key?(:balconyconvex) h[:balconysill ] = @set[id].key?(:balconysill) - h[:balconysillconcave ] = @set[id].key?(:balconysillconvex) + h[:balconysillconcave ] = @set[id].key?(:balconysillconcave) h[:balconysillconvex ] = @set[id].key?(:balconysillconvex) h[:balconydoorsill ] = @set[id].key?(:balconydoorsill) - h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconvex) + h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconcave) h[:balconydoorsillconvex ] = @set[id].key?(:balconydoorsillconvex) h[:rimjoist ] = @set[id].key?(:rimjoist) h[:rimjoistconcave ] = @set[id].key?(:rimjoistconcave) @@ -572,10 +572,10 @@ def gen(id = "") v[:head ] = 0; v[:headconcave ] = 0; v[:headconvex ] = 0 v[:sill ] = 0; v[:sillconcave ] = 0; v[:sillconvex ] = 0 v[:jamb ] = 0; v[:jambconcave ] = 0; v[:jambconvex ] = 0 - v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorconvex ] = 0 + v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorheadconvex ] = 0 v[:doorsill ] = 0; v[:doorsillconcave ] = 0; v[:doorsillconvex ] = 0 v[:doorjamb ] = 0; v[:doorjambconcave ] = 0; v[:doorjambconvex ] = 0 - v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightconvex ] = 0 + v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightheadconvex ] = 0 v[:skylightsill ] = 0; v[:skylightsillconcave ] = 0; v[:skylightsillconvex ] = 0 v[:skylightjamb ] = 0; v[:skylightjambconcave ] = 0; v[:skylightjambconvex ] = 0 v[:spandrel ] = 0; v[:spandrelconcave ] = 0; v[:spandrelconvex ] = 0 @@ -712,7 +712,7 @@ def gen(id = "") v[:roofconcave ] = @set[id][:parapet ] if h[:parapet ] v[:roofconvex ] = @set[id][:parapet ] if h[:parapet ] v[:roofconcave ] = @set[id][:parapetconcave ] if h[:parapetconcave ] - v[:roofconvex ] = @set[id][:parapetxonvex ] if h[:parapetconvex ] + v[:roofconvex ] = @set[id][:parapetconvex ] if h[:parapetconvex ] v[:roof ] = @set[id][:roof ] if h[:roof ] v[:roofconcave ] = @set[id][:roof ] if h[:roof ] v[:roofconvex ] = @set[id][:roof ] if h[:roof ] @@ -758,12 +758,12 @@ def gen(id = "") v[:balconysillconcave ] = @set[id][:balcony ] if h[:balcony ] v[:balconysillconvex ] = @set[id][:balcony ] if h[:balcony ] v[:balconysillconcave ] = @set[id][:balconyconcave ] if h[:balconyconcave ] - v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ] + v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ] v[:balconydoorsill ] = @set[id][:balcony ] if h[:balcony ] v[:balconydoorsillconcave] = @set[id][:balcony ] if h[:balcony ] v[:balconydoorsillconvex ] = @set[id][:balcony ] if h[:balcony ] v[:balconydoorsillconcave] = @set[id][:balconyconcave ] if h[:balconyconcave ] - v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ] + v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ] v[:balconysill ] = @set[id][:balconysill ] if h[:balconysill ] v[:balconysillconcave ] = @set[id][:balconysill ] if h[:balconysill ] v[:balconysillconvex ] = @set[id][:balconysill ] if h[:balconysill ] @@ -786,10 +786,10 @@ def gen(id = "") v[:rimjoistconvex ] = @set[id][:rimjoistconvex ] if h[:rimjoistconvex ] max = [v[:parapetconcave], v[:parapetconvex]].max - v[:parapet] = max unless @has[:parapet] + v[:parapet] = max unless h[:parapet] max = [v[:roofconcave], v[:roofconvex]].max - v[:roof] = max unless @has[:roof] + v[:roof] = max unless h[:roof] @val[id] = v @@ -982,7 +982,7 @@ def shorthands(id = "") mth = "TBD::#{__callee__}" sh = { has: {}, val: {} } id = trim(id) - return mismatch("set ID", id, String, mth, ERR, a) if id.empty? + return mismatch("set ID", id, String, mth, ERR, sh) if id.empty? return hashkey(id, @set , id, mth, ERR, sh) unless @set.key?(id) return hashkey(id, @has , id, mth, ERR, sh) unless @has.key?(id) return hashkey(id, @val , id, mth, ERR, sh) unless @val.key?(id) @@ -1736,9 +1736,9 @@ def process(model = nil, argh = {}) next unless point_V_mag > TOL next unless point_V_mag > farthest_mag - farthest = point - farthest_V = origin_point_V - fathest_mag = point_V_mag + farthest = point + farthest_V = origin_point_V + farthest_mag = point_V_mag end angle = reference_V.angle(farthest_V) diff --git a/lib/tbd/ua.rb b/lib/tbd/ua.rb index 994d0b5..50cdcff 100644 --- a/lib/tbd/ua.rb +++ b/lib/tbd/ua.rb @@ -1002,7 +1002,7 @@ def ua_md(ua = {}, lang = :en) model = "* modèle : #{ua[:file]}" if ua.key?(:file) && lang == :fr model += " (v#{ua[:version]})" if ua.key?(:version) report << model unless model.empty? - report << "* TBD : v3.6.0" + report << "* TBD : v3.6.1" report << "* date : #{ua[:date]}" if lang == :en diff --git a/lib/tbd/version.rb b/lib/tbd/version.rb index 3f9ebb2..e5c2201 100644 --- a/lib/tbd/version.rb +++ b/lib/tbd/version.rb @@ -21,5 +21,5 @@ # SOFTWARE. module TBD - VERSION = "3.6.0".freeze + VERSION = "3.6.1".freeze end