energy_demand.dwelling_stock package¶
Submodules¶
energy_demand.dwelling_stock.dw_stock module¶
Virtual Dwelling Generator - Generates a virtual dwelling stock
-
class
energy_demand.dwelling_stock.dw_stock.
Dwelling
(curr_yr, coordinates, floorarea, enduses, driver_assumptions, population=None, age=None, dwtype=None, sector=None, gva=None)[source]¶ Bases:
object
Dwelling or aggregated group of dwellings
- Parameters
curr_yr (int) – Current year of simulation
coordinates (float) – coordinates
dwtype (int) – Dwelling type id. Description can be found in daytype_lu
house_id (int) – Unique ID of dwelling or dwelling group
age (int) – Age of dwelling in years (year the building was built)
pop (float) – Dwelling population
floorarea (float) – Floor area of dwelling
hlc (float) – Heat loss coefficient
hdd (float) – Heating degree days
Note
Depending on service or residential model, not all attributes are filled (then they are inistialised as None or zero)
For every dwelling, the scenario drivers are calculated for each enduse
-
class
energy_demand.dwelling_stock.dw_stock.
DwellingStock
(dwellings, enduses)[source]¶ Bases:
object
Class of the building stock in a region
-
energy_demand.dwelling_stock.dw_stock.
generate_dw_existing
(driver_assumptions, enduses, reg_coord, region, curr_yr, dw_lu, floorarea_p, floorarea_by, dwtype_age_distr_by, floorarea_pp, gva_dw_data)[source]¶ Generates dwellings according to age, floor area and distribution assumption
- Parameters
assumptions (dict) – Assumptions
enduses (list) – Enduses
region (dict) – Region name
curr_yr (int) – Base year
dw_lu (dict) – Dwelling type look-up
floorarea_p (dict) – Fraction of floor area per dwelling type
floorarea_by (dict) – Floor area of base year
dwtype_age_distr_by (dict) – Age distribution of dwelling
floorarea_pp (dict) – Floor area per person
tot_floorarea_cy (float) – Floor are in current year
pop_by (dict) – Population in base year
- Returns
dw_stock_by – Dwelling stocks in a list
- Return type
-
energy_demand.dwelling_stock.dw_stock.
generate_dw_new
(driver_assumptions, reg_coord, enduses, dwtypes, region, curr_yr, floorarea_p_by, floorarea_pp_cy, dw_stock_new_dw, new_floorarea_cy, gva_dw_data)[source]¶ Generate dwelling objects for all new dwellings
All new dwellings are appended to the existing building stock of the region
- Parameters
- Returns
dw_stock_new_dw – List with appended dwellings
- Return type
Notes
The floor area id divided proprtionally depending on dwelling type Then the population is distributed builindg is creatd
-
energy_demand.dwelling_stock.dw_stock.
get_dwtype_distr
(dwtype_distr_by, dwtype_distr_fy, base_yr, sim_period)[source]¶ Calculates the annual distribution of dwelling types based on assumption of base and end year distribution
- Parameters
- Returns
dwtype_distr – Contains all dwelling type distribution for every year
- Return type
Note
A linear change over time is assumed
Example
out = {year: {‘dwtype’: 0.3}}
-
energy_demand.dwelling_stock.dw_stock.
get_dwtype_floor_area
(dwtype_floorarea_by, dwtype_floorarea_future, base_yr, sim_period)[source]¶ Calculates the floor area per dwelling type for every year
- Parameters
- Returns
dwtype_floor_area – Contains the floor area change per dwelling type
- Return type
Note
A linear change over time is assumed
Example
out = {year: {‘dwtype’: 0.3}}
-
energy_demand.dwelling_stock.dw_stock.
get_floorare_pp
(floorarea, reg_pop_by, base_yr, sim_period, assump_diff_floorarea_pp)[source]¶ Calculate future floor area per person depending on assumptions on final change and base year data
- Parameters
:param : base year :type : int :param sim_period: Simulation period :type sim_period: list :param assump_diff_floorarea_pp: Assumption of change in floor area up to end of simulation :type assump_diff_floorarea_pp: float
- Returns
floor_area_pp – Contains all values for floor area per person for every year
- Return type
Note
Linear change of floor area per person is assumed over time
-
energy_demand.dwelling_stock.dw_stock.
get_floorarea_dwtype_p
(dw_lookup, dw_floorarea, dwtype_distr)[source]¶ Calculates the percentage of the total floor area belonging to each dwelling type. Depending on average floor area per dwelling type and the dwelling type distribution, the percentages are calculated for ever simulation year
- Parameters
- Returns
dw_floorarea_p – Contains the percentage of the total floor area for each dwtype for every simulation year (must be 1.0 in tot)
- Return type
Notes
This calculation is necessary as the share of dwelling types may differ depending the year
-
energy_demand.dwelling_stock.dw_stock.
get_hlc
(dw_type, age)[source]¶ Calculates the linearly derived heat loss coeeficients depending on age and dwelling type
- Parameters
- Returns
hls
- Return type
Heat loss coefficient [W/m2 * K]
Notes
Source: Linear trends derived from Table 3.17 ECUK Tables https://www.gov.uk/government/collections/energy-consumption-in-the-uk
-
energy_demand.dwelling_stock.dw_stock.
get_tot_pop
(dwellings)[source]¶ Get total population of all dwellings
-
energy_demand.dwelling_stock.dw_stock.
rs_dw_stock
(region, assumptions, scenario_data, sim_yrs, dwelling_types, enduses, reg_coord, driver_assumptions, curr_yr, base_yr, virtual_building_stock_criteria)[source]¶ Creates a virtual building stock for every year and region
- Parameters
- Returns
dwelling_stock (dict) – Building stock wei
reg_dw_stock_by (Base year building stock) – reg_building_stock_yr : Building stock for every simulation year
Notes
The assumption about internal temperature change is used as for each dwelling the hdd are calculated based on wheater data and assumption on t_base
Doesn’t take floor area as an input but calculates floor area based on floor area pp parameter. However, floor area could be read in by:
1.) Inserting tot_floorarea_cy = data[‘rs_floorarea’][curr_yr]
- 2.) Replacing ‘dwtype_floor_area’, ‘dwtype_distr’ and ‘data_floorarea_pp’
with more specific information from real building stock model
-
energy_demand.dwelling_stock.dw_stock.
ss_dw_stock
(region, enduses, sectors, scenario_data, reg_coord, assumptions, curr_yr, base_yr, virtual_building_stock_criteria)[source]¶ Create dwelling stock for service sector
- Parameters
- Returns
dwelling_stock – List with objects
- Return type
Note
Iterate years and change floor area depending on assumption on linear change up to ey