Merge pull request 'debugging_peak_demands' (#14) from debugging_peak_demands into main

Reviewed-on: https://nextgenerations-cities.encs.concordia.ca/gitea/CERC/hub/pulls/14
This commit is contained in:
Guille Gutierrez 2023-03-24 10:57:07 -04:00
commit de80850367

View File

@ -37,7 +37,7 @@ class EpwWeatherParameters:
depth_measurement_ground_temperature = line[i*16+2] depth_measurement_ground_temperature = line[i*16+2]
temperatures = [] temperatures = []
for j in range(0, 12): for j in range(0, 12):
temperatures.append(line[i*16+j+6]) temperatures.append(float(line[i*16+j+6]))
ground_temperature[depth_measurement_ground_temperature] = temperatures ground_temperature[depth_measurement_ground_temperature] = temperatures
file.close() file.close()
except SystemExit: except SystemExit:
@ -74,6 +74,13 @@ class EpwWeatherParameters:
for building in self._city.buildings: for building in self._city.buildings:
building.ground_temperature[cte.MONTH] = ground_temperature building.ground_temperature[cte.MONTH] = ground_temperature
ground_temperature = {}
for set in building.ground_temperature[cte.MONTH]:
temperature = 0
for value in building.ground_temperature[cte.MONTH][set]:
temperature += value / 12
ground_temperature[set] = [temperature]
building.ground_temperature[cte.YEAR] = ground_temperature
if cte.HOUR in building.external_temperature: if cte.HOUR in building.external_temperature:
del building.external_temperature[cte.HOUR] del building.external_temperature[cte.HOUR]
new_value = pd.DataFrame(self._weather_values[['dry_bulb_temperature_c']].to_numpy(), columns=['epw']) new_value = pd.DataFrame(self._weather_values[['dry_bulb_temperature_c']].to_numpy(), columns=['epw'])