def test_simulation_parameter_setability(): """Test the setting of properties of SimulationParameter.""" sim_par = SimulationParameter() output = SimulationOutput() output.add_zone_energy_use() sim_par.output = output assert sim_par.output == output run_period = RunPeriod(Date(1, 1), Date(6, 21)) sim_par.run_period = run_period assert sim_par.run_period == run_period sim_par.timestep = 4 assert sim_par.timestep == 4 sim_control_alt = SimulationControl(run_for_sizing_periods=True, run_for_run_periods=False) sim_par.simulation_control = sim_control_alt assert sim_par.simulation_control == sim_control_alt shadow_calc_alt = ShadowCalculation('FullExteriorWithReflections') sim_par.shadow_calculation = shadow_calc_alt assert sim_par.shadow_calculation == shadow_calc_alt sizing_alt = SizingParameter(None, 1, 1) relative_path = './tests/ddy/chicago_monthly.ddy' sizing_alt.add_from_ddy(relative_path) sim_par.sizing_parameter = sizing_alt assert sim_par.sizing_parameter == sizing_alt sim_par.north_angle = 20 assert sim_par.north_angle == 20 sim_par.terrain_type = 'Ocean' assert sim_par.terrain_type == 'Ocean'
def test_sizing_parameter_to_ddy(): """Test the setting of properties of SizingParameter.""" sizing = SizingParameter() relative_path = './tests/ddy/chicago_monthly.ddy' sizing.add_from_ddy(relative_path) ddy_obj = DDY.from_ddy_file(relative_path) assert sizing.to_ddy() == ddy_obj
def test_sizing_parameter_setability(): """Test the setting of properties of SizingParameter.""" sizing = SizingParameter() relative_path = './tests/ddy/chicago_monthly.ddy' sizing.add_from_ddy(relative_path) assert len(sizing.design_days) == 12 assert len(sizing) == 12 assert isinstance(sizing[0], DesignDay) sizing.heating_factor = 1 assert sizing.heating_factor == 1 sizing.cooling_factor = 1 assert sizing.cooling_factor == 1
def test_sizing_parameter_equality(): """Test the equality of SizingParameter objects.""" sizing = SizingParameter() relative_path = './tests/ddy/chicago_monthly.ddy' sizing.add_from_ddy(relative_path) sizing_dup = sizing.duplicate() sizing_alt = SizingParameter(None, 1) assert sizing is sizing assert sizing is not sizing_dup assert sizing == sizing_dup sizing_dup.cooling_factor = 1 assert sizing != sizing_dup assert sizing != sizing_alt
Returns: sizing: Parameters with criteria for sizing the heating and cooling system. These can be connected to the "HB Simulation Parameter" component in order to specify settings for the EnergyPlus simulation. """ ghenv.Component.Name = "HB Sizing Parameter" ghenv.Component.NickName = 'SizingPar' ghenv.Component.Message = '0.1.0' ghenv.Component.Category = 'HB-Energy' ghenv.Component.SubCategory = '5 :: Simulate' ghenv.Component.AdditionalHelpFromDocStrings = "2" try: from honeybee_energy.simulation.sizing import SizingParameter except ImportError as e: raise ImportError('\nFailed to import honeybee_energy:\n\t{}'.format(e)) # set default sizing factors heating_fac = 1.25 if _heating_fac_ is None else _heating_fac_ cooling_fac = 1.15 if _cooling_fac_ is None else _cooling_fac_ # create the object sizing = SizingParameter(None, heating_fac, cooling_fac) # apply design days from ddy if ddy_file_ is not None: sizing.add_from_ddy(ddy_file_)