Ejemplo n.º 1
0
 OutputAlias.any(
     name='TCP',
     description=
     'Lists of values between 0 and 100 for the Thermal Comfort Percent '
     '(TCP). These can be plugged into the "LB Spatial Heatmap" component along '
     'with meshes of the sensor grids to visualize spatial thermal comfort. '
     'TCP is the percentage of occupied time where thermal conditions are '
     'acceptable/comfortable. Occupied hours are determined from the '
     'occupancy schedules of each room (any time where the occupancy '
     'schedule is >= 0.1 will be considered occupied). Outdoor sensors '
     'are considered occupied at all times. More custom TCP studies can '
     'be done by post-processing the condition results.',
     platform=['grasshopper'],
     handler=[
         IOAliasHandler(language='python',
                        module='pollination_handlers.outputs.comfort',
                        function='read_comfort_percent_from_folder')
     ]),
 # Rhino alias
 OutputAlias.linked(
     name='TCP',
     platform=['rhino'],
     handler=[
         # Preload results
         IOAliasHandler(language='python',
                        module='pollination_handlers.outputs.comfort',
                        function='read_comfort_percent_from_folder'),
         # load preloaded outputs to Rhino with following method
         IOAliasHandler(language='csharp',
                        module='Pollination.RhinoHandlers',
                        function='LoadMeshBasedResultsToRhino')
Ejemplo n.º 2
0
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler
"""Alias for inputs that expect a .ddy file as the recipe input."""
ddy_input = [
    InputAlias.any(
        name='ddy',
        description=
        'The path to a .ddy file or an .epw file with design days to be '
        'used for the initial sizing calculation.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.ddy',
                           function='ddy_handler')
        ])
]
Ejemplo n.º 3
0
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler


