honeybee-grasshopper-radiance 1.31.0__py2.py3-none-any.whl → 1.32.0__py2.py3-none-any.whl

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.
Files changed (19) hide show
  1. honeybee_grasshopper_radiance/src/HB Annual Average Values.py +29 -2
  2. honeybee_grasshopper_radiance/src/HB Annual Cumulative Values.py +34 -5
  3. honeybee_grasshopper_radiance/src/HB Annual Daylight Metrics.py +11 -5
  4. honeybee_grasshopper_radiance/src/HB Annual Daylight.py +16 -9
  5. honeybee_grasshopper_radiance/src/HB Annual Peak Values.py +33 -4
  6. honeybee_grasshopper_radiance/src/HB Annual Results to Data.py +31 -3
  7. honeybee_grasshopper_radiance/src/HB Daylight Control Schedule.py +30 -3
  8. honeybee_grasshopper_radiance/user_objects/HB Annual Average Values.ghuser +0 -0
  9. honeybee_grasshopper_radiance/user_objects/HB Annual Cumulative Values.ghuser +0 -0
  10. honeybee_grasshopper_radiance/user_objects/HB Annual Daylight Metrics.ghuser +0 -0
  11. honeybee_grasshopper_radiance/user_objects/HB Annual Daylight.ghuser +0 -0
  12. honeybee_grasshopper_radiance/user_objects/HB Annual Peak Values.ghuser +0 -0
  13. honeybee_grasshopper_radiance/user_objects/HB Annual Results to Data.ghuser +0 -0
  14. honeybee_grasshopper_radiance/user_objects/HB Daylight Control Schedule.ghuser +0 -0
  15. {honeybee_grasshopper_radiance-1.31.0.dist-info → honeybee_grasshopper_radiance-1.32.0.dist-info}/METADATA +1 -1
  16. {honeybee_grasshopper_radiance-1.31.0.dist-info → honeybee_grasshopper_radiance-1.32.0.dist-info}/RECORD +19 -19
  17. {honeybee_grasshopper_radiance-1.31.0.dist-info → honeybee_grasshopper_radiance-1.32.0.dist-info}/LICENSE +0 -0
  18. {honeybee_grasshopper_radiance-1.31.0.dist-info → honeybee_grasshopper_radiance-1.32.0.dist-info}/WHEEL +0 -0
  19. {honeybee_grasshopper_radiance-1.31.0.dist-info → honeybee_grasshopper_radiance-1.32.0.dist-info}/top_level.txt +0 -0
@@ -19,6 +19,11 @@ hour/timestep of the simulation.
19
19
  or the "HB Annual Irradiance" component (containing the .ill files and
20
20
  the sun-up-hours.txt). This can also be just the path to the folder
21
21
  containing these result files.
22
+ dyn_sch_: Optional dynamic Aperture Group Schedules from the "HB Aperture Group
23
+ Schedule" component, which will be used to customize the behavior
24
+ of any dyanmic aperture geometry in the output metrics. If unsupplied,
25
+ all dynamic aperture groups will be in their default state in for
26
+ the output metrics.
22
27
  _hoys_: An optional numbers or list of numbers to select the hours of the year (HOYs)
23
28
  for which results will be computed. These HOYs can be obtained from the
24
29
  "LB Calculate HOY" or the "LB Analysis Period" components. If None, all
@@ -41,7 +46,7 @@ hour/timestep of the simulation.
41
46
 
42
47
  ghenv.Component.Name = 'HB Annual Average Values'
43
48
  ghenv.Component.NickName = 'AvgValues'
44
- ghenv.Component.Message = '1.6.1'
49
+ ghenv.Component.Message = '1.6.2'
45
50
  ghenv.Component.Category = 'HB-Radiance'
46
51
  ghenv.Component.SubCategory = '4 :: Results'
47
52
  ghenv.Component.AdditionalHelpFromDocStrings = '2'
@@ -64,13 +69,19 @@ try:
64
69
  except ImportError as e:
65
70
  raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
66
71
 
72
+ try:
73
+ from honeybee_radiance_postprocess.dynamic import DynamicSchedule
74
+ except ImportError as e:
75
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
76
+
67
77
  try:
68
78
  from pollination_handlers.outputs.helper import read_sensor_grid_result
69
79
  except ImportError as e:
70
80
  raise ImportError('\nFailed to import pollination_handlers:\n\t{}'.format(e))
71
81
 
72
82
  try:
73
- from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree
83
+ from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree, \
84
+ give_warning
74
85
  except ImportError as e:
75
86
  raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
76
87
 
@@ -133,6 +144,17 @@ if all_required_inputs(ghenv.Component):
133
144
  cmds.extend(['--hoys-file', hoys_file])
134
145
  if grid_filter_ != '*':
135
146
  cmds.extend(['--grids-filter', grid_filter_])
147
+ if len(dyn_sch_) != 0:
148
+ if os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
149
+ dyn_sch = dyn_sch_[0] if isinstance(dyn_sch_[0], DynamicSchedule) else \
150
+ DynamicSchedule.from_group_schedules(dyn_sch_)
151
+ dyn_sch_file = dyn_sch.to_json(folder=res_folder)
152
+ cmds.extend(['--states', dyn_sch_file])
153
+ else:
154
+ msg = 'No dynamic aperture groups were found in the Model.\n' \
155
+ 'The input dynamic schedules will be ignored.'
156
+ print(msg)
157
+ give_warning(ghenv.Component, msg)
136
158
  use_shell = True if os.name == 'nt' else False
