honeybee-openstudio 2.7.3 → 2.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3b39e5f64802e410336f31c867d4eaa54ad67d35ca086b3cf21a6c497b3086f
4
- data.tar.gz: 3a0ef58c1b3a45c802e7c6dce6479fadb5c5642f4ec56bcf531df186893eba89
3
+ metadata.gz: 3079741f838bba3b05a4b168b70739072a77f7da9b7fe9fe8b65132fc9b38733
4
+ data.tar.gz: 9f2f6997db58ca1163e6bbae9f10600e0b59fb4e65a46972910e61fcba31d12b
5
5
  SHA512:
6
- metadata.gz: 4ca00a4b8a08f44f75176baacc9b85e7c51c4cdcf3602d567c9d6da0e6ee4164c528022bf543b3330d24f114590eb2d0e777337d630f1dbc969fbeecbbdf870c
7
- data.tar.gz: d1e923d4004ff2dc478978578537480c511799d7e9321075688705c067261d14f6ef81a05ad4b976ff8ff21f9e9c46d89543503c8f9af7101e0c21472b54db2c
6
+ metadata.gz: 238548fcbcae965a11c42bc82da68c68b4c9212cef14bee39262cfd74617e59bc029315b15edc40b1a229c3aa185c8a943adb992f8630ceadddee46abe0d3b68
7
+ data.tar.gz: f6fcac87e29808a302629fcf2f31afea75e4f68cc83aabaf2fd19bd09d67ae0d80a5b091f18a4023c32e8b07ae88ced54987482d0eba370af9112760500ac4eb
@@ -5,8 +5,8 @@ on:
5
5
  types: [published]
6
6
 
7
7
  jobs:
8
- dispatchSchema:
9
- name: "Dispatch Schema to Clients"
8
+ dispatch_schema:
9
+ name: Dispatch Schema to Clients
10
10
  runs-on: ubuntu-latest
11
11
 
12
12
  strategy:
@@ -15,7 +15,7 @@ jobs:
15
15
  - ladybug-tools/lbt-grasshopper
16
16
 
17
17
  steps:
18
- - name: "send repo dispatch to lbt-grasshopper"
18
+ - name: Send repo dispatch to lbt-grasshopper
19
19
  env:
20
20
  RELEASE_TAG: ${{ github.event.release.tag_name }}
21
21
  DISPATCH_URL: https://api.github.com/repos/${{ matrix.client_repo }}/dispatches
