prints to check error
This commit is contained in:
parent
989d89df80
commit
8099037225
|
@ -681,6 +681,7 @@ class Building(CityObject):
|
||||||
for i, value in enumerate(item):
|
for i, value in enumerate(item):
|
||||||
_working_hours[key][i] = max(_working_hours[key][i], saved_values[i])
|
_working_hours[key][i] = max(_working_hours[key][i], saved_values[i])
|
||||||
|
|
||||||
|
print(_working_hours)
|
||||||
_total_hours = 0
|
_total_hours = 0
|
||||||
for key in _working_hours:
|
for key in _working_hours:
|
||||||
hours = sum(_working_hours[key])
|
hours = sum(_working_hours[key])
|
||||||
|
@ -735,7 +736,7 @@ class Building(CityObject):
|
||||||
for key, item in self._distribution_systems_electrical_consumption.items():
|
for key, item in self._distribution_systems_electrical_consumption.items():
|
||||||
for i in range(0, len(item)):
|
for i in range(0, len(item)):
|
||||||
self._distribution_systems_electrical_consumption[key][i] += _peak_load * _consumption_fix_flow \
|
self._distribution_systems_electrical_consumption[key][i] += _peak_load * _consumption_fix_flow \
|
||||||
* _working_hours
|
* _working_hours[key] * cte.WATTS_HOUR_TO_JULES
|
||||||
return self._distribution_systems_electrical_consumption
|
return self._distribution_systems_electrical_consumption
|
||||||
|
|
||||||
def _calculate_consumption(self, consumption_type, demand):
|
def _calculate_consumption(self, consumption_type, demand):
|
||||||
|
|
|
@ -40,7 +40,7 @@ class TestResultsImport(TestCase):
|
||||||
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
||||||
|
|
||||||
ConstructionFactory('nrcan', self._city).enrich()
|
ConstructionFactory('nrcan', self._city).enrich()
|
||||||
UsageFactory('nrcan', self._city).enrich()
|
UsageFactory('comnet', self._city).enrich()
|
||||||
|
|
||||||
def test_sra_import(self):
|
def test_sra_import(self):
|
||||||
ExportsFactory('sra', self._city, self._output_path).export()
|
ExportsFactory('sra', self._city, self._output_path).export()
|
||||||
|
@ -64,6 +64,7 @@ class TestResultsImport(TestCase):
|
||||||
ResultFactory('insel_monthly_energy_balance', self._city, self._output_path).enrich()
|
ResultFactory('insel_monthly_energy_balance', self._city, self._output_path).enrich()
|
||||||
# Check that all the buildings have heating and cooling values
|
# Check that all the buildings have heating and cooling values
|
||||||
for building in self._city.buildings:
|
for building in self._city.buildings:
|
||||||
|
a = building.distribution_systems_electrical_consumption
|
||||||
self.assertIsNotNone(building.heating_demand[cte.MONTH])
|
self.assertIsNotNone(building.heating_demand[cte.MONTH])
|
||||||
self.assertIsNotNone(building.cooling_demand[cte.MONTH])
|
self.assertIsNotNone(building.cooling_demand[cte.MONTH])
|
||||||
self.assertIsNotNone(building.heating_demand[cte.YEAR])
|
self.assertIsNotNone(building.heating_demand[cte.YEAR])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user