MathJax

MathJax

Friday, February 6, 2015

Implementing the NASA HANDY Model in R

I followed some links on twitter that talked about a simple model that described interactions between a society and its environmental resources. It was based on the Predator/Prey model, and so should be something that was simple enough for me to implement, but interesting to play around with. I found a link to a pdf of the original paper at this url:

http://www.ara.cat/societat/handy-paper-for-submission-2_ARAFIL20140317_0003.pdf

which I used to construct the formulas in an R script.

Here is the script I came up with to implement the model described in the paper:

I ran the model with the initial conditions described in the paper, but altered one of the parameters because is seemed simply too extreme. They were starting with a subsistence wage s of 1/10th of what was necessary to avoid famine. It seemed unlikely that people would continue it this situation for long, so I bumped it up to just 0.01 less than the minimum survival wage. The model still produces a stable state with an initial population of 100 commoners and 10 elites, as long as the elites get to wear elaborate feather head dresses, but starve just like anyone else. Here is a graph of the model with these initial conditions:

The model runs for 1000 years and reaches a steady state after about 200 years, nothing further happens in this simple society. There is, of course, a problem, since elites don't starve unless the society in question is on the point of collapse, so I thought that I should be a bit more realistic and bump the differential wage for the elites, (represented by parameter kappa in the model), up to 2. This produced quite a drastic result:

Despite a very low extraction rate, the civilization collapses and the population falls to zero within about 400 years. The model is a little too simplistic of course, at least as I have implemented it here. The first problem is that the only restraint on population growth is famine. In reality there is also conflict, disease, and at times, voluntary restriction of reproduction. The next problem, I would say, is that the model views the elite as entirely parasitic. Actually, at least some amount of cultural innovation is produced by the elite, thus they don't merely consume wealth, they produce some amount of it as well. In fact, it does not seem possible for a society to expand to an organization larger than a village without an elite.

Several improvements on this simple model seem possible. I thought that I might try imagining a village in Mesopotamia developing from the beginning of agriculture up until 4000BC or so. Every hundred years or so cultural innovations occur which change the parameters. The increased population increases the area that can be cultivated for instance, or better methods of irrigation and cultivation are discovered. The population would then be fed back in and the model run for another hundred years. Seems simple enough, but I have just begun setting the model up in a loop like this. The model does seem to be modelling something like a village, or an entire civilization as an aggregate. It doesn't really model interactions or expansion over an area. There were several simple Predator/Prey models that did model organisms spreading out over an area that could be incorporated into this model fairly simply. Also, an idea occurred to me a couple of years ago which I thought might be possible to test in a model like this. It should be possible to lock the money supply to the remaining ecological resources available, so that it increases when ecological resources recover, and decreases when they are exhausted. Never happen in real life, but it seems that it might work to push the model toward a steady state. Maybe I can test out a few of these ideas in a later post.