Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mostaphaRoudsari committed Nov 2, 2018
2 parents 5f8c539 + a9aae5b commit 15f8a1b
Show file tree
Hide file tree
Showing 121 changed files with 564 additions and 593 deletions.
Binary file modified plugin/grasshopper/sampleFiles/00_point_in_time_gridbased.gh
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/01_point_in_time_imagebased.gh
Binary file not shown.
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/03_solaraccess_gridbased.gh
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/04_annual_daylight_gridbased.gh
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/05_annual_radiation_gridbased.gh
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/08_three_phase_I_gridbased.gh
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/09_three_phase_II_gridbased.gh
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/10_three_phase_III_gridbased.gh
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/11_five_phase_I_gridbased.gh
Binary file not shown.
Binary file modified plugin/grasshopper/sampleFiles/12_five_phase_II_gridbased.gh
Binary file not shown.
2 changes: 1 addition & 1 deletion plugin/grasshopper/src/HoneybeePlus Installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

ghenv.Component.Name = "HoneybeePlus Installer"
ghenv.Component.NickName = "HBInstaller"
ghenv.Component.Message = 'VER 0.0.04\nJUL_22_2018'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = "05 :: Developers"
ghenv.Component.AdditionalHelpFromDocStrings = "1"
Expand Down
17 changes: 8 additions & 9 deletions plugin/grasshopper/src/HoneybeePlus_Analysis Grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,25 @@
Args:
_name_: A name for this analysis grid.
_testPoints: A list or a datatree of points. Each branch of the datatree
_test_points: A list or a datatree of points. Each branch of the datatree
will be considered as a point group.
ptsVectors_: A list or a datatree of vectors. Each vector represents the
pts_vectors_: A list or a datatree of vectors. Each vector represents the
direction of the respective test point in testPoints. If only one
value is provided it will be used for all the test points. If no value
is provided (0, 0, 1) will be assigned for all the vectors.
wGroups_: An optional list of window groups. This input is only
w_groups_: An optional list of window groups. This input is only
important for multi-phase daylight simulation to avoid unnecessary
view matrix calculations. If this input is left empty for multi-phase
daylight recipes the view matrix will be calculated for each analysis
grid and every window group.
Returns:
readMe!: Reports, errors, warnings, etc.
analysisGrid: Analysis grid. Use this analysis grid to create a grid-based
analysis.
analysis_grid: Use this analysis grid to create a grid-based analysis.
"""

ghenv.Component.Name = "HoneybeePlus_Analysis Grid"
ghenv.Component.NickName = 'analysisGrid'
ghenv.Component.Message = 'VER 0.0.04\nFEB_07_2018'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = '00 :: Create'
ghenv.Component.AdditionalHelpFromDocStrings = "2"
Expand All @@ -43,6 +42,6 @@
raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))


if _testPoints:
analysisGrid = AnalysisGrid.from_points_and_vectors(_testPoints, ptsVectors_,
_name_, wGroups_)
if _test_points:
analysis_grid = AnalysisGrid.from_points_and_vectors(_test_points, pts_vectors_,
_name_, w_groups_)
29 changes: 15 additions & 14 deletions plugin/grasshopper/src/HoneybeePlus_Annual Daylight Metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,37 @@
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>

"""
Annual Daylight Metrics
Annual Daylight Metrics.
-
Args:
_analysisGrid: An analysis grid output from run Radiance analysis.
blindStates_: List of state ids for all the sources for input hoys.
_analysis_grid: An analysis grid output from run Radiance analysis.
blind_states_: List of state ids for all the sources for input hoys.
If you want a source to be removed set the state to -1. You can use
this option to study the effect of different blind states.
_occSchedule_: An annual occupancy schedule.
_occ_schedule_: An annual occupancy schedule.
_threshold_: Threshhold for daylight autonomy in lux (default: 300).
_minmax_: A list for min, max value for useful daylight illuminance
_min_max_: A list for min, max value for useful daylight illuminance
(default: (100, 3000)).
legendPar: Suggested legend parameters for annual metrics.
Returns:
report: Reports, errors, warnings, etc.
DA: Daylight autonomy. The percentage of time that each sensor
recieves equal or more than the threshold.
CDA: Continuous daylight autonomy.
UDI: Useful daylight illuminance. The percentage of time that illuminace
falls between minimum and maximum thresholds.
UDILess: The percentage of time that illuminace falls less than minimum
UDI_less: The percentage of time that illuminace falls less than minimum
threshold.
UDIMore: The percentage of time that illuminace falls more than maximum
UDI_more: The percentage of time that illuminace falls more than maximum
threshold.
legend_par: Suggested legend parameters for annual metrics.
"""

ghenv.Component.Name = "HoneybeePlus_Annual Daylight Metrics"
ghenv.Component.NickName = 'annualMetrics'
ghenv.Component.Message = 'VER 0.0.04\nFEB_07_2018'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = '04 :: Daylight :: Daylight'
ghenv.Component.AdditionalHelpFromDocStrings = "3"
Expand All @@ -48,10 +49,10 @@
raise ImportError('\nFailed to import ladybug:\n\t{}'.format(e))

col = color.Colorset.nuanced()
legendPar = lp.LegendParameters((0, 100), colors=col)
legend_par = lp.LegendParameters((0, 100), colors=col)

if _analysisGrid:
states = _analysisGrid.parse_blind_states(blindStates_)
DA, CDA, UDI, UDILess, UDIMore = _analysisGrid.annual_metrics(
_threshold_, _minmax_, states, _occSchedule_
if _analysis_grid:
states = _analysis_grid.parse_blind_states(blind_states_)
DA, CDA, UDI, UDI_less, UDI_more = _analysis_grid.annual_metrics(
_threshold_, _min_max_, states, _occ_schedule_
)
21 changes: 10 additions & 11 deletions plugin/grasshopper/src/HoneybeePlus_Annual Daylight Recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@
Args:
_skymtx: A sky matrix or a sky vector. Find honeybee skies under 02::Daylight::Light Sources.
_analysisGrids: A list of Honeybee analysis grids.
_analysisType_: Analysis type. [0] illuminance(lux), [1] radiation (kwh),
_analysis_grids: A list of Honeybee analysis grids.
_analysis_type_: Analysis type. [0] illuminance(lux), [1] radiation (kwh),
[2] luminance (Candela).
_dmtxPar_: Radiance parameters for Daylight matrix calculation. Find
_dmtx_par_: Radiance parameters for Daylight matrix calculation. Find
Radiance parameters node under 03::Daylight::Recipe.
reuseDmtx_: A boolean to indicate if you want the analysis to use the daylight
reuse_dmtx_: A boolean to indicate if you want the analysis to use the daylight
coeff matrix results from the previous study if available (default: False).
Returns:
report: Reports, errors, warnings, etc.
analysisRecipe: Annual analysis recipe. Connect this recipe to Run Radiance
analysis_recipe: Annual analysis recipe. Connect this recipe to Run Radiance
Analysis to run a annual analysis.
"""