@@ -0,0 +1,56 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+
7
+ test:
8
+ name: Unit tests
9
+ runs-on: ubuntu-18.04
10
+
11
+ steps:
12
+ - name: Check out repository
13
+ uses: actions/checkout@v2
14
+ - name: Run Tests
15
+ run: |
16
+ echo $(pwd)
17
+ echo $(ls)
18
+ docker pull nrel/openstudio:3.1.0
19
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.1.0
20
+ docker exec -t test pwd
21
+ docker exec -t test ls
22
+ docker exec -t test bundle update
23
+ docker exec -t test bundle exec rake
24
+ docker kill test
25
+
26
+ deploy:
27
+ name: Deploy to GitHub and Rubygems.org
28
+ runs-on: ubuntu-latest
29
+ needs: test
30
+ if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools'
31
+ steps:
32
+ - uses: actions/checkout@v2
33
+ - name: set up node # we need node for for semantic release
34
+ uses: actions/setup-node@v2.1.2
35
+ with:
36
+ node-version: 14.2.0
37
+ - name: install semantic-release
38
+ run:
39
+ npm install @semantic-release/exec
40
+ - name: run semantic release
41
+ uses: cycjimmy/semantic-release-action@v2
42
+ id: semantic # Need an `id` for output variables
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45
+ - name: Update gemspec
46
+ if: steps.semantic.outputs.new_release_published == 'true'
47
+ env:
48
+ RELEASE_TAG: ${{ steps.semantic.outputs.new_release_version }}
49
+ run: |
50
+ export CLEAN_TAG=$(echo $RELEASE_TAG | sed 's/v//g')
51
+ sed -i 's/"0.0.0"/'"'$CLEAN_TAG'"'/g' honeybee-openstudio.gemspec
52
+ - name: Release Gem
53
+ if: steps.semantic.outputs.new_release_published == 'true'
54
+ uses: dawidd6/action-publish-gem@v1
55
+ with:
56
+ api_key: ${{secrets.RUBYGEMS_API_KEY}}
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/ladybug-tools/honeybee-openstudio-gem.svg?branch=master)](https://travis-ci.org/ladybug-tools/honeybee-openstudio-gem)
1
+ [![Build Status](https://github.com/ladybug-tools/honeybee-openstudio-gem/workflows/CI/badge.svg)](https://github.com/ladybug-tools/honeybee-openstudio-gem/actions)
2
2
  [![Coverage Status](https://coveralls.io/repos/github/ladybug-tools/honeybee-openstudio-gem/badge.svg?branch=master)](https://coveralls.io/github/ladybug-tools/honeybee-openstudio-gem)
3
3
 
4
4
  ![Ruby 2.5](https://img.shields.io/badge/ruby-2.5-blue.svg)
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'honeybee-openstudio'
7
- spec.version = '2.7.3'
7
+ spec.version = '2.9.1'
8
8
  spec.authors = ['Tanushree Charan', 'Dan Macumber', 'Chris Mackey', 'Mostapha Sadeghipour Roudsari']
9
9
  spec.email = ['tanushree.charan@nrel.gov', 'chris@ladybug.tools']
10
10
 
@@ -29,7 +29,7 @@
29
29
  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
30
  # *******************************************************************************
31
31
 
32
- require 'urbanopt/scenario'
32
+ require 'urbanopt/reporting'
33
33
  require 'openstudio/common_measures'
34
34
  require 'openstudio/model_articulation'
35
35
 
@@ -72,6 +72,11 @@ module URBANopt
72
72
  feature_id = feature.id
73
73
  feature_type = feature.type
74
74
  feature_name = feature.name
75
+
76
+ # take the centroid of the vertices as the location of the building
77
+ feature_vertices_coordinates = feature.feature_json[:geometry][:coordinates][0]
78
+ feature_location = feature.find_feature_center(feature_vertices_coordinates).to_s
79
+
75
80
  if feature_names.size == 1
76
81
  feature_name = feature_names[0]
77
82
  end
@@ -103,6 +108,8 @@ module URBANopt
103
108
  osw, 'default_feature_reports', 'feature_name', feature_name)
104
109
  OpenStudio::Extension.set_measure_argument(
105
110
  osw, 'default_feature_reports', 'feature_type', feature_type)
111
+ OpenStudio::Extension.set_measure_argument(
112
+ osw, 'default_feature_reports', 'feature_location', feature_location)
106
113
 
107
114
  end
108
115
  return osw
@@ -0,0 +1,169 @@
1
+ # *******************************************************************************
2
+ # Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
3
+ # Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are met:
7
+ #
8
+ # (1) Redistributions of source code must retain the above copyright notice,
9
+ # this list of conditions and the following disclaimer.
10
+ #
11
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
12
+ # this list of conditions and the following disclaimer in the documentation
13
+ # and/or other materials provided with the distribution.
14
+ #
15
+ # (3) Neither the name of the copyright holder nor the names of any contributors
16
+ # may be used to endorse or promote products derived from this software without
17
+ # specific prior written permission from the respective party.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
20
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
23
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
24
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+ # *******************************************************************************
31
+
32
+ require 'openstudio/workflow/adapters/output_adapter'
33
+
34
+ # Local file based workflow
35
+ class HoneybeeAdapter < OpenStudio::Workflow::OutputAdapters
36
+ def initialize(options = {})
37
+ puts "viiiiiiiiiiiiizzzzzzzzz!"
38
+ STDOUT.flush
39
+ super
40
+ end
41
+
42
+ # Write to the filesystem that the process has started
43
+ #
44
+ def communicate_started
45
+ File.open("#{@options[:output_directory]}/started.job", 'w') do |f|
46
+ f << "Started Workflow #{::Time.now}"
47
+ # make sure data is written to the disk one way or the other
48
+ begin
49
+ f.fsync
50
+ rescue
51
+ f.flush
52
+ end
53
+ end
54
+ end
55
+
56
+ # Write to the filesystem that the process has completed
57
+ #
58
+ def communicate_complete
59
+ File.open("#{@options[:output_directory]}/finished.job", 'w') do |f|
60
+ f << "Finished Workflow #{::Time.now}"
61
+ # make sure data is written to the disk one way or the other
62
+ begin
63
+ f.fsync
64
+ rescue
65
+ f.flush
66
+ end
67
+ end
68
+ end
69
+
70
+ # Write to the filesystem that the process has failed
71
+ #
72
+ def communicate_failure
73
+ File.open("#{@options[:output_directory]}/failed.job", 'w') do |f|
74
+ f << "Failed Workflow #{::Time.now}"
75
+ # make sure data is written to the disk one way or the other
76
+ begin
77
+ f.fsync
78
+ rescue
79
+ f.flush
80
+ end
81
+ end
82
+ end
83
+
84
+ # Do nothing on a state transition
85
+ #
86
+ def communicate_transition(_ = nil, _ = nil, _ = nil)
87
+ end
88
+
89
+ # Do nothing on EnergyPlus stdout
90
+ #
91
+ def communicate_energyplus_stdout(line, options = {})
92
+ puts "EnergyPlus: #{line}"
93
+ end
94
+
95
+ # Do nothing on Measure result
96
+ #
97
+ def communicate_measure_result(result, options = {})
98
+ step_result = result.stepResult
99
+ initial_condition = result.stepInitialCondition
100
+ final_condition = result.stepFinalCondition
101
+ errors = result.stepErrors
102
+ warnings = result.stepWarnings
103
+ infos = result.stepInfo
104
+
105
+ # Mirrors WorkflowStepResult::string
106
+ tab = 'Honeybee '
107
+ puts "#{tab}Result: #{step_result.get.valueName}" if !step_result.empty?
108
+ puts "#{tab}Initial Condition: #{initial_condition.get}" if !initial_condition.empty?
109
+ puts "#{tab}Final Condition: #{final_condition.get}" if !final_condition.empty?
110
+ errors.each { |error| puts "#{tab}Error: #{error}" }
111
+ warnings.each { |warning| puts "#{tab}Warn: #{warning}" }
112
+ infos.each { |info| puts "#{tab}Info: #{info}" }
113
+ end
114
+
115
+ # Write the measure attributes to the filesystem
116
+ #
117
+ def communicate_measure_attributes(measure_attributes, _ = nil)
118
+ attributes_file = "#{@options[:output_directory]}/measure_attributes.json"
119
+ FileUtils.rm_f(attributes_file) if File.exist?(attributes_file)
120
+ File.open(attributes_file, 'w') do |f|
121
+ f << JSON.pretty_generate(measure_attributes)
122
+ # make sure data is written to the disk one way or the other
123
+ begin
124
+ f.fsync
125
+ rescue
126
+ f.flush
127
+ end
128
+ end
129
+ end
130
+
131
+ # Write the objective function results to the filesystem
132
+ #
133
+ def communicate_objective_function(objectives, _ = nil)
134
+ obj_fun_file = "#{@options[:output_directory]}/objectives.json"
135
+ FileUtils.rm_f(obj_fun_file) if File.exist?(obj_fun_file)
136
+ File.open(obj_fun_file, 'w') do |f|
137
+ f << JSON.pretty_generate(objectives)
138
+ # make sure data is written to the disk one way or the other
139
+ begin
140
+ f.fsync
141
+ rescue
142
+ f.flush
143
+ end
144
+ end
145
+ end
146
+
147
+ # Write the results of the workflow to the filesystem
148
+ #
149
+ def communicate_results(directory, results)
150
+ zip_results(directory)
151
+
152
+ if results.is_a? Hash
153
+ # DLM: don't we want this in the results zip?
154
+ # DLM: deprecate in favor of out.osw
155
+ File.open("#{@options[:output_directory]}/data_point_out.json", 'w') do |f|
156
+ f << JSON.pretty_generate(results)
157
+ # make sure data is written to the disk one way or the other
158
+ begin
159
+ f.fsync
160
+ rescue
161
+ f.flush
162
+ end
163
+ end
164
+ else
165
+ #puts "Unknown datapoint result type. Please handle #{results.class}"
166
+ end
167
+ end
168
+ end
169
+
@@ -39,7 +39,8 @@
39
39
  "__SKIP__": true,
40
40
  "feature_id": null,
41
41
  "feature_name": null,
42
- "feature_type": null
42
+ "feature_type": null,
43
+ "feature_location": null
43
44
  }
44
45
  }
45
46
  ],
@@ -4,12 +4,12 @@ ruby '~> 2.5.0'
4
4
 
5
5
  allow_local = ENV['FAVOR_LOCAL_GEMS']
6
6
 
7
- if allow_local && File.exist?('../urbanopt-scenario-gem')
8
- gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
7
+ if allow_local && File.exist?('../openstudio-model-articulation-gem')
8
+ gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
9
9
  elsif allow_local
10
- gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
10
+ gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
11
11
  else
12
- gem 'urbanopt-scenario', '~> 0.3.0'
12
+ gem 'openstudio-model-articulation', '0.2.0'
13
13
  end
14
14
 
15
15
  if allow_local && File.exist?('../urbanopt-geojson-gem')
@@ -17,8 +17,16 @@ if allow_local && File.exist?('../urbanopt-geojson-gem')
17
17
  elsif allow_local
18
18
  gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
19
19
  else
20
- gem 'urbanopt-geojson', '~> 0.3.0'
20
+ gem 'urbanopt-geojson', '~> 0.4.0'
21
+ end
22
+
23
+ if allow_local && File.exist?('../urbanopt-reporting-gem')
24
+ gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
25
+ elsif allow_local
26
+ gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
27
+ else
28
+ gem 'urbanopt-reporting', '~> 0.2.1'
21
29
  end
22
30
 
23
31
  # include the honeybee-openstudio-gem
24
- gem 'honeybee-openstudio', '2.6.4'
32
+ gem 'honeybee-openstudio', '2.7.3'
@@ -46,12 +46,7 @@ module Honeybee
46
46
  os_construction = OpenStudio::Model::ConstructionAirBoundary.new(openstudio_model)
47
47
  os_construction.setName(@hash[:identifier])
48
48
  os_construction.setSolarAndDaylightingMethod('GroupedZones')
49
- # REMOVE: Remove the use of IRTSurface once the AFN works with GroupedZone air walls
50
- if !$use_simple_vent # we're using the AFN!
51
- os_construction.setRadiantExchangeMethod('IRTSurface')
52
- else
53
- os_construction.setRadiantExchangeMethod('GroupedZones')
54
- end
49
+ os_construction.setRadiantExchangeMethod('GroupedZones')
55
50
  os_construction.setAirExchangeMethod('None')
56
51
 
57
52
  os_construction
@@ -201,7 +201,7 @@ class OpenStudio::Model::Model
201
201
  zone_equipment_ventilation: false)
202
202
  standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, heated_zones)