"""Alias inputs that expect a HBJSON model file as the recipe input."""
hbjson_model_input = [
    # grasshopper Alias
    InputAlias.any(
        name='model',
        description='A Honeybee Model to simulate or the path to a HBJSON file '
        'of a Model. This can also be the path to a HBpkl file, though this is only '
        'recommended for cases where the model is extremely large.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(
                language='python', module='pollination_handlers.inputs.model',
                function='model_to_json'
            ),
            IOAliasHandler(
                language='csharp', module='Pollination.RhinoHandlers',
                function='HBModelToJSON'
            )
        ]
    ),
    # Rhino alias
    InputAlias.linked(
        name='model',
        description='This input links the model to Rhino model.',
        platform=['rhino'],
        handler=[
            IOAliasHandler(
                language='csharp', module='Pollination.RhinoHandlers',
Ejemplo n.º 4
0
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler, ItemType
"""Alias for inputs that expect a simulation parameter .json file as the recipe input."""
energy_simulation_parameter_input = [
    InputAlias.any(
        name='sim_par',
        description=
        'A SimulationParameter object that describes all of the setting for '
        'the energy simulation. If None, some default simulation parameters will '
        'automatically be used. This can also be the path to a SimulationParameter '
        'JSON file.',
        optional=True,
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.simulation',
                           function='energy_sim_par_to_json')
        ])
]
"""Alias for inputs that expect a measures input."""
measures_input = [
    InputAlias.list(
        name='measures',
        item_type=ItemType.Generic,
        description=
        'An optional list of measures to apply to the OpenStudio model '
        'upon export. Use the "HB Load Measure" component to load a measure into '
        'Grasshopper and assign input arguments. Measures can be downloaded from the '
        'NREL Building Components Library (BCL) at (https://bcl.nrel.gov/).',
        default=[],
        optional=True,
Ejemplo n.º 5
0
from queenbee.io.common import IOAliasHandler


"""Alias for the selection of point-in-time metrics."""
point_in_time_metric_input = [
    InputAlias.any(
        name='metric',
        description='Either an integer or the full name of a point-in-time metric to '
        'be computed by the recipe. (Default: illuminance). Choose from the following:'
        '\n* 0 = illuminance\n* 1 = irradiance\n* 2 = luminance\n* 3 = radiance',
        default='illuminance',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(
                language='python',
                module='pollination_handlers.inputs.pit',
                function='point_in_time_metric_to_str'
            )
        ]
    )
]


"""Alias for the selection of point-in-time metrics."""
point_in_time_view_metric_input = [
    InputAlias.any(
        name='metric',
        description='Either an integer or the full name of a point-in-time metric to '
        'be computed by the recipe. (Default: luminance). Choose from the following:'
        '\n* 0 = illuminance\n* 1 = irradiance\n* 2 = luminance\n* 3 = radiance',
        default='luminance',
Ejemplo n.º 6
0
from queenbee.io.common import IOAliasHandler
"""Alias for inputs that expect an annual schedule as a .csv file."""
schedule_csv_input = [
    InputAlias.any(
        name='schedule',
        description=
        'An annual occupancy schedule, either as a path to a csv file (with '
        '8760 rows), a Ladybug Hourly Continuous Data Collection or a HB-Energy '
        'schedule object. This can also be the identifier of a schedule in '
        'your HB-Energy schedule library. Any value in this schedule that is '
        '0.1 or above will be considered occupied.',
        optional=True,
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.schedule',
                           function='schedule_to_csv')
        ])
]
"""Alias for inputs that expect a schedule as a .csv file from a data collection."""
comfort_schedule_csv_input = [
    InputAlias.any(
        name='schedule',
        description=
        'A schedule to specify the relevant times during which comfort '
        'should be evaluated. This must either be a Ladybug Hourly Data '
        'Collection that aligns with the input run_period or the path to a '
        'CSV file with a number of rows equal to the length of the run_period. '
        'If unspecified, it will be assumed that all times are relevant for '
        'outdoor sensors and the energy model occupancy schedules will be '
        'used for indoor sensors.',
Ejemplo n.º 7
0
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler
"""Alias for thermal map air speeds."""
air_speed_input = [
    InputAlias.any(
        name='air_speed',
        description=
        'A single number for air speed in m/s or an hourly data collection '
        'of air speeds that align with the input run_period. This will be '
        'used for all indoor comfort evaluation. Note that the EPW wind speed '
        'will be used for any outdoor sensors. (Default: 0.1).',
        default='0.1',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.data',
                           function='value_or_data_to_str')
        ])
]
"""Alias for thermal map wind speeds."""
wind_speed_input = [
    InputAlias.any(
        name='wind_speed',
        description=
        'A single number for meteorological wind speed in m/s or an hourly '
        'data collection of wind speeds that align with the input run period. '
        'This will be used for all indoor comfort evaluation. Note that the '
        'EPW wind speed will be used for any outdoor sensors. (Default: 0.5).',
        default='0.5',
        platform=['grasshopper'],
        handler=[
Ejemplo n.º 8
0
from pollination_dsl.alias import OutputAlias
from queenbee.io.common import IOAliasHandler
"""Annual energy use recipe output.

The result is a JSON with various end uses of energy.
"""
parse_eui_results = [
    OutputAlias.any(
        name='eui',
        description=
        'Energy Use intensity, including total and for each end use.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.outputs.eui',
                           function='eui_json_from_path')
        ])
]
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler
"""Alias for yes/no inputs about whether to filter design days."""
filter_des_days_input = [
    InputAlias.any(
        name='filter_des_days',
        description=
        'A boolean to note whether the ddy file should be filtered to only '
        'include 99.6 and 0.4 design days (True) or all design days in the ddy file '
        'should be used (False).',
        default=True,
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.bool_options',
                           function='filter_des_days_to_str')
        ])
]
"""Alias for yes/no inputs about whether to skip a view-based overture calculation."""
skip_overture_input = [
    InputAlias.any(
        name='skip_overture',
        description='A boolean to note whether an ambient file (.amb) should be '
        'generated for an overture calculation before the view is split into smaller '
        'views. With an overture calculation, the ambient file (aka ambient cache) is '
        'first populated with values. Thereby ensuring that - when reused to create '
        'an image - Radiance uses interpolation between already calculated values '
        'rather than less reliable extrapolation. The overture calculation has '
        'comparatively small computation time to full rendering but is single-core '
        'can become time consuming in situations with very high numbers of '
        'rendering multiprocessors.',
Ejemplo n.º 10
0
from pollination_dsl.alias import OutputAlias
from queenbee.io.common import IOAliasHandler
"""Alias for daylight factor recipe output."""
daylight_factor_results = [
    OutputAlias.any(
        name='results',
        description='Daylight factor values. These can be plugged into the "LB '
        'Spatial Heatmap" component along with meshes of the sensor grids to '
        'visualize results.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.outputs.daylight',
                           function='read_df_from_folder')
        ]),

    # Revit alias
    OutputAlias.any(
        name='results',
        description='Daylight factor values.',
        platform=['revit'],
        handler=[
            IOAliasHandler(language='csharp',
                           module='Pollination.RevitHandlers',
                           function='ReadDaylightFactorResultsFromFolder'),
            IOAliasHandler(language='python',
                           module='pollination_handlers.outputs.daylight',
                           function='read_df_from_folder')
        ]),

    # Rhino alias
Ejemplo n.º 11
0
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler


"""Alias for north inputs that can accept both an angle or a north vector."""
north_input = [
    InputAlias.any(
        name='north',
        description='A number between -360 and 360 for the counterclockwise difference '
        'between the North and the positive Y-axis in degrees. This can '
        'also be Vector for the direction to North. (Default: 0).',
        default=0,
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(
                language='python',
                module='pollination_handlers.inputs.north',
                function='north_vector_to_angle'
            )
        ]
    )
]
Ejemplo n.º 12
0
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler
"""Alias for inputs that expect a .wea file as the recipe input."""
wea_input = [
    InputAlias.any(
        name='wea',
        description=
        'A Wea object produced from the Wea components that are under '
        'the Light Sources tab. This can also be the path to a .wea or a .epw file.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.wea',
                           function='wea_handler')
        ])
]
"""Alias for inputs that expect a .wea file at a timestep of 1."""
wea_input_timestep_check = [
    InputAlias.any(
        name='wea',
        description=
        'A Wea object produced from the Wea components that are under '
        'the Light Sources tab. This can also be the path to a .wea or a .epw file.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.wea',
                           function='wea_handler_timestep_check')
        ])
]
Ejemplo n.º 13
0
from pollination_dsl.alias import InputAlias
from queenbee.io.common import IOAliasHandler, ItemType
"""Alias for inputs that expect a simulation parameter .json file as the recipe input."""
energy_simulation_parameter_input = [
    InputAlias.any(
        name='sim_par',
        description=
        'A SimulationParameter object that describes all of the setting for '
        'the energy simulation. If None, some default simulation parameters will '
        'automatically be used. This can also be the path to a SimulationParameter '
        'JSON file.',
        optional=True,
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.simulation',
                           function='energy_sim_par_to_json'),
            IOAliasHandler(language='csharp',
                           module='Pollination.RhinoHandlers',
                           function='HBSimulationParameterToJSON')
        ]),
    # Rhino alias
    InputAlias.linked(
        name='sim_par',
        description='This input links to SimulationParameter setting in Rhino.',
        platform=['rhino'],
        handler=[
            IOAliasHandler(language='csharp',
                           module='Pollination.RhinoHandlers',
                           function='RhinoSimulationParameterToJSON')
        ])
