def test_running_mean_outdoor_temperature(): assert (running_mean_outdoor_temperature([20, 20], alpha=0.7)) == 20 assert (running_mean_outdoor_temperature([20, 20], alpha=0.9)) == 20 assert (running_mean_outdoor_temperature([20, 20, 20, 20], alpha=0.7)) == 20 assert (running_mean_outdoor_temperature([20, 20, 20, 20], alpha=0.5)) == 20 assert (running_mean_outdoor_temperature([77, 77, 77, 77, 77, 77, 77], alpha=0.8, units='IP')) == 77 assert (running_mean_outdoor_temperature([77, 77, 77, 77, 77, 77, 77], alpha=0.8, units='ip')) == 77
from pythermalcomfort.models import adaptive_ashrae from pythermalcomfort.psychrometrics import running_mean_outdoor_temperature from pprint import pprint result = adaptive_ashrae(tdb=25, tr=25, t_running_mean=23, v=0.3) pprint(result) print(result['acceptability_80']) result = adaptive_ashrae(tdb=77, tr=77, t_running_mean=73.5, v=1, units='IP') pprint(result) print(result['acceptability_80']) rmt_value = running_mean_outdoor_temperature([29, 28, 30, 29, 28, 30, 27], alpha=0.9) result = adaptive_ashrae(tdb=25, tr=25, t_running_mean=rmt_value, v=0.3) pprint(result)