extensions [ gis ]
globals [
mesos-killed-by-neos ; counter to keep track of the number of mesos killed by neos
agr_potential ; agr_potential map (apc in QGis)
]
breed [ mesos meso ]
breed [ neos neo ]
neos-own [ settled? ]
turtles-own [ age
energy]
patches-own [ apc ]
to load-gis
set agr_potential gis:load-dataset "APC2.asc" ; load agr_potential raster dataset
gis:set-world-envelope-ds gis:envelope-of agr_potential
gis:apply-raster agr_potential apc ; give to each patch the value of its agr_potential mean
end
to recolor-patches
ask patches [
ifelse apc > 0 [ set pcolor scale-color brown apc 1 0 ] [
set pcolor 97
]
]
end
to setup
clear-all
load-gis
recolor-patches
set-default-shape mesos "person"
create-mesos number-of-mesos [
set size 4
set color red
set age random (25) ; average mesos age
set energy random (40)
move-to one-of patches with [ apc >= 0.3 and pycor >= 12 and pxcor <= -25 ]
]
set-default-shape neos "person"
create-neos number-of-neos [
set size 4
set color blue
set age random (30 ) ; average neo age
set energy random (50)
move-to one-of patches with [ apc >= 0.3 and apc <= 0.4 and pxcor >= -25 and pxcor <= -10 and pycor >= 30 and pycor <= 55 ] ; localisation of Early Neolithic in PPN area
set heading 5 + random 10 ; generally head west
set settled? false
]
set mesos-killed-by-neos 0
reset-ticks
end
to go
; mesos move and reproduce
ask mesos [
move meso-speed
reproduce (20) meso-birth-rate ; mesos reproduce after age 20
]
; neos decide whether to move or settle where they are, and then they hunt and reproduce
ask neos [
let mesos-nearby mesos in-radius 5
; neos have a chance of settling inv_proportional to the number of mesos in their immediate vicinity
if not settled? and random 100 < count mesos-nearby [
set settled? true
]
if not settled? [
if any? mesos-nearby [
face min-one-of mesos-nearby [ distance myself ]
]
move neo-speed
]
if any? mesos-here [
let r random 100
if r < 3 [ die ] ; mesos have a 3% chance of killing the neo
if r < 3 + odds-of-killing [
ask one-of mesos-here [ die ] ; successfully hunt a mesos!
set mesos-killed-by-neos mesos-killed-by-neos + 1
]
]
reproduce ( 17 ) neo-birth-rate ; neos reproduce after age 17
]
die-naturally ; mesos and neos die if they're old or crowded
ask turtles [ set age age + 1 ]
ask turtles [ set energy energy - 8 ] ;at each round, each turtle spend 10 points of energy
tick
end
to move [ dist ]
right random 20
left random 20
let turn one-of [ -10 10 ] ; avoid moving into the ocean or outside the world by turning left (-10) or right (10) until the patch ahead is not an ocean patch
while [ not land-ahead dist ] [
set heading heading + turn
]
set energy energy + (50 * apc ) ; energy gain (prop of agr_potential coeff)
forward dist
end
to-report land-ahead [ dist ]
let target patch-ahead dist
report target != nobody and [ apc >= 0.05 ] of target and [ apc <= 1 ] of target
end
to reproduce [ min-age birth-rate ]
if age >= min-age and random 100 < birth-rate [
hatch 1 [
set age 0
set energy 50
if breed = neos [ set settled? false ]
]
]
end
to die-naturally
ask mesos [
if age > 40 and random-float 100 < 10 [ die ] ; % chance of dying if they're over the age
if density > 0.6 and random-float 100 < 50 [ die ] ; % chance of dying if their density is too high
if energy < 10 and random-float 100 < 50 [ die ] ; % chance of dying if their energy is too low
if energy = 0 [ die ]
if random-float 100 < 0.33 [ die ] ; finally, all mesos have a 0.33% chance of dying.
; if [ pcolor ] of patch-here = green + 3 and random-float 100 < 5 [ ; if they are on a patch affected by climate change, they get a 5% chance of dying
; set mesos-killed-by-climate-change mesos-killed-by-climate-change + 1
; die
; ]
]
ask neos [
if age > 30 and random-float 100 < 5 [ die ] ; % chance of dying if they're over the age
if density > 0.4 and random-float 100 < 50 [ die ] ; % chance of dying if their density is too high
if energy < 10 and random-float 100 < 50 [ die ] ; % chance of dying if their energy is too low
if random-float 100 < 0.33 [ die ] ; in addition, all neos have a 0.33% chance of dying
]
end
to-report density ; turtle reporter
let nearby-turtles (turtle-set turtles-on neighbors turtles-here)
report (count nearby-turtles with [ breed = [ breed ] of myself ]) / 9
end
; Copyright 2020 Thomas Perrin.
; See Info tab for full copyright and license.
@#$#@#$#@
GRAPHICS-WINDOW
375
15
1400
417
-1
-1
3.9
1
10
1
1
1
0
0
0
1
-260
0
0
100
1
1
1
years
30.0
MONITOR
40
355
120
400
years
ticks
0
1
11
SLIDER
10
240
365
273
neo-birth-rate
neo-birth-rate
0
20
10.0
0.1
1
%
HORIZONTAL
SLIDER
10
205
365
238
meso-birth-rate
meso-birth-rate
0
10
4.2
0.1
1
%
HORIZONTAL
SLIDER
10
275
365
308
odds-of-killing
odds-of-killing
1
97
50.0
1
1
%
HORIZONTAL
SLIDER
10
50
365
83
number-of-neos
number-of-neos
0
100
10.0
5
1
NIL
HORIZONTAL
SLIDER
10
15
365
48
number-of-mesos
number-of-mesos
0
400
100.0
5
1
NIL
HORIZONTAL
BUTTON
120
95
180
128
setup
setup
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
BUTTON
205
95
265
128
go
go
T
1
T
OBSERVER
NIL
NIL
NIL
NIL
0
PLOT
375
440
1400
625
Population
Years
Frequency
0.0
10.0
0.0
10.0
true
true
"" ""
PENS
"mesos" 1.0 0 -2674135 true "" "plot count mesos"
"neos" 1.0 0 -13345367 true "" "plot count neos"
SLIDER
10
135
365
168
neo-speed
neo-speed
0
1
0.2
0.05
1
patches
HORIZONTAL
SLIDER
10
170
365
203
meso-speed
meso-speed
0
1
0.1
0.05
1
patches
HORIZONTAL
MONITOR
245
355
340
400
neos
count neos
17
1
11
MONITOR
125
355
240
400
mesos
count mesos
17
1
11
BUTTON
15
555
97
588
NIL
load-gis
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
BUTTON
15
595
147
628
NIL
recolor-patches
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
@#$#@#$#@
## WHAT IS IT?
Agent base modelisation of the neolithization process in the Mediterranean area and interactions between autochtonous hunter-gatherers and neolithic settlers.
## HOW IT WORKS
The background map combines an elevation map and a climatic one (made in QGis).
- Elevation map: gtopo1km (https://www.usgs.gov/centers/eros/science/usgs-eros-archive-digital-elevation-global-30-arc-second-elevation-gtopo30?qt-science_center_objects=0#qt-science_center_objects) >
The working area is restricted to -10,42,28,48 frame, and is changed intor a raster with a grid of 0.25° (i.e. ~22km). For each square, the elevation mean is calculated and rounded to the nearest integer. They are the then classified into 5 types: 1=Sub-montane level (z<500 m asl), 2=Mountain level (500≤z<1500 m), 3=Subalpine level (1500≤z<2000 m), 4=Alpine level (2000≤z<2700 m), 5=Eternal snow level (2700≤z).
- Climatic map: extract from RUBEL F., KOTTEK M. (2010) ‒ Observed and projected climate shifts 1901–2100 depicted by world maps of the Köppen-Geiger climate classification, Meteorologische Zeitschrift, 19, 2, p.p. 135‑141 under a 0.25° grid (the original map was with a 0.5° grid). A k indice is subjctively estimated for the agricultural potential.
This pitch of 0.25° of the grid partially compensates partially for the rise in sea level.
These two maps are combined to calculate a kind of agricultural potential coefficient (APC) ; APC = k/Z (k= climatic type; Z = elevation class). The APC for the seas is manually sets to 0.1 (for marine food resources and navigation possibilities). The APC for inland desert is manually sets to 0.02 (no food resources but possible move).
The APC vector map is changed into a raster one and then exported into an ascii file (float32 format) for the integraiton into NetLogo.
From QGis, the header of this file has to be manually changed with the followings:
north: 48N
south: 28N
east: 42E
west: 10W
rows: 100
cols: 260
## HOW TO USE IT?
The number_of_mesos slider sets the initial number of Mesolithic people (aleatory dispersal in area with APC>=0.3).
The number_of_neos slider sets the initial number of Neolithic people (only in the Near East area with 0.3>=APC>=0.4).
SETUP initializes the mesos and neos people. The number of he turtles for each population can be set above (by default, mesos=100, neo=10).
GO starts and stops the simulation.
The neo-speed slider sets the distance, in patches, that a Neolithic can travel each year (default 0.2).
The meso-speed slider sets the distance, in patches, that a Mesolithic can travel each year (default:0.50).
The neo-birth-rate slider sets the likelihood of Neolithic reproducing each year (default:10%).
The meso-birth-rate slider sets the likelihood of Mesolithic reproducing each year (default:4.2%).
The odds-of-killing slider sets the odds that when a Neolithic encounters a Mesolithic, the Mesolithic will die (==really die or becomming neolithic).
The years monitor displays elapsed years in the model.
The population monitor shows dynamically the current number of Neolithic and Mesolithic people.
## THINGS TO NOTICE
Each turtle is born with an energy of 50
Moving costs energy
## THINGS TO TRY
Vary the odds-of-killing. How does that affect the neolithic progression?
Vary the ratio of neos-speed and meso-speed. How does that affect the neolithic diffusion?
Vary the both birth rates to see how it affects the Neolithic diffusion. Under 4%, Mesolithic is note viable.
## EXTENDING THE MODEL
Things to do:
- refine the map (intergates rivers; join the -20m asl squares)
- integrate real past climatic areas
- refine Mesolithic starting localization
- adjust birth rates to real data
...
## NETLOGO FEATURES
This model is derived from the Mammoths one:
Wilensky, U. (1997). NetLogo Mammoths model. http://ccl.northwestern.edu/netlogo/models/Mammoths. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
## CREDITS AND REFERENCES
* EPSTEIN J.M. (2006) ‒Generative Social Science: Studies in Agent-Based Computational Modeling, Princeton University Press, 2006, 378 p.
* BOCQUET-APPEL J.-P. et al. (2014) ‒ Multi-agent Modelling of the Trajectory of the LBK Neolithic: A Study in Progress, in A. Whittle et P. Bickle dir, Early Farmers: The View from Archaeology and Science, Proceedings of the British Academy, British Academy, p.53‑69.
* ZANOTTI A. (2016) ‒ Modélisation de type multi-agents en archéologie : l’expansion des premiers agriculteurs Balkaniques : adaptation du modèle OBRESOC : manipulation et exploration des données simulées, phdthesis, École pratique des hautes études - EPHE PARIS Consultable à https://tel.archives-ouvertes.fr/tel-02102276
## HOW TO CITE
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
* Perrin, T. (2020). Netlogo Mediterranean Neolithization model.
CNRS, UMR5608 TRACES, Toulouse Jean-Jaurès University, Toulouse, France.
Please cite the NetLogo software as:
* Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
## COPYRIGHT AND LICENSE
Copyright 2020 Thomas Perrin.

This work is licensed under a Creative Commons Attribution 4.0 International License.
@#$#@#$#@
default
true
0
Polygon -7566196 true true 150 5 40 250 150 205 260 250
mammoth
false
0
Polygon -7500403 true true 195 181 180 196 165 196 166 178 151 148 151 163 136 178 61 178 45 196 30 196 16 178 16 163 1 133 16 103 46 88 106 73 166 58 196 28 226 28 255 78 271 193 256 193 241 118 226 118 211 133
Rectangle -7500403 true true 165 195 180 225
Rectangle -7500403 true true 30 195 45 225
Rectangle -16777216 true false 165 225 180 240
Rectangle -16777216 true false 30 225 45 240
Line -16777216 false 255 90 240 90
Polygon -7500403 true true 0 165 0 135 15 135 0 165
Polygon -1 true false 224 122 234 129 242 135 260 138 272 135 287 123 289 108 283 89 276 80 267 73 276 96 277 109 269 122 254 127 240 119 229 111 225 100 214 112
person
false
0
Circle -7500403 true true 110 5 80
Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90
Rectangle -7500403 true true 127 79 172 94
Polygon -7500403 true true 195 90 240 150 225 180 165 105
Polygon -7500403 true true 105 90 60 150 75 180 135 105
@#$#@#$#@
NetLogo 6.1.1
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
default
0.0
-0.2 0 0.0 1.0
0.0 1 1.0 0.0
0.2 0 0.0 1.0
link direction
true
0
Line -7500403 true 150 150 90 180
Line -7500403 true 150 150 210 180
@#$#@#$#@
1
@#$#@#$#@