tbd 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +3 -0
- data/.github/workflows/pull_request.yml +72 -0
- data/.gitignore +23 -0
- data/.rspec +3 -0
- data/Gemfile +3 -0
- data/LICENSE.md +21 -0
- data/README.md +154 -0
- data/Rakefile +60 -0
- data/json/midrise.json +64 -0
- data/json/tbd_5ZoneNoHVAC.json +19 -0
- data/json/tbd_5ZoneNoHVAC_btap.json +91 -0
- data/json/tbd_seb_n2.json +41 -0
- data/json/tbd_seb_n4.json +57 -0
- data/json/tbd_warehouse10.json +24 -0
- data/json/tbd_warehouse5.json +37 -0
- data/lib/measures/tbd/LICENSE.md +21 -0
- data/lib/measures/tbd/README.md +136 -0
- data/lib/measures/tbd/README.md.erb +42 -0
- data/lib/measures/tbd/docs/.gitkeep +1 -0
- data/lib/measures/tbd/measure.rb +327 -0
- data/lib/measures/tbd/measure.xml +460 -0
- data/lib/measures/tbd/resources/geo.rb +714 -0
- data/lib/measures/tbd/resources/geometry.rb +351 -0
- data/lib/measures/tbd/resources/model.rb +1431 -0
- data/lib/measures/tbd/resources/oslog.rb +381 -0
- data/lib/measures/tbd/resources/psi.rb +2229 -0
- data/lib/measures/tbd/resources/tbd.rb +55 -0
- data/lib/measures/tbd/resources/transformation.rb +121 -0
- data/lib/measures/tbd/resources/ua.rb +986 -0
- data/lib/measures/tbd/resources/utils.rb +1636 -0
- data/lib/measures/tbd/resources/version.rb +3 -0
- data/lib/measures/tbd/tests/tbd_full_PSI.json +17 -0
- data/lib/measures/tbd/tests/tbd_tests.rb +222 -0
- data/lib/tbd/geo.rb +714 -0
- data/lib/tbd/psi.rb +2229 -0
- data/lib/tbd/ua.rb +986 -0
- data/lib/tbd/version.rb +25 -0
- data/lib/tbd.rb +93 -0
- data/sponsors/canada.png +0 -0
- data/sponsors/quebec.png +0 -0
- data/tbd.gemspec +43 -0
- data/tbd.schema.json +571 -0
- data/v291_MacOS.md +110 -0
- metadata +191 -0
data/lib/tbd/version.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# MIT License
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2022 Denis Bourgeois & Dan Macumber
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
13
|
+
# copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
module TBD
|
24
|
+
VERSION = "3.0.0".freeze
|
25
|
+
end
|
data/lib/tbd.rb
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# MIT License
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2022 Denis Bourgeois & Dan Macumber
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
13
|
+
# copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
require "openstudio"
|
24
|
+
|
25
|
+
begin
|
26
|
+
# Try to load from the Topolys gem.
|
27
|
+
require "topolys"
|
28
|
+
|
29
|
+
puts "... relying on the Topolys gem"
|
30
|
+
rescue LoadError
|
31
|
+
require_relative "topolys/model"
|
32
|
+
require_relative "topolys/geometry"
|
33
|
+
require_relative "topolys/transformation"
|
34
|
+
require_relative "topolys/version"
|
35
|
+
|
36
|
+
puts "... fallback to local Topolys files"
|
37
|
+
end
|
38
|
+
|
39
|
+
begin
|
40
|
+
# Try to load from the OSlg gem.
|
41
|
+
require "oslg"
|
42
|
+
|
43
|
+
puts "... relying on the OSlg gem"
|
44
|
+
rescue LoadError
|
45
|
+
require_relative "oslg/oslog"
|
46
|
+
require_relative "osut/version"
|
47
|
+
|
48
|
+
puts "... fallback to local OSlg files"
|
49
|
+
end
|
50
|
+
|
51
|
+
begin
|
52
|
+
# Try to load from the OSut gem.
|
53
|
+
require "osut"
|
54
|
+
|
55
|
+
puts "... relying on the OSut gem"
|
56
|
+
rescue LoadError
|
57
|
+
require_relative "osut/utils"
|
58
|
+
require_relative "osut/version"
|
59
|
+
|
60
|
+
puts "... fallback to local OSut files"
|
61
|
+
end
|
62
|
+
|
63
|
+
begin
|
64
|
+
# Try to load from the TBD gem.
|
65
|
+
require "tbd/psi"
|
66
|
+
require "tbd/geo"
|
67
|
+
require "tbd/ua"
|
68
|
+
require "tbd/version"
|
69
|
+
|
70
|
+
puts "... relying on the TBD gem"
|
71
|
+
rescue LoadError
|
72
|
+
require_relative "tbd/psi"
|
73
|
+
require_relative "tbd/geo"
|
74
|
+
require_relative "tbd/ua"
|
75
|
+
require_relative "tbd/version"
|
76
|
+
|
77
|
+
puts "... fallback to local TBD files"
|
78
|
+
end
|
79
|
+
|
80
|
+
module TBD
|
81
|
+
extend OSut # OpenStudio utilities
|
82
|
+
|
83
|
+
TOL = OSut::TOL
|
84
|
+
TOL2 = OSut::TOL2
|
85
|
+
DBG = OSut::DEBUG # mainly to flag invalid arguments for devs (buggy code)
|
86
|
+
INF = OSut::INFO # informs TBD user of measure success or failure
|
87
|
+
WRN = OSut::WARN # e.g. WARN users of 'iffy' .osm inputs (yet not critical)
|
88
|
+
ERR = OSut::ERR # e.g. flag invalid .osm inputs
|
89
|
+
FTL = OSut::FATAL # e.g. invalid TBD JSON format/entries
|
90
|
+
NS = "nameString" # OpenStudio IdfObject nameString method
|
91
|
+
|
92
|
+
extend TBD
|
93
|
+
end
|
data/sponsors/canada.png
ADDED
Binary file
|
data/sponsors/quebec.png
ADDED
Binary file
|
data/tbd.gemspec
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "tbd/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
# Specify which files should be added to the gem when it is released.
|
7
|
+
# "git ls-files -z" loads files in the RubyGem that have been added into git.
|
8
|
+
s.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
9
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
10
|
+
f.match(%r{^(test|spec|features)/})
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
s.name = "tbd"
|
15
|
+
s.version = TBD::VERSION
|
16
|
+
s.license = "MIT"
|
17
|
+
s.summary = "Thermal Bridging and Derating (for OpenStudio)"
|
18
|
+
s.description = "An OpenStudio Measure that autodetects major " \
|
19
|
+
"thermal bridges in a model, and then derates " \
|
20
|
+
"outside-facing, opaque surface constructions."
|
21
|
+
s.authors = ["Denis Bourgeois & Dan Macumber"]
|
22
|
+
s.email = ["denis@rd2.ca"]
|
23
|
+
s.platform = Gem::Platform::RUBY
|
24
|
+
s.homepage = "https://github.com/rd2/tbd"
|
25
|
+
s.bindir = "exe"
|
26
|
+
s.require_paths = ["lib"]
|
27
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
s.required_ruby_version = [">= 2.5.0", "< 2.7.3"]
|
29
|
+
s.metadata = {}
|
30
|
+
|
31
|
+
s.add_dependency "topolys", "~> 0"
|
32
|
+
s.add_dependency "osut", "~> 0"
|
33
|
+
s.add_dependency "json-schema", "~> 2.7.0"
|
34
|
+
|
35
|
+
s.add_development_dependency "bundler", "~> 2.1"
|
36
|
+
s.add_development_dependency "rake", "~> 13.0"
|
37
|
+
s.add_development_dependency "rspec", "~> 3.11"
|
38
|
+
s.add_development_dependency "parallel", "~> 1.19.2"
|
39
|
+
|
40
|
+
s.metadata["homepage_uri" ] = s.homepage
|
41
|
+
s.metadata["source_code_uri"] = "#{s.homepage}/tree/v#{s.version}"
|
42
|
+
s.metadata["bug_tracker_uri"] = "#{s.homepage}/issues"
|
43
|
+
end
|