137
159
  process = subprocess.Popen(
138
160
  cmds, cwd=res_folder, shell=use_shell,
@@ -147,6 +169,11 @@ if all_required_inputs(ghenv.Component):
147
169
  values = list_to_data_tree(values)
148
170
 
149
171
  else:
172
+ if len(dyn_sch_) != 0:
173
+ msg = 'Dynamic Schedules are currently only supported for Annual Daylight ' \
174
+ 'simulations.\nThe input schedules will be ignored.'
175
+ print(msg)
176
+ give_warning(ghenv.Component, msg)
150
177
  if median_:
151
178
  raise ValueError('The median values can only be calculated for a '
152
179
  'results folder from the "HB Annual Daylight" '
@@ -19,6 +19,11 @@ hour/timestep of the simulation.
19
19
  or the "HB Annual Irradiance" component (containing the .ill files and
20
20
  the sun-up-hours.txt). This can also be just the path to the folder
21
21
  containing these result files.
22
+ dyn_sch_: Optional dynamic Aperture Group Schedules from the "HB Aperture Group
23
+ Schedule" component, which will be used to customize the behavior
24
+ of any dyanmic aperture geometry in the output metrics. If unsupplied,
25
+ all dynamic aperture groups will be in their default state in for
26
+ the output metrics.
22
27
  _hoys_: An optional numbers or list of numbers to select the hours of the year (HOYs)
23
28
  for which results will be computed. These HOYs can be obtained from the
24
29
  "LB Calculate HOY" or the "LB Analysis Period" components. If None, all
@@ -39,7 +44,7 @@ hour/timestep of the simulation.
39
44
 
40
45
  ghenv.Component.Name = 'HB Annual Cumulative Values'
41
46
  ghenv.Component.NickName = 'CumulValues'
42
- ghenv.Component.Message = '1.6.0'
47
+ ghenv.Component.Message = '1.6.1'
43
48
  ghenv.Component.Category = 'HB-Radiance'
44
49
  ghenv.Component.SubCategory = '4 :: Results'
45
50
  ghenv.Component.AdditionalHelpFromDocStrings = '2'
@@ -62,13 +67,19 @@ try:
62
67
  except ImportError as e:
63
68
  raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
64
69
 
70
+ try:
71
+ from honeybee_radiance_postprocess.dynamic import DynamicSchedule
72
+ except ImportError as e:
73
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
74
+
65
75
  try:
66
76
  from pollination_handlers.outputs.helper import read_sensor_grid_result
67
77
  except ImportError as e:
68
78
  raise ImportError('\nFailed to import pollination_handlers:\n\t{}'.format(e))
69
79
 
70
80
  try:
71
- from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree
81
+ from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree, \
82
+ give_warning
72
83
  except ImportError as e:
73
84
  raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
74
85
 
@@ -112,7 +123,8 @@ if all_required_inputs(ghenv.Component):
112
123
  else _results[0]
113
124
 
114
125
  # check to see if results use the newer numpy arrays
115
- if os.path.isdir(os.path.join(res_folder, '__static_apertures__')):
126
+ if os.path.isdir(os.path.join(res_folder, '__static_apertures__')) or \
127
+ os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
116
128
  cmds = [folders.python_exe_path, '-m', 'honeybee_radiance_postprocess',
117
129
  'post-process', 'cumulative-values', res_folder, '-sf', 'metrics']
118
130
  if len(_hoys_) != 0:
@@ -122,6 +134,17 @@ if all_required_inputs(ghenv.Component):
122
134
  cmds.extend(['--hoys-file', hoys_file])
123
135
  if grid_filter_ != '*':
124
136
  cmds.extend(['--grids-filter', grid_filter_])
137
+ if len(dyn_sch_) != 0:
138
+ if os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
139
+ dyn_sch = dyn_sch_[0] if isinstance(dyn_sch_[0], DynamicSchedule) else \
140
+ DynamicSchedule.from_group_schedules(dyn_sch_)
141
+ dyn_sch_file = dyn_sch.to_json(folder=res_folder)
142
+ cmds.extend(['--states', dyn_sch_file])
143
+ else:
144
+ msg = 'No dynamic aperture groups were found in the Model.\n' \
145
+ 'The input dynamic schedules will be ignored.'
146
+ print(msg)
147
+ give_warning(ghenv.Component, msg)
125
148
  use_shell = True if os.name == 'nt' else False
126
149
  process = subprocess.Popen(
127
150
  cmds, cwd=res_folder, shell=use_shell,
@@ -136,17 +159,23 @@ if all_required_inputs(ghenv.Component):
136
159
  values = list_to_data_tree(values)
137
160
 
138
161
  else:
162
+ if len(dyn_sch_) != 0:
163
+ msg = 'Dynamic Schedules are currently only supported for Annual Daylight ' \
164
+ 'simulations.\nThe input schedules will be ignored.'
165
+ print(msg)
166
+ give_warning(ghenv.Component, msg)
167
+
139
168
  # extract the timestep if it exists
140
169
  timestep = 1
141
170
  tstep_file = os.path.join(res_folder, 'timestep.txt')
142
171
  if os.path.isfile(tstep_file):
143
172
  with open(tstep_file) as tf:
144
173
  timestep = int(tf.readline())
145
-
174
+
146
175
  # parse the sun-up-hours
147
176
  grids, sun_up_hours = _process_input_folder(res_folder, grid_filter_)
148
177
  su_pattern = parse_sun_up_hours(sun_up_hours, _hoys_, timestep)
149
-
178
+
150
179
  # compute the average values
151
180
  values = []
152
181
  for grid_info in grids:
@@ -65,7 +65,7 @@ Calculate Annual Daylight Metrics from a result (.ill) files.
65
65
 
66
66
  ghenv.Component.Name = "HB Annual Daylight Metrics"
67
67
  ghenv.Component.NickName = 'DaylightMetrics'
68
- ghenv.Component.Message = '1.6.1'
68
+ ghenv.Component.Message = '1.6.2'
69
69
  ghenv.Component.Category = 'HB-Radiance'
70
70
  ghenv.Component.SubCategory = '4 :: Results'
71
71
  ghenv.Component.AdditionalHelpFromDocStrings = '1'
@@ -163,10 +163,16 @@ if all_required_inputs(ghenv.Component):
163
163
  if grid_filter_ != '*':
164
164
  cmds.extend(['--grids-filter', grid_filter_])
165
165
  if len(dyn_sch_) != 0:
166
- dyn_sch = dyn_sch_[0] if isinstance(dyn_sch_[0], DynamicSchedule) else \
167
- DynamicSchedule.from_group_schedules(dyn_sch_)
168
- dyn_sch_file = dyn_sch.to_json(folder=res_folder)
169
- cmds.extend(['--states', dyn_sch_file])
166
+ if os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
167
+ dyn_sch = dyn_sch_[0] if isinstance(dyn_sch_[0], DynamicSchedule) else \
168
+ DynamicSchedule.from_group_schedules(dyn_sch_)
169
+ dyn_sch_file = dyn_sch.to_json(folder=res_folder)
170
+ cmds.extend(['--states', dyn_sch_file])
171
+ else:
172
+ msg = 'No dynamic aperture groups were found in the Model.\n' \
173
+ 'The input dynamic schedules will be ignored.'
174
+ print(msg)
175
+ give_warning(ghenv.Component, msg)
170
176
  if schedule is not None:
171
177
  sch_str = '\n'.join(str(h) for h in schedule)
172
178
  sch_file = os.path.join(res_folder, 'schedule.txt')
@@ -11,13 +11,16 @@
11
11
  Run an annual daylight study for a Honeybee model to compute hourly illuminance
12
12
  for each sensor in a model's sensor grids.
13
13
  _
14
- By default, this recipe uses a standard 2-phase method for simulation, which
15
- determines the relationship between each sensor and sky patch and then multiplies
16
- the value of each sky patch at each hour by the relationship coefficient.
14
+ By default, this recipe uses an enhanced 2-phase method, which accurately models
15
+ direct sun by tracing rays from each sensor to the solar position at each hour
16
+ of the calculation. This makes the result suitable for computing Annual Sun
17
+ Exposure (ASE) and for modeling the effects of dynamic shades and apertures.
17
18
  _
18
- When the enhanced_ option is selected, this recipe uses an enhanced 2-phase method,
19
- which accurately models direct sun by tracing rays from each sensor to the solar
20
- position at each hour of the calculation.
19
+ When the enhanced_ option is set to False, a standard 2-phase method for simulation,
20
+ which is much faster because it simply determines the relationship between each
21
+ sensor and sky patch and then multiplies the value of each sky patch at each
22
+ hour by the relationship coefficient. However, this means that the direct sun
23
+ is spread out across a few sky patches, making it unsuitable for ASE.
21
24
  _
22
25
  The resulting illuminance is used to compute the following metrics:
23
26
  _
@@ -60,7 +63,10 @@ _
60
63
  tracing. (Default: -ab 2 -ad 5000 -lw 2e-05).
61
64
  enhanced_: Boolean to note whether an enhanced version of the 2-phase ray tracing
62
65
  simulation should be used, which will more accurately account for
63
- direct sun at each time step. (Default:False).
66
+ direct sun at each time step. If False, only a 2-phase daylight
67
+ coefficient calculation with sky patches will be used, which is
68
+ much faster but spreads the direct sun out across a few sky
69
+ patches, making it unsuitable for ASE. (Default: True).
64
70
  run_settings_: Settings from the "HB Recipe Settings" component that specify
65
71
  how the recipe should be run. This can also be a text string of
66
72
  recipe settings.
@@ -103,7 +109,7 @@ _
103
109
 
104
110
  ghenv.Component.Name = 'HB Annual Daylight'
105
111
  ghenv.Component.NickName = 'AnnualDaylight'
106
- ghenv.Component.Message = '1.6.1'
112
+ ghenv.Component.Message = '1.6.2'
107
113
  ghenv.Component.Category = 'HB-Radiance'
108
114
  ghenv.Component.SubCategory = '3 :: Recipes'
109
115
  ghenv.Component.AdditionalHelpFromDocStrings = '1'
@@ -121,7 +127,8 @@ except ImportError as e:
121
127
 
122
128
  if all_required_inputs(ghenv.Component) and _run:
123
129
  # create the recipe and set the input arguments
124
- recipe = Recipe('annual-daylight-enhanced') if enhanced_ else Recipe('annual-daylight')
130
+ recipe = Recipe('annual-daylight') if enhanced_ is False else \
131
+ Recipe('annual-daylight-enhanced')
125
132
  recipe.input_value_by_name('model', _model)
126
133
  recipe.input_value_by_name('wea', _wea)
127
134
  recipe.input_value_by_name('north', north_)
@@ -19,6 +19,11 @@ hour/timestep of the simulation.
19
19
  or the "HB Annual Irradiance" component (containing the .ill files and
20
20
  the sun-up-hours.txt). This can also be just the path to the folder
21
21
  containing these result files.
22
+ dyn_sch_: Optional dynamic Aperture Group Schedules from the "HB Aperture Group
23
+ Schedule" component, which will be used to customize the behavior
24
+ of any dyanmic aperture geometry in the output metrics. If unsupplied,
25
+ all dynamic aperture groups will be in their default state in for
26
+ the output metrics.
22
27
  _hoys_: An optional numbers or list of numbers to select the hours of the year (HOYs)
23
28
  for which results will be computed. These HOYs can be obtained from the
24
29
  "LB Calculate HOY" or the "LB Analysis Period" components. If None, all
@@ -45,7 +50,7 @@ hour/timestep of the simulation.
45
50
 
46
51
  ghenv.Component.Name = 'HB Annual Peak Values'
47
52
  ghenv.Component.NickName = 'PeakValues'
48
- ghenv.Component.Message = '1.6.2'
53
+ ghenv.Component.Message = '1.6.3'
49
54
  ghenv.Component.Category = 'HB-Radiance'
50
55
  ghenv.Component.SubCategory = '4 :: Results'
51
56
  ghenv.Component.AdditionalHelpFromDocStrings = '2'
@@ -68,13 +73,19 @@ try:
68
73
  except ImportError as e:
69
74
  raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
70
75
 
76
+ try:
77
+ from honeybee_radiance_postprocess.dynamic import DynamicSchedule
78
+ except ImportError as e:
79
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
80
+
71
81
  try:
72
82
  from pollination_handlers.outputs.helper import read_sensor_grid_result
73
83
  except ImportError as e:
74
84
  raise ImportError('\nFailed to import pollination_handlers:\n\t{}'.format(e))
75
85
 
76
86
  try:
77
- from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree
87
+ from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree, \
88
+ give_warning
78
89
  except ImportError as e:
79
90
  raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
80
91
 
@@ -132,7 +143,8 @@ if all_required_inputs(ghenv.Component):
132
143
  else _results[0]
133
144
 
134
145
  # check to see if results use the newer numpy arrays
135
- if os.path.isdir(os.path.join(res_folder, '__static_apertures__')):
146
+ if os.path.isdir(os.path.join(res_folder, '__static_apertures__')) or \
147
+ os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
136
148
  cmds = [folders.python_exe_path, '-m', 'honeybee_radiance_postprocess',
137
149
  'post-process', 'peak-values', res_folder, '-sf', 'metrics']
138
150
  if len(_hoys_) != 0:
@@ -144,6 +156,17 @@ if all_required_inputs(ghenv.Component):
144
156
  cmds.extend(['--grids-filter', grid_filter_])
145
157
  if coincident_:
146
158
  cmds.append('--coincident')
159
+ if len(dyn_sch_) != 0:
160
+ if os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
161
+ dyn_sch = dyn_sch_[0] if isinstance(dyn_sch_[0], DynamicSchedule) else \
162
+ DynamicSchedule.from_group_schedules(dyn_sch_)
163
+ dyn_sch_file = dyn_sch.to_json(folder=res_folder)
164
+ cmds.extend(['--states', dyn_sch_file])
165
+ else:
166
+ msg = 'No dynamic aperture groups were found in the Model.\n' \
167
+ 'The input dynamic schedules will be ignored.'
168
+ print(msg)
169
+ give_warning(ghenv.Component, msg)
147
170
  use_shell = True if os.name == 'nt' else False
148
171
  process = subprocess.Popen(
149
172
  cmds, cwd=res_folder, shell=use_shell,
@@ -164,13 +187,19 @@ if all_required_inputs(ghenv.Component):
164
187
  hoys = [None] * len(hoys)
165
188
 
166
189
  else:
190
+ if len(dyn_sch_) != 0:
191
+ msg = 'Dynamic Schedules are currently only supported for Annual Daylight ' \
192
+ 'simulations.\nThe input schedules will be ignored.'
193
+ print(msg)
194
+ give_warning(ghenv.Component, msg)
195
+
167
196
  # extract the timestep if it exists
168
197
  timestep = 1
169
198
  tstep_file = os.path.join(res_folder, 'timestep.txt')
170
199
  if os.path.isfile(tstep_file):
171
200
  with open(tstep_file) as tf:
172
201
  timestep = int(tf.readline())
173
-
202
+
174
203
  # parse the sun-up-hours
175
204
  grids, sun_up_hours = _process_input_folder(res_folder, grid_filter_)
176
205
  su_pattern = parse_sun_up_hours(sun_up_hours, _hoys_, timestep)
@@ -19,6 +19,11 @@ deconstructed for detailed analysis with native Grasshopper math components.
19
19
  component (containing the .ill files and the sun-up-hours.txt).
20
20
  This can also be just the path to the folder containing these
21
21
  result files.
22
+ dyn_sch_: Optional dynamic Aperture Group Schedules from the "HB Aperture Group
23
+ Schedule" component, which will be used to customize the behavior
24
+ of any dyanmic aperture geometry in the output metrics. If unsupplied,
25
+ all dynamic aperture groups will be in their default state in for
26
+ the output metrics.
22
27
  _sel_pts: A point or list of points, which will be used to filter the sensors
23
28
  for which data collections will be imported.
24
29
  _all_pts: The data tree of all sensor points that were used in the simulation.
@@ -40,7 +45,7 @@ deconstructed for detailed analysis with native Grasshopper math components.
40
45
 
41
46
  ghenv.Component.Name = 'HB Annual Results to Data'
42
47
  ghenv.Component.NickName = 'AnnualToData'
43
- ghenv.Component.Message = '1.6.0'
48
+ ghenv.Component.Message = '1.6.1'
44
49
  ghenv.Component.Category = 'HB-Radiance'
45
50
  ghenv.Component.SubCategory = '4 :: Results'
46
51
  ghenv.Component.AdditionalHelpFromDocStrings = '2'
@@ -71,11 +76,16 @@ try:
71
76
  except ImportError as e:
72
77
  raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
73
78
 
79
+ try:
80
+ from honeybee_radiance_postprocess.dynamic import DynamicSchedule
81
+ except ImportError as e:
82
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
83
+
74
84
  try:
75
85
  from ladybug_rhino.config import tolerance
76
86
  from ladybug_rhino.togeometry import to_point3d, to_vector3d
77
87
  from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree, \
78
- data_tree_to_list
88
+ data_tree_to_list, give_warning
79
89
  except ImportError as e:
80
90
  raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
81
91
 
@@ -159,7 +169,8 @@ if all_required_inputs(ghenv.Component):
159
169
  pt_filter = new_pt_filter
160
170
 
161
171
  # check to see if results use the newer numpy arrays
162
- if os.path.isdir(os.path.join(res_folder, '__static_apertures__')):
172
+ if os.path.isdir(os.path.join(res_folder, '__static_apertures__')) or \
173
+ os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
163
174
  cmds = [folders.python_exe_path, '-m', 'honeybee_radiance_postprocess',
164
175
  'post-process', 'annual-to-data', res_folder]
165
176
  if pt_filter[0] is not None:
@@ -167,6 +178,17 @@ if all_required_inputs(ghenv.Component):
167
178
  si_file = os.path.join(res_folder, 'sensor_indices.json')
168
179
  write_to_file(si_file, json.dumps(sen_dict))
169
180
  cmds.extend(['--sensor-index', si_file])
181
+ if len(dyn_sch_) != 0:
182
+ if os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
183
+ dyn_sch = dyn_sch_[0] if isinstance(dyn_sch_[0], DynamicSchedule) else \
184
+ DynamicSchedule.from_group_schedules(dyn_sch_)
185
+ dyn_sch_file = dyn_sch.to_json(folder=res_folder)
186
+ cmds.extend(['--states', dyn_sch_file])
187
+ else:
188
+ msg = 'No dynamic aperture groups were found in the Model.\n' \
189
+ 'The input dynamic schedules will be ignored.'
190
+ print(msg)
191
+ give_warning(ghenv.Component, msg)
170
192
  use_shell = True if os.name == 'nt' else False
171
193
  process = subprocess.Popen(
172
194
  cmds, cwd=res_folder, shell=use_shell,
@@ -181,6 +203,12 @@ if all_required_inputs(ghenv.Component):
181
203
  data = list_to_data_tree(data)
182
204
 
183
205
  else:
206
+ if len(dyn_sch_) != 0:
207
+ msg = 'Dynamic Schedules are currently only supported for Annual Daylight ' \
208
+ 'simulations.\nThe input schedules will be ignored.'
209
+ print(msg)
210
+ give_warning(ghenv.Component, msg)
211
+
184
212
  # extract the timestep if it exists
185
213
  timestep, has_t_step = 1, False
186
214
  tstep_file = os.path.join(res_folder, 'timestep.txt')
@@ -31,6 +31,11 @@ illuminance setpoint everywhere in the room.
31
31
  component (containing the .ill files and the sun-up-hours.txt).
32
32
  This can also be just the path to the folder containing these
33
33
  result files.
34
+ dyn_sch_: Optional dynamic Aperture Group Schedules from the "HB Aperture Group
35
+ Schedule" component, which will be used to customize the behavior
36
+ of any dyanmic aperture geometry in the output metrics. If unsupplied,
37
+ all dynamic aperture groups will be in their default state in for
38
+ the output metrics.
34
39
  _base_schedule_: A lighting schedule representing the usage of lights without
35
40
  any daylight controls. The values of this schedule will be multiplied
36
41
  by the hourly dimming fraction to yield the output lighting schedules.
@@ -67,7 +72,7 @@ illuminance setpoint everywhere in the room.
67
72
 
68
73
  ghenv.Component.Name = 'HB Daylight Control Schedule'
69
74
  ghenv.Component.NickName = 'DaylightSchedule'
70
- ghenv.Component.Message = '1.6.0'
75
+ ghenv.Component.Message = '1.6.1'
71
76
  ghenv.Component.Category = 'HB-Radiance'
72
77
  ghenv.Component.SubCategory = '4 :: Results'
73
78
  ghenv.Component.AdditionalHelpFromDocStrings = '1'
@@ -92,6 +97,11 @@ try:
92
97
  except ImportError as e:
93
98
  raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
94
99
 
100
+ try:
101
+ from honeybee_radiance_postprocess.dynamic import DynamicSchedule
102
+ except ImportError as e:
103
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
104
+
95
105
  try:
96
106
  from honeybee_energy.lib.schedules import schedule_by_identifier
97
107
  from honeybee_energy.lib.scheduletypelimits import schedule_type_limit_by_identifier
@@ -100,7 +110,7 @@ except ImportError as e:
100
110
  raise ImportError('\nFailed to import honeybee_energy:\n\t{}'.format(e))
101
111
 
102
112
  try:
103
- from ladybug_rhino.grasshopper import all_required_inputs
113
+ from ladybug_rhino.grasshopper import all_required_inputs, give_warning
104
114
  except ImportError as e:
105
115
  raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
106
116
 
@@ -143,7 +153,8 @@ if all_required_inputs(ghenv.Component):
143
153
  else _results[0]
144
154
 
145
155
  # check to see if results use the newer numpy arrays
146
- if os.path.isdir(os.path.join(res_folder, '__static_apertures__')):
156
+ if os.path.isdir(os.path.join(res_folder, '__static_apertures__')) or \
157
+ os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
147
158
  cmds = [
148
159
  folders.python_exe_path, '-m', 'honeybee_radiance_postprocess',
149
160
  'schedule', 'control-schedules', res_folder,
@@ -159,6 +170,17 @@ if all_required_inputs(ghenv.Component):
159
170
  cmds.extend(['--base-schedule-file', sch_file])
160
171
  if off_at_min_:
161
172
  cmds.append('--off-at-min')
173
+ if len(dyn_sch_) != 0:
174
+ if os.path.isfile(os.path.join(res_folder, 'grid_states.json')):
175
+ dyn_sch = dyn_sch_[0] if isinstance(dyn_sch_[0], DynamicSchedule) else \
176
+ DynamicSchedule.from_group_schedules(dyn_sch_)
177
+ dyn_sch_file = dyn_sch.to_json(folder=res_folder)
178
+ cmds.extend(['--states', dyn_sch_file])
179
+ else:
180
+ msg = 'No dynamic aperture groups were found in the Model.\n' \
181
+ 'The input dynamic schedules will be ignored.'
182
+ print(msg)
183
+ give_warning(ghenv.Component, msg)
162
184
  use_shell = True if os.name == 'nt' else False
163
185
  process = subprocess.Popen(
164
186
  cmds, cwd=res_folder, shell=use_shell,
@@ -172,6 +194,11 @@ if all_required_inputs(ghenv.Component):
172
194
  sch_vals, sch_ids = load_schedules_from_folder(cntrl_dir)
173
195
 
174
196
  else:
197
+ if len(dyn_sch_) != 0:
198
+ msg = 'Dynamic Schedules are currently only supported for Annual Daylight ' \
199
+ 'simulations.\nThe input schedules will be ignored.'
200
+ print(msg)
201
+ give_warning(ghenv.Component, msg)
175
202
  sch_vals, sch_ids = daylight_control_schedules(
176
203
  res_folder, schedule, _ill_setpoint_, _min_power_in_, _min_light_out_, off_at_min_)
177
204
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-grasshopper-radiance
3
- Version: 1.31.0
3
+ Version: 1.32.0
4
4
  Summary: Honeybee Radiance plugin for Grasshopper.
5
5
  Home-page: https://github.com/ladybug-tools/honeybee-grasshopper-radiance
6
6
  Author: Ladybug Tools
@@ -1,14 +1,14 @@
1
1
  honeybee_grasshopper_radiance/__init__.py,sha256=74_HUn2iNnsmqgDOBEsdshIz8qH76tyBFnJBrX-YtOI,351
2
2
  honeybee_grasshopper_radiance/src/HB Adjust HDR.py,sha256=3gdb3FhWW2KLciLmCV30G2JHeDQRDtD-4P-G4LfRvbQ,4288
3
3
  honeybee_grasshopper_radiance/src/HB Ambient Resolution.py,sha256=2za9uOA-m7EjNlHwCXTi2a18EpfeZ_b2EQ7k5EBrBvE,2476
4
- honeybee_grasshopper_radiance/src/HB Annual Average Values.py,sha256=c1xw315CdLuBq25hNMaEacfOH3OWCexzSM4hSNPNzCw,7561
5
- honeybee_grasshopper_radiance/src/HB Annual Cumulative Values.py,sha256=-eWgEYTQptjq75SYJHikh7DIzL1rAHYm474erznFtVo,6750
6
- honeybee_grasshopper_radiance/src/HB Annual Daylight Metrics.py,sha256=peeajxDKsUlbIZtEoORFfv5_U0ph_V9AfVhvxM-RGQw,9786
7
- honeybee_grasshopper_radiance/src/HB Annual Daylight.py,sha256=X1KW91HXmEZlEGKy3TGAiX-DOKm_-js4EzFge7-jcrk,8506
4
+ honeybee_grasshopper_radiance/src/HB Annual Average Values.py,sha256=IUwINNg2hNnxxTgpm91jzb_jdrZq7AyGyPBCFKNjT74,9013
5
+ honeybee_grasshopper_radiance/src/HB Annual Cumulative Values.py,sha256=tvUeoToOWcxtgpFXU6Mld185DZo8i9fdJcbNmE2bYlI,8274
6
+ honeybee_grasshopper_radiance/src/HB Annual Daylight Metrics.py,sha256=k9LhinuEf9o4GFh-wYYkxv5enReFwyhGes3DxFSUl4A,10122
7
+ honeybee_grasshopper_radiance/src/HB Annual Daylight.py,sha256=HmDTP2RqpeHZaPu-29PPZISkQ-45tT1sdsFRS1HUa2A,9021
8
8
  honeybee_grasshopper_radiance/src/HB Annual Glare Metrics.py,sha256=CzHnVq471iNvQhYQF3zeQ_pc9zL52aW8rSqXEP0BgvY,6328
9
9
  honeybee_grasshopper_radiance/src/HB Annual Irradiance.py,sha256=GsB4Bg9XqmteWD3hMZ8BYQjnYRmcriqymH-NbP9l7mE,6032
10
- honeybee_grasshopper_radiance/src/HB Annual Peak Values.py,sha256=_nq3FZgNQ8S6fnoAS1KJCv95M5xZlxCvxr2faXWP5fk,8382
11
- honeybee_grasshopper_radiance/src/HB Annual Results to Data.py,sha256=MIpuKUfbCbPvlUIujWRBv7bnn-Ss_WRThA8kkgh5kEM,9406
10
+ honeybee_grasshopper_radiance/src/HB Annual Peak Values.py,sha256=ynWxg2j1aujkVQz7rt0FuuGt9jwTtuUBdAyy2ZEppWc,9909
11
+ honeybee_grasshopper_radiance/src/HB Annual Results to Data.py,sha256=mb8rK9kC2aLcbqEFrRdr97AnBzezJRBWBtjqxcNPwAE,10928
12
12
  honeybee_grasshopper_radiance/src/HB Annual Sunlight Exposure.py,sha256=dsTiIG6JRRmB4PxSd4u_tUFhcpY8mHA5co0iw9uKUvE,6226
13
13
  honeybee_grasshopper_radiance/src/HB Aperture Group Schedule.py,sha256=lHnDPAKqp60tu5RG1-9f5X3dWEKNqdzIxBukhOcQFgg,3052
14
14
  honeybee_grasshopper_radiance/src/HB Apply Face Modifier.py,sha256=9MA29eHhd7Z-ju7uGmtm_9mScQlO_pP-eMk4u5I3cp4,4475
@@ -24,7 +24,7 @@ honeybee_grasshopper_radiance/src/HB Check Scene.py,sha256=iu6QcmCtqauy0tcUwUrPP
24
24
  honeybee_grasshopper_radiance/src/HB Climatebased Sky.py,sha256=jy_rvmFhH4kjxipwxltO_tDW1BzOwJAIxBgxqm-8AYA,2838
25
25
  honeybee_grasshopper_radiance/src/HB Cumulative Radiation.py,sha256=ObSNs6X2KIzf2DVMj0msdvcaNiqzjcyTbakiq5Be3Qc,4954
26
26
  honeybee_grasshopper_radiance/src/HB Custom Sky.py,sha256=uvBEhuNMIK3dJiU65gsUbCYJ9BBDcEJtZ2z28-DL7-g,2866
27
- honeybee_grasshopper_radiance/src/HB Daylight Control Schedule.py,sha256=HQ_xVP9vdHuYTob4asNy5oNi3v-2sE6NzrUdXE91xU4,8572
27
+ honeybee_grasshopper_radiance/src/HB Daylight Control Schedule.py,sha256=WCJmyFWgedBh3nQodjrWh17-M8WXYaPQe2SgUymaHMw,10092
28
28
  honeybee_grasshopper_radiance/src/HB Daylight Factor.py,sha256=kv7GTl-hsxr0f8O3jbtnTp8ok8mVTxlHQf8WQtqnzvs,3636
29
29
  honeybee_grasshopper_radiance/src/HB Deconstruct Modifier.py,sha256=UkE3cOSvdEXpZGEcm1wLHxL4BH-A4LISHNFB1ULCTH0,1527
30
30
  honeybee_grasshopper_radiance/src/HB Deconstruct ModifierSet Interior.py,sha256=f7KnAF-ffeaoQtkPeZp-TYIPW-d778fEcdzVlOxL6zY,2695
@@ -82,14 +82,14 @@ honeybee_grasshopper_radiance/src/HB Wea from Zhang-Huang.py,sha256=ohYyIl3Gpx5X
82
82
  honeybee_grasshopper_radiance/src/__init__.py,sha256=vvjkuMcZSQQvmG068RMNsB0qce6k6_plH0Yl0UL82gY,59
83
83
  honeybee_grasshopper_radiance/user_objects/HB Adjust HDR.ghuser,sha256=UOc4ybzHdgs7lGh0ZuUbuMu6wpiWdcSoWRFLW3Xmkjo,5387
84
84
  honeybee_grasshopper_radiance/user_objects/HB Ambient Resolution.ghuser,sha256=xYlvVjjYugmCKfJU8ntOP3N5nEnSrTzep5qFMyw-GkI,4839
85
- honeybee_grasshopper_radiance/user_objects/HB Annual Average Values.ghuser,sha256=5A1pENWxTt53aHxSfWd_a2vcidFzMb2glbqRyDSemYU,6075
86
- honeybee_grasshopper_radiance/user_objects/HB Annual Cumulative Values.ghuser,sha256=cIkXZR_UmgIiHDctBRDWHu34hD1nPqPT0dQha4kFApw,5862
87
- honeybee_grasshopper_radiance/user_objects/HB Annual Daylight Metrics.ghuser,sha256=Bcwqx5ef9XJxVtFfgeVLKXt80G7gipLpeyA_0911QIY,7436
88
- honeybee_grasshopper_radiance/user_objects/HB Annual Daylight.ghuser,sha256=94N9xXFr8vXhKVGML0Q0SNNTDzUVpKGN3pT4flm9d-o,7841
85
+ honeybee_grasshopper_radiance/user_objects/HB Annual Average Values.ghuser,sha256=en46MPlHsBRmZVPd6XWtbWWmDGdJxVSygndZpLGnMkU,6535
86
+ honeybee_grasshopper_radiance/user_objects/HB Annual Cumulative Values.ghuser,sha256=BF4gPLXQkPHqiPBndF1iF0p2l8x81wQkd4S_rsCfAvk,6372
87
+ honeybee_grasshopper_radiance/user_objects/HB Annual Daylight Metrics.ghuser,sha256=O8cPYeh_TE-AeR9j7g1VlSQiOlQ1v7P2tpsXiXUHGyM,7473
88
+ honeybee_grasshopper_radiance/user_objects/HB Annual Daylight.ghuser,sha256=iMiBlIYmtIRXPlO9j0Sj3ZkmFgVRuw3zI4PCReaamYM,8272
89
89
  honeybee_grasshopper_radiance/user_objects/HB Annual Glare Metrics.ghuser,sha256=lrG8DUXjGIHGx_EO_yplpvlURmCa-BAKVU_et1-If_I,6730
90
90
  honeybee_grasshopper_radiance/user_objects/HB Annual Irradiance.ghuser,sha256=aKIBQ34GRbVI01Ox2JWvof8lMKktx3ci23l4jF5zKJw,7371
91
- honeybee_grasshopper_radiance/user_objects/HB Annual Peak Values.ghuser,sha256=VpMLjV6Bj5Q79uLbO_IcqqtbfN-KJk82D9BHfcz7u10,6638
92
- honeybee_grasshopper_radiance/user_objects/HB Annual Results to Data.ghuser,sha256=C9TCbcMH_76sxLgWKhRbQs4hVLTJC6iZANX-xNtrFRE,6685
91
+ honeybee_grasshopper_radiance/user_objects/HB Annual Peak Values.ghuser,sha256=kbGjhm5gcUu-JVc2q7bWmXxgezF1Y8bZfWnqvN3xXMw,7133
92
+ honeybee_grasshopper_radiance/user_objects/HB Annual Results to Data.ghuser,sha256=LX6S938VSHNkw0cNcNLF38f4mRlOKzo9dz3nKstrt-E,7167
93
93
  honeybee_grasshopper_radiance/user_objects/HB Annual Sunlight Exposure.ghuser,sha256=BDwCxwUAuvV5EhhhG1zQ1sYlS6AzDdIIL-Sc_ZNtd4A,5952
94
94
  honeybee_grasshopper_radiance/user_objects/HB Aperture Group Schedule.ghuser,sha256=jV9N8lMhq6XAleA7PKC4_M8NWbsoCcPnKyenarveXB8,5188
95
95
  honeybee_grasshopper_radiance/user_objects/HB Apply Face Modifier.ghuser,sha256=wD0CkV8tcck9x8IyrltdCEiHFi9SMCBHuvvtwZRaYJk,4993
@@ -105,7 +105,7 @@ honeybee_grasshopper_radiance/user_objects/HB Check Scene.ghuser,sha256=9Ylsw8NI
105
105
  honeybee_grasshopper_radiance/user_objects/HB Climatebased Sky.ghuser,sha256=xePC-YYpwRmwNu0y9oV9bgNeIFGBHuHPxL30AXJzKto,4881
106
106
  honeybee_grasshopper_radiance/user_objects/HB Cumulative Radiation.ghuser,sha256=TGp34QU77SKUFlSg1jsc15Yy1zWXQ4hyHyPzjOytt4A,6257
107
107
  honeybee_grasshopper_radiance/user_objects/HB Custom Sky.ghuser,sha256=TdKkDYMbOwrr1HqmS7FhG20J8PE74rfDqIKOwxI7B94,5828
108
- honeybee_grasshopper_radiance/user_objects/HB Daylight Control Schedule.ghuser,sha256=EKE15pZMpcASQNZh8Pf53tzwDB0887dmmNFrz_i_m-I,6932
108
+ honeybee_grasshopper_radiance/user_objects/HB Daylight Control Schedule.ghuser,sha256=baoBOXSsJS6-lq-6yWaASjrCpbgImmbOz3gkhx8nS50,7398
109
109
  honeybee_grasshopper_radiance/user_objects/HB Daylight Factor.ghuser,sha256=wBNWHKBWpXGK4UCyW0D4vNyWOpN5jgQhQVxnme7xQZI,5501
110
110
  honeybee_grasshopper_radiance/user_objects/HB Deconstruct Modifier.ghuser,sha256=ZnKUZZzZUjMtWTZ_Okkaq5TpOVk97rChc5UkZKZ5HtY,3991
111
111
  honeybee_grasshopper_radiance/user_objects/HB Deconstruct ModifierSet Interior.ghuser,sha256=0wU1V7Auwp7uqojpPFuuDJ9PxHXu4P0Xa4Am8QeFVdM,4578
@@ -163,8 +163,8 @@ honeybee_grasshopper_radiance/user_objects/HB Wea From EPW.ghuser,sha256=4u5GC7_
163
163
  honeybee_grasshopper_radiance/user_objects/HB Wea From Tau Clear Sky.ghuser,sha256=CygIse9NyttX970ONz-wNxpUd_CXqPdBcCEFvym2yf8,5418
164
164
  honeybee_grasshopper_radiance/user_objects/HB Wea from Zhang-Huang.ghuser,sha256=tUGGqqJhF5teKNEisvtom24Sko-a1zD7bfM4j0JcDww,4680
165
165
  honeybee_grasshopper_radiance/user_objects/__init__.py,sha256=7BOscRVupILqwFUBWP6nAsMNgNN8lXQPsQ_zYUvGEr8,50
166
- honeybee_grasshopper_radiance-1.31.0.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
167
- honeybee_grasshopper_radiance-1.31.0.dist-info/METADATA,sha256=fxg7PbekV3H9l1hM8CrLuy4MS3X_dmw8EnFBfzkMUIw,2767
168
- honeybee_grasshopper_radiance-1.31.0.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
169
- honeybee_grasshopper_radiance-1.31.0.dist-info/top_level.txt,sha256=BBzJ4nJKMDfzWMqymIH91kdsQlHSptnGHSk8i6_KZ_4,30
170
- honeybee_grasshopper_radiance-1.31.0.dist-info/RECORD,,
166
+ honeybee_grasshopper_radiance-1.32.0.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
167
+ honeybee_grasshopper_radiance-1.32.0.dist-info/METADATA,sha256=tt0xj064xjRVvdOIeJdrpZiUDJlCr-9AQX5jJvnroAg,2767
168
+ honeybee_grasshopper_radiance-1.32.0.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
169
+ honeybee_grasshopper_radiance-1.32.0.dist-info/top_level.txt,sha256=BBzJ4nJKMDfzWMqymIH91kdsQlHSptnGHSk8i6_KZ_4,30
170
+ honeybee_grasshopper_radiance-1.32.0.dist-info/RECORD,,