ghenv.Component.Name = "HoneybeePlus_Annual Daylight Recipe"
ghenv.Component.NickName = 'annualDLRecipe'
ghenv.Component.Message = 'VER 0.0.05\nMAY_14_2018'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = '03 :: Daylight :: Recipe'
ghenv.Component.AdditionalHelpFromDocStrings = "1"
Expand All @@ -42,7 +41,7 @@
raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))


if _skymtx and _analysisGrids and _analysisGrids[0] != None:
reuseDmtx_ = bool(reuseDmtx_)
analysisRecipe = GridBased(
_skymtx, _analysisGrids, _analysisType_, _dmtxPar_, reuseDmtx_)
if _skymtx and _analysis_grids and _analysis_grids[0] is not None:
reuse_dmtx_ = bool(reuse_dmtx_)
analysis_recipe = GridBased(
_skymtx, _analysis_grids, _analysis_type_, _dmtx_par_, reuse_dmtx_)
25 changes: 10 additions & 15 deletions plugin/grasshopper/src/HoneybeePlus_Annual Radiation Recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,36 @@
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>

"""
Annual radiation analysis
Annual radiation analysis recipe.
-
Args:
_skymtx: A sky matrix or a sky vector. Find honeybee skies under 02::Daylight::Light Sources.
_analysisGrids: A list of Honeybee analysis grids.
_dmtxPar_: Radiance parameters for Daylight matrix calculation. Find
_analysis_grids: A list of Honeybee analysis grids.
_dmtx_par_: Radiance parameters for Daylight matrix calculation. Find
Radiance parameters node under 03::Daylight::Recipe.
reuseDmtx_: A boolean to indicate if you want the analysis to use the daylight
reuse_dmtx_: A boolean to indicate if you want the analysis to use the daylight
coeff matrix results from the previous study if available (default: False).
Returns:
readMe!: Reports, errors, warnings, etc.
analysisRecipe: Annual analysis recipe. Connect this recipe to Run Radiance
analysis_recipe: Annual analysis recipe. Connect this recipe to Run Radiance
Analysis to run a annual analysis.
"""

