Brussels. Step 1.e Micro-level Non-Residential model

In [1]:
import datetime; print(datetime.datetime.now())
2018-03-26 02:14:48.583647

Notebook abstract

A simple micro-level building stock model. The consumption model defined for the building stock works in theory exactly like the other micro level consumption model. The difference between this model and the income, electricity and water demand models is that we don’t have a micro-level consumption data set in order to extract regression coefficients. In order to define a consumption model we use predefine building typologies.

Prior non-residential model

In [2]:
import pandas as pd
In [3]:
TypesB = pd.read_csv('data/TypesB.csv', index_col=[0,1])
In [4]:
TypesB
Out[4]:
heat cool elec sqm entities p
group typ
comm Services 114.646120 42.900227 85.453653 3600.0 7610 0.383472
Food services 820.440000 125.188571 298.847619 525.0 3020 0.152179
Lodging 79.161081 23.435315 74.837117 11100.0 259 0.013051
Office building 55.291667 31.980083 92.729167 12000.0 8099 0.408113
Warehous/Storage 101.099570 1.860645 41.330108 4650.0 130 0.006551
indu Chemical - Pharmaceutical/Medical 183.492971 9.645261 198.687800 105.0 40 0.002016
Fabricated metal products 33.160702 1.528521 228.669574 105.0 95 0.004787
Food 483.129187 275.699073 255.629133 39.0 362 0.018241
Furniture 39.597494 2.899449 172.696441 105.0 45 0.002268
Machinery 27.536797 24.687100 230.904416 105.0 78 0.003930
Plastic/Rubber products 31.946667 1396.809143 516.179810 105.0 18 0.000907
Textiles - Apparel 82.170370 16.185185 243.263426 36.0 89 0.004485
In [5]:
sub_typ = TypesB.loc[:, ['heat', 'cool', 'sqm', 'entities']]
In [6]:
sub_typ_sum = sub_typ.loc[:, ['heat', 'cool']].mul(sub_typ.sqm.mul(sub_typ.entities), axis=0).sum()
In [7]:
sub_typ_sum.div(sub_typ_sum.sum())
Out[7]:
heat    0.689349
cool    0.310651
dtype: float64
In [8]:
input_sd = 0.01
In [9]:
nrb_elec = pd.DataFrame(columns=['co_mu', 'co_sd', 'p', 'dis', 'lb', 'ub'])
In [10]:
nrb_elec.loc['BuildingSqm', 'co_mu'] = ",".join([str(i) for i in TypesB.loc[:, 'sqm']])
nrb_elec.loc['BuildingSqm', 'co_sd'] = ",".join([str(i * input_sd) for i in TypesB.loc[:, 'sqm']])
nrb_elec.loc['BuildingSqm', 'dis'] = "Deterministic;n;Categorical"

nrb_elec.loc['BuildingHeat', 'co_mu'] = ",".join([str(i) for i in TypesB.loc[:, 'heat']])
nrb_elec.loc['BuildingHeat', 'co_sd'] = ",".join([str(i * input_sd) for i in TypesB.loc[:, 'heat']])
nrb_elec.loc['BuildingHeat', 'dis'] = "Deterministic;BuildingSqm;Categorical"

nrb_elec.loc['BuildingCool', 'co_mu'] = ",".join([str(i) for i in TypesB.loc[:, 'cool']])
nrb_elec.loc['BuildingCool', 'co_sd'] = ",".join([str(i * input_sd) for i in TypesB.loc[:, 'cool']])
nrb_elec.loc['BuildingCool', 'dis'] = "Deterministic;BuildingSqm;Categorical"

nrb_elec.loc['BuildingElec', 'co_mu'] = ",".join([str(i) for i in TypesB.loc[:, 'elec']])
nrb_elec.loc['BuildingElec', 'co_sd'] = ",".join([str(i * input_sd) for i in TypesB.loc[:, 'elec']])
nrb_elec.loc['BuildingElec', 'dis'] = "Deterministic;BuildingSqm;Categorical"

nrb_elec.loc[:, 'p'] = ",".join([str(i * input_sd) for i in TypesB.loc[:, 'p']])
nrb_elec.loc[:, 'lb'] = 0
In [11]:
nrb_elec.to_csv('data/table_elec_nr.csv')
In [12]:
nrb_elec
Out[12]:
co_mu co_sd p dis lb ub
BuildingSqm 3600.0,525.0,11100.0,12000.0,4650.0,105.0,105.... 36.0,5.25,111.0,120.0,46.5,1.05,1.05,0.39,1.05... 0.00383471907281,0.00152179390275,0.0001305114... Deterministic;n;Categorical 0 NaN
BuildingHeat 114.64612041392596,820.44,79.16108108108108,55... 1.1464612041392597,8.204400000000001,0.7916108... 0.00383471907281,0.00152179390275,0.0001305114... Deterministic;BuildingSqm;Categorical 0 NaN
BuildingCool 42.90022677542567,125.18857142857142,23.435315... 0.4290022677542567,1.2518857142857143,0.234353... 0.00383471907281,0.00152179390275,0.0001305114... Deterministic;BuildingSqm;Categorical 0 NaN
BuildingElec 85.45365281064835,298.84761904761905,74.837117... 0.8545365281064835,2.9884761904761907,0.748371... 0.00383471907281,0.00152179390275,0.0001305114... Deterministic;BuildingSqm;Categorical 0 NaN