honeybee-openstudio 2.7.5 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/{emit-release-event.yaml → cd.yml} +3 -3
- data/.github/workflows/ci.yaml +56 -0
- data/README.md +1 -1
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/files/Honeybee.rb +7 -0
- data/lib/files/honeybee_adapter.rb +169 -0
- data/lib/files/honeybee_workflow.osw +2 -1
- data/lib/honeybee.rb +1 -0
- data/lib/honeybee/_defaults/model.json +220 -82
- data/lib/honeybee/_defaults/simulation-parameter.json +5 -22
- data/lib/honeybee/load/service_hot_water.rb +42 -0
- data/lib/to_openstudio.rb +1 -0
- data/lib/to_openstudio/construction/air.rb +1 -6
- data/lib/to_openstudio/geometry/room.rb +7 -0
- data/lib/to_openstudio/hvac/template.rb +13 -11
- data/lib/to_openstudio/load/electric_equipment.rb +1 -1
- data/lib/to_openstudio/load/gas_equipment.rb +1 -1
- data/lib/to_openstudio/load/lighting.rb +1 -1
- data/lib/to_openstudio/load/people.rb +1 -1
- data/lib/to_openstudio/load/service_hot_water.rb +170 -0
- data/lib/to_openstudio/model.rb +28 -1
- data/lib/to_openstudio/program_type.rb +5 -0
- data/lib/to_openstudio/schedule/ruleset.rb +1 -4
- data/lib/to_openstudio/simulation/parameter_model.rb +22 -53
- data/lib/to_openstudio/ventcool/control.rb +1 -1
- metadata +95 -9
- data/.coveralls.yml +0 -1
- data/.github/workflows/pull_request.yaml +0 -25
- data/.travis.yml +0 -44
@@ -75,6 +75,11 @@ module Honeybee
|
|
75
75
|
os_gas_equipment.setSpaceType(os_space_type)
|
76
76
|
end
|
77
77
|
|
78
|
+
# add hot water from to a global hash that will be used to assign them to rooms
|
79
|
+
if @hash[:service_hot_water]
|
80
|
+
$programtype_shw_hash[@hash[:identifier]] = @hash[:service_hot_water]
|
81
|
+
end
|
82
|
+
|
78
83
|
# assign infiltration
|
79
84
|
if @hash[:infiltration] && $use_simple_vent # only use infiltration with simple ventilation
|
80
85
|
infiltration = InfiltrationAbridged.new(@hash[:infiltration])
|
@@ -85,10 +85,7 @@ module Honeybee
|
|
85
85
|
holiday_schedule = openstudio_model.getScheduleDayByName(@hash[:holiday_schedule])
|
86
86
|
unless holiday_schedule.empty?
|
87
87
|
holiday_schedule_object = holiday_schedule.get
|
88
|
-
|
89
|
-
os_sch_ruleset.setHolidaySchedule(holiday_schedule_object)
|
90
|
-
rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
91
|
-
end
|
88
|
+
os_sch_ruleset.setHolidaySchedule(holiday_schedule_object)
|
92
89
|
end
|
93
90
|
end
|
94
91
|
|
@@ -98,54 +98,28 @@ module Honeybee
|
|
98
98
|
|
99
99
|
# set defaults for the Model's ShadowCalculation object
|
100
100
|
os_shadow_calc = @openstudio_model.getShadowCalculation
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
end
|
108
|
-
begin
|
109
|
-
os_shadow_calc.setShadingCalculationUpdateFrequencyMethod(
|
110
|
-
shdw_defaults[:calculation_update_method][:default])
|
111
|
-
rescue # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
112
|
-
end
|
113
|
-
begin
|
114
|
-
os_shadow_calc.setShadingCalculationUpdateFrequency(
|
115
|
-
shdw_defaults[:calculation_frequency][:default])
|
116
|
-
rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
117
|
-
os_shadow_calc.setCalculationFrequency(
|
118
|
-
shdw_defaults[:calculation_frequency][:default])
|
119
|
-
end
|
101
|
+
os_shadow_calc.setShadingCalculationMethod(
|
102
|
+
shdw_defaults[:calculation_method][:default])
|
103
|
+
os_shadow_calc.setShadingCalculationUpdateFrequencyMethod(
|
104
|
+
shdw_defaults[:calculation_update_method][:default])
|
105
|
+
os_shadow_calc.setShadingCalculationUpdateFrequency(
|
106
|
+
shdw_defaults[:calculation_frequency][:default])
|
120
107
|
os_shadow_calc.setMaximumFiguresInShadowOverlapCalculations(
|
121
108
|
shdw_defaults[:maximum_figures][:default])
|
122
109
|
|
123
110
|
# override any ShadowCalculation defaults with lodaded JSON
|
124
111
|
if @hash[:shadow_calculation]
|
125
112
|
if @hash[:shadow_calculation][:calculation_method]
|
126
|
-
|
127
|
-
|
128
|
-
@hash[:shadow_calculation][:calculation_method])
|
129
|
-
rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
130
|
-
os_shadow_calc.setCalculationMethod(
|
131
|
-
@hash[:shadow_calculation][:calculation_method])
|
132
|
-
end
|
113
|
+
os_shadow_calc.setShadingCalculationMethod(
|
114
|
+
@hash[:shadow_calculation][:calculation_method])
|
133
115
|
end
|
134
116
|
if @hash[:shadow_calculation][:calculation_update_method]
|
135
|
-
|
136
|
-
|
137
|
-
@hash[:shadow_calculation][:calculation_update_method])
|
138
|
-
rescue # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
139
|
-
end
|
117
|
+
os_shadow_calc.setShadingCalculationUpdateFrequencyMethod(
|
118
|
+
@hash[:shadow_calculation][:calculation_update_method])
|
140
119
|
end
|
141
120
|
if @hash[:shadow_calculation][:calculation_frequency]
|
142
|
-
|
143
|
-
|
144
|
-
@hash[:shadow_calculation][:calculation_frequency])
|
145
|
-
rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
146
|
-
os_shadow_calc.setCalculationFrequency(
|
147
|
-
@hash[:shadow_calculation][:calculation_frequency])
|
148
|
-
end
|
121
|
+
os_shadow_calc.setShadingCalculationUpdateFrequency(
|
122
|
+
@hash[:shadow_calculation][:calculation_frequency])
|
149
123
|
end
|
150
124
|
if @hash[:shadow_calculation][:maximum_figures]
|
151
125
|
os_shadow_calc.setMaximumFiguresInShadowOverlapCalculations(
|
@@ -192,15 +166,9 @@ module Honeybee
|
|
192
166
|
end
|
193
167
|
end
|
194
168
|
if @hash[:output][:summary_reports]
|
195
|
-
|
196
|
-
os_report = @openstudio_model.getOutputTableSummaryReports
|
197
|
-
rescue # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
198
|
-
end
|
169
|
+
os_report = @openstudio_model.getOutputTableSummaryReports
|
199
170
|
@hash[:output][:summary_reports].each do |report|
|
200
|
-
|
201
|
-
os_report.addSummaryReport(report)
|
202
|
-
rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
203
|
-
end
|
171
|
+
os_report.addSummaryReport(report)
|
204
172
|
end
|
205
173
|
end
|
206
174
|
end
|
@@ -242,13 +210,10 @@ module Honeybee
|
|
242
210
|
# Set the holidays
|
243
211
|
if @hash[:run_period][:holidays]
|
244
212
|
@hash[:run_period][:holidays].each do |hol|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
os_hol.setSpecialDayType('Holiday')
|
250
|
-
rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
|
251
|
-
end
|
213
|
+
os_hol = OpenStudio::Model::RunPeriodControlSpecialDays.new(
|
214
|
+
OpenStudio::MonthOfYear.new(hol[0]), hol[1], @openstudio_model)
|
215
|
+
os_hol.setDuration(1)
|
216
|
+
os_hol.setSpecialDayType('Holiday')
|
252
217
|
end
|
253
218
|
end
|
254
219
|
end
|
@@ -272,6 +237,10 @@ module Honeybee
|
|
272
237
|
if @hash[:terrain_type]
|
273
238
|
os_site.setTerrain(@hash[:terrain_type])
|
274
239
|
end
|
240
|
+
|
241
|
+
# ensure water mains temperatures are written
|
242
|
+
os_water_mains = @openstudio_model.getSiteWaterMainsTemperature
|
243
|
+
os_water_mains.setCalculationMethod('CorrelationFromWeatherFile')
|
275
244
|
end
|
276
245
|
|
277
246
|
end #SimulationParameter
|
@@ -64,7 +64,7 @@ module Honeybee
|
|
64
64
|
@@program_manager.setCallingPoint('BeginTimestepBeforePredictor')
|
65
65
|
end
|
66
66
|
@@program_manager
|
67
|
-
|
67
|
+
end
|
68
68
|
|
69
69
|
def replace_ems_special_characters(ems_variable_name)
|
70
70
|
# remove special characters from an name to be used as an EMS variable
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybee-openstudio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanushree Charan
|
@@ -11,8 +11,92 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-
|
14
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: bundler
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.1'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.1'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: public_suffix
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - "~>"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 3.1.1
|
37
|
+
type: :development
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 3.1.1
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: json-schema
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - "~>"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 2.8.1
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 2.8.1
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rake
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - "~>"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '13.0'
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '13.0'
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: rspec
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - "~>"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '3.9'
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '3.9'
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: rubocop
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - "~>"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 0.54.0
|
93
|
+
type: :development
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 0.54.0
|
16
100
|
- !ruby/object:Gem::Dependency
|
17
101
|
name: json_pure
|
18
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,12 +148,10 @@ executables: []
|
|
64
148
|
extensions: []
|
65
149
|
extra_rdoc_files: []
|
66
150
|
files:
|
67
|
-
- ".
|
68
|
-
- ".github/workflows/
|
69
|
-
- ".github/workflows/pull_request.yaml"
|
151
|
+
- ".github/workflows/cd.yml"
|
152
|
+
- ".github/workflows/ci.yaml"
|
70
153
|
- ".gitignore"
|
71
154
|
- ".releaserc.json"
|
72
|
-
- ".travis.yml"
|
73
155
|
- Gemfile
|
74
156
|
- LICENSE.md
|
75
157
|
- README.md
|
@@ -81,6 +163,7 @@ files:
|
|
81
163
|
- doc_templates/copyright_ruby.txt
|
82
164
|
- honeybee-openstudio.gemspec
|
83
165
|
- lib/files/Honeybee.rb
|
166
|
+
- lib/files/honeybee_adapter.rb
|
84
167
|
- lib/files/honeybee_workflow.osw
|
85
168
|
- lib/files/urbanopt_Gemfile
|
86
169
|
- lib/from_openstudio.rb
|
@@ -117,6 +200,7 @@ files:
|
|
117
200
|
- lib/honeybee/load/infiltration.rb
|
118
201
|
- lib/honeybee/load/lighting.rb
|
119
202
|
- lib/honeybee/load/people.rb
|
203
|
+
- lib/honeybee/load/service_hot_water.rb
|
120
204
|
- lib/honeybee/load/setpoint_humidistat.rb
|
121
205
|
- lib/honeybee/load/setpoint_thermostat.rb
|
122
206
|
- lib/honeybee/load/ventilation.rb
|
@@ -172,6 +256,7 @@ files:
|
|
172
256
|
- lib/to_openstudio/load/infiltration.rb
|
173
257
|
- lib/to_openstudio/load/lighting.rb
|
174
258
|
- lib/to_openstudio/load/people.rb
|
259
|
+
- lib/to_openstudio/load/service_hot_water.rb
|
175
260
|
- lib/to_openstudio/load/setpoint_humidistat.rb
|
176
261
|
- lib/to_openstudio/load/setpoint_thermostat.rb
|
177
262
|
- lib/to_openstudio/load/ventilation.rb
|
@@ -204,16 +289,17 @@ require_paths:
|
|
204
289
|
- lib
|
205
290
|
required_ruby_version: !ruby/object:Gem::Requirement
|
206
291
|
requirements:
|
207
|
-
- - "
|
292
|
+
- - "~>"
|
208
293
|
- !ruby/object:Gem::Version
|
209
|
-
version:
|
294
|
+
version: 2.5.0
|
210
295
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
296
|
requirements:
|
212
297
|
- - ">="
|
213
298
|
- !ruby/object:Gem::Version
|
214
299
|
version: '0'
|
215
300
|
requirements: []
|
216
|
-
|
301
|
+
rubyforge_project:
|
302
|
+
rubygems_version: 2.7.6
|
217
303
|
signing_key:
|
218
304
|
specification_version: 4
|
219
305
|
summary: Gem for translating between Honeybee JSON and OpenStudio Model.
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
@@ -1,25 +0,0 @@
|
|
1
|
-
name: Pull Request CI
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
branches:
|
6
|
-
- master
|
7
|
-
- develop
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
test_3x:
|
11
|
-
runs-on: ubuntu-18.04
|
12
|
-
steps:
|
13
|
-
- name: Check out repository
|
14
|
-
uses: actions/checkout@v2
|
15
|
-
- name: Run Tests
|
16
|
-
run: |
|
17
|
-
echo $(pwd)
|
18
|
-
echo $(ls)
|
19
|
-
docker pull nrel/openstudio:3.1.0
|
20
|
-
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.1.0
|
21
|
-
docker exec -t test pwd
|
22
|
-
docker exec -t test ls
|
23
|
-
docker exec -t test bundle update
|
24
|
-
docker exec -t test bundle exec rake
|
25
|
-
docker kill test
|
data/.travis.yml
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
dist: bionic
|
2
|
-
language: ruby
|
3
|
-
|
4
|
-
rvm:
|
5
|
-
- 2.5
|
6
|
-
|
7
|
-
before_install:
|
8
|
-
# install openstudio
|
9
|
-
- wget https://github.com/NREL/OpenStudio/releases/download/v3.0.0/OpenStudio-3.0.0+1c9617fa4e-Linux.deb
|
10
|
-
- sudo dpkg -i ./OpenStudio-3.0.0+1c9617fa4e-Linux.deb
|
11
|
-
# install the openstudio extension gem
|
12
|
-
- export RUBYLIB=/usr/local/openstudio-3.0.0/Ruby
|
13
|
-
- gem install openstudio-extension -v 0.2.3
|
14
|
-
|
15
|
-
install:
|
16
|
-
- bundle install
|
17
|
-
|
18
|
-
jobs:
|
19
|
-
include:
|
20
|
-
- stage: test
|
21
|
-
script:
|
22
|
-
- rake
|
23
|
-
- stage: deploy
|
24
|
-
if: branch = master AND (NOT type IN (pull_request))
|
25
|
-
before_install:
|
26
|
-
- nvm install lts/* --latest-npm
|
27
|
-
install:
|
28
|
-
- npm install @semantic-release/exec
|
29
|
-
script:
|
30
|
-
- git config --global user.email "releases@ladybug.tools"
|
31
|
-
- git config --global user.name "ladybugbot"
|
32
|
-
- npx semantic-release
|
33
|
-
- stage: deploy
|
34
|
-
if: tag IS present
|
35
|
-
script:
|
36
|
-
- export CLEAN_TAG=$(echo $TRAVIS_TAG | sed 's/v//g')
|
37
|
-
- sed -i 's/"0.0.0"/'"'$CLEAN_TAG'"'/g' honeybee-openstudio.gemspec
|
38
|
-
deploy:
|
39
|
-
on:
|
40
|
-
tags: true
|
41
|
-
provider: rubygems
|
42
|
-
skip_cleanup: true
|
43
|
-
api_key: $API_KEY
|
44
|
-
gem: honeybee-openstudio
|