203
203
 
204
- when 'DOAS with fan coil district chilled water with no heat '
204
+ when 'DOAS with fan coil district chilled water with no heat'
205
205
  standard.model_add_hvac_system(self, 'DOAS', ht = nil, znht = nil, cl = 'DistrictCooling', zones,
206
206
  air_loop_heating_type: nil)
207
207
  standard.model_add_hvac_system(self, 'Fan Coil', ht = nil, znht = nil, cl = 'DistrictCooling', zones,
@@ -33,13 +33,15 @@ require 'honeybee/hvac/template'
33
33
 
34
34
  require 'to_openstudio/model_object'
35
35
 
36
- require 'openstudio-standards'
37
- require_relative 'Model.hvac'
38
-
39
36
  module Honeybee
40
37
  class TemplateHVAC
41
38
 
42
39
  def to_openstudio(openstudio_model, room_ids)
40
+
41
+ # only load openstudio-standards when needed
42
+ require 'openstudio-standards'
43
+ require_relative 'Model.hvac'
44
+
43
45
  # get the defaults for the specific system type
44
46
  hvac_defaults = defaults(@hash[:type])
45
47
 
@@ -82,14 +84,6 @@ module Honeybee
82
84
  end
83
85
  end
84
86
 
85
- # TODO: consider adding the ability to decentralize the plant by changing loop names
86
- #os_hvac.each do |hvac_loop|
87
- # loop_name = hvac_loop.name
88
- # unless loop_name.empty?
89
- # hvac_loop.setName(@hash[:identifier] + ' - ' + loop_name.get)
90
- # end
91
- #end
92
-
93
87
  # assign the economizer type if there's an air loop and the economizer is specified
94
88
  if @hash[:economizer_type] && @hash[:economizer_type] != 'Inferred' && os_air_loop
95
89
  oasys = os_air_loop.airLoopHVACOutdoorAirSystem
@@ -126,9 +120,17 @@ module Honeybee
126
120
  erv.setLatentEffectivenessat75HeatingAirFlow(@hash[:latent_heat_recovery])
127
121
  end
128
122
 
123
+ # set all plants to non-coincident sizing to avoid simualtion control on design days
124
+ openstudio_model.getPlantLoops.each do |loop|
125
+ sizing = loop.sizingPlant
126
+ sizing.setSizingOption('NonCoincident')
127
+ end
128
+
129
129
  os_hvac
130
130
  end
131
131
 
132
+ private
133
+
132
134
  def get_existing_erv(os_air_loop)
133
135
  # get an existing heat ecovery unit from an air loop; will be nil if there is none
134
136
  os_air_loop.oaComponents.each do |supply_component|
@@ -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
- begin
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
- begin
102
- os_shadow_calc.setShadingCalculationMethod(
103
- shdw_defaults[:calculation_method][:default])
104
- rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
105
- os_shadow_calc.setCalculationMethod(
106
- shdw_defaults[:calculation_method][:default])
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
- begin
127
- os_shadow_calc.setShadingCalculationMethod(
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
- begin
136
- os_shadow_calc.setShadingCalculationUpdateFrequencyMethod(
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
- begin
143
- os_shadow_calc.setShadingCalculationUpdateFrequency(
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
- begin
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
- begin
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
- begin
246
- os_hol = OpenStudio::Model::RunPeriodControlSpecialDays.new(
247
- OpenStudio::MonthOfYear.new(hol[0]), hol[1], @openstudio_model)
248
- os_hol.setDuration(1)
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
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.7.3
4
+ version: 2.9.1
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-11-25 00:00:00.000000000 Z
14
+ date: 2020-12-18 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
- - ".coveralls.yml"
68
- - ".github/workflows/emit-release-event.yaml"
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
@@ -204,16 +287,17 @@ require_paths:
204
287
  - lib
205
288
  required_ruby_version: !ruby/object:Gem::Requirement
206
289
  requirements:
207
- - - ">="
290
+ - - "~>"
208
291
  - !ruby/object:Gem::Version
209
- version: '0'
292
+ version: 2.5.0
210
293
  required_rubygems_version: !ruby/object:Gem::Requirement
211
294
  requirements:
212
295
  - - ">="
213
296
  - !ruby/object:Gem::Version
214
297
  version: '0'
215
298
  requirements: []
216
- rubygems_version: 3.0.6
299
+ rubyforge_project:
300
+ rubygems_version: 2.7.6
217
301
  signing_key:
218
302
  specification_version: 4
219
303
  summary: Gem for translating between Honeybee JSON and OpenStudio Model.
@@ -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
@@ -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