Cost now returns all the needed outputs and a small performance improvement done.
This commit is contained in:
parent
1052478ace
commit
8cb2ad265d
|
@ -136,15 +136,29 @@ class Cost:
|
|||
life_cycle_operational_costs,
|
||||
life_cycle_maintenance_costs,
|
||||
life_cycle_operational_incomes,
|
||||
life_cycle_capital_incomes
|
||||
life_cycle_capital_incomes,
|
||||
global_capital_costs,
|
||||
global_capital_incomes,
|
||||
global_end_of_life_costs,
|
||||
global_operational_costs,
|
||||
global_maintenance_costs,
|
||||
global_operational_incomes
|
||||
]
|
||||
|
||||
results.index = ['total_capital_costs_skin',
|
||||
'total_capital_costs_systems',
|
||||
'end_of_life_costs',
|
||||
'total_operational_costs',
|
||||
'total_maintenance_costs',
|
||||
'operational_incomes',
|
||||
'capital_incomes']
|
||||
results.index = [
|
||||
'total_capital_costs_skin',
|
||||
'total_capital_costs_systems',
|
||||
'end_of_life_costs',
|
||||
'total_operational_costs',
|
||||
'total_maintenance_costs',
|
||||
'operational_incomes',
|
||||
'capital_incomes',
|
||||
'global_capital_costs',
|
||||
'global_capital_incomes',
|
||||
'global_end_of_life_costs',
|
||||
'global_operational_costs',
|
||||
'global_maintenance_costs',
|
||||
'global_operational_incomes'
|
||||
]
|
||||
|
||||
return results
|
||||
|
|
|
@ -39,15 +39,14 @@ class PeakLoad:
|
|||
for thermal_zone in self._building.internal_zones[0].thermal_zones:
|
||||
lighting = thermal_zone.lighting
|
||||
for schedule in lighting.schedules:
|
||||
for value in schedule.values:
|
||||
if value * lighting.density * thermal_zone.total_floor_area > peak_lighting:
|
||||
peak_lighting = value * lighting.density * thermal_zone.total_floor_area
|
||||
peak = max(schedule.values) * lighting.density * thermal_zone.total_floor_area
|
||||
if peak > peak_lighting:
|
||||
peak_lighting = peak
|
||||
appliances = thermal_zone.appliances
|
||||
for schedule in appliances.schedules:
|
||||
for value in schedule.values:
|
||||
if value * appliances.density * thermal_zone.total_floor_area > peak_appliances:
|
||||
peak_appliances = value * appliances.density * thermal_zone.total_floor_area
|
||||
|
||||
peak = max(schedule.values) * appliances.density * thermal_zone.total_floor_area
|
||||
if peak > peak_appliances:
|
||||
peak_appliances = peak
|
||||
monthly_electricity_peak = [0.9 * peak_lighting + 0.7 * peak_appliances] * 12
|
||||
conditioning_peak = []
|
||||
for i, value in enumerate(self._building.heating_peak_load[cte.MONTH]):
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import datetime
|
||||
import glob
|
||||
import os
|
||||
import subprocess
|
||||
|
@ -25,6 +26,7 @@ class Initialize:
|
|||
@property
|
||||
def city(self):
|
||||
if self._city is None:
|
||||
start = datetime.datetime.now()
|
||||
print('init tests')
|
||||
city_file = (Path(__file__).parent / 'data/test.geojson').resolve()
|
||||
output_path = (Path(__file__).parent / 'output').resolve()
|
||||
|
@ -50,7 +52,7 @@ class Initialize:
|
|||
subprocess.run(['insel', str(insel_file)], stdout=subprocess.DEVNULL)
|
||||
ResultFactory('insel_monthly_energy_balance', city, output_path).enrich()
|
||||
self._city = city
|
||||
print('init completed')
|
||||
print(f'init completed {datetime.datetime.now() - start}')
|
||||
return self._city
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user