Ejemplo n.º 14
0
from queenbee_dsl.alias import InputAlias, OutputAlias
from queenbee.io.common import IOAliasHandler


input_model_alias = [
    # grasshopper Alias
    InputAlias.any(
        name='model',
        description='A path to a HBJSON file or a HB model object built with Python or'
        'dotnet libraries.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(
                language='python', module='honeybee_radiance_handlers.handlers',
                function='model_to_json_path'
            ),
            IOAliasHandler(
                language='csharp', module='HoneybeeSchema.Handlers',
                function='HBModelToJSON'
            )
        ]
    ),
    # Rhino alias
    InputAlias.linked(
        name='model',
        description='This input links the model to Rhino model.',
        platform=['rhino'],
        handler=[
            IOAliasHandler(
                language='csharp', module='HoneybeeRhino.Handlers',
                function='RhinoHBModelToJSON'
Ejemplo n.º 15
0
from queenbee_dsl.alias import InputAlias, OutputAlias
from queenbee.io.common import IOAliasHandler

input_model_alias = [
    # grasshopper Alias
    InputAlias.any(
        name='model',
        description=
        'A path to a HBJSON file or a HB model object built with Python or'
        'dotnet libraries.',
        platform=['grasshopper'],
        handler=[
            IOAliasHandler(language='python',
                           module='pollination_handlers.inputs.model',
                           function='model_to_json'),
            IOAliasHandler(language='csharp',
                           module='HoneybeeSchema.Handlers',
                           function='HBModelToJSON')
        ]),
    # Rhino alias
    InputAlias.linked(name='model',
                      description='This input links the model to Rhino model.',
                      platform=['rhino'],
                      handler=[
                          IOAliasHandler(language='csharp',
                                         module='HoneybeeRhino.Handlers',
                                         function='RhinoHBModelToJSON')
                      ])
]