CoMSES Net Discourse Forums

Artificial Anasazi 1.1.0

Replication of the well known Artificial Anasazi model that simulates the population dynamics between 800 and 1350 in the Long House Valley in Arizona. See also Marco A. Janssen (2009) Understanding Artificial Anasazi, Journal of Artificial Societies and Social Simulation 12 (4) 13
This is a companion discussion topic for the original entry at

I am running version 1.1.0 of this model in Netlogo version 5.0.3 as suggested in the dependencies.
I am able to reproduce the results as in the associated paper Janssen (2009) by simply running setup and go.

However, I find that the default setting in this implementation enables wrapping of the world.
This becomes important when agents search for a patch to set up a new farm plot.
They only consider patches which are within 1 mile (16 pixels) of a patch containing water.
The netlogo code contains this if-statement

to findFarmAndSettlement
    ifelse distance bestfarm <= watersourcedistance [set xh pxcor set yh pycor set bool 0][set bool 1]

using the function distance (and later distancexy) which calculates the “wrapped distance
(around the edges of the world) if wrapping is allowed by the topology and
the wrapped distance is shorter.”

Hence, during drought periods agents believe that potential farming patches near the bottom of the map
are close to water, because their distance to water patches in the top of the map is small in the wrapped world.

When I disable the wrapping in the netlogo settings to make the map a box (as it is in reality) rather than a torus,
the setup breaks with the error message

Cannot move turtle beyond the worlds edge.
error while waterpoint 572 running SET
  called by procedure LOAD-MAP-DATA
  called by procedure SETUP
  called by Button 'setup'

I use the original data sets, and it include two observations of water points on location 0 0 that are never used. You can take them out of the data file, or have an ineligant fix like:

ifelse meter-east > 0 and meter-north > 0 [
 set xcor 24.5 + int ((meter-east - 2392) / 93.5)
 set ycor 45 + int (37.6 + ((meter-north - 7954) / 93.5))
  set xcor 0
  set ycor 0

I also noticed that there is a similar issue with settlement data, where a historical settlement is outside the map, and a crude fix is the following (or remove it from the data set):
ifelse meter-east < 10000 and meter-north < 12000 [
set xcor (24.5 + (meter-east - 2392) / 93.5) ; this is a translation from the input data in meters into location on the map.
set ycor 45 + (37.6 + (meter-north - 7954) / 93.5)
set xcor 79
set ycor 119