def test_init_pmv_collection_full_collection_input(): """Test initialization of the PMV collection will all inputs as collections.""" calc_length = 24 air_temp_header = Header(Temperature(), 'C', AnalysisPeriod(end_month=1, end_day=1)) air_temp = HourlyContinuousCollection(air_temp_header, [24] * calc_length) rel_humid_header = Header(RelativeHumidity(), '%', AnalysisPeriod(end_month=1, end_day=1)) rel_humid = HourlyContinuousCollection(rel_humid_header, [50] * calc_length) rad_temp_header = Header(Temperature(), 'C', AnalysisPeriod(end_month=1, end_day=1)) rad_temp = HourlyContinuousCollection(rad_temp_header, [22] * calc_length) air_speed_header = Header(AirSpeed(), 'm/s', AnalysisPeriod(end_month=1, end_day=1)) air_speed = HourlyContinuousCollection(air_speed_header, [0.5] * calc_length) met_header = Header(MetabolicRate(), 'met', AnalysisPeriod(end_month=1, end_day=1)) met_rate = HourlyContinuousCollection(met_header, [1.2] * calc_length) clo_header = Header(ClothingInsulation(), 'clo', AnalysisPeriod(end_month=1, end_day=1)) clo_level = HourlyContinuousCollection(clo_header, [0.85] * calc_length) work_header = Header(MetabolicRate(), 'met', AnalysisPeriod(end_month=1, end_day=1)) ext_work = HourlyContinuousCollection(work_header, [0.1] * calc_length) pmv_obj = PMV(air_temp, rel_humid, rad_temp, air_speed, met_rate, clo_level, ext_work) assert pmv_obj.air_temperature[0] == 24 assert pmv_obj.rel_humidity[0] == 50 assert pmv_obj.rad_temperature[0] == 22 assert pmv_obj.air_speed[0] == 0.5 assert pmv_obj.met_rate[0] == 1.2 assert pmv_obj.clo_value[0] == 0.85 assert pmv_obj.external_work[0] == 0.1
def test_init_adaptive_collection_full_collection_input(): """Test initialization of the Adaptive collection with inputs as collections.""" calc_length = 24 prevail_header = Header(PrevailingOutdoorTemperature(), 'C', AnalysisPeriod(end_month=1, end_day=1)) prevail_temp = HourlyContinuousCollection(prevail_header, [22] * calc_length) op_temp_header = Header(Temperature(), 'C', AnalysisPeriod(end_month=1, end_day=1)) op_temp = HourlyContinuousCollection(op_temp_header, [26] * calc_length) air_speed_header = Header(AirSpeed(), 'm/s', AnalysisPeriod(end_month=1, end_day=1)) air_speed = HourlyContinuousCollection(air_speed_header, [0.7] * calc_length) adapt_obj = Adaptive(prevail_temp, op_temp, air_speed) assert adapt_obj.operative_temperature[0] == 26 assert adapt_obj.air_speed[0] == 0.7
def test_init_utci_collection_full_collection_input(): """Test initialization of the UTCI collection will all inputs as collections.""" calc_length = 24 air_temp_header = Header(Temperature(), 'C', AnalysisPeriod(end_month=1, end_day=1)) air_temp = HourlyContinuousCollection(air_temp_header, [24] * calc_length) rel_humid_header = Header(RelativeHumidity(), '%', AnalysisPeriod(end_month=1, end_day=1)) rel_humid = HourlyContinuousCollection(rel_humid_header, [50] * calc_length) rad_temp_header = Header(Temperature(), 'C', AnalysisPeriod(end_month=1, end_day=1)) rad_temp = HourlyContinuousCollection(rad_temp_header, [22] * calc_length) wind_speed_header = Header(AirSpeed(), 'm/s', AnalysisPeriod(end_month=1, end_day=1)) wind_speed = HourlyContinuousCollection(wind_speed_header, [0.5] * calc_length) utci_obj = UTCI(air_temp, rel_humid, rad_temp, wind_speed) assert utci_obj.air_temperature[0] == 24 assert utci_obj.rel_humidity[0] == 50 assert utci_obj.rad_temperature[0] == 22 assert utci_obj.wind_speed[0] == 0.5