Aleksander Janczewski, Charel Felten, Mario van Rooij, Mehmet Ege Arkin
Agent-based model to simulate EU policy, wealth disparities and economic convergence.
Developed to answer the research question: How can we sustain cooperation and economic convergence in the European Union?
ABM.pdf
: report
model.py
: contains the model classagent.py
: contains the agent classserver.py
: contains some code to create a local webserver to run the model
batcher.py, para.sh, data/*, data_int_on.csv, errorplot.m
: for sensitivity analysis and plotssobol.ipynb, test.ipynb, out.csv
: jupyter notebooks used to investigate model and create plots for sensitivity analysisnuts_rg_60M_2013_lvl_2.geojson
: regions datasetrun.py
: file from mesaLICENSE, README.md, web_interface_screenshot.png
: readme and license__init__.py
: to make the folder a python module
In the base directory, run the command mesa runserver
or python server.py
to launch the web-interace on localhost. The model can also be ran from a class by initialising it and then manually calling model.step()
to progress it.
- Open 'sobol.ipynb' and choose the number of samples, and replicates to perform the saltelli sampling. After the 'out.csv' file has been created close the notebook.
- Head over to your local cluster of choice or personal slurm workload manager and submit para.sh to the job system
- A file 'data_int_on.csv' will be created which contains the data needed for the sensitivity analysis.
- Make sure the column names are defined as in e.g. 'data/data_int_off.csv'
- Reopen the 'sobol.ipynb' and run the remaining cells, which output the sobol indices.
The model is an extension of the Schelling example from mesa geo: https://github.com/Corvince/mesa-geo
All contributions can be seen across the different branches online at https://github.com/charelF/ABM