forked from s_ranjbar/city_retrofit
Merge remote-tracking branch 'origin/retrofit_project' into retrofit_project
This commit is contained in:
commit
1819541a21
|
@ -10,8 +10,6 @@ import logging
|
|||
from typing import List, Union, TypeVar
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
import hub.helpers.constants as cte
|
||||
from hub.city_model_structure.attributes.polyhedron import Polyhedron
|
||||
from hub.city_model_structure.building_demand.household import Household
|
||||
|
@ -731,9 +729,10 @@ class Building(CityObject):
|
|||
for _key in self.roofs[0].global_irradiance.keys():
|
||||
_results = [0 for _ in range(0, len(self.roofs[0].global_irradiance[_key][cte.SRA]))]
|
||||
for surface in self.roofs:
|
||||
if _key in orientation_losses_factor:
|
||||
_results = [x + y * _efficiency * surface.perimeter_area
|
||||
* surface.solar_collectors_area_reduction_factor * z
|
||||
for x, y, z in zip(_results, surface.global_irradiance[_key][cte.SRA],
|
||||
orientation_losses_factor[cte.MONTH]['south'])]
|
||||
orientation_losses_factor[_key]['south'])]
|
||||
self._onsite_electrical_production[_key] = _results
|
||||
return self._onsite_electrical_production
|
||||
|
|
|
@ -112,3 +112,4 @@ class TestSystemsFactory(TestCase):
|
|||
self.assertLess(0, building.cooling_consumption[cte.YEAR][0])
|
||||
self.assertLess(0, building.domestic_hot_water_consumption[cte.YEAR][0])
|
||||
self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0])
|
||||
print(building.heating_consumption[cte.YEAR][0], building.cooling_consumption[cte.YEAR][0], building.domestic_hot_water_consumption[cte.YEAR][0], building.onsite_electrical_production[cte.YEAR][0])
|
Loading…
Reference in New Issue
Block a user