at -here -on can-move? clear-turtles ( ct)Ĭreate- create-ordered- create-ordered-turtles ( cro)ĭie distance distancexy downhill downhill4 dx dy face facexy forward ( fd) To see which agents (turtles, patches, links, observer) canĪctually run a primitive, consult its dictionary entry. Primitive might still be used by patches or the observer, and vice This controls the grain size of the diplay.Special: Variables - Keywords - Constants
The patch size could be derived automatically, but here it is set in the function call. It is particularly important when rasters are imported, as this is all related to resolution a corrspondence of 1 unit in netlogo space to 100 m in gis space. In this case the scale factor of 100 results in reltionship between the units used by netlogo and the GIS units. It is necessary to ensure that when a call is made to a function such as “in-radius” there is a clear This is not explicit in the examples provided. This is VITAL: The underlying coordinate system is resized. Resize-world 0 gis-width / scale_factor 0 gis-height / scale_factor Find the width of the box in GIS units (probably meters) The bounding box is read from the gis layer that is passed to this function. Set perimeter gis:property-value ? “perimeter” Some of these are read from the vector layer. Now simply place a habitat turtle at each position and set all its attributes. Let location gis:location-of (first (first (gis:vertex-lists-of ?)))
In this case there should only be one vertex, but use the code in the conventional coincides with a row in the vector layer attributes table. Notice that we need to cycle through the feature list.
overwritten once they have been converted into “turtles” of the habitat breed using the The centroids are now drawn on the interface. Check the setup-world-function below for more details. Set centroids gis:load-dataset “NFAnWood_Centroids.shp” Do not forget the scale fator! 1 km will be 10 units in the model. Links may own the property of distance, if measured. The properties of the habitats could be estended in a more detailed model The scale_factor is the ratio between the width of a netlogo patch and the unit of The global variables include the names that the GIS layers will have when imported
In fact it is very important to get this right when loading rasters and setting patch variables from them. it was all taken care of in the “setup-gis-world” function It took me a while to see why this was necessary, as I assumed There is also a global scale factor that is used to translate meters into So we have “wood” for the polygons and centroids The netlogo lists into which the gis layers are loaded have to be defined as This is a very similar little model in R.Įxtensions This makes the gis extension available. Note the simplicity of the code for actually making the model run. The patches should know their area and the true distance to neighbours. Many more realistic elements could be built from here. Watch the ouptut in order to see on which parts of the network the populations persist. The model does not take into account the area of the habitat when evaluating extinction risk nor the absolute distance between patches when evaluating colonisation. In this case, the New Forest, but other vector layers can easily be used. While the model is too simplistic to represent any real situation it is paramaterised using real GIS data and therefore can be related to a known landscape. Sensitivity could be analysed using the behaviour space tool.
HOW TO USE ITĪs the model stands it is only useful for teaching the concept. The distances between them are used to set up the links. If an unoccupied patch has any linked patch which is occupied it can be recolonised with a certain probability (col_prob expressed as % in the interface) HOW IT WORKSĬentroids are loaded using the GIS extension. This is a very simple implementation of a Levins type metapopulation.Īll patches are assumed to be homogeneous with respect to extinction risk when occupied (ext_prob expressed as % in the interface) The model files can be obtained from here. Note that the applet version does not seem to work with GIS data.