ghenv.Component.Name = "HoneybeePlus_Annual Radiation Recipe"
ghenv.Component.NickName = 'radiationRecipe'
ghenv.Component.Message = 'VER 0.0.04\nFEB_07_2018'
ghenv.Component.NickName = 'annualRadRecipe'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = '03 :: Daylight :: Recipe'
ghenv.Component.AdditionalHelpFromDocStrings = "1"


#import honeybee
#reload(honeybee.radiance.recipe.recipedcutil)
#reload(honeybee.radiance.recipe.daylightcoeff.gridbased)
#reload(honeybee.radiance.recipe.radiation.gridbased)
try:
from honeybee.radiance.recipe.radiation.gridbased import GridBased
except ImportError as e:
raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))


if _skymtx and _analysisGrids and _analysisGrids[0] != None:
reuseDmtx_ = bool(reuseDmtx_)
analysisRecipe = GridBased(_skymtx, _analysisGrids, _dmtxPar_, reuseDmtx_)
if _skymtx and _analysis_grids and _analysis_grids[0] is not None:
reuse_dmtx_ = bool(reuse_dmtx_)
analysis_recipe = GridBased(_skymtx, _analysis_grids, _dmtx_par_, reuse_dmtx_)
41 changes: 21 additions & 20 deletions plugin/grasshopper/src/HoneybeePlus_Annual Sunlight Exposure.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,36 @@
"""
Calculate annual sunlight exposure (ASE).
As per IES-LM-83-12 ASE is the percent of sensors that are
As per IES-LM-83-12, ASE is the percent of sensors that are
found to be exposed to more than 1000lux of direct sunlight for
more than 250hrs per year. For LEED credits no more than 10% of
the points in the grid should fail this measure.
-
Args:
_analysisGrid: An analysis grid output from run Radiance analysis.
blindStates_: List of state ids for all the sources for input hoys.
_analysis_grid: An analysis grid output from run Radiance analysis.
blind_states_: List of state ids for all the sources for input hoys.
If you want a source to be removed set the state to -1. ASE must
be calculated without dynamic blinds but you can use this option
to study the effect of different blind states.
_occSchedule_: An annual occupancy schedule.
_occ_schedule_: An annual occupancy schedule.
_threshold_: Threshhold for solar exposure in lux (default: 1000).
_targetHrs_: Minimum targe hours for each point (default: 250).
_targetArea_: Minimum target area percentage for this grid (default: 10)
legendPar: Suggested legend parameters for Annual Sunlight Exposure.
_target_hrs_: Minimum target hours for each point (default: 250).
_target_area_: Minimum target area percentage for this grid (default: 10)
Returns:
Success: True if you meet target area based on target hours.
report: Reports, errors, warnings, etc.
success: True if you meet target area based on target hours.
ASE: Number of hours of annual sunlight exposure for each test point.
perArea: Percentage area that doesn't meet the target.
prblmPts: A list of problematic test points.
prblmHrs: Problematic hours for each point.
per_area: Percentage area that doesn't meet the target.
prblm_pts: A list of problematic test points.
prblm_hrs: Problematic hours for each point.
legend_par: Suggested legend parameters for Annual Sunlight Exposure.
"""

ghenv.Component.Name = "HoneybeePlus_Annual Sunlight Exposure"
ghenv.Component.NickName = 'ASE'
ghenv.Component.Message = 'VER 0.0.05\nMAY_14_2018'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = '04 :: Daylight :: Daylight'
ghenv.Component.AdditionalHelpFromDocStrings = "3"
Expand All @@ -52,19 +53,19 @@


