This repository contains my master thesis project for the degree in Engineering and Policy Analysis at the TU Delft. It concerns the creation of a soft-link between an ABM and PBL's HESTIA model in an attempt to come closer to the integration of recognition justice in energy models.
The repository contains notebooks and .py files that have to be run in a specific order, specified below. The data used in this model is based on national and local census data as well as HESTIA's data. The code for data cleaning, validation and post-processing of the results has been written in Jupyter Notebook. The ABM itself has been written in python. HESTIA runs in a program called GeoDMS, the code is managed in Notebook++ and is written in HTML.
This project was designed using Python version 3.11. For the requirements see requirements.txt.
For HESTIA installation see https://github.com/pbl-nl/model-hestia-public.
There is a specific order in which the files have to be run to enable the simulation*. First the initialisation data has to be extracted from HESTIA. To gain access to this information a key step is to enable "Show hidden items".
BeginSituatie > StartingStateComponents > Woning > Results --> Planregio_rel; ModelObject_rel; ModelObject_str; Energielabel_rel; GebouwOptie_rel; HuishoudensGrootte > nrPersonen; Functioneel > RV, TW, KD, VT, EA, KK, VT, DK; InstallatiesperProduct > RVb, RVp, TWb, TWp, KDb, KDp.
This data is cleaned and validated in 'Data cleaning and validation.ipynb' after which the first year can be run in the ABM.
The HESTIA and ABM models must be run sequentially and cumulatively from the start year (2020) through to the end year (2027). Importantly, both models do not remember their previous states across runs, so each new step must begin from 2020 and extend to the next year in the sequence. The intermediate results should be saved in .csv files called hh_info_{year}_{seed).csv.
To extrapolate this data from HESTIA:
Tussenresultaten > year > Bebouwingscomponenten > Woning > BO > Energielabel_rel; InstallatiesperProduct > RVb, RVp, TWb, TWp, KDb, KDp; functioneel > VT, KK, EA, TW, KD, RV.
For the cost information: Tussenresultaten > year > Bebouwingscomponenten > Woning > BO > Energielabel_rel; MetervraagBerekening > result> Total; Jaarlijks > Kj_elek, Kj_gas, Kj_biomassa, Kj_olie, Kj_olie_eh, Kj_pellets, Kj_vastrecht_G, Kj_vastrecht_G, Kj_vastrecht_G, Kj_vastrecht_G, Kj_adm_LO, Kj_oh_LO.
- Several files with agent information were too large to upload to Github.
- These were files such as Agent_profile_geo.csv required for ABM initialisation and Agent_information_base.csv, which contains the values for the Theory of Planned Behaviour attributes per agent, per year.
- Should you want to use this simulation and require access to these files please contact me.
Process Overview:
- Initial year (2020):
- Run HESTIA for 2020.
- Rename the output file content.csv to hh_info_2020_{seed}.csv and move it to the appropriate folder.
- Clean this intialisation data in 'Data cleaning and validation.ipynb'.
- Run ABM for 2020 using this renamed HESTIA output.
- Subsequent years (2021–2027):
- For each new year Y, run HESTIA from 2020 to Y (i.e., cumulatively: 2020–2021, 2020–2022, ..., 2020–2030).
- Rename the resulting content.csv to hh_info_{Y}_{seed}.csv and store it appropriately.
- Update the ABM’s year = [] list to include all years from 2020 to Y.
- Run ABM from 2020 to Y, using the corresponding HESTIA output.
- Repeat This process ensures that both models operate with the full historical context up to each year, despite not having built-in memory between runs. It also results in exponentially increasing runtime, as each new year reprocesses the entire history from 2020 onward. Analysis of the results happens in folder 'Result analysis' in base_case.ipynb.
The folder Adjust_Ilse contains all files that I have adjusted for my thesis, as well as the data required to run the adjusted model. Should you want to run the multi-model please contact me for instructions on how to incorporate these into the standard HESTIA configuration.
The Hestia model is owned by PBL and TNO. Use is at your own risk; PBL and TNO are not liable for use by third parties, and no guarantee is given on software, data, key figures or information. For terms of use, see the licence. The Hestia model is intended for use by experts who are aware of the limitations and risks of the model.
- HESTIA: GNU GENERAL PUBLIC LICENSE v3.0 (https://github.com/pbl-nl/model-hestia-public?tab=GPL-3.0-1-ov-file#readme).
- CBS data: Creative CommonsNaamsvermelding (CC BY 4.0)) (https://creativecommons.org/licenses/by/4.0/deed.nl)
ilsededroog@quicknet.nl In email-subject please mention the thesis.