Compare commits

..

2 Commits

2 changed files with 23 additions and 24 deletions

View File

@ -25,9 +25,9 @@ class HubFunctionToNrcanConstructionFunction:
cte.MEDIUM_OFFICE: 'MediumOffice',
cte.LARGE_OFFICE: 'LargeOffice',
cte.COURTHOUSE: 'MediumOffice',
cte.FIRE_STATION: 'n/a',
cte.FIRE_STATION: 'Warehouse',
cte.PENITENTIARY: 'LargeHotel',
cte.POLICE_STATION: 'n/a',
cte.POLICE_STATION: 'Warehouse',
cte.POST_OFFICE: 'MediumOffice',
cte.LIBRARY: 'MediumOffice',
cte.EDUCATION: 'SecondarySchool',
@ -54,27 +54,27 @@ class HubFunctionToNrcanConstructionFunction:
cte.SMALL_HOTEL: 'SmallHotel',
cte.LARGE_HOTEL: 'LargeHotel',
cte.DORMITORY: 'SmallHotel',
cte.EVENT_LOCATION: 'n/a',
cte.CONVENTION_CENTER: 'n/a',
cte.HALL: 'n/a',
cte.GREEN_HOUSE: 'n/a',
cte.INDUSTRY: 'n/a',
cte.WORKSHOP: 'n/a',
cte.EVENT_LOCATION: 'Warehouse',
cte.CONVENTION_CENTER: 'Warehouse',
cte.HALL: 'Warehouse',
cte.GREEN_HOUSE: 'Warehouse',
cte.INDUSTRY: 'Warehouse',
cte.WORKSHOP: 'Warehouse',
cte.WAREHOUSE: 'Warehouse',
cte.WAREHOUSE_REFRIGERATED: 'Warehouse',
cte.SPORTS_LOCATION: 'n/a',
cte.SPORTS_ARENA: 'n/a',
cte.GYMNASIUM: 'n/a',
cte.MOTION_PICTURE_THEATRE: 'n/a',
cte.MUSEUM: 'n/a',
cte.PERFORMING_ARTS_THEATRE: 'n/a',
cte.TRANSPORTATION: 'n/a',
cte.AUTOMOTIVE_FACILITY: 'n/a',
cte.PARKING_GARAGE: 'n/a',
cte.RELIGIOUS: 'n/a',
cte.NON_HEATED: 'n/a',
cte.DATACENTER: 'n/a',
cte.FARM: 'n/a'
cte.SPORTS_LOCATION: 'Warehouse',
cte.SPORTS_ARENA: 'Warehouse',
cte.GYMNASIUM: 'Warehouse',
cte.MOTION_PICTURE_THEATRE: 'Warehouse',
cte.MUSEUM: 'Warehouse',
cte.PERFORMING_ARTS_THEATRE: 'Warehouse',
cte.TRANSPORTATION: 'Warehouse',
cte.AUTOMOTIVE_FACILITY: 'Warehouse',
cte.PARKING_GARAGE: 'Warehouse',
cte.RELIGIOUS: 'Warehouse',
cte.NON_HEATED: 'Warehouse',
cte.DATACENTER: 'Warehouse',
cte.FARM: 'Warehouse'
}
@property

View File

@ -164,17 +164,16 @@ class PvSystemAssessment:
total_hourly_pv_output = [rooftops_pv_output[i] + facades_pv_output[i] for i in range(len(electricity_demand))]
imported_electricity = []
exported_electricity = []
self.building.self_sufficiency['hour'] = []
self.building.self_sufficiency['percent'] = []
for i in range(len(electricity_demand)):
transfer = total_hourly_pv_output[i] - electricity_demand[i]
self.building.self_sufficiency['hour'].append(transfer)
if transfer > 0:
exported_electricity.append(transfer)
imported_electricity.append(0)
else:
exported_electricity.append(0)
imported_electricity.append(abs(transfer))
self.building.self_sufficiency['year'] = sum(self.building.self_sufficiency['hour'])
self.building.self_sufficiency['percent'] = sum(total_hourly_pv_output) / sum(electricity_demand) * 100
results = {
'building_name': self.building.name,