col = color.Colorset.original()
legendPar = lp.LegendParameters((0, 250), colors=col)
legend_par = lp.LegendParameters((0, 250), colors=col)

if _analysisGrid:
states = _analysisGrid.parse_blind_states(blindStates_)
success, ASE, perArea, prblmPts, prblmHrs = \
_analysisGrid.annual_sunlight_exposure(
_threshold_, states, _occSchedule_, _targetHrs_, _targetArea_
if _analysis_grid:
states = _analysis_grid.parse_blind_states(blind_states_)
success, ASE, per_area, prblm_pts, prblm_hrs = \
_analysis_grid.annual_sunlight_exposure(
_threshold_, states, _occ_schedule_, _target_hrs_, _target_area_
)

prblmPts = (lg.point(s.location.x, s.location.y, s.location.z) for s in prblmPts)
prblm_pts = (lg.point(s.location.x, s.location.y, s.location.z) for s in prblm_pts)
# convert list of lists to data tree
try:
prblmHrs = output.list_to_tree(prblmHrs, ghenv.Component.RunCount - 1)
prblm_hrs = output.list_to_tree(prblm_hrs, ghenv.Component.RunCount - 1)
except NameError:
# dynamo
pass
18 changes: 9 additions & 9 deletions plugin/grasshopper/src/HoneybeePlus_CIE Standard Sky.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>

"""
Standard Radiance CIE Sky.
A point-in-time standard Radiance CIE sky.
Args:
north_: A number between 0 and 360 that represents the degrees off from
Expand All @@ -21,14 +21,14 @@
[0] Sunny with sun, [1] sunny without sun, [2] intermediate with sun
[3] intermediate without sun, [4] cloudy sky, [5] uniform sky (default: 0)
Returns:
sky: Honeybee sky. You can use this sky to create a grid-based daylight
recipe.
sky: Honeybee sky. You can use this sky to create a point-in-time
daylight recipe.
"""

ghenv.Component.Name = "HoneybeePlus_CIE Standard Sky"
ghenv.Component.NickName = 'CIESky'
ghenv.Component.Message = 'VER 0.0.04\nSEP_10_2018'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = '02 :: Daylight :: Light Sources'
ghenv.Component.AdditionalHelpFromDocStrings = "1"
Expand All @@ -43,9 +43,9 @@
if not hasattr(_location, 'isLocation'):
_location = Location.from_location(_location)
# set default values if they are not set
north_ = north_ or 0
_type_ = _type_ or 0
_month_ = _month_ or 6
_day_ = _day_ or 21
_hour_ = _hour_ or 12
north_ = 0 if north_ is None else north_
_type_ = 0 if _type_ is None else _type_
_month_ = 6 if _month_ is None else _month_
_day_ = 21 if _day_ is None else _day_
_hour_ = 12 if _hour_ is None else _hour_
sky = CIE(_location, _month_, _day_, _hour_, north_, _type_)
10 changes: 5 additions & 5 deletions plugin/grasshopper/src/HoneybeePlus_Certain Illuminance.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>

"""
Sky with certain illuminance.
A uniform sky with certain illuminance.
Args:
_value: Desired value for sky horizontal illuminance in lux
(default: 10000).
Returns:
sky: Honeybee sky. You can use this sky to create a grid-based daylight
recipe.
sky: Honeybee sky. You can use this sky to create a point-in-time
daylight recipe.
"""

ghenv.Component.Name = "HoneybeePlus_Certain Illuminance"
ghenv.Component.NickName = 'certainIllum'
ghenv.Component.Message = 'VER 0.0.04\nFEB_07_2018'
ghenv.Component.Message = 'VER 0.0.05\nOCT_22_2018'
ghenv.Component.Category = "HoneybeePlus"
ghenv.Component.SubCategory = '02 :: Daylight :: Light Sources'
ghenv.Component.AdditionalHelpFromDocStrings = "1"
Expand All @@ -30,5 +30,5 @@
except ImportError as e:
raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))

_value_ = _value_ or 10000
_value_ = 10000 if _value_ is None else _value_
sky = CertainIlluminanceLevel(_value_)
Loading

0 comments on commit 15f8a1b

Please sign in to comment.