Agent Based Model simulation of rent control and building height regulations
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


About the project

Affitto is a suite of agent-based models (ABMs) that explores the emergent behavior within housing markets and the impact of rent control and other zoning regulations.

Contributing to our models

All of our models (including a template and examples) can be found in the /models directory. All examples are standalone .html files with inline coffeescript, while the template model follows the same structure as each of our custom models:

/model-name  # The coffeescript file in which we do most of our work.
    model-name.html    # The html page that contains the dynamic model.
    model-name.js      # The compiled version of ``.

Working in Coffeescript

To install Coffeescript, Browserify, and Coffeeify with the Node Package Manager:

$ sudo npm install -g coffee-script
$ sudo npm install -g browserify
$ sudo npm install -g coffeeify

To continuously compile coffeescript into the .js files required in the models .html, run the following:

$ watch -n 2 'rm model.js; browserify -t coffeeify --extension=".coffee" > model.js'

For example, when working on our template model:

$ cd models/_tempate/
$ coffee -wc -o . *.coffee

6:51:06 PM - compiled /Users/devonzuegel/Github/affitto/models/_template/


Our work relies heavily on AgentScript, a minimalist Agent Based Modeling framework in Javascript/Coffescript based on NetLogo agent semantics. The framework has very thorough docs and modeling examples on their Github Pages site.


Origin of Data for Model 2