From aaa6cb848b7cdf6e145be208bbee7bcfa7c85ca7 Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Fri, 2 Aug 2024 15:32:14 +1200 Subject: [PATCH] updated to 6.4.0 and also switched R to Simple R --- as-released/base-models/1.1-life.nlogo | 4 +- .../1.2-galtonBoard-Additive.nlogo | 4 +- .../1.3-galtonBoard-Multiplicative.nlogo | 4 +- as-released/base-models/2.1-scale-mrc.nls | 2 +- as-released/base-models/2.1-scale.nlogo | 4 +- .../2.2-flugge-2012-spatial-bd-noR.nlogo | 4 +- as-released/base-models/2.3-csr.nlogo | 4 +- .../base-models/2.4-inhomPoisson.nlogo | 4 +- as-released/base-models/2.5-inhibition.nlogo | 4 +- as-released/base-models/2.6-cluster.nlogo | 4 +- .../base-models/2.7-double-cluster.nlogo | 4 +- .../base-models/3.1-local-average.nlogo | 4 +- as-released/base-models/3.10-schelling.nlogo | 4 +- .../base-models/3.11-schelling-as-IPS.nlogo | 4 +- .../base-models/3.12-subdivision.nlogo | 4 +- .../base-models/3.13-iterated-voronoi.nlogo | 4 +- .../base-models/3.14-spots-and-stripes.nlogo | 4 +- .../base-models/3.15-Nowak-May-1992.nlogo | 4 +- as-released/base-models/3.16-IPD.nlogo | 4 +- .../3.2-vicsek-galaxy-formation.nlogo | 4 +- .../base-models/3.3-totalistic_automata.nlogo | 4 +- .../3.4-BasicContactProcess2D.nlogo | 4 +- .../3.5-CompetingContactProcess2D.nlogo | 4 +- .../3.6-simple-grass-brush-trees.nlogo | 4 +- as-released/base-models/3.7-simpleRSP.nlogo | 4 +- as-released/base-models/3.8-voter-model.nlogo | 4 +- .../3.9-voter-model-with-mutation.nlogo | 4 +- .../base-models/4.1-random-walks.nlogo | 4 +- .../4.2-correlation-length-walks.nlogo | 4 +- .../4.3-Simon-lattice-forager.nlogo | 4 +- .../base-models/4.4-manhattan-sausages.nlogo | 4 +- .../base-models/4.5-monkeys-foraging.nlogo | 4 +- .../4.6-foraging-with-regrowth.nlogo | 4 +- as-released/base-models/4.7-flocking.nlogo | 4 +- .../base-models/5.1-sitePercolation.nlogo | 4 +- as-released/base-models/5.10-edenTip.nlogo | 4 +- .../5.11-edenWilliamsBjerknes.nlogo | 4 +- .../base-models/5.12-edenSingleOnLine.nlogo | 4 +- .../base-models/5.13-edenEpidemic.nlogo | 4 +- as-released/base-models/5.14-benguiguiP.nlogo | 4 +- .../5.15-edenSingleOnLineLDD.nlogo | 4 +- .../base-models/5.16-onlattice-dla.nlogo | 4 +- .../base-models/5.17-simpleNeutral.nlogo | 4 +- as-released/base-models/5.18-simmap.nlogo | 4 +- as-released/base-models/5.19-dsFFM.nlogo | 4 +- .../base-models/5.2-antLabyrinth.nlogo | 4 +- .../base-models/5.20-FFM-ContLsp.nlogo | 4 +- .../base-models/5.21-starkGullying.nlogo | 4 +- .../base-models/5.3-firePercolation.nlogo | 4 +- .../base-models/5.4-percolationBackBone.nlogo | 4 +- .../5.5-invasionPercolationWithTrapping.nlogo | 4 +- ...nvasionPercolationStarkDrainageModel.nlogo | 4 +- as-released/base-models/5.7-edenSimple.nlogo | 4 +- .../base-models/5.8-edenSimpleInverse.nlogo | 4 +- as-released/base-models/5.9-edenTree.nlogo | 4 +- ...1-life-under-different-update-models.nlogo | 4 +- ...y-rule-under-different-update-models.nlogo | 4 +- .../base-models/6.3-event-queue-simple.nlogo | 4 +- .../base-models/6.4-hex-array-voter.nlogo | 4 +- .../base-models/6.5-voronoi-voter.nlogo | 4 +- .../base-models/6.6-infinite-life.nlogo | 4 +- .../7.1-dispersal-fragmentation.nlogo | 4 +- as-released/base-models/9.1-cale-model.nlogo | 4 +- as-released/license.html | 2 +- .../using-R/2.2-flugge-2012-spatial-bd.nlogo | 4 +- as-released/using-R/2.3-csr-using-R.nlogo | 4 +- .../using-R/2.4-inhomPoisson-using-R.nlogo | 4 +- .../using-R/2.5-inhibition-using-R.nlogo | 4 +- as-released/using-R/2.6-cluster-using-R.nlogo | 2 +- as-released/using-R/2.7-double-cluster.nlogo | 4 +- .../using-R/4.1-random-walks-using-R.nlogo | 4 +- .../4.5-monkeys-foraging-using-R.nlogo | 4 +- .../using-R/4.5-monkeys-foraging.nlogo | 4 +- as-released/using-R/4.5-r-snapshots-3.nls | 2 +- .../using-R/4.7-flocking-using-R.nlogo | 4 +- .../using-R/5.1-sitePercolation-using-R.nlogo | 4 +- .../using-R/5.10-edenTip-using-R.nlogo | 4 +- .../using-R/5.14-benguiguiP-using-R.nlogo | 4 +- .../5.15-edenSingleOnLineLDD-using-R.nlogo | 4 +- .../using-R/5.2-antLabyrinth-using-R.nlogo | 4 +- .../using-R/5.7-edenSimple-using-R.nlogo | 4 +- .../using-R/5.9-edenTree-using-R.nlogo | 4 +- base-models/1.1-life.nlogo | 6 +- base-models/1.2-galtonBoard-Additive.nlogo | 6 +- .../1.3-galtonBoard-Multiplicative.nlogo | 6 +- base-models/2.1-classes.txt | 7 +- base-models/2.1-scale-mrc.nls | 2 +- base-models/2.1-scale.nlogo | 10 +- .../2.2-flugge-2012-spatial-bd-noR.nlogo | 6 +- base-models/2.3-csr.nlogo | 161 +++--- base-models/3.1-local-average.nlogo | 6 +- base-models/3.10-schelling.nlogo | 6 +- base-models/3.11-schelling-as-IPS.nlogo | 6 +- base-models/3.12-subdivision.nlogo | 6 +- base-models/3.13-iterated-voronoi.nlogo | 6 +- base-models/3.14-spots-and-stripes.nlogo | 6 +- base-models/3.15-Nowak-May-1992.nlogo | 6 +- base-models/3.16-IPD.nlogo | 14 +- base-models/3.2-vicsek-galaxy-formation.nlogo | 6 +- base-models/3.3-totalistic_automata.nlogo | 14 +- base-models/3.4-BasicContactProcess2D.nlogo | 6 +- .../3.5-CompetingContactProcess2D.nlogo | 6 +- .../3.6-simple-grass-brush-trees.nlogo | 6 +- base-models/3.7-simpleRSP.nlogo | 6 +- base-models/3.8-voter-model.nlogo | 6 +- .../3.9-voter-model-with-mutation.nlogo | 6 +- base-models/4.1-random-walks.nlogo | 6 +- .../4.2-correlation-length-walks.nlogo | 6 +- base-models/4.3-Simon-lattice-forager.nlogo | 8 +- base-models/4.4-manhattan-sausages.nlogo | 10 +- base-models/4.5-monkeys-foraging.nlogo | 6 +- base-models/4.6-foraging-with-regrowth.nlogo | 20 +- base-models/4.7-flocking.nlogo | 6 +- base-models/5.1-sitePercolation.nlogo | 44 +- base-models/5.10-edenTip.nlogo | 6 +- base-models/5.11-edenWilliamsBjerknes.nlogo | 6 +- base-models/5.12-edenSingleOnLine.nlogo | 6 +- base-models/5.13-edenEpidemic.nlogo | 14 +- base-models/5.14-benguiguiP.nlogo | 6 +- base-models/5.16-onlattice-dla.nlogo | 10 +- base-models/5.17-simpleNeutral.nlogo | 8 +- base-models/5.18-simmap.nlogo | 6 +- base-models/5.19-dsFFM.nlogo | 6 +- base-models/5.2-antLabyrinth.nlogo | 6 +- base-models/5.20-FFM-ContLsp.nlogo | 6 +- base-models/5.21-starkGullying.nlogo | 12 +- base-models/5.3-firePercolation.nlogo | 6 +- base-models/5.4-percolationBackBone.nlogo | 16 +- .../5.5-invasionPercolationWithTrapping.nlogo | 8 +- ...nvasionPercolationStarkDrainageModel.nlogo | 6 +- base-models/5.7-edenSimple.nlogo | 6 +- base-models/5.8-edenSimpleInverse.nlogo | 6 +- base-models/5.9-edenTree.nlogo | 6 +- ...1-life-under-different-update-models.nlogo | 6 +- ...y-rule-under-different-update-models.nlogo | 8 +- base-models/6.3-event-queue-simple.nlogo | 6 +- base-models/6.4-hex-array-voter.nlogo | 14 +- base-models/6.5-voronoi-voter.nlogo | 8 +- base-models/6.6-infinite-life.nlogo | 23 +- base-models/7.1-dispersal-fragmentation.nlogo | 6 +- base-models/8.1-human-demography_v1.6.nls | 2 +- .../8.1-hunting-and-gathering_v1.6.nls | 2 +- base-models/8.1-landscape-demography_v1.6.nls | 2 +- base-models/8.1-leGUME_v1.6.nlogo | 6 +- base-models/8.1-simmap_code.nls | 2 +- base-models/8.1-utilities_v1.6.nls | 2 +- base-models/9.1-cale-model.nlogo | 6 +- base-models/pp-utils.nls | 60 +++ misc/misc-5.1a-bondPercolation.nlogo | 6 +- misc/misc-BrousseTigre-ThierryEtAl.nlogo | 6 +- .../misc-Vicsek-Gregoire-et-al-flocking.nlogo | 6 +- misc/misc-VoronoiDynamic.nlogo | 6 +- misc/misc-flocking-with-targets-no-R.nlogo | 6 +- misc/misc-inhomPoissonCluster.nlogo | 6 +- misc/misc-ising.nlogo | 6 +- ...isc-self-similar-splodgeness-abounds.nlogo | 6 +- misc/misc-simmap.nlogo | 6 +- misc/misc-termite-dune-fields-h.nlogo | 2 +- misc/misc-termite-dune-fields.nlogo | 2 +- misc/misc-two-flocks-no-R.nlogo | 6 +- misc/misc-voter-model-two-ranges.nlogo | 6 +- ...isc-voter-model-uniques-start-states.nlogo | 6 +- ...ter-model-with-mutation-species-area.nlogo | 4 +- odds-and-ends/CC_license.txt | 2 +- odds-and-ends/MIT_license.txt | 2 +- odds-and-ends/how-to-cite-and-license.txt | 2 +- using-R/2.3-csr-R.nlogo | 231 ++++----- using-R/2.4-inhomPoisson.nlogo | 460 +++++++----------- using-R/2.5-inhibition.nlogo | 368 ++++++-------- using-R/2.6-cluster .nlogo | 447 ++++++----------- using-R/2.7-doubleCluster.nlogo | 452 ++++++----------- using-R/3.1-local-average-using-R.nlogo | 89 ++-- .../3.2-vicsek-galaxy-formation-using-R.nlogo | 22 +- using-R/4.1-r-snapshots.nls | 157 +++--- using-R/4.1-random-walks-using-R.nlogo | 243 ++++----- using-R/4.4-manhattan-sausages-using-R.nlogo | 46 +- using-R/4.5-monkeys-foraging-using-R.nlogo | 57 +-- using-R/4.5-r-snapshots-3.nls | 83 ++-- using-R/4.7-flocking-using-R.nlogo | 139 +++--- using-R/5.1-sitePercolation-using-R.nlogo | 61 ++- using-R/5.10-edenTip-using-R.nlogo | 62 ++- using-R/5.14-benguiguiP-using-R.nlogo | 63 ++- .../5.15-edenSingleOnLineLDD-using-R.nlogo | 107 ++-- using-R/5.2-antLabyrinth-using-R.nlogo | 217 ++++----- using-R/5.7-edenSimple-using-R.nlogo | 13 +- using-R/5.9-edenTree-using-R.nlogo | 14 +- using-R/5.x-r-clusters.nls | 113 ++--- using-R/Rplots.pdf | Bin 0 -> 3611 bytes using-R/pp-r-utils.nls | 45 ++ using-R/pp-utils.nls | 60 +++ 190 files changed, 2100 insertions(+), 2576 deletions(-) create mode 100644 base-models/pp-utils.nls create mode 100644 using-R/Rplots.pdf create mode 100644 using-R/pp-r-utils.nls create mode 100644 using-R/pp-utils.nls diff --git a/as-released/base-models/1.1-life.nlogo b/as-released/base-models/1.1-life.nlogo index 4314e7a..1cfc155 100644 --- a/as-released/base-models/1.1-life.nlogo +++ b/as-released/base-models/1.1-life.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -325,7 +325,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/1.2-galtonBoard-Additive.nlogo b/as-released/base-models/1.2-galtonBoard-Additive.nlogo index ff82f24..fe23fb2 100644 --- a/as-released/base-models/1.2-galtonBoard-Additive.nlogo +++ b/as-released/base-models/1.2-galtonBoard-Additive.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -196,7 +196,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/1.3-galtonBoard-Multiplicative.nlogo b/as-released/base-models/1.3-galtonBoard-Multiplicative.nlogo index c9e2509..ccad853 100644 --- a/as-released/base-models/1.3-galtonBoard-Multiplicative.nlogo +++ b/as-released/base-models/1.3-galtonBoard-Multiplicative.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -281,7 +281,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/2.1-scale-mrc.nls b/as-released/base-models/2.1-scale-mrc.nls index b688f6f..370d0a5 100644 --- a/as-released/base-models/2.1-scale-mrc.nls +++ b/as-released/base-models/2.1-scale-mrc.nls @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information diff --git a/as-released/base-models/2.1-scale.nlogo b/as-released/base-models/2.1-scale.nlogo index 9129ec6..2918c53 100644 --- a/as-released/base-models/2.1-scale.nlogo +++ b/as-released/base-models/2.1-scale.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -378,7 +378,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo b/as-released/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo index b19798e..2473170 100644 --- a/as-released/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo +++ b/as-released/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -500,7 +500,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/2.3-csr.nlogo b/as-released/base-models/2.3-csr.nlogo index 1e2fd87..52f810b 100644 --- a/as-released/base-models/2.3-csr.nlogo +++ b/as-released/base-models/2.3-csr.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -206,7 +206,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/2.4-inhomPoisson.nlogo b/as-released/base-models/2.4-inhomPoisson.nlogo index ce57675..7739c5d 100644 --- a/as-released/base-models/2.4-inhomPoisson.nlogo +++ b/as-released/base-models/2.4-inhomPoisson.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -393,7 +393,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/2.5-inhibition.nlogo b/as-released/base-models/2.5-inhibition.nlogo index a2a8aa6..04e98e7 100644 --- a/as-released/base-models/2.5-inhibition.nlogo +++ b/as-released/base-models/2.5-inhibition.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -347,7 +347,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/2.6-cluster.nlogo b/as-released/base-models/2.6-cluster.nlogo index e0a6aa3..5ae7f6f 100644 --- a/as-released/base-models/2.6-cluster.nlogo +++ b/as-released/base-models/2.6-cluster.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -480,7 +480,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/2.7-double-cluster.nlogo b/as-released/base-models/2.7-double-cluster.nlogo index 6e68e2e..e830a08 100644 --- a/as-released/base-models/2.7-double-cluster.nlogo +++ b/as-released/base-models/2.7-double-cluster.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -510,7 +510,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.1-local-average.nlogo b/as-released/base-models/3.1-local-average.nlogo index bc2e388..14c574f 100644 --- a/as-released/base-models/3.1-local-average.nlogo +++ b/as-released/base-models/3.1-local-average.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -301,7 +301,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.10-schelling.nlogo b/as-released/base-models/3.10-schelling.nlogo index 7b482a6..e36d5a1 100644 --- a/as-released/base-models/3.10-schelling.nlogo +++ b/as-released/base-models/3.10-schelling.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -393,7 +393,7 @@ You should also cite appropriate examples of the Schelling model, although it is ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.11-schelling-as-IPS.nlogo b/as-released/base-models/3.11-schelling-as-IPS.nlogo index c93403e..0f18d68 100644 --- a/as-released/base-models/3.11-schelling-as-IPS.nlogo +++ b/as-released/base-models/3.11-schelling-as-IPS.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -222,7 +222,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.12-subdivision.nlogo b/as-released/base-models/3.12-subdivision.nlogo index cf1ed69..cd14819 100644 --- a/as-released/base-models/3.12-subdivision.nlogo +++ b/as-released/base-models/3.12-subdivision.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -300,7 +300,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.13-iterated-voronoi.nlogo b/as-released/base-models/3.13-iterated-voronoi.nlogo index 3d4f9c1..2824f65 100644 --- a/as-released/base-models/3.13-iterated-voronoi.nlogo +++ b/as-released/base-models/3.13-iterated-voronoi.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -146,7 +146,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.14-spots-and-stripes.nlogo b/as-released/base-models/3.14-spots-and-stripes.nlogo index 2e2a4a2..e9f43f4 100644 --- a/as-released/base-models/3.14-spots-and-stripes.nlogo +++ b/as-released/base-models/3.14-spots-and-stripes.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -289,7 +289,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.15-Nowak-May-1992.nlogo b/as-released/base-models/3.15-Nowak-May-1992.nlogo index cbaf00f..4c5f9f1 100644 --- a/as-released/base-models/3.15-Nowak-May-1992.nlogo +++ b/as-released/base-models/3.15-Nowak-May-1992.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -215,7 +215,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.16-IPD.nlogo b/as-released/base-models/3.16-IPD.nlogo index 3570ed3..721d5af 100644 --- a/as-released/base-models/3.16-IPD.nlogo +++ b/as-released/base-models/3.16-IPD.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -422,7 +422,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.2-vicsek-galaxy-formation.nlogo b/as-released/base-models/3.2-vicsek-galaxy-formation.nlogo index 2689ee4..0e6b366 100644 --- a/as-released/base-models/3.2-vicsek-galaxy-formation.nlogo +++ b/as-released/base-models/3.2-vicsek-galaxy-formation.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -253,7 +253,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-14 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.3-totalistic_automata.nlogo b/as-released/base-models/3.3-totalistic_automata.nlogo index 8fb841f..a25d8d9 100644 --- a/as-released/base-models/3.3-totalistic_automata.nlogo +++ b/as-released/base-models/3.3-totalistic_automata.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -772,7 +772,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.4-BasicContactProcess2D.nlogo b/as-released/base-models/3.4-BasicContactProcess2D.nlogo index 91dd4ec..f194e67 100644 --- a/as-released/base-models/3.4-BasicContactProcess2D.nlogo +++ b/as-released/base-models/3.4-BasicContactProcess2D.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -270,7 +270,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-14 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.5-CompetingContactProcess2D.nlogo b/as-released/base-models/3.5-CompetingContactProcess2D.nlogo index ac597dc..a66b05e 100644 --- a/as-released/base-models/3.5-CompetingContactProcess2D.nlogo +++ b/as-released/base-models/3.5-CompetingContactProcess2D.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -307,7 +307,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-14 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.6-simple-grass-brush-trees.nlogo b/as-released/base-models/3.6-simple-grass-brush-trees.nlogo index 4b5e4db..a46b72e 100644 --- a/as-released/base-models/3.6-simple-grass-brush-trees.nlogo +++ b/as-released/base-models/3.6-simple-grass-brush-trees.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -263,7 +263,7 @@ This means that although there are three particle types in the system (only two ## COPYRIGHT AND LICENSE -Copyright 2011-14 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.7-simpleRSP.nlogo b/as-released/base-models/3.7-simpleRSP.nlogo index 56d9dc2..aea0559 100644 --- a/as-released/base-models/3.7-simpleRSP.nlogo +++ b/as-released/base-models/3.7-simpleRSP.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -236,7 +236,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-14 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.8-voter-model.nlogo b/as-released/base-models/3.8-voter-model.nlogo index ca660d3..5ac1046 100644 --- a/as-released/base-models/3.8-voter-model.nlogo +++ b/as-released/base-models/3.8-voter-model.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -219,7 +219,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-14 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/3.9-voter-model-with-mutation.nlogo b/as-released/base-models/3.9-voter-model-with-mutation.nlogo index dc02269..a26a59d 100644 --- a/as-released/base-models/3.9-voter-model-with-mutation.nlogo +++ b/as-released/base-models/3.9-voter-model-with-mutation.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-14 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -337,7 +337,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-14 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/4.1-random-walks.nlogo b/as-released/base-models/4.1-random-walks.nlogo index 8294424..d4099d5 100644 --- a/as-released/base-models/4.1-random-walks.nlogo +++ b/as-released/base-models/4.1-random-walks.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -538,7 +538,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/4.2-correlation-length-walks.nlogo b/as-released/base-models/4.2-correlation-length-walks.nlogo index 5e5a52c..8fd6d91 100644 --- a/as-released/base-models/4.2-correlation-length-walks.nlogo +++ b/as-released/base-models/4.2-correlation-length-walks.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -343,7 +343,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/4.3-Simon-lattice-forager.nlogo b/as-released/base-models/4.3-Simon-lattice-forager.nlogo index 9d77910..dd144f2 100644 --- a/as-released/base-models/4.3-Simon-lattice-forager.nlogo +++ b/as-released/base-models/4.3-Simon-lattice-forager.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -430,7 +430,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/4.4-manhattan-sausages.nlogo b/as-released/base-models/4.4-manhattan-sausages.nlogo index 6fec634..d4ab18c 100644 --- a/as-released/base-models/4.4-manhattan-sausages.nlogo +++ b/as-released/base-models/4.4-manhattan-sausages.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -309,7 +309,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/4.5-monkeys-foraging.nlogo b/as-released/base-models/4.5-monkeys-foraging.nlogo index ee03184..0f8e11c 100644 --- a/as-released/base-models/4.5-monkeys-foraging.nlogo +++ b/as-released/base-models/4.5-monkeys-foraging.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -358,7 +358,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/4.6-foraging-with-regrowth.nlogo b/as-released/base-models/4.6-foraging-with-regrowth.nlogo index bce05d7..6ec9a74 100644 --- a/as-released/base-models/4.6-foraging-with-regrowth.nlogo +++ b/as-released/base-models/4.6-foraging-with-regrowth.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -275,7 +275,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/4.7-flocking.nlogo b/as-released/base-models/4.7-flocking.nlogo index daaf31b..6a2d73a 100644 --- a/as-released/base-models/4.7-flocking.nlogo +++ b/as-released/base-models/4.7-flocking.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -614,7 +614,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.1-sitePercolation.nlogo b/as-released/base-models/5.1-sitePercolation.nlogo index 5a845e1..aeb190d 100644 --- a/as-released/base-models/5.1-sitePercolation.nlogo +++ b/as-released/base-models/5.1-sitePercolation.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -378,7 +378,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.10-edenTip.nlogo b/as-released/base-models/5.10-edenTip.nlogo index 016ca6e..7aa7db2 100644 --- a/as-released/base-models/5.10-edenTip.nlogo +++ b/as-released/base-models/5.10-edenTip.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -300,7 +300,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.11-edenWilliamsBjerknes.nlogo b/as-released/base-models/5.11-edenWilliamsBjerknes.nlogo index c57b710..b90a306 100644 --- a/as-released/base-models/5.11-edenWilliamsBjerknes.nlogo +++ b/as-released/base-models/5.11-edenWilliamsBjerknes.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -287,7 +287,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.12-edenSingleOnLine.nlogo b/as-released/base-models/5.12-edenSingleOnLine.nlogo index c775de1..ad53732 100644 --- a/as-released/base-models/5.12-edenSingleOnLine.nlogo +++ b/as-released/base-models/5.12-edenSingleOnLine.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -350,7 +350,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.13-edenEpidemic.nlogo b/as-released/base-models/5.13-edenEpidemic.nlogo index a0e588a..586810d 100644 --- a/as-released/base-models/5.13-edenEpidemic.nlogo +++ b/as-released/base-models/5.13-edenEpidemic.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -221,7 +221,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.14-benguiguiP.nlogo b/as-released/base-models/5.14-benguiguiP.nlogo index 47571f5..2503f6a 100644 --- a/as-released/base-models/5.14-benguiguiP.nlogo +++ b/as-released/base-models/5.14-benguiguiP.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -334,7 +334,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.15-edenSingleOnLineLDD.nlogo b/as-released/base-models/5.15-edenSingleOnLineLDD.nlogo index 50134c6..64f1edd 100644 --- a/as-released/base-models/5.15-edenSingleOnLineLDD.nlogo +++ b/as-released/base-models/5.15-edenSingleOnLineLDD.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -435,7 +435,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.16-onlattice-dla.nlogo b/as-released/base-models/5.16-onlattice-dla.nlogo index 4aa2e7a..a7aeb2a 100644 --- a/as-released/base-models/5.16-onlattice-dla.nlogo +++ b/as-released/base-models/5.16-onlattice-dla.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -304,7 +304,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.17-simpleNeutral.nlogo b/as-released/base-models/5.17-simpleNeutral.nlogo index 56d12ee..326c22f 100644 --- a/as-released/base-models/5.17-simpleNeutral.nlogo +++ b/as-released/base-models/5.17-simpleNeutral.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -288,7 +288,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.18-simmap.nlogo b/as-released/base-models/5.18-simmap.nlogo index c8d1a74..41d0de0 100644 --- a/as-released/base-models/5.18-simmap.nlogo +++ b/as-released/base-models/5.18-simmap.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -330,7 +330,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.19-dsFFM.nlogo b/as-released/base-models/5.19-dsFFM.nlogo index 4f03dd3..b25b4ab 100644 --- a/as-released/base-models/5.19-dsFFM.nlogo +++ b/as-released/base-models/5.19-dsFFM.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -361,7 +361,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.2-antLabyrinth.nlogo b/as-released/base-models/5.2-antLabyrinth.nlogo index 83e800c..49af7d3 100644 --- a/as-released/base-models/5.2-antLabyrinth.nlogo +++ b/as-released/base-models/5.2-antLabyrinth.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -315,7 +315,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.20-FFM-ContLsp.nlogo b/as-released/base-models/5.20-FFM-ContLsp.nlogo index ee0bcb5..09913bc 100644 --- a/as-released/base-models/5.20-FFM-ContLsp.nlogo +++ b/as-released/base-models/5.20-FFM-ContLsp.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -484,7 +484,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.21-starkGullying.nlogo b/as-released/base-models/5.21-starkGullying.nlogo index d7eaecf..e7fdc99 100644 --- a/as-released/base-models/5.21-starkGullying.nlogo +++ b/as-released/base-models/5.21-starkGullying.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -375,7 +375,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.3-firePercolation.nlogo b/as-released/base-models/5.3-firePercolation.nlogo index e6ea110..e467d9a 100644 --- a/as-released/base-models/5.3-firePercolation.nlogo +++ b/as-released/base-models/5.3-firePercolation.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -178,7 +178,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.4-percolationBackBone.nlogo b/as-released/base-models/5.4-percolationBackBone.nlogo index a2401c4..1ea49a0 100644 --- a/as-released/base-models/5.4-percolationBackBone.nlogo +++ b/as-released/base-models/5.4-percolationBackBone.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -464,7 +464,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.5-invasionPercolationWithTrapping.nlogo b/as-released/base-models/5.5-invasionPercolationWithTrapping.nlogo index 5b350ec..cb8a6bc 100644 --- a/as-released/base-models/5.5-invasionPercolationWithTrapping.nlogo +++ b/as-released/base-models/5.5-invasionPercolationWithTrapping.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -508,7 +508,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo b/as-released/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo index 773f50a..45e9f9c 100644 --- a/as-released/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo +++ b/as-released/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -505,7 +505,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.7-edenSimple.nlogo b/as-released/base-models/5.7-edenSimple.nlogo index 7672cea..37680a9 100644 --- a/as-released/base-models/5.7-edenSimple.nlogo +++ b/as-released/base-models/5.7-edenSimple.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -265,7 +265,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.8-edenSimpleInverse.nlogo b/as-released/base-models/5.8-edenSimpleInverse.nlogo index 1680bf6..c6bdcc1 100644 --- a/as-released/base-models/5.8-edenSimpleInverse.nlogo +++ b/as-released/base-models/5.8-edenSimpleInverse.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -249,7 +249,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/5.9-edenTree.nlogo b/as-released/base-models/5.9-edenTree.nlogo index b7e1684..dfd2b91 100644 --- a/as-released/base-models/5.9-edenTree.nlogo +++ b/as-released/base-models/5.9-edenTree.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -244,7 +244,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/6.1-life-under-different-update-models.nlogo b/as-released/base-models/6.1-life-under-different-update-models.nlogo index f475223..f9d26c6 100644 --- a/as-released/base-models/6.1-life-under-different-update-models.nlogo +++ b/as-released/base-models/6.1-life-under-different-update-models.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -262,7 +262,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/6.2-majority-rule-under-different-update-models.nlogo b/as-released/base-models/6.2-majority-rule-under-different-update-models.nlogo index cc06225..3c0163d 100644 --- a/as-released/base-models/6.2-majority-rule-under-different-update-models.nlogo +++ b/as-released/base-models/6.2-majority-rule-under-different-update-models.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -274,7 +274,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/6.3-event-queue-simple.nlogo b/as-released/base-models/6.3-event-queue-simple.nlogo index fe184ff..efbe791 100644 --- a/as-released/base-models/6.3-event-queue-simple.nlogo +++ b/as-released/base-models/6.3-event-queue-simple.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -225,7 +225,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/6.4-hex-array-voter.nlogo b/as-released/base-models/6.4-hex-array-voter.nlogo index 3b4569f..3e23458 100644 --- a/as-released/base-models/6.4-hex-array-voter.nlogo +++ b/as-released/base-models/6.4-hex-array-voter.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -149,7 +149,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/6.5-voronoi-voter.nlogo b/as-released/base-models/6.5-voronoi-voter.nlogo index 6b5063f..90fcebb 100644 --- a/as-released/base-models/6.5-voronoi-voter.nlogo +++ b/as-released/base-models/6.5-voronoi-voter.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -162,7 +162,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/6.6-infinite-life.nlogo b/as-released/base-models/6.6-infinite-life.nlogo index c7992e6..5aeff03 100644 --- a/as-released/base-models/6.6-infinite-life.nlogo +++ b/as-released/base-models/6.6-infinite-life.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -481,7 +481,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/7.1-dispersal-fragmentation.nlogo b/as-released/base-models/7.1-dispersal-fragmentation.nlogo index 8f6d058..18b52f2 100644 --- a/as-released/base-models/7.1-dispersal-fragmentation.nlogo +++ b/as-released/base-models/7.1-dispersal-fragmentation.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -600,7 +600,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/base-models/9.1-cale-model.nlogo b/as-released/base-models/9.1-cale-model.nlogo index 60870a6..7f72643 100644 --- a/as-released/base-models/9.1-cale-model.nlogo +++ b/as-released/base-models/9.1-cale-model.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -243,7 +243,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/license.html b/as-released/license.html index 2ce10a9..75521d8 100644 --- a/as-released/license.html +++ b/as-released/license.html @@ -3,7 +3,7 @@ -

All models are © 2011-13 David O'Sullivan and George L. W. Perry +

All models are © 2011-24 David O'Sullivan and George L. W. Perry

diff --git a/as-released/using-R/2.2-flugge-2012-spatial-bd.nlogo b/as-released/using-R/2.2-flugge-2012-spatial-bd.nlogo index 80061e7..c80a055 100644 --- a/as-released/using-R/2.2-flugge-2012-spatial-bd.nlogo +++ b/as-released/using-R/2.2-flugge-2012-spatial-bd.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -531,7 +531,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/2.3-csr-using-R.nlogo b/as-released/using-R/2.3-csr-using-R.nlogo index 3b93e08..92b8d7f 100644 --- a/as-released/using-R/2.3-csr-using-R.nlogo +++ b/as-released/using-R/2.3-csr-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -291,7 +291,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/2.4-inhomPoisson-using-R.nlogo b/as-released/using-R/2.4-inhomPoisson-using-R.nlogo index 8343a07..801a8bb 100644 --- a/as-released/using-R/2.4-inhomPoisson-using-R.nlogo +++ b/as-released/using-R/2.4-inhomPoisson-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -465,7 +465,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/2.5-inhibition-using-R.nlogo b/as-released/using-R/2.5-inhibition-using-R.nlogo index ed00a3b..6803ffe 100644 --- a/as-released/using-R/2.5-inhibition-using-R.nlogo +++ b/as-released/using-R/2.5-inhibition-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -419,7 +419,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/2.6-cluster-using-R.nlogo b/as-released/using-R/2.6-cluster-using-R.nlogo index 95a11d9..2ebb72d 100644 --- a/as-released/using-R/2.6-cluster-using-R.nlogo +++ b/as-released/using-R/2.6-cluster-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information diff --git a/as-released/using-R/2.7-double-cluster.nlogo b/as-released/using-R/2.7-double-cluster.nlogo index b990da1..80cc898 100644 --- a/as-released/using-R/2.7-double-cluster.nlogo +++ b/as-released/using-R/2.7-double-cluster.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -584,7 +584,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/4.1-random-walks-using-R.nlogo b/as-released/using-R/4.1-random-walks-using-R.nlogo index 263bd67..fb66128 100644 --- a/as-released/using-R/4.1-random-walks-using-R.nlogo +++ b/as-released/using-R/4.1-random-walks-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -696,7 +696,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/4.5-monkeys-foraging-using-R.nlogo b/as-released/using-R/4.5-monkeys-foraging-using-R.nlogo index 1fb1291..8686889 100644 --- a/as-released/using-R/4.5-monkeys-foraging-using-R.nlogo +++ b/as-released/using-R/4.5-monkeys-foraging-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -465,7 +465,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/4.5-monkeys-foraging.nlogo b/as-released/using-R/4.5-monkeys-foraging.nlogo index 2053bd6..1136a08 100644 --- a/as-released/using-R/4.5-monkeys-foraging.nlogo +++ b/as-released/using-R/4.5-monkeys-foraging.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -475,7 +475,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/4.5-r-snapshots-3.nls b/as-released/using-R/4.5-r-snapshots-3.nls index 48b0644..3569a04 100644 --- a/as-released/using-R/4.5-r-snapshots-3.nls +++ b/as-released/using-R/4.5-r-snapshots-3.nls @@ -1,5 +1,5 @@ ;; The MIT License (MIT) -;; Copyright (c) 2011-13 David O'Sullivan and George L. W. Perry +;; Copyright (c) 2011-24 David O'Sullivan and George L. W. Perry ;; ;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;; this software and associated documentation files (the "Software"), to deal in diff --git a/as-released/using-R/4.7-flocking-using-R.nlogo b/as-released/using-R/4.7-flocking-using-R.nlogo index 215e8ed..a3866fd 100644 --- a/as-released/using-R/4.7-flocking-using-R.nlogo +++ b/as-released/using-R/4.7-flocking-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -719,7 +719,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/5.1-sitePercolation-using-R.nlogo b/as-released/using-R/5.1-sitePercolation-using-R.nlogo index 367295f..9d1e955 100644 --- a/as-released/using-R/5.1-sitePercolation-using-R.nlogo +++ b/as-released/using-R/5.1-sitePercolation-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -521,7 +521,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/5.10-edenTip-using-R.nlogo b/as-released/using-R/5.10-edenTip-using-R.nlogo index 2b65b7a..8241f5e 100644 --- a/as-released/using-R/5.10-edenTip-using-R.nlogo +++ b/as-released/using-R/5.10-edenTip-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -396,7 +396,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/5.14-benguiguiP-using-R.nlogo b/as-released/using-R/5.14-benguiguiP-using-R.nlogo index 587493b..f5ce6d4 100644 --- a/as-released/using-R/5.14-benguiguiP-using-R.nlogo +++ b/as-released/using-R/5.14-benguiguiP-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -436,7 +436,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo b/as-released/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo index e713230..ae8a1c2 100644 --- a/as-released/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo +++ b/as-released/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -552,7 +552,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/5.2-antLabyrinth-using-R.nlogo b/as-released/using-R/5.2-antLabyrinth-using-R.nlogo index 21e0da3..0b94e19 100644 --- a/as-released/using-R/5.2-antLabyrinth-using-R.nlogo +++ b/as-released/using-R/5.2-antLabyrinth-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -433,7 +433,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/5.7-edenSimple-using-R.nlogo b/as-released/using-R/5.7-edenSimple-using-R.nlogo index 3ae88e3..34a028b 100644 --- a/as-released/using-R/5.7-edenSimple-using-R.nlogo +++ b/as-released/using-R/5.7-edenSimple-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -369,7 +369,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/as-released/using-R/5.9-edenTree-using-R.nlogo b/as-released/using-R/5.9-edenTree-using-R.nlogo index cf550d9..fe9678f 100644 --- a/as-released/using-R/5.9-edenTree-using-R.nlogo +++ b/as-released/using-R/5.9-edenTree-using-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -345,7 +345,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/base-models/1.1-life.nlogo b/base-models/1.1-life.nlogo index 8ab9f9a..ecfb9ca 100644 --- a/base-models/1.1-life.nlogo +++ b/base-models/1.1-life.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -348,7 +348,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -638,7 +638,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/1.2-galtonBoard-Additive.nlogo b/base-models/1.2-galtonBoard-Additive.nlogo index 843f471..c002997 100644 --- a/base-models/1.2-galtonBoard-Additive.nlogo +++ b/base-models/1.2-galtonBoard-Additive.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -268,7 +268,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -567,7 +567,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/1.3-galtonBoard-Multiplicative.nlogo b/base-models/1.3-galtonBoard-Multiplicative.nlogo index 52d1915..5a9ffba 100644 --- a/base-models/1.3-galtonBoard-Multiplicative.nlogo +++ b/base-models/1.3-galtonBoard-Multiplicative.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -334,7 +334,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -633,7 +633,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/2.1-classes.txt b/base-models/2.1-classes.txt index e9454ef..19bbd78 100644 --- a/base-models/2.1-classes.txt +++ b/base-models/2.1-classes.txt @@ -1,4 +1,7 @@ 3 -6 3 -1 \ No newline at end of file +3 +3 +3 +3 +3 \ No newline at end of file diff --git a/base-models/2.1-scale-mrc.nls b/base-models/2.1-scale-mrc.nls index bd1fe19..60abb35 100644 --- a/base-models/2.1-scale-mrc.nls +++ b/base-models/2.1-scale-mrc.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation diff --git a/base-models/2.1-scale.nlogo b/base-models/2.1-scale.nlogo index 5dea80e..7fcfb0e 100644 --- a/base-models/2.1-scale.nlogo +++ b/base-models/2.1-scale.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -333,7 +333,7 @@ CHOOSER method method "random" "mrc" "voter" -2 +0 INPUTBOX 710 @@ -450,7 +450,7 @@ The **reset** button restores the world to the state when it was first initializ The code here uses the `n-values` operation to create lists of coordinates for the aggregated block centres, in the `change-grain` procedure. The line - let center-coords n-values n-blocks [? * new-grain + offset] + let center-coords n-values n-blocks [i -> i * new-grain + offset] is an example. This is a useful NetLogo function worth getting to know. Here is makes a list with `n-blocks` elements, each of them a multiple (by a factor of `new-grain`) of its index postion in the list, with an `offset` added. For example, with `offset` 5 and `new-grain` set to 9, this would produce a list `[5 14 23 32 ...]` and so on, up to the requested number of elements. We then use nested `foreach` loops to step through this list and set patch centres for the aggregated blocks. @@ -481,7 +481,7 @@ See also The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -780,7 +780,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo b/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo index 8c513ae..b2b6623 100644 --- a/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo +++ b/base-models/2.2-flugge-2012-spatial-bd-noR.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -460,7 +460,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -759,7 +759,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/2.3-csr.nlogo b/base-models/2.3-csr.nlogo index 70e2459..94f6a0b 100644 --- a/base-models/2.3-csr.nlogo +++ b/base-models/2.3-csr.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -21,76 +21,65 @@ ;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ;; DEALINGS IN THE SOFTWARE. +__includes [ "pp-utils.nls" ] + extensions [ palette ] -patches-own [ lambda ] +breed [ points point ] + +globals [ smooth ] + +patches-own [ + lambda + point-dists +] to setup clear-all - ;; resize world so that it has a patch-grid at the - ;; required resolution and is approx 500 x 500 pixels - set-patch-size floor ( 500 / resolution ) - resize-world 0 (resolution - 1) 0 (resolution - 1) + clear-background reset-ticks end to go setup ;; turtles are point events - create-turtles n [ + create-points n [ ;; events are randomly located ;; and do not interact with one another setxy random-xcor random-ycor - - set color white + set color black set shape "circle" - - ;; note that because pixel size of patches changes - ;; with resolution the size of events does not appear - ;; to change much - set size 1 * ( resolution / 100) ] end ;; use smoothing of even count per patch as estimate -to plot-intensity - let bw bandwidth * resolution - ask patches [ set lambda 0 ] - - if density-method = "quartic-kernel" [ - ask turtles [ - let w-in-r [] - foreach (sort patches in-radius bw) [ p -> - ask p [ - set w-in-r lput get-quartic bw distance myself w-in-r - ] - ] - let sum-w sum w-in-r - (foreach (sort patches in-radius bw) w-in-r [ [p w] -> - ask p [ - set lambda lambda + w / sum-w - ] - ]) - ] - ] - if density-method = "smoothing" [ - ask patches [ set lambda count turtles-here ] - let steps ceiling (bw) - show steps - repeat steps [ - diffuse lambda 0.95 - ] - ] - - let max-lambda max [lambda] of patches - ask turtles [ set color black ] - ask patches [ set pcolor palette:scale-gradient [[255 0 0] [255 255 0]] lambda (1.2 * max-lambda) 0 ] +to calculate-intensity + ifelse density-method = "quartic-kernel" [ + ask patches [ + set point-dists [] + ] + let bw rescale bandwidth 0 1 0 world-width + ask points [ + ask patches in-radius bw [ + set point-dists lput (distance myself) point-dists + ] + ] + ;; normalising factor for a quartic kernel in 2D is 3 / (pi * bw^2) + let k 3 / (pi * bw ^ 2) + ask patches [ + set lambda sum map [x -> k * get-quartic bw x] point-dists + ] + ] + [ + set smooth bandwidth * world-width + calculate-point-intensity + ] end - to-report get-quartic [h r] + if r > h [ report 0 ] let u r / h - report 15 / 16 * (1 - u ^ 2) ^ 2 + report (1 - u ^ 2) ^ 2 end @#$#@#$#@ GRAPHICS-WINDOW @@ -107,8 +96,8 @@ GRAPHICS-WINDOW 1 1 0 -1 -1 +0 +0 1 0 99 @@ -121,10 +110,10 @@ ticks 100.0 SLIDER -16 -56 -188 -89 +17 +135 +189 +168 n n 1 @@ -136,10 +125,10 @@ NIL HORIZONTAL BUTTON -38 -17 -173 -51 +39 +96 +174 +130 generate pattern go NIL @@ -152,38 +141,13 @@ NIL NIL 1 -SLIDER -17 -118 -189 -151 -resolution -resolution -10 -200 -100.0 -1 -1 -NIL -HORIZONTAL - -TEXTBOX -28 -158 -188 -198 -Controls grain of underlying grid -11 -0.0 -1 - BUTTON 49 229 159 262 plot intensity -plot-intensity +calculate-intensity\nplot-surface [p -> [lambda] of p] NIL 1 T @@ -220,7 +184,7 @@ bandwidth bandwidth 0.01 0.5 -0.25 +0.05 0.01 1 NIL @@ -228,13 +192,30 @@ HORIZONTAL CHOOSER 52 -389 +391 190 -434 +436 density-method density-method "smoothing" "quartic-kernel" -0 +1 + +BUTTON +108 +23 +174 +56 +NIL +setup +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 @#$#@#$#@ ## WHAT IS IT? @@ -256,7 +237,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -555,7 +536,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.1-local-average.nlogo b/base-models/3.1-local-average.nlogo index 5edb9cb..46c6f60 100644 --- a/base-models/3.1-local-average.nlogo +++ b/base-models/3.1-local-average.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -269,7 +269,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -568,7 +568,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.10-schelling.nlogo b/base-models/3.10-schelling.nlogo index 2235a0e..9789ae3 100644 --- a/base-models/3.10-schelling.nlogo +++ b/base-models/3.10-schelling.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -515,7 +515,7 @@ You should also cite appropriate examples of the Schelling model, although it is The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -814,7 +814,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.11-schelling-as-IPS.nlogo b/base-models/3.11-schelling-as-IPS.nlogo index 2fdc65a..694ef14 100644 --- a/base-models/3.11-schelling-as-IPS.nlogo +++ b/base-models/3.11-schelling-as-IPS.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -309,7 +309,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -599,7 +599,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.12-subdivision.nlogo b/base-models/3.12-subdivision.nlogo index 24d8095..5795e01 100644 --- a/base-models/3.12-subdivision.nlogo +++ b/base-models/3.12-subdivision.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-2018 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -521,7 +521,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -820,7 +820,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.13-iterated-voronoi.nlogo b/base-models/3.13-iterated-voronoi.nlogo index 905d1eb..cae56a4 100644 --- a/base-models/3.13-iterated-voronoi.nlogo +++ b/base-models/3.13-iterated-voronoi.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -230,7 +230,7 @@ It is interesting to get the turtles to draw their path from their starting loca The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -528,7 +528,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.14-spots-and-stripes.nlogo b/base-models/3.14-spots-and-stripes.nlogo index 4f2b554..b14a2b1 100644 --- a/base-models/3.14-spots-and-stripes.nlogo +++ b/base-models/3.14-spots-and-stripes.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -317,7 +317,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -616,7 +616,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.15-Nowak-May-1992.nlogo b/base-models/3.15-Nowak-May-1992.nlogo index 2cd62bf..20d218e 100644 --- a/base-models/3.15-Nowak-May-1992.nlogo +++ b/base-models/3.15-Nowak-May-1992.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -254,7 +254,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -553,7 +553,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.16-IPD.nlogo b/base-models/3.16-IPD.nlogo index d1be91f..4807fe7 100644 --- a/base-models/3.16-IPD.nlogo +++ b/base-models/3.16-IPD.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -330,7 +330,7 @@ p-mutate p-mutate 0 0.05 -0.0 +0.01 0.001 1 NIL @@ -399,7 +399,7 @@ payoff-memory payoff-memory 1 5 -1.0 +5.0 1 1 NIL @@ -546,7 +546,7 @@ strat-1 strat-1 0 15 -15.0 +5.0 1 1 NIL @@ -561,7 +561,7 @@ strat-2 strat-2 0 15 -2.0 +7.0 1 1 NIL @@ -650,7 +650,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -949,7 +949,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.2-vicsek-galaxy-formation.nlogo b/base-models/3.2-vicsek-galaxy-formation.nlogo index b769687..a9c61c1 100644 --- a/base-models/3.2-vicsek-galaxy-formation.nlogo +++ b/base-models/3.2-vicsek-galaxy-formation.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -271,7 +271,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -570,7 +570,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.3-totalistic_automata.nlogo b/base-models/3.3-totalistic_automata.nlogo index 71cee16..29c181b 100644 --- a/base-models/3.3-totalistic_automata.nlogo +++ b/base-models/3.3-totalistic_automata.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -592,7 +592,7 @@ INPUTBOX 666 414 Wolfram-code -224.0 +20476.0 1 0 Number @@ -729,7 +729,7 @@ INPUTBOX 980 406 list-0 -000100000 +011111010 1 0 String @@ -740,7 +740,7 @@ INPUTBOX 980 473 list-1 -001100000 +011111000 1 0 String @@ -769,7 +769,7 @@ SWITCH 326 setup-from-ranges? setup-from-ranges? -0 +1 1 -1000 @@ -975,7 +975,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -1265,7 +1265,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.4-BasicContactProcess2D.nlogo b/base-models/3.4-BasicContactProcess2D.nlogo index 3c38649..ffb9d15 100644 --- a/base-models/3.4-BasicContactProcess2D.nlogo +++ b/base-models/3.4-BasicContactProcess2D.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -263,7 +263,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -562,7 +562,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.5-CompetingContactProcess2D.nlogo b/base-models/3.5-CompetingContactProcess2D.nlogo index 690f7e9..8b98c82 100644 --- a/base-models/3.5-CompetingContactProcess2D.nlogo +++ b/base-models/3.5-CompetingContactProcess2D.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -339,7 +339,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -638,7 +638,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.6-simple-grass-brush-trees.nlogo b/base-models/3.6-simple-grass-brush-trees.nlogo index 285ad26..f6fad7f 100644 --- a/base-models/3.6-simple-grass-brush-trees.nlogo +++ b/base-models/3.6-simple-grass-brush-trees.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -329,7 +329,7 @@ The default initial values of `birth-rate-1` set to 6.0 and `birth-rate-2` set t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -628,7 +628,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.7-simpleRSP.nlogo b/base-models/3.7-simpleRSP.nlogo index de4a049..e143c52 100644 --- a/base-models/3.7-simpleRSP.nlogo +++ b/base-models/3.7-simpleRSP.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -248,7 +248,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -547,7 +547,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.8-voter-model.nlogo b/base-models/3.8-voter-model.nlogo index 7695342..fff66a0 100644 --- a/base-models/3.8-voter-model.nlogo +++ b/base-models/3.8-voter-model.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -236,7 +236,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -526,7 +526,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/3.9-voter-model-with-mutation.nlogo b/base-models/3.9-voter-model-with-mutation.nlogo index 73872b7..d77312a 100644 --- a/base-models/3.9-voter-model-with-mutation.nlogo +++ b/base-models/3.9-voter-model-with-mutation.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -350,7 +350,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -640,7 +640,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/4.1-random-walks.nlogo b/base-models/4.1-random-walks.nlogo index 3faf694..2118c22 100644 --- a/base-models/4.1-random-walks.nlogo +++ b/base-models/4.1-random-walks.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -528,7 +528,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -827,7 +827,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/4.2-correlation-length-walks.nlogo b/base-models/4.2-correlation-length-walks.nlogo index f357d70..7b4cf68 100644 --- a/base-models/4.2-correlation-length-walks.nlogo +++ b/base-models/4.2-correlation-length-walks.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -311,7 +311,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -610,7 +610,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/4.3-Simon-lattice-forager.nlogo b/base-models/4.3-Simon-lattice-forager.nlogo index b686918..844bb12 100644 --- a/base-models/4.3-Simon-lattice-forager.nlogo +++ b/base-models/4.3-Simon-lattice-forager.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -465,7 +465,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -775,7 +775,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @@ -799,7 +799,7 @@ NetLogo 6.2.0 - + setup go ticks diff --git a/base-models/4.4-manhattan-sausages.nlogo b/base-models/4.4-manhattan-sausages.nlogo index 415f7e1..7cd88c1 100644 --- a/base-models/4.4-manhattan-sausages.nlogo +++ b/base-models/4.4-manhattan-sausages.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -187,7 +187,7 @@ vision vision 1 25 -10.0 +5.0 1 1 NIL @@ -253,7 +253,7 @@ walk-duration walk-duration 0 1000 -200.0 +1000.0 10 1 NIL @@ -321,7 +321,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -626,7 +626,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/4.5-monkeys-foraging.nlogo b/base-models/4.5-monkeys-foraging.nlogo index b615de3..b9c0fa3 100644 --- a/base-models/4.5-monkeys-foraging.nlogo +++ b/base-models/4.5-monkeys-foraging.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -374,7 +374,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -678,7 +678,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/4.6-foraging-with-regrowth.nlogo b/base-models/4.6-foraging-with-regrowth.nlogo index 569ca38..d15f4e6 100644 --- a/base-models/4.6-foraging-with-regrowth.nlogo +++ b/base-models/4.6-foraging-with-regrowth.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -69,7 +69,7 @@ to setup ] sprout-spots 1 [ set color orange - set size 0.8 + set size 1 set shape "circle" ] set visited sort spots @@ -106,7 +106,7 @@ to go [ sprout-spots 1 [ set color orange - set size 0.8 + set size 1 set shape "circle" set target self ] @@ -144,11 +144,11 @@ end GRAPHICS-WINDOW 193 10 -621 -439 +601 +419 -1 -1 -7.0 +4.0 1 10 1 @@ -159,9 +159,9 @@ GRAPHICS-WINDOW 0 1 0 -59 +99 0 -59 +99 1 1 1 @@ -288,7 +288,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -592,7 +592,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/4.7-flocking.nlogo b/base-models/4.7-flocking.nlogo index 61e0a4d..ae19afe 100644 --- a/base-models/4.7-flocking.nlogo +++ b/base-models/4.7-flocking.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -671,7 +671,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -970,7 +970,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.1-sitePercolation.nlogo b/base-models/5.1-sitePercolation.nlogo index 9196001..45ea6af 100644 --- a/base-models/5.1-sitePercolation.nlogo +++ b/base-models/5.1-sitePercolation.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -229,10 +229,10 @@ NIL 1 TEXTBOX -675 -473 -827 -491 +507 +474 +659 +492 Occupied patches in white 12 0.0 @@ -377,6 +377,36 @@ This plot is not very useful - a better option is available in the R-enabled ver 0.0 1 +TEXTBOX +14 +105 +106 +123 +FIRST DO THIS +11 +0.0 +1 + +TEXTBOX +13 +192 +84 +210 +THEN THIS +11 +0.0 +1 + +TEXTBOX +14 +345 +84 +373 +THEN THESE +11 +0.0 +1 + @#$#@#$#@ ## WHAT IS IT? @@ -411,7 +441,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -710,7 +740,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.10-edenTip.nlogo b/base-models/5.10-edenTip.nlogo index 26af13a..12ddcba 100644 --- a/base-models/5.10-edenTip.nlogo +++ b/base-models/5.10-edenTip.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -311,7 +311,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -610,7 +610,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.11-edenWilliamsBjerknes.nlogo b/base-models/5.11-edenWilliamsBjerknes.nlogo index d5f3c6b..78a69e9 100644 --- a/base-models/5.11-edenWilliamsBjerknes.nlogo +++ b/base-models/5.11-edenWilliamsBjerknes.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -317,7 +317,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -616,7 +616,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.12-edenSingleOnLine.nlogo b/base-models/5.12-edenSingleOnLine.nlogo index 6621eb8..009436c 100644 --- a/base-models/5.12-edenSingleOnLine.nlogo +++ b/base-models/5.12-edenSingleOnLine.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -312,7 +312,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -610,7 +610,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.13-edenEpidemic.nlogo b/base-models/5.13-edenEpidemic.nlogo index c0bc3f5..653ad40 100644 --- a/base-models/5.13-edenEpidemic.nlogo +++ b/base-models/5.13-edenEpidemic.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -61,7 +61,7 @@ to go ] [ set immune? true - set pcolor violet +; set pcolor violet ] update-perimeter ] @@ -95,11 +95,11 @@ end GRAPHICS-WINDOW 210 10 -618 -419 +722 +523 -1 -1 -1.0 +1.26 1 10 1 @@ -224,7 +224,7 @@ You might expect there to a _p_critical value for a model like this. The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -523,7 +523,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.14-benguiguiP.nlogo b/base-models/5.14-benguiguiP.nlogo index 9ca834b..f98e413 100644 --- a/base-models/5.14-benguiguiP.nlogo +++ b/base-models/5.14-benguiguiP.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -309,7 +309,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -608,7 +608,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.16-onlattice-dla.nlogo b/base-models/5.16-onlattice-dla.nlogo index ca5de42..454ed93 100644 --- a/base-models/5.16-onlattice-dla.nlogo +++ b/base-models/5.16-onlattice-dla.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -242,7 +242,7 @@ SWITCH 184 show-starts? show-starts? -1 +0 1 -1000 @@ -284,7 +284,7 @@ CHOOSER walker-starts-method walker-starts-method "advancing circle" "buffer" "fixed circle" -2 +1 TEXTBOX 10 @@ -321,7 +321,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -620,7 +620,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.17-simpleNeutral.nlogo b/base-models/5.17-simpleNeutral.nlogo index 7086bb2..6891f33 100644 --- a/base-models/5.17-simpleNeutral.nlogo +++ b/base-models/5.17-simpleNeutral.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -157,7 +157,7 @@ CHOOSER model model "random" "random blocky" "heirarchical" -2 +1 SLIDER 18 @@ -282,7 +282,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -581,7 +581,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.18-simmap.nlogo b/base-models/5.18-simmap.nlogo index d4a9723..35b4412 100644 --- a/base-models/5.18-simmap.nlogo +++ b/base-models/5.18-simmap.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -341,7 +341,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -642,7 +642,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.19-dsFFM.nlogo b/base-models/5.19-dsFFM.nlogo index 6d553da..73324dd 100644 --- a/base-models/5.19-dsFFM.nlogo +++ b/base-models/5.19-dsFFM.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -335,7 +335,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -625,7 +625,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.2-antLabyrinth.nlogo b/base-models/5.2-antLabyrinth.nlogo index b7ef6f7..e2e83b9 100644 --- a/base-models/5.2-antLabyrinth.nlogo +++ b/base-models/5.2-antLabyrinth.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -320,7 +320,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -619,7 +619,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.20-FFM-ContLsp.nlogo b/base-models/5.20-FFM-ContLsp.nlogo index c2f36fe..44b1d74 100644 --- a/base-models/5.20-FFM-ContLsp.nlogo +++ b/base-models/5.20-FFM-ContLsp.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -474,7 +474,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -775,7 +775,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.21-starkGullying.nlogo b/base-models/5.21-starkGullying.nlogo index 966c513..11e55cb 100644 --- a/base-models/5.21-starkGullying.nlogo +++ b/base-models/5.21-starkGullying.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -192,8 +192,8 @@ GRAPHICS-WINDOW 255 0 127 -0 -0 +1 +1 1 ticks 200.0 @@ -305,7 +305,7 @@ smoothing smoothing 0 50 -3.0 +11.0 1 1 NIL @@ -387,7 +387,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -686,7 +686,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.3-firePercolation.nlogo b/base-models/5.3-firePercolation.nlogo index 48e1eff..5b9bb4e 100644 --- a/base-models/5.3-firePercolation.nlogo +++ b/base-models/5.3-firePercolation.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -202,7 +202,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -492,7 +492,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.4-percolationBackBone.nlogo b/base-models/5.4-percolationBackBone.nlogo index e2493d0..449b01c 100644 --- a/base-models/5.4-percolationBackBone.nlogo +++ b/base-models/5.4-percolationBackBone.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -269,11 +269,11 @@ end GRAPHICS-WINDOW 224 10 -632 -419 +631 +418 -1 -1 -4.0 +3.0 1 10 1 @@ -284,9 +284,9 @@ GRAPHICS-WINDOW 0 1 0 -99 +132 0 -99 +132 0 0 0 @@ -462,7 +462,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -761,7 +761,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.5-invasionPercolationWithTrapping.nlogo b/base-models/5.5-invasionPercolationWithTrapping.nlogo index 1502a01..f0a21fe 100644 --- a/base-models/5.5-invasionPercolationWithTrapping.nlogo +++ b/base-models/5.5-invasionPercolationWithTrapping.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -494,7 +494,7 @@ You should consult that book for more information and details of the model. ## INVASION PERCOLATION -Invasion percolation (IP) is a much less well known form of percolation than site percolation as portrayed in previou Chapter 5 models. +Invasion percolation (IP) is a much less well known form of percolation than site percolation as portrayed in previous Chapter 5 models. The process is as follows: @@ -536,7 +536,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -835,7 +835,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo b/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo index 1187580..12eb40a 100644 --- a/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo +++ b/base-models/5.6-invasionPercolationStarkDrainageModel.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -464,7 +464,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -763,7 +763,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.7-edenSimple.nlogo b/base-models/5.7-edenSimple.nlogo index 941de1c..0a01a00 100644 --- a/base-models/5.7-edenSimple.nlogo +++ b/base-models/5.7-edenSimple.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -267,7 +267,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -566,7 +566,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.8-edenSimpleInverse.nlogo b/base-models/5.8-edenSimpleInverse.nlogo index 3bf8b61..ddd1d66 100644 --- a/base-models/5.8-edenSimpleInverse.nlogo +++ b/base-models/5.8-edenSimpleInverse.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -249,7 +249,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -548,7 +548,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/5.9-edenTree.nlogo b/base-models/5.9-edenTree.nlogo index 39a9a76..deb760b 100644 --- a/base-models/5.9-edenTree.nlogo +++ b/base-models/5.9-edenTree.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -219,7 +219,7 @@ The difference from the simple Eden process in this model is that invasion can o The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -518,7 +518,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/6.1-life-under-different-update-models.nlogo b/base-models/6.1-life-under-different-update-models.nlogo index 5fbe0cb..2282116 100644 --- a/base-models/6.1-life-under-different-update-models.nlogo +++ b/base-models/6.1-life-under-different-update-models.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -269,7 +269,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -559,7 +559,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/6.2-majority-rule-under-different-update-models.nlogo b/base-models/6.2-majority-rule-under-different-update-models.nlogo index de229ba..cc614a6 100644 --- a/base-models/6.2-majority-rule-under-different-update-models.nlogo +++ b/base-models/6.2-majority-rule-under-different-update-models.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -205,7 +205,7 @@ CHOOSER update-mode update-mode "synchronous" "async all random" "async random" "async ordered" -0 +3 SWITCH 72 @@ -245,7 +245,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -535,7 +535,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/6.3-event-queue-simple.nlogo b/base-models/6.3-event-queue-simple.nlogo index 419a3b4..359be7d 100644 --- a/base-models/6.3-event-queue-simple.nlogo +++ b/base-models/6.3-event-queue-simple.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -246,7 +246,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -545,7 +545,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/6.4-hex-array-voter.nlogo b/base-models/6.4-hex-array-voter.nlogo index 4f31422..98901eb 100644 --- a/base-models/6.4-hex-array-voter.nlogo +++ b/base-models/6.4-hex-array-voter.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -111,7 +111,7 @@ GRAPHICS-WINDOW 819 -1 -1 -16.0 +10.0 1 15 1 @@ -122,9 +122,9 @@ GRAPHICS-WINDOW 0 1 0 -49 +79 0 -49 +79 1 1 1 @@ -201,6 +201,8 @@ The hex lattice uses cube coordinates. Excellent information concerning hex latt A challenging extension of this model is to extend it to work in a toroidal space. Such an extension might require an entirely different approach, and is especially tricky when it comes to assigning the hex lattice coordinates. +A good option might be to use NetLogo's `links` breed to make the neighbourhoods and then update the model update process accordingly. Surprisingly the model does not seem to run any faster using this approach... + ## HOW TO CITE If you mention this model in a publication, please include these citations for the model itself and for NetLogo @@ -212,7 +214,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -506,7 +508,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/6.5-voronoi-voter.nlogo b/base-models/6.5-voronoi-voter.nlogo index d1e303c..86d31d4 100644 --- a/base-models/6.5-voronoi-voter.nlogo +++ b/base-models/6.5-voronoi-voter.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -184,7 +184,7 @@ You should consult that book for more information and details of the model. ## THINGS TO NOTICE -This models exemplifies an approach that is often useful where collections of patches (i.e. `patch-set`s) are associated with inidividual agents at point locations. +This models exemplifies an approach that is often useful where collections of patches (i.e. `patch-set`s) are associated with individual agents at point locations. ## HOW TO CITE @@ -197,7 +197,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -493,7 +493,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ setup @#$#@#$#@ diff --git a/base-models/6.6-infinite-life.nlogo b/base-models/6.6-infinite-life.nlogo index fe8b326..1c41182 100644 --- a/base-models/6.6-infinite-life.nlogo +++ b/base-models/6.6-infinite-life.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,8 +22,6 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [matrix] - globals [ neighbor-offsets ;; a list of the x-y coord offsets of a Moore neighbourhood current-scale ;; the scale-factor from lattice-coords to world-coords @@ -115,13 +113,10 @@ to-report mean-centre [list-of-coords] report map [ x -> mean x ] transpose list-of-coords end -;; converts a list of coord pair lists -;; to a list of lists of each coord -;; uses the matrix extension -to-report transpose [list-of-lists] - let IJ matrix:from-row-list list-of-lists - let JI matrix:transpose IJ - report matrix:to-row-list JI +;; converts a list of coord pair lists to a list of lists of each coord +to-report transpose [lists] + let indexes range length first lists + report map [i -> map [lst -> item i lst] lists] indexes end ;; runs each generation @@ -435,7 +430,7 @@ The Game of Life CA is implemented using turtles ('cells') to represent live cel This model uses some tricky methods to provide the world extensibility feature, and these should repay close study. -This model demonstrates how a model space can be extended effectively by recording only the locations of interest. In Life, only locations that are currently alive or are adjacent to locations that are currently alive can possible be alive in the next time step. This means that most of the space in a typical Life model where the density of live cells is likely to be less than 25% is being used to store information that is not useful (i.e., lots of dead cells). +This model demonstrates how a model space can be extended effectively by recording only the locations of interest. In Life, only locations that are currently alive or are adjacent to locations that are currently alive can possibly be alive in the next time step. This means that most of the space in a typical Life model where the density of live cells is likely to be less than 25% is being used to store information that is not useful (i.e., lots of dead cells). Here, by storing the live cells (as `cell` turtles) we avoid this problem, and also enable the model scale to vary as required. @@ -449,7 +444,7 @@ Conversion from Netlogo world coordinates to lattice coordinates is done by the where the `map` function applies the scaling operation to each item in the supplied `xy` coord pair list after subtracting the current `centre-xy` coord pair global. A convenience procedure `set-world-xy` is provided to allow a turtle's location to be set according to its current `lattice-site` and `current scale` of the model. -Rescaling happens when required in the `rescale` procedure which runs at the start of each model tick. In determining the mean lattice coordinates of the current `cells` use is made of the matrix extension transpose operation. +Rescaling happens when required in the `rescale` procedure which runs at the start of each model tick. Because cell locations are stored as the `lattice-site` list it is necessary to have special code to retrieve the Moore neighbourhood lattice coordinates. This is done in the `neighbouring-lattice-sites` reporter which, by applying a map function between the `lattice-site` coordinate pair and the global `neighbor-offsets` list: @@ -489,7 +484,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -788,7 +783,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/7.1-dispersal-fragmentation.nlogo b/base-models/7.1-dispersal-fragmentation.nlogo index 1908477..485a77e 100644 --- a/base-models/7.1-dispersal-fragmentation.nlogo +++ b/base-models/7.1-dispersal-fragmentation.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -598,7 +598,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -897,7 +897,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/8.1-human-demography_v1.6.nls b/base-models/8.1-human-demography_v1.6.nls index ab50a30..d3c2fb4 100644 --- a/base-models/8.1-human-demography_v1.6.nls +++ b/base-models/8.1-human-demography_v1.6.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation diff --git a/base-models/8.1-hunting-and-gathering_v1.6.nls b/base-models/8.1-hunting-and-gathering_v1.6.nls index 934e13c..cff314d 100644 --- a/base-models/8.1-hunting-and-gathering_v1.6.nls +++ b/base-models/8.1-hunting-and-gathering_v1.6.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation diff --git a/base-models/8.1-landscape-demography_v1.6.nls b/base-models/8.1-landscape-demography_v1.6.nls index 92180d6..158f153 100644 --- a/base-models/8.1-landscape-demography_v1.6.nls +++ b/base-models/8.1-landscape-demography_v1.6.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation diff --git a/base-models/8.1-leGUME_v1.6.nlogo b/base-models/8.1-leGUME_v1.6.nlogo index 66190fd..58485e4 100644 --- a/base-models/8.1-leGUME_v1.6.nlogo +++ b/base-models/8.1-leGUME_v1.6.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -1130,7 +1130,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -1429,7 +1429,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/8.1-simmap_code.nls b/base-models/8.1-simmap_code.nls index 3f34ef7..2a74ac6 100644 --- a/base-models/8.1-simmap_code.nls +++ b/base-models/8.1-simmap_code.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation diff --git a/base-models/8.1-utilities_v1.6.nls b/base-models/8.1-utilities_v1.6.nls index de1db7e..49c8955 100644 --- a/base-models/8.1-utilities_v1.6.nls +++ b/base-models/8.1-utilities_v1.6.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation diff --git a/base-models/9.1-cale-model.nlogo b/base-models/9.1-cale-model.nlogo index f34fa03..0524225 100644 --- a/base-models/9.1-cale-model.nlogo +++ b/base-models/9.1-cale-model.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -262,7 +262,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -570,7 +570,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/base-models/pp-utils.nls b/base-models/pp-utils.nls new file mode 100644 index 0000000..aca1089 --- /dev/null +++ b/base-models/pp-utils.nls @@ -0,0 +1,60 @@ +;; The MIT License (MIT) +;; +;; Copyright (c) 2011-24 David O'Sullivan and George Perry +;; +;; Permission is hereby granted, free of charge, to any person +;; obtaining a copy of this software and associated documentation +;; files (the "Software"), to deal in the Software without restriction, +;; including without limitation the rights to use, copy, modify, merge, +;; publish, distribute, sublicense, and/or sell copies of the Software, +;; and to permit persons to whom the Software is furnished to do so, +;; subject to the following conditions: +;; +;; The above copyright notice and this permission notice shall be included +;; in all copies or substantial portions of the Software. +;; +;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +;; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +;; DEALINGS IN THE SOFTWARE. + +to clear-pattern + clear-plot + clear-background + ask turtles [ die ] +end + +to clear-background + ask patches [ set pcolor white ] +end + +to calculate-point-intensity + ask patches [ set lambda count points-here ] + repeat smooth [ diffuse4 lambda (3 / 4) ] +end + +to plot-surface [getter] + let max-value max [(runresult getter self)] of patches + ask patches [ + set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207]] (runresult getter self) max-value 0 + ] +end + +to toggle-points + ask points [set hidden? not hidden?] +end + +to-report rescale-x [x] + report rescale x (min-pxcor - 0.5) (max-pxcor + 0.5) 0 1 +end + +to-report rescale-y [y] + report rescale y (min-pycor - 0.5) (max-pycor + 0.5) 0 1 +end + +to-report rescale [x xmin xmax newmin newmax] + report newmin + (newmax - newmin) * (x - xmin) / (xmax - xmin) +end diff --git a/misc/misc-5.1a-bondPercolation.nlogo b/misc/misc-5.1a-bondPercolation.nlogo index b69e41b..615234f 100644 --- a/misc/misc-5.1a-bondPercolation.nlogo +++ b/misc/misc-5.1a-bondPercolation.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -126,7 +126,7 @@ NIL This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -172,7 +172,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-BrousseTigre-ThierryEtAl.nlogo b/misc/misc-BrousseTigre-ThierryEtAl.nlogo index f0359a6..378face 100644 --- a/misc/misc-BrousseTigre-ThierryEtAl.nlogo +++ b/misc/misc-BrousseTigre-ThierryEtAl.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -180,7 +180,7 @@ HORIZONTAL This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -226,7 +226,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-Vicsek-Gregoire-et-al-flocking.nlogo b/misc/misc-Vicsek-Gregoire-et-al-flocking.nlogo index 2e3edd3..e8edd7f 100644 --- a/misc/misc-Vicsek-Gregoire-et-al-flocking.nlogo +++ b/misc/misc-Vicsek-Gregoire-et-al-flocking.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -540,7 +540,7 @@ show-density-map? This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -587,7 +587,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/misc/misc-VoronoiDynamic.nlogo b/misc/misc-VoronoiDynamic.nlogo index cecdbfd..a42ae6d 100644 --- a/misc/misc-VoronoiDynamic.nlogo +++ b/misc/misc-VoronoiDynamic.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -250,7 +250,7 @@ While the GO button is down, you can drag the points around with the mouse. This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -319,7 +319,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-flocking-with-targets-no-R.nlogo b/misc/misc-flocking-with-targets-no-R.nlogo index 20ea89e..4176afe 100644 --- a/misc/misc-flocking-with-targets-no-R.nlogo +++ b/misc/misc-flocking-with-targets-no-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -586,7 +586,7 @@ HORIZONTAL This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -633,7 +633,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/misc/misc-inhomPoissonCluster.nlogo b/misc/misc-inhomPoissonCluster.nlogo index 1bf91c1..ce017f6 100644 --- a/misc/misc-inhomPoissonCluster.nlogo +++ b/misc/misc-inhomPoissonCluster.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -648,7 +648,7 @@ NIL This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -695,7 +695,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/misc/misc-ising.nlogo b/misc/misc-ising.nlogo index 3ca8d07..12574e0 100644 --- a/misc/misc-ising.nlogo +++ b/misc/misc-ising.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -188,7 +188,7 @@ PENS This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -234,7 +234,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-self-similar-splodgeness-abounds.nlogo b/misc/misc-self-similar-splodgeness-abounds.nlogo index 0274557..15a0c42 100644 --- a/misc/misc-self-similar-splodgeness-abounds.nlogo +++ b/misc/misc-self-similar-splodgeness-abounds.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -144,7 +144,7 @@ This generates approximately self-similar splodges. The size of each circle is This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -190,7 +190,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-simmap.nlogo b/misc/misc-simmap.nlogo index ac3af11..b8c28f4 100644 --- a/misc/misc-simmap.nlogo +++ b/misc/misc-simmap.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -330,7 +330,7 @@ NIL This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -376,7 +376,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-termite-dune-fields-h.nlogo b/misc/misc-termite-dune-fields-h.nlogo index c8a784c..117378b 100644 --- a/misc/misc-termite-dune-fields-h.nlogo +++ b/misc/misc-termite-dune-fields-h.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information diff --git a/misc/misc-termite-dune-fields.nlogo b/misc/misc-termite-dune-fields.nlogo index 164d482..1992734 100644 --- a/misc/misc-termite-dune-fields.nlogo +++ b/misc/misc-termite-dune-fields.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information diff --git a/misc/misc-two-flocks-no-R.nlogo b/misc/misc-two-flocks-no-R.nlogo index 1f81dda..9e76877 100644 --- a/misc/misc-two-flocks-no-R.nlogo +++ b/misc/misc-two-flocks-no-R.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -589,7 +589,7 @@ HORIZONTAL This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -636,7 +636,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/misc/misc-voter-model-two-ranges.nlogo b/misc/misc-voter-model-two-ranges.nlogo index 2afd8db..87f63cf 100644 --- a/misc/misc-voter-model-two-ranges.nlogo +++ b/misc/misc-voter-model-two-ranges.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -230,7 +230,7 @@ sequential-update? This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -276,7 +276,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-voter-model-uniques-start-states.nlogo b/misc/misc-voter-model-uniques-start-states.nlogo index 1dfe08f..feccf0f 100644 --- a/misc/misc-voter-model-uniques-start-states.nlogo +++ b/misc/misc-voter-model-uniques-start-states.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -199,7 +199,7 @@ get-n-states This model is an implementation of Conway's game of life. See: -+ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway’s new solitaire game ‘life’. _Scientific American_ **223**, 120–123. ++ Gardner M 1970 Mathematical games: the fantastic combinations of John Conway�s new solitaire game �life�. _Scientific American_ **223**, 120�123. This is an example model referenced in Chapter 1 of @@ -245,7 +245,7 @@ If you mention this model in a publication, please include these citations for t ## COPYRIGHT AND LICENSE -Copyright 2011-13 David O'Sullivan and George L. W. Perry +Copyright 2011-24 David O'Sullivan and George L. W. Perry ![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png) diff --git a/misc/misc-voter-model-with-mutation-species-area.nlogo b/misc/misc-voter-model-with-mutation-species-area.nlogo index d282782..ca8c4ab 100644 --- a/misc/misc-voter-model-with-mutation-species-area.nlogo +++ b/misc/misc-voter-model-with-mutation-species-area.nlogo @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information @@ -276,7 +276,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/odds-and-ends/CC_license.txt b/odds-and-ends/CC_license.txt index 4530653..ccd1dfd 100644 --- a/odds-and-ends/CC_license.txt +++ b/odds-and-ends/CC_license.txt @@ -1,4 +1,4 @@ -; Copyright (c) 2011-13 David O'Sullivan and George Perry +; Copyright (c) 2011-24 David O'Sullivan and George Perry ; Licensed under the Creative Commons ; Attribution-NonCommercial-ShareAlike 3.0 License ; See Info tab for full copyright and license information diff --git a/odds-and-ends/MIT_license.txt b/odds-and-ends/MIT_license.txt index ce18652..27c8d9c 100644 --- a/odds-and-ends/MIT_license.txt +++ b/odds-and-ends/MIT_license.txt @@ -1,5 +1,5 @@ ;; The MIT License (MIT) -;; Copyright (c) 2011-13 David O'Sullivan and George L. W. Perry +;; Copyright (c) 2011-24 David O'Sullivan and George L. W. Perry ;; ;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;; this software and associated documentation files (the "Software"), to deal in diff --git a/odds-and-ends/how-to-cite-and-license.txt b/odds-and-ends/how-to-cite-and-license.txt index 7397f43..c3d6068 100644 --- a/odds-and-ends/how-to-cite-and-license.txt +++ b/odds-and-ends/how-to-cite-and-license.txt @@ -9,7 +9,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/using-R/2.3-csr-R.nlogo b/using-R/2.3-csr-R.nlogo index 5481fa4..115e157 100644 --- a/using-R/2.3-csr-R.nlogo +++ b/using-R/2.3-csr-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,95 +22,39 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [palette r] +__includes [ + "pp-utils.nls" + "pp-r-utils.nls" +] + +breed [ points point ] + +extensions [palette sr] patches-own [ lambda ] -turtles-own [ - x - y -] - to setup clear-all - set-patch-size ( 100 / resolution ) * 4 - resize-world 0 (resolution - 1) 0 (resolution - 1) + clear-pattern + sr:setup + set-default-shape turtles "circle" reset-ticks end to go - setup - create-turtles n [ + clear-pattern + create-points n [ setxy random-xcor random-ycor - - set x xcor / resolution - set y ycor / resolution - - set color white - set shape "circle" - set size 1 * ( resolution / 100) + set color black ] end - -to plot-intensity - ask patches [ - set lambda count turtles-here - ] - repeat smooth [ diffuse lambda 0.9 ] - - let max-lambda max [lambda] of patches - - ask turtles [ set color black ] - - ask patches [ - set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207] ] lambda max-lambda 0 - ] -end - - - -to plot-K -;; modified from the example R extension code - - r:eval "library(spatstat)" - - ;; send agent variables into an R data-frame - (r:putagentdf "agentset" turtles "who" "x" "y") - - ;; create point pattern with vectors of x- and y-coordinates of turtles and the dimension of the window/world - let revalstring (word "agppp <- ppp(agentset$x, agentset$y)") ; don't need a window on the unit square - r:eval revalstring - - ;; calculate K - r:eval "k <- Kest(agppp, method = 'c')" - - ;; get results from R - let k r:get "k$iso" - let r r:get "k$r" - let theo r:get "k$theo" - - -; ;; combine results into a multidimensional list for plotting - let ripley (map [ [rx ky theoretical] -> (list rx ky theoretical) ] r k theo) -; -; ;; plot the results - clear-plot - foreach ripley [ tuple -> - set-current-plot "Ripley's K" - set-current-plot-pen "K(r)" - plotxy (item 0 tuple) (item 1 tuple) - set-current-plot-pen "theo" - plotxy (item 0 tuple) (item 2 tuple) - ] - -end @#$#@#$#@ GRAPHICS-WINDOW -210 +201 10 -618 +609 419 -1 -1 @@ -121,8 +65,8 @@ GRAPHICS-WINDOW 1 1 0 -1 -1 +0 +0 1 0 99 @@ -135,10 +79,10 @@ ticks 100.0 SLIDER -16 -56 -188 -89 +12 +135 +184 +168 n n 1 @@ -150,10 +94,10 @@ NIL HORIZONTAL BUTTON -38 -17 -173 -51 +33 +76 +168 +110 generate pattern go NIL @@ -164,40 +108,15 @@ NIL NIL NIL NIL -1 - -SLIDER -17 -118 -189 -151 -resolution -resolution -1 -200 -100.0 -1 -1 -NIL -HORIZONTAL - -TEXTBOX -28 -158 -188 -202 -Controls grain of underlying grid -11 -0.0 -1 +0 BUTTON -49 -242 -159 -275 -plot intensity -plot-intensity +38 +260 +154 +293 +plot-density +calculate-point-intensity\nplot-surface [p -> [lambda] of p] NIL 1 T @@ -206,23 +125,13 @@ NIL NIL NIL NIL -1 - -TEXTBOX -631 -14 -781 -62 -Note this model uses the gradient extension and also the R library spatstat -12 -0.0 -1 +0 BUTTON -795 -23 -873 -56 +703 +350 +781 +383 Plot K plot-k NIL @@ -233,7 +142,7 @@ NIL NIL NIL NIL -1 +0 PLOT 630 @@ -263,19 +172,63 @@ smooth smooth 1 20 -11.0 +15.0 1 1 NIL HORIZONTAL BUTTON -47 -282 -161 -315 +36 +177 +153 +210 +NIL toggle-points -ask turtles [set hidden? not hidden?] +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +0 + +BUTTON +78 +25 +144 +58 +NIL +setup +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +TEXTBOX +789 +352 +939 +380 +Uses Simple R extension and the spatstat library +11 +0.0 +1 + +BUTTON +39 +301 +156 +334 +clear-density +clear-background NIL 1 T @@ -306,7 +259,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -605,7 +558,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/2.4-inhomPoisson.nlogo b/using-R/2.4-inhomPoisson.nlogo index 5e579dc..d8bff6c 100644 --- a/using-R/2.4-inhomPoisson.nlogo +++ b/using-R/2.4-inhomPoisson.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,191 +22,73 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [palette r] - -patches-own -[ - theo-lambda - obs-lambda - xP - yP +__includes [ + "pp-utils.nls" + "pp-r-utils.nls" ] -turtles-own -[ - x - y +extensions [palette sr] + +breed [ points point ] + +patches-own [ + theo-lambda + lambda + px + py ] to setup clear-all - resize-world 0 (resolution - 1) 0 (resolution - 1) - set-patch-size ( 100 / resolution ) * 4 - - ask patches - [ - set xP pxcor / resolution - set yP pycor / resolution - ] - - build-intensity - - reset-ticks - -end - - -to simulate-pattern - - setup - simulate-inhom + clear-pattern + set-default-shape turtles "circle" + sr:setup ask patches [ - set obs-lambda count turtles-here + set px rescale-x pxcor + set py rescale-y pycor ] + reset-ticks end - -to simulate-inhom - - let max-lambda [theo-lambda] of max-one-of patches [theo-lambda] - - create-turtles max-lambda - [ - set hidden? true - setxy random-xcor random-ycor - ] - - ask turtles - [ - let p-retain theo-lambda / max-lambda - if random-float 1 > p-retain [die] - ] - - ;; ask n-of (count turtles - n) turtles [die] - - ask turtles - [ - set color white - set shape "circle" - set size 1 * ( resolution / 100) - set hidden? false - - set x pxcor / world-width - set y pycor / world-height - ] - +to go + clear-pattern + build-intensity + plot-surface [p -> [theo-lambda] of p] + simulate-inhomogeneous + calculate-point-intensity end to build-intensity - ask patches [ set theo-lambda runresult function ] - - ;; If you enter (e.g.) -1000 * Xp then you get negative lambdas + ;; If you enter (e.g.) -1000 * px then you get negative lambdas ;; This 'flips' this over... - let mx-flip 0 - if max [theo-lambda] of patches <= 0 - [ - set mx-flip abs (min[theo-lambda] of patches) + let max-flip max [theo-lambda] of patches + if max-flip <= 0 [ + ask patches [ + set theo-lambda theo-lambda - max-flip + ] ] - - ask patches [ - set theo-lambda mx-flip + theo-lambda - ] - end - - -to plot-surface - - ;; repeat each time in case has been previously smoothed - ask patches [ - set obs-lambda count turtles-here +to simulate-inhomogeneous + let max-lambda [theo-lambda] of max-one-of patches [theo-lambda] + create-points max-lambda [ + setxy random-xcor random-ycor + set color black ] - - let max-lambda max [theo-lambda] of patches - -ask turtles [ - set color black - ] - - ask patches [ - set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207]] theo-lambda max-lambda 0 - ] - - -end - - - - -to plot-intensity - - ask patches [ - set obs-lambda count turtles-here - ] - - repeat smooth [ diffuse obs-lambda 0.9 ] - - let max-lambda max [obs-lambda] of patches - - ask turtles [ - set color black - ] - - ask patches [ - set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207]] obs-lambda max-lambda 0 - ] - - -end - - -to plot-K -;; modified from the example R extension code - - r:eval "library(spatstat)" - - ;; send agent variables into an R data-frame - (r:putagentdf "agentset" turtles "who" "x" "y") - - ;; create point pattern with vectors of x- and y-coordinates of turtles and the dimension of the window/world - let revalstring (word "agppp <- ppp(agentset$x, agentset$y)") ; don't need a window on the unit square - r:eval revalstring - - ;; calculate PCF - r:eval "k <- Kest(agppp, method = 'c')" - - ;; get results from R - let k r:get "k$iso" - let r r:get "k$r" - let theo r:get "k$theo" - - -; ;; combine results into a multidimensional list for plotting - let pcf (map [ [ri ki theoretical] -> (list ri ki theoretical) ] r k theo) -; -; ;; plot the results - clear-plot - foreach pcf - [ rkt -> - set-current-plot "Ripley's K" - set-current-plot-pen "K(r)" - plotxy (item 0 rkt) (item 1 rkt) - set-current-plot-pen "theo" - plotxy (item 0 rkt) (item 2 rkt) + ask points [ + let p-retain theo-lambda / max-lambda + if random-float 1 > p-retain [ die ] ] - end - @#$#@#$#@ GRAPHICS-WINDOW -210 -12 -618 -421 +277 +10 +685 +419 -1 -1 4.0 @@ -216,26 +98,26 @@ GRAPHICS-WINDOW 1 1 0 -1 -1 +0 +0 1 0 99 0 99 -0 -0 +1 +1 1 ticks 30.0 BUTTON -40 -13 -175 -47 +125 +73 +260 +107 generate pattern -simulate-pattern +go NIL 1 T @@ -244,40 +126,15 @@ NIL NIL NIL NIL -1 - -SLIDER -28 -70 -200 -103 -resolution -resolution -1 -200 -100.0 -1 -1 -NIL -HORIZONTAL - -TEXTBOX -39 -110 -189 -170 -Controls grain of underlying grid - pixel size will need to be manually adjusted in the World View options. -11 -0.0 -1 +0 BUTTON -99 -327 -209 -360 -plot intensity -plot-intensity +140 +291 +256 +324 +plot-density +calculate-point-intensity\nplot-surface [p -> [lambda] of p] NIL 1 T @@ -286,25 +143,25 @@ NIL NIL NIL NIL -1 +0 TEXTBOX -652 -115 -802 -163 -Note this model uses the palette extensions and also the R library spatstat +793 +403 +1037 +440 +Note this requires the Simple R extension and the R library spatstat 12 0.0 1 BUTTON -7 -366 -104 -399 -show points -ask turtles [set hidden? false] +16 +291 +133 +324 +toggle-points +ask turtles [set hidden? not hidden?] NIL 1 T @@ -313,30 +170,13 @@ NIL NIL NIL NIL -1 - -BUTTON -107 -368 -199 -401 -hide points -ask turtles [set hidden? true] -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 +0 BUTTON -817 -136 -895 -169 +700 +399 +778 +432 Plot K plot-K NIL @@ -347,13 +187,13 @@ NIL NIL NIL NIL -1 +0 PLOT -641 -174 -988 -444 +699 +120 +1046 +390 Ripley's K r K(r) @@ -362,19 +202,19 @@ K(r) 0.0 0.25 true -false +true "" "" PENS "K(r)" 1.0 0 -16777216 true "" "" "theo" 1.0 0 -2674135 true "" "" BUTTON --1 -327 -96 -360 +158 +203 +255 +236 plot surface -plot-surface +plot-surface [p -> [theo-lambda] of p] NIL 1 T @@ -383,24 +223,24 @@ NIL NIL NIL NIL -1 +0 MONITOR -577 -455 -657 -500 -pua lambda +698 +15 +831 +60 +mean-theo-lambda mean [theo-lambda] of patches -5 +4 1 11 MONITOR -730 -452 -787 -497 +774 +65 +831 +110 n count turtles 0 @@ -408,76 +248,110 @@ count turtles 11 TEXTBOX -217 -451 -542 -549 -Note that lambda is the intensity, that is, the expected number of points per unit area. \n\nThe total number of points in the simulated pattern will be random with expected value mu = lambda * area (area = the unit square here).\n +843 +14 +999 +67 +theo-lambda is the intensity, that is, the expected number of points per unit area. 11 0.0 1 MONITOR -659 -453 -725 -498 +699 +65 +765 +110 lambda -count turtles / (count patches) -17 +count turtles +4 1 11 INPUTBOX -19 -192 -211 -252 +15 +136 +259 +196 function -(1000 * xP) / (2 * (yP + 1)) +1000 * sqrt (px ^ 2 + py ^ 2) 1 0 String SLIDER -18 -416 -190 -449 +56 +332 +228 +365 smooth smooth -0 -20 -20.0 +1 +50 +41.0 1 1 NIL HORIZONTAL TEXTBOX -48 -267 -198 -309 -Enter function here - use xP and yP to refer to the x and y coordinates +13 +206 +155 +276 +Enter a function here: use px and py to reference x and y coordinates (normalised from 0 to 1) 11 0.0 1 TEXTBOX -34 -456 -184 -512 +31 +373 +256 +416 smooth controls how often the 'diffuse' command is repeated to generate an approximate kernel density 11 0.0 1 +BUTTON +194 +32 +260 +65 +NIL +setup +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +BUTTON +165 +246 +256 +279 +clear-density +clear-background +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + @#$#@#$#@ ## WHAT IS IT? -This model is an implementation of complete spatial randomness (CSR) or the _independent random process_ for a spatial point pattern and is discussed in Chapter 2 of +This model is an implementation of an _inhomogenous Poisson point process_ and is discussed in Chapter 2 of + O'Sullivan D and Perry GLW 2013 _Spatial Simulation: Exploring Pattern and Process_. Wiley, Chichester, England. @@ -494,7 +368,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -793,7 +667,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/2.5-inhibition.nlogo b/using-R/2.5-inhibition.nlogo index f1ea1fc..9303302 100644 --- a/using-R/2.5-inhibition.nlogo +++ b/using-R/2.5-inhibition.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,154 +22,71 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [palette r] - -patches-own -[ - lambda - nn-distance +__includes [ + "pp-utils.nls" + "pp-r-utils.nls" ] -turtles-own -[ - x - y +breed [ exclusion-zones exclusion-zone ] +breed [ points point ] + +extensions [palette sr] + +patches-own [ + lambda ] ; Note that the sims are assumed to take place on the unit square ; the resolution is purely graphical (to display intensity) to setup - clear-all - resize-world 0 (resolution - 1) 0 (resolution - 1) - set-patch-size ( 100 / resolution ) * 4 - + clear-pattern + set-default-shape turtles "circle" + sr:setup reset-ticks - end to go - - setup - if check-packing = true - [ - - create-turtles 1 - [ - setxy random-xcor random-ycor - set shape "circle" - set color white - set size 1 * ( resolution / 100) - ] - - while [count turtles < n] - [ - ; unit square... - create-turtles 1 - [ - setxy random-xcor random-ycor - set size 0 - - ;; distance to nn scaled to unit square -> DO'S TO CHECK! - let nearest-nhb-dist distance min-one-of other turtles [distance myself] - set nearest-nhb-dist (nearest-nhb-dist / resolution) - - - ifelse nearest-nhb-dist >= min-distance or random-float 1 >= inhibit-strength - [ - set color white - set shape "circle" - set size 1 * ( resolution / 100) - ] - [ - die - ] - ] - ] - ask turtles - [ - set nn-distance (distance min-one-of other turtles [distance myself]) - set x xcor / resolution - set y ycor / resolution + clear-pattern + if packing-is-possible? [ + while [count points < n] [ + create-points 1 [ + set color black + setxy random-xcor random-ycor + if any? other points [ + let nearest-nhb-dist rescale min [distance myself] of (other points) 0 world-width 0 1 + if nearest-nhb-dist < min-distance and random-float 1 < inhibit-strength + [ die ] + ] + hatch-exclusion-zones 1 [ + set color [ 255 0 0 20 ] + set size rescale (min-distance * 2) 0 1 0 world-width + ] + ] ] ] end to plot-intensity - ask patches [ - set lambda count turtles-here + set lambda count points-here ] - - - repeat smooth [diffuse lambda 0.9] - + repeat smooth [diffuse lambda (8 / 9)] let max-lambda max [lambda] of patches - - ask turtles [ - set color black - ] - ask patches [ set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207]] lambda max-lambda 0 ] - - end -;Test whether pattern can be generated (based on packing intensity: limit ~ 0.567) -; See Diggle 2003 -to-report check-packing - let packing 0 - let pack-test true - set packing (n * Pi * min-distance ^ 2) / (4 * 1) - - - if packing > 0.65 [ - user-message (word "Packing intensity (= " precision packing 4 ") too high - event set can not be generated") - set pack-test false +to-report packing-is-possible? + let packing-intensity n * pi * (min-distance ^ 2) / 4 + if packing-intensity > 0.5 and inhibit-strength = 1 [ + user-message (word "It will be time consuming to generate the requested number of points at a packing intensity of " + precision packing-intensity 4 ". Consider setting the inhibit-strength to less than 1, or reducing " + "the min-distance to around " precision sqrt (2 / n / pi) 3 " or less") + report false ] - - report pack-test -end - - - -to plot-K -;; modified from the example R extension code - - r:eval "library(spatstat)" - - ;; send agent variables into an R data-frame - (r:putagentdf "agentset" turtles "who" "x" "y") - - ;; create point pattern with vectors of x- and y-coordinates of turtles and the dimension of the window/world - let revalstring (word "agppp <- ppp(agentset$x, agentset$y)") ; don't need a window on the unit square - r:eval revalstring - - ;; calculate K - r:eval "k <- Kest(agppp, method = 'c')" - - ;; get results from R - let k r:get "k$iso" - let r r:get "k$r" - let theo r:get "k$theo" - - -; ;; combine results into a multidimensional list for plotting - let ripley (map [ [ri ki theoretical] -> (list ri ki theoretical) ] r k theo) -; -; ;; plot the results - clear-plot - foreach ripley - [ rkt -> - set-current-plot "Ripley's K" - set-current-plot-pen "K(r)" - plotxy (item 0 rkt) (item 1 rkt) - set-current-plot-pen "theo" - plotxy (item 0 rkt) (item 2 rkt) - ] - + report true end @#$#@#$#@ GRAPHICS-WINDOW @@ -179,7 +96,7 @@ GRAPHICS-WINDOW 426 -1 -1 -8.88888888888889 +4.0 1 10 1 @@ -190,35 +107,35 @@ GRAPHICS-WINDOW 1 1 0 -44 +99 +0 +99 +0 0 -44 -1 -1 1 ticks 30.0 SLIDER -18 -17 -190 -50 +22 +112 +194 +145 n n 1 1000 -217.0 +160.0 1 1 NIL HORIZONTAL BUTTON -31 -150 -166 -184 +60 +62 +195 +96 generate pattern go NIL @@ -229,40 +146,15 @@ NIL NIL NIL NIL -1 - -SLIDER -19 -207 -191 -240 -resolution -resolution -1 -200 -45.0 -1 -1 -NIL -HORIZONTAL - -TEXTBOX -30 -247 -180 -307 -Controls grain of underlying grid - pixel size will need to be manually adjusted in the World View options. -11 -0.0 -1 +0 BUTTON -42 -315 -152 -348 -plot intensity -plot-intensity +17 +334 +95 +367 +plot density +calculate-point-intensity\nplot-surface [p -> [lambda] of p] NIL 1 T @@ -271,53 +163,53 @@ NIL NIL NIL NIL -1 +0 TEXTBOX 733 -199 -913 -247 -Note this model uses the gradient extension and the R library spatstat +387 +958 +421 +Note this model uses the Simple R extension and the R library spatstat 12 0.0 1 SLIDER -18 -61 -190 -94 +22 +156 +194 +189 min-distance min-distance 0 -.2 -0.04 -.01 +0.1 +0.063 +.001 1 NIL HORIZONTAL SLIDER -18 -100 -190 -133 +22 +195 +194 +228 inhibit-strength inhibit-strength 0 1.0 -0.57 +1.0 .01 1 NIL HORIZONTAL PLOT -730 -254 -1049 -486 +634 +20 +953 +373 Ripley's K r K(r) @@ -333,12 +225,12 @@ PENS "theo" 1.0 0 -2674135 true "" "" BUTTON -921 -209 -1042 -242 +652 +383 +725 +416 Plot K -plot-k +plot-K NIL 1 T @@ -347,15 +239,15 @@ NIL NIL NIL NIL -1 +0 BUTTON -9 -360 -103 -393 -hide turtles -ask turtles [set hidden? true] +26 +283 +196 +316 +toggle-points +ask turtles [set hidden? not hidden?] NIL 1 T @@ -364,15 +256,30 @@ NIL NIL NIL NIL +0 + +SLIDER +19 +374 +191 +407 +smooth +smooth +1 +20 +20.0 1 +1 +NIL +HORIZONTAL BUTTON -105 -360 -205 -393 -show turtles -ask turtles [set hidden? false] +129 +23 +195 +56 +NIL +setup NIL 1 T @@ -383,20 +290,39 @@ NIL NIL 1 -SLIDER -15 -403 -187 -436 -smooth -smooth -1 -20 -5.0 +BUTTON +26 +242 +195 +275 +toggle-exclusion-zones +ask exclusion-zones [ set hidden? not hidden? ] +NIL 1 +T +OBSERVER +NIL +NIL +NIL +NIL +0 + +BUTTON +101 +334 +192 +367 +clear density +clear-background +NIL 1 +T +OBSERVER NIL -HORIZONTAL +NIL +NIL +NIL +0 @#$#@#$#@ ## WHAT IS IT? @@ -418,7 +344,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -717,7 +643,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/2.6-cluster .nlogo b/using-R/2.6-cluster .nlogo index fa67163..f3e5d4c 100644 --- a/using-R/2.6-cluster .nlogo +++ b/using-R/2.6-cluster .nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,219 +22,117 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [palette r] +extensions [palette sr] -patches-own -[ - lambda - nn-distance - xP - yP -] +breed [parents parent] +breed [children child] -turtles-own -[ - x - y - component +patches-own [ + lambda ] - ; Note that the sims are assumed to take place on the unit square ; the resolution is purely graphical (to display intensity) to setup clear-all - resize-world 0 (resolution - 1) 0 (resolution - 1) - - if n-clusters > n [set n-clusters n] - + sr:setup + ask patches [ set pcolor white ] + set-default-shape turtles "circle" + if n-clusters > overall-intensity [set n-clusters overall-intensity] reset-ticks - end to go - - setup - + clear-plot + ask patches [ set pcolor white ] + ask turtles [ die ] build-cluster - - - ask turtles - [ - set nn-distance (distance min-one-of other turtles [distance myself]) - set x xcor / resolution - set y ycor / resolution - ] - end to plot-intensity - ask patches [ set lambda count turtles-here ] - repeat smooth [ diffuse lambda 0.9 ] - let max-lambda max [lambda] of patches - ask turtles [ - set color black - ] - ask patches [ set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207]] lambda max-lambda 0 ] - end to build-cluster - - ;; 1. Generate the parent clusters (homog Poisson process) - create-turtles n-clusters - [ + create-parents n-clusters [ setxy random-xcor random-ycor - format-turtle "parent" ] - - let mean-offspring n / n-clusters - - ;; 2. Disperse 'offspring' around the parent clusters - ask turtles with [component = "parent"] - [ - let offspring random-poisson mean-offspring - let sd-px sd-displacement * resolution - - - hatch offspring - [ - ifelse cluster-type = "thomas" - [ - - let xy-check false - let cand-x [xcor] of myself - let cand-y [ycor] of myself - - ;; bounds checking to stop points being placed outside the world - while [xy-check = false] - [ - set cand-x random-normal [xcor] of myself sd-px - set cand-y random-normal [ycor] of myself sd-px - - if xy-bounds-check cand-x cand-y [ set xy-check true] - ] - - setxy cand-x cand-y - ] - [ - - let xy-check false - let cand-x [xcor] of myself - let cand-y [ycor] of myself - - while [xy-check = false] - [ - let h random 360 - let d random-float disc-distance * resolution - - set cand-x [xcor] of myself + (d * cos(h)) - set cand-y [ycor] of myself + (d * sin(h)) - - if xy-bounds-check cand-x cand-y [ set xy-check true] - ] - - setxy cand-x cand-y - ] - - format-turtle "offspring-1" + let mean-offspring overall-intensity / n-clusters + let c-scale rescale cluster-scale 0 1 0 world-width + ask turtles [ + let n-offspring random-poisson mean-offspring + hatch-children n-offspring [ + set color black + ifelse cluster-type = "thomas" [ + set heading random-float 360 + let d abs random-normal 0 c-scale + ifelse patch-at-heading-and-distance heading d = nobody + [ die ] + [ jump d ] + ] + [ + let diff-x (random-float-between -1 1) * c-scale + let diff-y (random-float-between -1 1) * c-scale + ifelse patch-at diff-x diff-y = nobody or dist diff-x diff-y > c-scale + [ die ] + [ setxy xcor + diff-x ycor + diff-y ] + ] ] ] - - ;; 3. Thin the pattern to ensure the exact number of points specified is produced - let excess count turtles - n - - if excess > 0 - [ - ask n-of excess turtles [die] - ] - + ask parents [ die ] end -to format-turtle [comp] - - set color white - set shape "circle" - set size 1.0 - set component comp - set x xcor / resolution - set y ycor / resolution - +to-report random-float-between [mn mx] + report rescale random-float 1 0 1 mn mx end -to colour-by-type - - ask turtles - [ - ifelse component = "parent" - [ set color red - set size 2 ] - [ set color yellow ] - ] - +to-report dist [a b] + report sqrt (a ^ 2 + b ^ 2) end +to-report rescale [x xmin xmax newmin newmax] + report newmin + (newmax - newmin) * (x - xmin) / (xmax - xmin) +end to plot-K -;; modified from the example R extension code - - r:eval "library(spatstat)" - - ;; send agent variables into an R data-frame - (r:putagentdf "agentset" turtles "who" "x" "y") - - ;; create point pattern with vectors of x- and y-coordinates of turtles and the dimension of the window/world - let revalstring (word "agppp <- ppp(agentset$x, agentset$y)") ; don't need a window on the unit square - r:eval revalstring - - ;; calculate K - r:eval "k <- Kest(agppp, method = 'c')" - - ;; get results from R - let k r:get "k$iso" - let r r:get "k$r" - let theo r:get "k$theo" - - -; ;; combine results into a multidimensional list for plotting - let ripley (map [ [ri ki theoretical] -> (list ri ki theoretical) ] r k theo) -; -; ;; plot the results + sr:run "library(spatstat)" + sr:set "x" map [t -> [rescale xcor -0.5 99.5 0 1] of t] sort turtles + sr:set "y" map [t -> [rescale ycor -0.5 99.5 0 1] of t] sort turtles + sr:run "pp <- ppp(x = x, y = y)" + + ;; calculate and retrieve K function + sr:run "k <- Kest(pp)" + let r sr:runresult "k$r" + let iso sr:runresult "k$iso" + let theo sr:runresult "k$theo" + + ;; plot the results clear-plot - foreach ripley - [ rkt -> - set-current-plot "Ripley's K" - set-current-plot-pen "K(r)" - plotxy (item 0 rkt) (item 1 rkt) - set-current-plot-pen "theo" - plotxy (item 0 rkt) (item 2 rkt) - ] - -end - -to-report xy-bounds-check [cx cy] - - report cx > 0 and cx <= max-pxcor and cy > 0 and cy <= max-pycor - + set-plot-x-range 0 precision last r 3 + set-plot-y-range 0 precision max sentence iso theo 3 + set-current-plot "Ripley's K" + set-current-plot-pen "K(r)" + (foreach r iso [ [x y] -> plotxy x y ]) + set-current-plot-pen "theo" + (foreach r theo [ [x y] -> plotxy x y ]) end @#$#@#$#@ GRAPHICS-WINDOW 210 10 -718 -519 +618 +419 -1 -1 -5.0 +4.0 1 10 1 @@ -255,25 +153,25 @@ ticks 30.0 SLIDER -18 -17 -190 -50 -n -n +16 +92 +188 +125 +overall-intensity +overall-intensity 1 1000 -301.0 +500.0 1 1 NIL HORIZONTAL BUTTON -34 -354 -169 -388 +51 +51 +186 +85 generate pattern go NIL @@ -284,38 +182,13 @@ NIL NIL NIL NIL -1 - -SLIDER -19 -247 -191 -280 -resolution -resolution -1 -200 -100.0 -1 -1 -NIL -HORIZONTAL - -TEXTBOX -27 -283 -177 -343 -Controls grain of underlying grid - pixel size will need to be manually adjusted in the World View options. -11 -0.0 -1 +0 BUTTON -45 -394 -155 -427 +72 +296 +187 +329 plot intensity plot-intensity NIL @@ -326,38 +199,38 @@ NIL NIL NIL NIL -1 +0 TEXTBOX -759 -97 -909 -145 +771 +396 +983 +432 Note this model uses the gradient extension and the R library spatstat 12 0.0 1 SLIDER -18 -171 -190 -204 -sd-displacement -sd-displacement +16 +218 +188 +251 +cluster-scale +cluster-scale 0 1.0 0.1 -.01 +.001 1 NIL HORIZONTAL PLOT -752 -154 -1071 -386 +640 +68 +985 +385 Ripley's K r K(r) @@ -373,10 +246,10 @@ PENS "theo" 1.0 0 -2674135 true "" "" BUTTON -928 -103 -1049 -136 +640 +391 +761 +424 Plot K plot-k NIL @@ -387,40 +260,40 @@ NIL NIL NIL NIL -1 +0 SLIDER -19 -104 -191 -137 +17 +179 +189 +212 n-clusters n-clusters 0 -100 -10.0 +ceiling (overall-intensity / 2) +20.0 1 1 NIL HORIZONTAL TEXTBOX -33 -213 -183 -241 +31 +260 +181 +288 Scaled to the unit square not Netlogo world dimensions 11 0.0 1 BUTTON -26 -432 -172 -465 -identify components -colour-by-type +71 +338 +188 +371 +toggle-points +ask turtles [set hidden? not hidden?] NIL 1 T @@ -429,47 +302,13 @@ NIL NIL NIL NIL -1 - -BUTTON -4 -472 -96 -505 -hide points -ask turtles [set hidden? true] -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 - -BUTTON -104 -470 -201 -503 -show points -ask turtles [set hidden? false] -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 +0 SLIDER 17 -524 +380 189 -557 +413 smooth smooth 1 @@ -481,37 +320,22 @@ NIL HORIZONTAL CHOOSER -37 -54 -175 -99 +51 +129 +189 +174 cluster-type cluster-type "matern" "thomas" 1 -SLIDER -18 -137 -190 -170 -disc-distance -disc-distance -0 -1.0 -0.1 -.01 -1 -NIL -HORIZONTAL - BUTTON -758 -21 -882 -54 -remove 'parents' -ask turtles with [component != \"offspring-1\"]\n [die] +119 +13 +185 +46 +NIL +setup NIL 1 T @@ -525,12 +349,17 @@ NIL @#$#@#$#@ ## WHAT IS IT? -This model is an implementation of complete spatial randomness (CSR) or the _independent random process_ for a spatial point pattern and is discussed in Chapter 2 of +This model is an implementation of two clustered spatial point processes, the _Thomas process_ and _Matern's cluster process_ as discussed in Chapter 2 of + O'Sullivan D and Perry GLW 2013 _Spatial Simulation: Exploring Pattern and Process_. Wiley, Chichester, England. You should consult that book for more information and details of the model. +See also: + ++ Matern B. 1960. _Spatial Variation_. Meddelanden fraan Statens Skogsforskningsinstitut, **59**(5). Statens Skogsforskningsinstitut, Sweden. ++ Thomas M. 1949. A generalisation of Poisson's binomial limit for use in ecology. _Biometrika_ **36** 18–25. + ## HOW TO CITE If you mention this model in a publication, please include these citations for the model itself and for NetLogo @@ -542,7 +371,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -841,7 +670,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/2.7-doubleCluster.nlogo b/using-R/2.7-doubleCluster.nlogo index 13c2bb5..5681e4b 100644 --- a/using-R/2.7-doubleCluster.nlogo +++ b/using-R/2.7-doubleCluster.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,242 +22,99 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [palette r] - -globals -[ - overall-lambda +__includes [ + "pp-utils.nls" + "pp-r-utils.nls" ] -patches-own -[ - lambda - nn-distance - xP - yP -] +extensions [ palette sr ] -turtles-own -[ - x - y - component -] +globals [ show-groups? ] +breed [ points point ] + +patches-own [ lambda ] ; Note that the simulations are assumed to take place on the unit square ; the resolution is purely graphical (to display intensity) to setup - clear-all - resize-world 0 (resolution - 1) 0 (resolution - 1) - set-patch-size ( 100 / resolution ) * 4 + clear-background + set-default-shape turtles "circle" + set show-groups? false + sr:setup reset-ticks - end to go - - setup - + clear-pattern build-cluster - - - ask turtles - [ - ;; set size 1 * ( resolution / 100) - set nn-distance (distance min-one-of other turtles [distance myself]) - set x xcor / resolution - set y ycor / resolution - ] - end -to plot-intensity - - ask patches [ - set lambda count turtles-here - ] - - repeat smooth [ diffuse lambda 0.9 ] - - let max-lambda max [lambda] of patches - -ask turtles [ - set color black - ] - - ask patches [ - set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207]] lambda max-lambda 0 - ] - - -end - - to build-cluster - - ;; 1. Generate the parent clusters (homog Poisson process) - create-turtles n-parent-clusters - [ + create-points n-parent-clusters [ setxy random-xcor random-ycor - format-turtle "parent" + set color black + set label "parent" + set label-color [0 0 0 0] ] - ;; let mean-offspring n / n-clusters-g1 - - ;; 2. Disperse 'offspring' around the parent clusters and ... - ;; first generation - let mean-n-g1 n / n-parent-clusters - - ask turtles with [component = "parent"] - [ - + let mean-n-g1 n / n-parent-clusters + ask points with [ label = "parent" ] [ let n-offspring random-poisson mean-n-g1 - let sd-px sd-displacement-g1 * resolution - - hatch n-offspring - [ - - let xy-check false - let cand-x [xcor] of myself - let cand-y [ycor] of myself - - ;; bounds checking to stop points being placed outside the world - while [xy-check = false] - [ - set cand-x random-normal [xcor] of myself sd-px - set cand-y random-normal [ycor] of myself sd-px - - if xy-bounds-check cand-x cand-y [ set xy-check true] - ] - - - setxy cand-x cand-y - format-turtle "offspring-1" + let sd-px rescale (random-normal 0 sd-displacement-g1) 0 1 0 world-width + hatch n-offspring [ + set label "offspring-1" + set heading random-float 360 + let d abs rescale (random-normal 0 sd-displacement-g1) 0 1 0 world-width + ifelse patch-at-heading-and-distance heading d = nobody + [ die ] + [ jump d ] ] ] - ;; second generation - let mean-n-g2 n / (count turtles with [component = "offspring-1"]) - - ask turtles with [component = "offspring-1"] - [ - - - let n-offspring-2 random-poisson mean-n-g2 - let sd-px sd-displacement-g2 * resolution - - hatch n-offspring-2 - [ - - let xy-check false - let cand-x [xcor] of myself - let cand-y [ycor] of myself - - ;; bounds checking to stop points being placed outside the world - while [xy-check = false] - [ - set cand-x random-normal [xcor] of myself sd-px - Set cand-y random-normal [ycor] of myself sd-px - - if xy-bounds-check cand-x cand-y [ set xy-check true] - ] - - - setxy cand-x cand-y - format-turtle "offspring-2" - ] + let mean-n-g2 n / (count turtles with [label = "offspring-1"]) + ask turtles with [ label = "offspring-1" ] [ + let n-offspring-2 random-poisson mean-n-g2 + let sd-px rescale (random-normal 0 sd-displacement-g2) 0 1 0 world-width + hatch n-offspring-2 [ + set label "offspring-2" + set heading random-float 360 + let d abs rescale (random-normal 0 sd-displacement-g2) 0 1 0 world-width + ifelse patch-at-heading-and-distance heading d = nobody + [ die ] + [ jump d ] + ] ] - - ;; 3. Thin the pattern to ensure the exact number of points specified is produced - ;let excess count turtles - overall-lambda - ; - ;if excess > 0 - ;[ - ; ask n-of excess turtles [die] - ;] - -end - -to format-turtle [comp] - - set color white - set shape "circle" - set size 1.0 * (resolution / 100) - set component comp - set x xcor / resolution - set y ycor / resolution - end to colour-by-type - - ask turtles - [ - if component = "parent" [ - set size 3 - set color red ] - if component = "offspring-1" [set size 2 - set color orange ] - if component = "offspring-2" [set color yellow ] - ] - -end - -to plot-K -;; modified from the example R extension code - - r:eval "library(spatstat)" - - ;; send agent variables into an R data-frame - (r:putagentdf "agentset" turtles "who" "x" "y") - - ;; create point pattern with vectors of x- and y-coordinates of turtles and the dimension of the window/world - let revalstring (word "agppp <- ppp(agentset$x, agentset$y)") ; don't need a window on the unit square - r:eval revalstring - - ;; calculate K - r:eval "k <- Kest(agppp, method = 'c')" - - ;; get results from R - let k r:get "k$iso" - let r r:get "k$r" - let theo r:get "k$theo" - - -; ;; combine results into a multidimensional list for plotting - let ripley (map [ [ri ki theoretical] -> (list ri ki theoretical) ] r k theo) -; -; ;; plot the results - clear-plot - foreach ripley - [ rkt -> - set-current-plot "Ripley's K" - set-current-plot-pen "K(r)" - plotxy (item 0 rkt) (item 1 rkt) - set-current-plot-pen "theo" - plotxy (item 0 rkt) (item 2 rkt) + ask points [ + ifelse show-groups? [ + (ifelse + label = "parent" + [ set size 4 + set color red + ] + label = "offspring-1" + [ set size 2 + set color [255 128 0 160] + ] + [ set color [0 0 0 120] ] + ) + ] + [ set size 1 + set color black + ] ] - -end - -to-report xy-bounds-check [cx cy] - - report cx > 0 and cx <= max-pxcor and cy > 0 and cy <= max-pycor - end to dump-to-file - file-open "doubleThomas.txt" file-print "x y type" - - ask turtles - [ - file-type xcor file-type " " file-type ycor file-type " " file-print component + ask turtles [ + file-type xcor file-type " " file-type ycor file-type " " file-print label ] - file-close end @#$#@#$#@ @@ -268,7 +125,7 @@ GRAPHICS-WINDOW 419 -1 -1 -8.0 +4.0 1 10 1 @@ -279,9 +136,9 @@ GRAPHICS-WINDOW 0 1 0 -49 +99 0 -49 +99 1 1 1 @@ -289,10 +146,10 @@ ticks 30.0 BUTTON -34 -332 -169 -366 +57 +53 +192 +87 generate pattern go NIL @@ -305,38 +162,13 @@ NIL NIL 1 -SLIDER -19 -225 -191 -258 -resolution -resolution -1 -200 -50.0 -1 -1 -NIL -HORIZONTAL - -TEXTBOX -27 -261 -177 -321 -Controls grain of underlying grid - pixel size will need to be manually adjusted in the World View options. -11 -0.0 -1 - BUTTON -45 -372 -155 -405 -plot intensity -plot-intensity +112 +357 +196 +390 +plot density +calculate-point-intensity\nplot-surface [p -> [lambda] of p] NIL 1 T @@ -348,10 +180,10 @@ NIL 1 TEXTBOX -755 -89 -905 -137 +720 +387 +950 +423 Note this model uses the R extension and the R library spatstat 12 0.0 @@ -359,9 +191,9 @@ Note this model uses the R extension and the R library spatstat SLIDER 21 -92 +181 193 -125 +214 sd-displacement-g1 sd-displacement-g1 0 @@ -373,10 +205,10 @@ NIL HORIZONTAL PLOT -752 -154 -1071 -386 +628 +56 +947 +375 Ripley's K r K(r) @@ -392,10 +224,10 @@ PENS "theo" 1.0 0 -2674135 true "" "" BUTTON -913 -101 -1034 -134 +637 +387 +712 +420 Plot K plot-k NIL @@ -410,9 +242,9 @@ NIL SLIDER 23 -47 +136 195 -80 +169 n-parent-clusters n-parent-clusters 0 @@ -423,23 +255,13 @@ n-parent-clusters NIL HORIZONTAL -TEXTBOX -33 -191 -183 -219 -Scaled to the unit square not Netlogo world dimensions -11 -0.0 -1 - BUTTON -26 -410 -172 -443 -identify components -colour-by-type +67 +311 +193 +344 +toggle groups +set show-groups? not show-groups?\ncolour-by-type NIL 1 T @@ -451,29 +273,12 @@ NIL 1 BUTTON -4 -450 -96 -483 -hide points -ask turtles [set hidden? true] -NIL -1 -T -OBSERVER -NIL -NIL -NIL +67 +271 +194 +304 NIL -1 - -BUTTON -104 -448 -201 -481 -show points -ask turtles [set hidden? false] +toggle-points NIL 1 T @@ -485,10 +290,10 @@ NIL 1 SLIDER -17 -502 -189 -535 +19 +398 +191 +431 smooth smooth 1 @@ -501,9 +306,9 @@ HORIZONTAL SLIDER 22 -131 +220 194 -164 +253 sd-displacement-g2 sd-displacement-g2 0 @@ -516,9 +321,9 @@ HORIZONTAL SLIDER 23 -11 +100 195 -44 +133 n n 0 @@ -530,12 +335,12 @@ NIL HORIZONTAL BUTTON -304 -442 -428 -475 +628 +16 +752 +49 remove 'parents' -ask turtles with [component != \"offspring-2\"]\n [die] +ask points with [label != \"offspring-2\"] [die] NIL 1 T @@ -547,12 +352,29 @@ NIL 1 BUTTON -433 -442 -541 -475 -pattern to file -dump-to-file +125 +10 +191 +43 +NIL +setup\n +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +BUTTON +19 +357 +105 +390 +clear density +clear-background NIL 1 T @@ -583,7 +405,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -882,7 +704,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/3.1-local-average-using-R.nlogo b/using-R/3.1-local-average-using-R.nlogo index 135ffc2..f00e0da 100644 --- a/using-R/3.1-local-average-using-R.nlogo +++ b/using-R/3.1-local-average-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. -extensions [ r ] +extensions [ sr ] patches-own [ @@ -32,7 +32,7 @@ patches-own [ to setup clear-all - r:setPlotDevice + sr:setup if use-seed? [ ; initialize the RNG seed to guarantee repeatability random-seed seed-value @@ -81,51 +81,60 @@ end ;;; R plotting code to r-plot-world + sr:set-plot-device ;; make a list of patches in x-y order - r:put "z" map [ p -> [z] of p ] sort patches + sr:set "z" map [ p -> [z] of p ] sort patches ;; world width and height required to setup matrix - r:put "nr" world-height - r:put "nc" world-width + sr:set "nr" world-height + sr:set "nc" world-width ;; make matrix of the z values - r:eval("z <-matrix(z, nrow=nr, ncol=nc)") + sr:run "z <- matrix(z, nrow = nr, ncol = nc)" ;; plot as an image - r:eval("image(z, asp=1, axes=F, col=gray(1-41:61/100))") -end - -;; as for r-plot-world, but with addition of contours -to r-plot-contours - r-plot-world - r:eval("contour(z, add=T, asp=1, axes=F, levels=seq(0,1,0.05))") + sr:run "image(z, asp = 1, axes = F, col = gray(1-41:61/100))" + if with-contours? [ + sr:run "contour(z, add = T, asp = 1, axes = F, levels = seq(0, 1, 0.05))" + ] end - ;; makes three sequences of box plots showing the ;; distribution of z-values over time, as the ;; weight parameter is varied to r-plot-fig-5.1 + sr:run "require(dplyr)" ;; need to NOT rescale values to demonstrate the effect set rescale-values? false - r:eval("par(mfrow=c(1,3))") ;; the series of weights let w [ 0.05 0.1 0.5 ] ;; the time steps of interest let t-plot [ 0 10 20 30 40 50 ] + let titles [] + let ts [] ;; store all the ticks of interest + let zs [] + let wts [] + let n count patches foreach w [ wt -> setup - let t [] ;; store all the ticks of interest - let x [] + set weight-w wt while [ticks <= last t-plot] [ if member? ticks t-plot [ - set t (sentence t (n-values count patches [ticks])) - set x (sentence x ([z] of patches)) + set ts (sentence ts (n-values n [i -> ticks])) + set zs (sentence zs ([z] of patches)) + set wts (sentence wts (n-values n [i -> wt])) ] go ] - r:put "x" x - r:put "t" t - r:put "label" (word "w = " wt) - r:eval("boxplot(x~t, ylim=c(0,1), xlab='Time', ylab='Grid values', main=label, las=1)") ] + sr:set "z" zs + sr:set "t" ts + sr:set "w" wts + sr:run "df <- data.frame(z = z, t = t, w = w)" + sr:set-plot-device + sr:run "par(mfrow = c(1, 3))" + sr:run "boxplot(z ~ t, data = df |> filter(w == 0.05), xlab = 'Time', main = 'w = 0.05')" + sr:run "boxplot(z ~ t, data = df |> filter(w == 0.1), xlab = 'Time', main = 'w = 0.1')" + sr:run "boxplot(z ~ t, data = df |> filter(w == 0.5), xlab = 'Time', main = 'w = 0.5')" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end @#$#@#$#@ GRAPHICS-WINDOW @@ -309,23 +318,6 @@ NIL NIL 1 -BUTTON -67 -347 -199 -380 -r-plot-contours -r-plot-contours -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 - BUTTON 67 386 @@ -343,6 +335,17 @@ NIL NIL 1 +SWITCH +49 +345 +200 +378 +with-contours? +with-contours? +0 +1 +-1000 + @#$#@#$#@ ## WHAT IS IT? @@ -375,7 +378,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -674,7 +677,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/3.2-vicsek-galaxy-formation-using-R.nlogo b/using-R/3.2-vicsek-galaxy-formation-using-R.nlogo index 8dd3488..9156e48 100644 --- a/using-R/3.2-vicsek-galaxy-formation-using-R.nlogo +++ b/using-R/3.2-vicsek-galaxy-formation-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. -extensions [ r ] +extensions [ sr ] globals [ random-choices ;; +1 or -1 for convenience @@ -37,7 +37,7 @@ patches-own [ to setup clear-all - r:setPlotDevice + sr:setup ;; this is a neat way to do the random assignment set random-choices [1 -1] @@ -90,12 +90,14 @@ end ;; R plotting code to r-plot-world + sr:setup + sr:set-plot-device let z map [ p -> [get-value] of p ] sort patches - r:put "z" z - r:put "nc" world-width - r:put "nr" world-height - r:eval("map <- matrix(z, nrow=nr, ncol=nc)") - r:eval("image(map, col=c('white','black'), asp=1, axes=F)") + sr:set "z" z + sr:set "nc" world-width + sr:set "nr" world-height + sr:run("map <- matrix(z, nrow = nr, ncol = nc)") + sr:run("image(map, col = c('white', 'black'), asp = 1, axes = F)") end ;; for use by the R plotting @@ -308,7 +310,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -607,7 +609,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/4.1-r-snapshots.nls b/using-R/4.1-r-snapshots.nls index ca2db7b..b48b6d8 100644 --- a/using-R/4.1-r-snapshots.nls +++ b/using-R/4.1-r-snapshots.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,85 +22,118 @@ ;; DEALINGS IN THE SOFTWARE. to r-snapshot-tracks - r:put "xl" list (min-x - 1) (max-x + 1) - r:put "yl" list (min-y - 1) (max-y + 1) + update-stats + sr:set-plot-device + sr:set "xl" list (min-x - 1) (max-x + 1) + sr:set "yl" list (min-y - 1) (max-y + 1) ask one-of turtles [ - r:put "x" history-x - r:put "y" history-y - r:eval("plot(x, y, type='l', asp=1, xlim=xl, ylim=yl, col='gray')") + sr:set "x" history-x + sr:set "y" history-y + sr:run "plot(x, y, type = 'l', asp = 1, xlim = xl, ylim = yl, col = 'gray')" ask other turtles [ - r:put "x" history-x - r:put "y" history-y - r:eval("lines(x, y, col='gray')") + sr:set "x" history-x + sr:set "y" history-y + sr:run "lines(x, y, col='gray')" ] ] - r:eval("points(0, 0)") + sr:run "points(0, 0)" ask turtles [ - r:put "x" history-x - r:put "y" history-y - r:eval("points(x[length(x)], y[length(y)], pch=19, cex=0.5)") + sr:set "x" history-x + sr:set "y" history-y + sr:run "points(x[length(x)], y[length(y)], pch = 19, cex = 0.5)" ] -end - -to r-snapshot-points - r:put "xl" list (min-x - 1) (max-x + 1) - r:put "yl" list (min-y - 1) (max-y + 1) - r:put "x" [xcor] of turtles - r:put "y" [ycor] of turtles - r:eval("plot(x, y, asp=1, xlim=xl, ylim=yl)") -end - -to r-density-plot - r:eval("require(spatstat)") - r:put "xl" list (min-x - 1) (max-x + 1) - r:put "yl" list (min-y - 1) (max-y + 1) - r:put "x" [xcor] of turtles - r:put "y" [ycor] of turtles - r:eval("pp <- ppp(x, y, window=owin(xrange=xl, yrange=yl))") - r:eval("plot(density(pp), col=grey(50:100/100), main='')") - r:eval("plot(pp, pch=19, cex=0.5, add=T)") + user-message "Close plot by closing this dialog." + sr:run "dev.off()" end to r-rms-d-plot + update-stats + sr:set-plot-device let tick-vals range (ticks + 1) - r:put "tickvals" tick-vals - r:eval("t <- tickvals") + sr:set "tickvals" tick-vals + sr:run "t <- tickvals" ask one-of turtles [ - r:put "x" history-x - r:put "y" history-y + sr:set "x" history-x + sr:set "y" history-y ask other turtles [ - r:put "xn" history-x - r:put "yn" history-y - r:eval("t <- c(t, tickvals)") - r:eval("x <- c(x, xn)") - r:eval("y <- c(y, yn)") + sr:set "xn" history-x + sr:set "yn" history-y + sr:run "t <- c(t, tickvals)" + sr:run "x <- c(x, xn)" + sr:run "y <- c(y, yn)" ] ] - r:eval("df <- data.frame(t, d=sqrt(x^2 + y^2), d2=(x^2 + y^2))") - r:eval("plot(df$t, df$d, col='grey', pch=19, cex=0.4, xlab='t', ylab='Distance', bty='n')") - ; r:eval("lines(unique(df$t), tapply(df$d, df$t, mean))") - r:eval("lines(unique(df$t), sqrt(tapply(df$d2, df$t, mean)))") - r:eval("lines(unique(df$t), sqrt(unique(df$t)), lty='dashed')") + sr:run "df <- data.frame(t = t, d = sqrt(x^2 + y^2), d2 = (x^2 + y^2))" + sr:run "plot(df$t, df$d, col = 'grey', pch = 19, cex = 0.4, xlab = 't', ylab = 'Distance', bty = 'n')" + sr:run "lines(unique(df$t), sqrt(tapply(df$d2, df$t, mean)))" + sr:run "lines(unique(df$t), sqrt(unique(df$t)), lty = 'dashed')" + user-message "Close plot by closing this dialog." + sr:run "dev.off()" +end + +to r-snapshot-points + update-stats + sr:set-plot-device + sr:set "xl" list (min-x - 1) (max-x + 1) + sr:set "yl" list (min-y - 1) (max-y + 1) + sr:set "x" [real_x] of turtles + sr:set "y" [real_y] of turtles + sr:run "plot(x, y, asp = 1, xlim = xl, ylim = yl)" + user-message "Close plot by closing this dialog."
 + sr:run "dev.off()"

 +end + +to r-density-plot + update-stats + sr:set-plot-device + sr:run "require(spatstat)" + sr:set "xmin" min-x - 1 + sr:set "xmax" max-x + 1 + sr:set "ymin" min-y - 1 + sr:set "ymax" max-y + 1 + sr:set "x" [real_x] of turtles + sr:set "y" [real_y] of turtles + sr:run "pp <- ppp(x = x, y = y, window = owin(c(xmin, xmax), c(ymin, ymax)))" + sr:run "plot(density(pp), col = grey(50:100 / 100), main = '')" + sr:run "plot(pp, pch = 19, cex = 0.5, add = T)" + user-message "Close plot by closing this dialog."
 + sr:run "dev.off()"

 end to r-rms-d-log-plot + update-stats + sr:run "require(dplyr)" + sr:set-plot-device let tick-vals but-first range (ticks + 1) - r:put "tickvals" tick-vals - r:put "dmax" max [sqrt (real_x ^ 2 + real_y ^ 2)] of turtles - r:eval("t <- tickvals") + sr:set "tickvals" tick-vals + sr:set "dmax" max [sqrt (real_x ^ 2 + real_y ^ 2)] of turtles + sr:run "t <- tickvals" ask one-of turtles [ - r:put "x" but-first history-x - r:put "y" but-first history-y - r:eval("plot(tickvals, sqrt(x^2 + y^2), col='grey', type='l', ylim=c(1,dmax), xlab='t', ylab='Distance', bty='n', log='xy')") + sr:set "x" but-first history-x + sr:set "y" but-first history-y + sr:run "df <- data.frame(x = x, y = y, t = t) |> filter(x !=0, y != 0, t != 0)" + (sr:run "plot(df$t, sqrt(df$x^2 + df$y^2), log = 'xy', col = 'grey', type = 'l', " + "ylim = c(1, dmax), xlab = 't', ylab = 'Distance', bty = 'n')") ask other turtles [ - r:put "xn" but-first history-x - r:put "yn" but-first history-y - r:eval("t <- c(t, tickvals)") - r:eval("x <- c(x, xn)") - r:eval("y <- c(y, yn)") - r:eval("lines(tickvals, sqrt(xn^2 + yn^2), col='grey', log='xy')") - ] + sr:set "xn" but-first history-x + sr:set "yn" but-first history-y + sr:run "t <- c(t, tickvals)" + sr:run "x <- c(x, xn)" + sr:run "y <- c(y, yn)" + sr:run "df <- data.frame(x = x, y = y, t = t) |> filter(x !=0, y != 0, t != 0)" + sr:run "lines(tickvals, sqrt(xn^2 + yn^2), col = 'grey')" + ] ] - r:eval("df <- data.frame(t, d=sqrt(x^2 + y^2), d2=(x^2 + y^2))") - r:eval("lines(unique(df$t), sqrt(tapply(df$d2, df$t, mean)))") -end \ No newline at end of file + sr:run "df <- data.frame(t, d = sqrt(x^2 + y^2), d2 = (x^2 + y^2))" + sr:run "lines(unique(df$t), sqrt(tapply(df$d2, df$t, mean)))" + user-message "Close plot by closing this dialog."
 + sr:run "dev.off()"

 +end + +to-report triple [L1 L2 L3] + report (map [[a b c] -> (list a b c)] L1 L2 L3) +end + +to-report remove-zeros [z] + report filter [t -> item 0 t != 0 and item 1 t != 0 and item 2 t != 0] z +end diff --git a/using-R/4.1-random-walks-using-R.nlogo b/using-R/4.1-random-walks-using-R.nlogo index 7e37199..f2e2476 100644 --- a/using-R/4.1-random-walks-using-R.nlogo +++ b/using-R/4.1-random-walks-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -24,7 +24,7 @@ __includes ["4.1-r-snapshots.nls"] -extensions [r] +extensions [sr] turtles-own [ real_x ; the real x coord dist from origin ie ignoring wrapping around world @@ -49,7 +49,7 @@ globals [ to setup clear-all - r:setPlotDevice + sr:setup set max-x 0 set min-x 0 @@ -58,8 +58,8 @@ to setup if use-random-seed? [ random-seed seed-value - r:put "rngseed" seed-value - r:eval("set.seed(rngseed)") + sr:set "rngseed" seed-value + sr:run "set.seed(rngseed)" ] ; make the world white @@ -153,7 +153,7 @@ to step ] if type-of-walk = "Cauchy distributed step lengths" [ set heading random-float 360 - let step-length r:get "rcauchy(1)" + let step-length sr:runresult "rcauchy(1)" set real_x real_x + (dx * step-length) set real_y real_y + (dy * step-length) fd step-length @@ -216,7 +216,7 @@ num-of-walkers num-of-walkers 1 500 -20.0 +500.0 1 1 NIL @@ -302,9 +302,9 @@ NIL PLOT 631 -10 +13 943 -207 +235 Distance from origin Steps Distance @@ -321,10 +321,10 @@ PENS "expected" 1.0 0 -2674135 true "" "if ticks mod update-plot-every-x-ticks = 0 [\n ifelse type-of-walk = \"correlated directions\" [\n ;; These alternative lines use an adjustment for the RMS dist for\n ;; correlated walks from\n ;; Bovet & Benhamou, J. theor. Biol. (1988) 131, 419-433\n ;; itself derived from\n ;; Random Flight with Multiple Partial Correlations, C. M. Tchen\n ;; J. Chem. Phys. 20, 214 (1952); doi:10.1063/1.1700381\n ;; which shows that for large #ticks RMS-D = sqrt[(1+r)/(1-r)ticks]\n ;; where r is a correlation angle between walk steps\n ;; ONLY RELEVANT to the correlated case, so not used in general\n let r 1 / exp (((stdev-angle * pi / 180) ^ 2) / 2)\n ;plotxy ticks sqrt ((1 + r) / (1 - r) * ticks)\n ;; Note that this is approximate: there is an additional correction\n ;; required for low turn angles\n ;; It is unclear whether the second term is in r^2 or r; see\n ;; Hsin-i Wu, Bai-Lian Li, Timothy A. Springer, William H. Neill,\n ;; Modelling animal movement as a persistent random walk in two dimensions: expected magnitude of net displacement\n ;; Ecol Mod, 132(1-2), 115-124 DOI: 10.1016/S0304-3800(00)00309-4.\n plotxy ticks sqrt (((1 + r) / (1 - r) * ticks) - ((2 * r * r * (1 - (r ^ ticks))) / (1 - r) / (1 - r)))\n ]\n [\n plotxy ticks sqrt ticks\n ]\n]" MONITOR -749 -249 -806 -294 +799 +283 +870 +328 NIL max-d 3 @@ -332,10 +332,10 @@ max-d 11 MONITOR -690 -249 -747 -294 +717 +283 +791 +328 NIL mean-d 3 @@ -343,10 +343,10 @@ mean-d 11 MONITOR -630 -249 -687 -294 +632 +282 +707 +327 NIL min-d 3 @@ -354,10 +354,10 @@ min-d 11 MONITOR -888 -249 -942 -294 +875 +283 +944 +328 NIL rms-d 3 @@ -391,10 +391,10 @@ use-random-seed? -1000 BUTTON -732 -371 -827 -404 +676 +357 +791 +390 NIL r-snapshot-tracks NIL @@ -407,40 +407,6 @@ NIL NIL 1 -BUTTON -832 -371 -931 -404 -NIL -r-snapshot-points -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 - -BUTTON -831 -408 -931 -441 -NIL -r-density-plot -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 - BUTTON 121 88 @@ -491,11 +457,11 @@ NIL HORIZONTAL TEXTBOX -634 -313 -941 -358 -These buttons only work if you have R extension installed. You will also need the javaGD package, and in some cases, the spatstat package. See http://netlogo-r-ext.berlios.de/ +639 +436 +944 +465 +These buttons only work if you have Simple R extension installed and the spatstat and dplyr R libraries. 11 15.0 1 @@ -516,27 +482,10 @@ NIL HORIZONTAL BUTTON -640 -443 -713 -476 -rows, cols -r:put \"nr\" nrows\nr:put \"nc\" ncols\nr:eval(\"par(mfrow=c(nr,nc))\") -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 - -BUTTON -732 -408 -826 -441 +740 +397 +825 +430 NIL r-rms-d-plot NIL @@ -558,64 +507,17 @@ mean-step-length mean-step-length 0.1 5 -1.0 +2.5 0.1 1 NIL HORIZONTAL -SLIDER -632 -372 -724 -405 -nrows -nrows -1 -3 -1.0 -1 -1 -NIL -HORIZONTAL - -SLIDER -632 -407 -724 -440 -ncols -ncols -1 -5 -2.0 -1 -1 -NIL -HORIZONTAL - -BUTTON -732 -445 -825 -478 -NIL -r-rms-d-log-plot -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 - TEXTBOX -636 -294 -940 -312 +638 +327 +942 +345 __________________________________________________ 11 0.0 @@ -623,9 +525,9 @@ __________________________________________________ SLIDER 631 -210 +241 787 -243 +274 update-plot-every-x-ticks update-plot-every-x-ticks 1 @@ -651,6 +553,57 @@ p-lazy NIL HORIZONTAL +BUTTON +795 +357 +906 +390 +NIL +r-snapshot-points +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +BUTTON +646 +397 +735 +430 +NIL +r-density-plot +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +BUTTON +829 +397 +940 +430 +NIL +r-rms-d-log-plot +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + @#$#@#$#@ ## WHAT IS IT? @@ -708,7 +661,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -1007,7 +960,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/4.4-manhattan-sausages-using-R.nlogo b/using-R/4.4-manhattan-sausages-using-R.nlogo index ce3b20f..ebdfd9b 100644 --- a/using-R/4.4-manhattan-sausages-using-R.nlogo +++ b/using-R/4.4-manhattan-sausages-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -28,7 +28,7 @@ ;; Retrieved from http://www.ncbi.nlm.nih.gov/pubmed/13310708 -extensions [ r ] +extensions [ sr ] globals [ area-per-step @@ -50,8 +50,6 @@ patches-own [ to setup clear-all - r:setPlotDevice - set area-per-step [] set search-durations [] set search-color grey + 3 @@ -155,14 +153,18 @@ end ;; R plotting code to r-plot-search-area - r:put "s" map [ p -> [searched] of p ] sort patches - r:put "v" map [ p -> [visited] of p ] sort patches - r:put "p" p-direction-change - r:put "nr" world-height - r:put "nc" world-width - r:eval("map <- matrix(s+v, ncol=nc, nrow=nr)") - r:eval("cols <- colorRampPalette(c('white', 'black'))") - r:eval("image(map, asp=1, col=cols(3), axes=F)") + sr:setup + sr:set "s" map [ p -> [searched] of p ] sort patches + sr:set "v" map [ p -> [visited] of p ] sort patches + sr:set "p" p-direction-change + sr:set "nr" world-height + sr:set "nc" world-width + sr:run "map <- matrix(s + v, ncol = nc, nrow = nr)" + sr:run "cols <- colorRampPalette(c('white', 'black'))" + sr:set-plot-device + sr:run "image(map, asp = 1, col = cols(3), axes = F)" + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 end @#$#@#$#@ GRAPHICS-WINDOW @@ -186,8 +188,8 @@ GRAPHICS-WINDOW 99 0 99 -1 -1 +0 +0 1 ticks 100.0 @@ -267,7 +269,7 @@ walk-duration walk-duration 0 1000 -200.0 +300.0 10 1 NIL @@ -299,6 +301,16 @@ self-avoiding? 1 -1000 +TEXTBOX +9 +339 +134 +367 +Only self-avoiding until it can't be! +11 +15.0 +1 + @#$#@#$#@ ## WHAT IS IT? @@ -319,7 +331,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -624,7 +636,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/4.5-monkeys-foraging-using-R.nlogo b/using-R/4.5-monkeys-foraging-using-R.nlogo index d423149..d3222d5 100644 --- a/using-R/4.5-monkeys-foraging-using-R.nlogo +++ b/using-R/4.5-monkeys-foraging-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -26,7 +26,7 @@ ;; walks that wrap around the toroidal world... __includes ["4.5-r-snapshots-3.nls"] -extensions [r] +extensions [sr] breed [ trees tree ] breed [ foragers forager ] @@ -54,7 +54,7 @@ globals [ to setup clear-all - r:setPlotDevice + sr:setup if use-seed? [ random-seed random-seed-value ] @@ -378,53 +378,6 @@ Note: there are always 5000 trees 0.0 1 -SLIDER -673 -133 -769 -166 -nrow -nrow -1 -3 -1.0 -1 -1 -NIL -HORIZONTAL - -SLIDER -673 -170 -770 -203 -ncol -ncol -1 -3 -2.0 -1 -1 -NIL -HORIZONTAL - -BUTTON -672 -214 -805 -247 -set R rows and cols -r:put \"nr\" nrow\nr:put \"nc\" ncol\nr:eval(\"par(mfrow=c(nr,nc))\") -NIL -1 -T -OBSERVER -NIL -NIL -NIL -NIL -1 - SWITCH 673 266 @@ -478,7 +431,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -782,7 +735,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/4.5-r-snapshots-3.nls b/using-R/4.5-r-snapshots-3.nls index b52a91a..96694a7 100644 --- a/using-R/4.5-r-snapshots-3.nls +++ b/using-R/4.5-r-snapshots-3.nls @@ -1,5 +1,5 @@ ;; The MIT License (MIT) -;; Copyright (c) 2011-13 David O'Sullivan and George L. W. Perry +;; Copyright (c) 2011-24 David O'Sullivan and George L. W. Perry ;; ;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;; this software and associated documentation files (the "Software"), to deal in @@ -20,6 +20,7 @@ ;; to r-snapshot-tracks + sr:set-plot-device ask one-of foragers [ ;; need to tile the forest in case there has been a wrapping move... ;; determine the min and max tile offsets needed @@ -35,8 +36,8 @@ to r-snapshot-tracks let tile-max-y ceiling (max-y / world-height) ;; make lists of the tile x- and y- offsets required - let tiles-x (range tile-min-x tile-max-x) ;;n-values (tile-max-x - tile-min-x) [tile-min-x + ?] - let tiles-y (range tile-min-y tile-max-y) ;;n-values (tile-max-y - tile-min-y) [tile-min-y + ?] + let tiles-x range-from-to tile-min-x tile-max-x + let tiles-y range-from-to tile-min-y tile-max-y ;; make same-ordered lists of tree x, y, size let trees-x map [ t -> [xcor] of t ] sort trees @@ -66,21 +67,28 @@ to r-snapshot-tracks ] ] ;; now get all this into R, first the plot bounds - r:put "xl" list min all-x max all-x - r:put "yl" list min all-y max all-y + sr:set "xl" list min all-x max all-x + sr:set "yl" list min all-y max all-y ;; then the tree coordinates and sizes - r:put "x_trees" all-x - r:put "y_trees" all-y - r:put "size_trees" all-sizes + sr:set "x_trees" all-x + sr:set "y_trees" all-y + sr:set "size_trees" all-sizes ;; plot the trees - r:eval("plot(x_trees, y_trees, xlim=xl, ylim=yl, asp=1, col='gray', cex=size_trees/2, xlab='', ylab='')") - r:put "x" history-x - r:put "y" history-y + (sr:run "plot(x_trees, y_trees, xlim = xl, ylim = yl, asp = 1, col = 'gray', " + "cex=size_trees/2, xlab='', ylab='')") + sr:set "x" history-x + sr:set "y" history-y ;; finally plot the walk - r:eval("lines(x, y, type='l', asp=1, add=T, lw=1.75)") + sr:run "lines(x, y, type = 'l', asp = 1, lw = 1.75)" ] - r:eval("points(x[1], y[1])") - r:eval("points(x[length(x)], y[length(y)], pch=20)") + sr:run "points(x[1], y[1])" + sr:run "points(x[length(x)], y[length(y)], pch = 20)" + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 +end + +to-report range-from-to [x0 x1] + report map [y -> y + x0] range (x1 - x0) end ;; reports true if x y lie inside box defined by NSEW limits @@ -101,33 +109,36 @@ to-report filter-by-boolean-list [x fltr] end to r-hist-step-lengths - r:put "d" [link-length] of links - r:eval("hist(d)") + sr:set "d" [link-length] of links + sr:set-plot-device + sr:run "hist(d)" + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 end +;; Doesn't quite work exactly - the par adjustment to the right margin seems to +;; have no effect -so you can't read that axis label to r-rank-size-plot - r:put "d" [link-length] of links - r:put "s" yields + sr:set "d" [link-length] of links + sr:set "s" yields ; create a set of ranks for the yields - r:eval("r <- seq(length(s), 1, -1)") + sr:run "r <- seq(length(s), 1, -1)" ;; make space for the right axis and its label - r:eval("par(mar=c(5,4,4,5) + .1)") - ;; plot rank-size of the tree yields - r:eval("plot(r / length(r) * 100, sort(s), axes=F, log='x', xlab='', ylab='', type='l', lty=1)") - r:eval("axis(2)") - r:eval("mtext('Tree yield', side=2, line=3)") - - r:eval("r <- seq(length(d), 1, -1)") - r:eval("par(new=TRUE)") - r:eval("plot(r / length(r) * 100, sort(d), axes=F, log='x', xlab='', ylab='', type='l', lty=2)") - - r:eval("axis(4)") - r:eval("mtext('Step length', side=4, line=3)") - - r:eval("axis(1, log='x')") - r:eval("mtext('Log percentile', side=1, line=3)") - - r:eval("legend('bottomleft', lty=c(1,2), legend=c('Tree yield','Step length'), box.lty=0)") + sr:set-plot-device + sr:run "par(mar = c(5, 4, 4, 5) + .1)" + sr:run "plot(r / length(r) * 100, sort(s), axes = F, log = 'x', xlab = '', ylab = '', type = 'l', lty = 1)" + sr:run "par(new = TRUE)" + sr:run "r <- seq(length(d), 1, -1)" + sr:run "plot(r / length(r) * 100, sort(d), axes = F, log = 'x', xlab = '', ylab = '', type = 'l', lty = 2)" + sr:run "axis(1)" + sr:run "mtext('Percentile', side = 1, line = 3)" + sr:run "axis(2)" + sr:run "mtext('Tree yield', side = 2, line = 3)" + sr:run "axis(4)" + sr:run "mtext('Step length', side = 4, line = 3)" + sr:run "legend('bottomleft', lty=c(1,2), legend=c('Tree yield','Step length'), box.lty=0)" + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 end diff --git a/using-R/4.7-flocking-using-R.nlogo b/using-R/4.7-flocking-using-R.nlogo index 6176b7f..dc7ac99 100644 --- a/using-R/4.7-flocking-using-R.nlogo +++ b/using-R/4.7-flocking-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [r] +extensions [sr table] breed [flockers flocker] ;; the flocking individuals breed [tails tail] ;; turtles to form a tail showing recent locations @@ -53,9 +53,8 @@ patches-own [ to setup clear-all - r:setPlotDevice - r:eval("library(spatstat)") - r:eval("library(deldir)") + sr:setup + sr:run "library(deldir)" ask patches [ set pcolor white @@ -254,16 +253,18 @@ end ;; sends a snapshot to R of the current flock to snapshot-R - r:put "mx" map [ f -> [xcor] of f ] sort flockers - r:put "my" map [ f -> [ycor] of f ] sort flockers - r:put "x_min" min-pxcor - r:put "x_max" max-pxcor - r:put "y_min" min-pycor - r:put "y_max" max-pycor - - r:eval("par(mar=c(1,1,1,1))") - r:eval("plot(mx, my, asp=1,pch=20, cex=2, lwd=0.5,axes=F, xlab='',ylab='', xlim=c(x_min,x_max), ylim=c(y_min,y_max))") - r:eval("box()") + sr:set "mx" map [ f -> [xcor] of f ] sort flockers + sr:set "my" map [ f -> [ycor] of f ] sort flockers + sr:set "x_min" min-pxcor + sr:set "x_max" max-pxcor + sr:set "y_min" min-pycor + sr:set "y_max" max-pycor + + sr:set-plot-device + sr:run "par(mar = rep(1, 4))" + (sr:run "plot(mx, my, asp = 1,pch = 20, cex = 2, lwd = 0.5, axes = F, " + "xlab = '', ylab = '', xlim = c(x_min, x_max), ylim = c(y_min, y_max))") + sr:run "box()" ask flockers [ let memory-x (list xcor) @@ -274,58 +275,70 @@ to snapshot-R set memory-x lput (last memory-x - x-inc) memory-x set memory-y lput (last memory-y - y-inc) memory-y ] - r:put "x" memory-x - r:put "y" memory-y - r:eval("lines(x, y)") + sr:set "x" memory-x + sr:set "y" memory-y + sr:run "lines(x, y)" ] + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 end ;; delegates construction of a delaunay triangulation -;; to R - assumes spatstat is installed +;; to R - assumes deldir is installed +;; +;; NOTE: the wonder of this is not that it works well, but that it works at all to triangulate - ask links [die] - ;; commented out chunks can implement a - ;; guardzone to handle the toroidal space -; let guardzone-x1 sort flockers with [xcor < min-pxcor] -; let guardzone-x2 sort flockers with [xcor > max-pxcor] -; let guardzone-y1 sort flockers with [ycor < min-pycor] -; let guardzone-y2 sort flockers with [ycor > max-pycor] - let ids (sentence (map [ f -> [who] of f ] sort flockers)) -; (map [[who] of ?] guardzone-x1) -; (map [[who] of ?] guardzone-x2) -; (map [[who] of ?] guardzone-y1) -; (map [[who] of ?] guardzone-y2)) - let x (sentence (map [ f -> [xcor] of f ] sort flockers)) -; (map [[xcor] of ? + world-width] guardzone-x1) -; (map [[xcor] of ? - world-width] guardzone-x2) -; (map [[xcor] of ?] guardzone-y1) -; (map [[xcor] of ?] guardzone-y2)) - let y (sentence (map [ f -> [ycor] of f ] sort flockers)) -; (map [[ycor] of ?] guardzone-x1) -; (map [[ycor] of ?] guardzone-x2) -; (map [[ycor] of ? + world-height] guardzone-y1) -; (map [[ycor] of ? - world-height] guardzone-y2)) - r:put "x" x - r:put "y" y - r:put "min_x" min x - r:put "max_x" max x - r:put "min_y" min y - r:put "max_y" max y - r:eval("pp <- ppp(x,y,window=owin(c(min_x,max_x),c(min_y,max_y)))") - r:eval("dt <- deldir(pp)") + let sorted-flockers sort flockers + ;; make up sets of flockers in each N/S/E/W 'guard' area of the space + ;; to allow triangulation to handle the toroidal wrapping + let north filter [f -> [in-wrapped-zone? "N"] of f] sorted-flockers + let south filter [f -> [in-wrapped-zone? "S"] of f] sorted-flockers + let east filter [f -> [in-wrapped-zone? "E"] of f] sorted-flockers + let west filter [f -> [in-wrapped-zone? "W"] of f] sorted-flockers + let wrapped-flockers (sentence sorted-flockers north south east west) + ;; apply offsets to the x and y coords of each group to make up x y lists + let x (sentence map [f -> [xcor] of f] sorted-flockers + map [f -> [xcor] of f] north + map [f -> [xcor] of f] south + map [f -> [xcor] of f + world-width] east + map [f -> [xcor] of f - world-width] west) + let y (sentence map [f -> [ycor] of f] sorted-flockers + map [f -> [ycor] of f + world-height] north + map [f -> [ycor] of f - world-height] south + map [f -> [ycor] of f] east + map [f -> [ycor] of f] west) + sr:set "x" x + sr:set "y" y + let deldir table:from-list sr:runresult "deldir(x = x, y = y)$delsgs" + ; note R results are 1-indexed so have to get i-1th entries in wrapped-flockers + let froms map [i -> item (i - 1) wrapped-flockers] table:get deldir "ind1" + let tos map [i -> item (i - 1) wrapped-flockers] table:get deldir "ind2" ask flockers [ set flock-mates (turtle-set nobody) ] - let froms map [ f -> f - 1 ] r:get "dt$delsgs[,5]" - let tos map [ t -> t - 1 ] r:get "dt$delsgs[,6]" (foreach froms tos [ [f t] -> - if f != t [ - ask flocker item f ids [ - if distance flocker item t ids < near-range [ - set flock-mates (turtle-set flock-mates (flocker item t ids)) - ] + if f != t [ + ask f [ + if distance t < near-range [ + set flock-mates (turtle-set flock-mates t) + ask t [ set flock-mates (turtle-set flock-mates f) ] ] ] + ] ]) end + +;; reports true if turtle is in a zone such that it can be considered as a +;; potential near neighbour due to toroidal wrapping of the netlogo world +;; note that 'N' zone is turtles near the bottom of the world - which when +;; wrapped, are at top... +to-report in-wrapped-zone? [zone] + (ifelse + zone = "N" [ report ycor < min-pycor + near-range ] + zone = "S" [ report ycor > max-pycor - near-range ] + zone = "E" [ report xcor < min-pxcor + near-range ] + zone = "W" [ report xcor > max-pxcor - near-range ] + [ print "***WARNING*** Invalid zone identifier in in-wrapped-zone? reporter" + report false ]) +end @#$#@#$#@ GRAPHICS-WINDOW 185 @@ -363,7 +376,7 @@ density density 0.1 2 -0.5 +0.55 0.05 1 NIL @@ -601,7 +614,7 @@ show-density-map? PLOT 630 263 -902 +879 464 flocker speeds NIL @@ -657,7 +670,7 @@ TEXTBOX 77 975 167 -\"near\" uses local 'pie slice' method\n\"lattice\" uses the patch 'locale'\n\"delaunay\" uses delaunay triangulation (requires R-spatstat)\n +\"near\" uses local 'pie slice' method\n\"lattice\" uses the patch 'locale'\n\"delaunay\" uses delaunay triangulation (requires R-deldir)\n 11 0.0 1 @@ -671,7 +684,7 @@ near-range near-range preferred-distance 5 -1.0 +1.5 0.1 1 NIL @@ -709,7 +722,7 @@ which are discussed in detail in Chapters 4 and 6 of You should consult that book for more information and details of the model. -This version requires the R-netlogo extension including the spatstat library, if you wish to use `delaunay` as the `flock-mates-method` option, although it is important to note that this option may be unreliable, and will run _slowly_. +This version requires the Simple R extension including the `deldir` library, if you wish to use `delaunay` as the `flock-mates-method` option, although it is important to note that this option may be unreliable, and will run _slowly_. An alternative version of the model that does not require the R-netlogo extension is available. @@ -724,7 +737,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -1023,7 +1036,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.1-sitePercolation-using-R.nlogo b/using-R/5.1-sitePercolation-using-R.nlogo index f05cce3..23cec98 100644 --- a/using-R/5.1-sitePercolation-using-R.nlogo +++ b/using-R/5.1-sitePercolation-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions[r] +extensions[sr] globals [ cluster-size ;; list of size of each occupied cluster, length is cluster-count - 1 @@ -44,7 +44,7 @@ patches-own [ ;; initialise the lattice based on percolation threshold to setup clear-all - r:setPlotDevice + sr:setup ask patches [ set occupied? false @@ -167,13 +167,16 @@ end ;; send data to R to make log-log size rank plot to r-hist-cs let s reverse sort cluster-size - r:put "s" s + sr:set "s" s let cs map [ x -> count-gte s x ] remove-duplicates s - r:put "cs" cs + sr:set "cs" cs - r:eval("s <- unique(s)") - r:eval("plot(x = s, y = cs, log = 'xy', las = 1, bty = 'n', xlab = 'Clusters of size s', ylab = 'No. clusters size > s')") + sr:run "s <- unique(s)" + sr:set-plot-device + sr:run "plot(x = s, y = cs, log = 'xy', las = 1, bty = 'n', xlab = 'Clusters of size s', ylab = 'No. clusters size > s')" + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 end ;; reports the number of items in list lst that are >= x @@ -183,24 +186,30 @@ end ;; plot lattice in R to lattice-to-R - r:put "nr" world-height - r:put "nc" world-width - - r:put "z" map [ ptch -> [occupied?] of ptch ] sort patches - r:eval("z <-matrix(z, nrow=nr, ncol=nc)") - r:eval("image(z, col = c('black', 'white'), asp = 1)") + sr:set "nr" world-height + sr:set "nc" world-width + + sr:set "z" map [ ptch -> [occupied?] of ptch ] sort patches + sr:run "z <- matrix(z, nrow = nr, ncol = nc, byrow = TRUE) |> apply(2, rev) |> t()" + sr:set-plot-device + sr:run "image(z, col = c('black', 'white'), asp = 1)" + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 end ;; send the largest cluster to R to largest-to-r code-for-r - r:put "nr" world-height - r:put "nc" world-width + sr:set "nr" world-height + sr:set "nc" world-width - r:put "z" map [ ptch -> [r-num-code] of ptch ] sort patches - r:eval("z <-matrix(z, nrow=nr, ncol=nc)") - r:eval("image(z, col = c('black', 'white', 'red'), asp = 1)") + sr:set "z" map [ ptch -> [r-num-code] of ptch ] sort patches + sr:run "z <- matrix(z, nrow = nr, ncol = nc, byrow = TRUE) |> apply(2, rev) |> t()" + sr:set-plot-device + sr:run "image(z, col = c('black', 'white', 'red'), asp = 1)" + user-message "Plot will close when you close this dialog."
 + sr:run "dev.off()"

 end ;; set the r-num-code @@ -213,9 +222,9 @@ to code-for-r end @#$#@#$#@ GRAPHICS-WINDOW -210 +216 10 -668 +674 469 -1 -1 @@ -272,10 +281,10 @@ NIL 1 TEXTBOX -211 -446 -434 -466 +219 +476 +398 +496 Occupied patches in white 12 0.0 @@ -499,7 +508,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -798,7 +807,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.10-edenTip-using-R.nlogo b/using-R/5.10-edenTip-using-R.nlogo index 7a22cd7..3f66997 100644 --- a/using-R/5.10-edenTip-using-R.nlogo +++ b/using-R/5.10-edenTip-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [r palette] +extensions [sr palette] __includes["5.x-r-clusters.nls"] globals @@ -41,36 +41,34 @@ patches-own ] to setup - clear-all - ask patches [ - set occupied? false - set t-colonised -1 - set n-occupied-N4 0 - ] - - let start-site nobody - - ;; get the start loication - either centre of grid or random location - ifelse start-in-centre? - [ set start-site patch (max-pxcor / 2) (max-pycor / 2) ] - [ set start-site one-of patches ] - - ask start-site [ - set pcolor white - set t-colonised 0 - set perimeter-set neighbors4 - set perimeter-tip-set perimeter-set - ask neighbors4 [ - set n-occupied-N4 n-occupied-N4 + 1 - ] + clear-all + sr:setup + sr:run "library(matlab)" + ask patches [ + set occupied? false + set t-colonised -1 + set n-occupied-N4 0 + ] + let start-site nobody + + ;; get the start loication - either centre of grid or random location + ifelse start-in-centre? + [ set start-site patch (max-pxcor / 2) (max-pycor / 2) ] + [ set start-site one-of patches ] + + ask start-site [ + set pcolor white + set t-colonised 0 + set perimeter-set neighbors4 + set perimeter-tip-set perimeter-set + ask neighbors4 [ + set n-occupied-N4 n-occupied-N4 + 1 ] + ] + set p-length-list [] + set p-length-list lput (count perimeter-set) p-length-list - r:setPlotDevice - - set p-length-list [] - set p-length-list lput (count perimeter-set) p-length-list - - reset-ticks + reset-ticks end to go @@ -414,7 +412,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -713,7 +711,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.14-benguiguiP-using-R.nlogo b/using-R/5.14-benguiguiP-using-R.nlogo index 142ad68..7900051 100644 --- a/using-R/5.14-benguiguiP-using-R.nlogo +++ b/using-R/5.14-benguiguiP-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [palette r] +extensions [palette sr] __includes["5.x-r-clusters.nls"] globals @@ -41,36 +41,31 @@ patches-own ] to setup - clear-all - - ask patches - [ set occupied? false - set t-colonised -1 - set attempts 0 - ] - - let start-site nobody - - ;; get the start loication - either centre of grid or random location - ifelse start-in-centre? - [ set start-site patch (max-pxcor / 2) (max-pycor / 2) ] - [ set start-site one-of patches ] - - ask start-site [ - set occupied? true - set t-colonised 0 - set perimeter-set neighbors4 - set pcolor white - ] - - set p-length-list [] - set p-length-list lput (count perimeter-set) p-length-list - - set n-occupied 1 - - r:setPlotDevice - - reset-ticks + clear-all + sr:setup + sr:run "library(matlab)" + + ask patches [ + set occupied? false + set t-colonised -1 + set attempts 0 + ] + let start-site nobody + + ;; get the start loication - either centre of grid or random location + ifelse start-in-centre? + [ set start-site patch (max-pxcor / 2) (max-pycor / 2) ] + [ set start-site one-of patches ] + ask start-site [ + set occupied? true + set t-colonised 0 + set perimeter-set neighbors4 + set pcolor white + ] + set p-length-list [] + set p-length-list lput (count perimeter-set) p-length-list + set n-occupied 1 + reset-ticks end to go @@ -456,7 +451,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -755,7 +750,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo b/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo index 9fa06e1..b3c7905 100644 --- a/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo +++ b/using-R/5.15-edenSingleOnLineLDD-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2016 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,11 +22,10 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [r palette] +extensions [sr palette] __includes["5.x-r-clusters.nls"] -globals -[ +globals [ perimeter-set p-length-list n-occupied @@ -38,52 +37,45 @@ globals breed [counters counter] counters-own [hgt] -patches-own -[ +patches-own [ t-colonised attempts occupied? ] to setup - clear-all + clear-all + sr:setup + sr:run "library(matlab)" - ask patches with [pycor = 0] - [sprout-counters 1 [set hgt 0 ht]] - - set n-occupied 0 - - ask patches - [ set occupied? false - set t-colonised -1 - ] - - let start-sites patches with [pycor = 0] - - set perimeter-set nobody - - ask start-sites [ - let f-site self - set occupied? true - set t-colonised 0 - set perimeter-set (patch-set perimeter-set neighbors4) - set pcolor white - set n-occupied n-occupied + 1 - ask counters with [xcor = ([pxcor] of f-site)] [set hgt hgt + 1] ;; f-site = myself - ] - - set max-height 1 - - set mean-height-list [] - set var-height-list [] - - set mean-height-list lput 1 mean-height-list - set var-height-list lput 0 var-height-list - set p-length-list [] - set p-length-list lput (count perimeter-set) p-length-list + ask patches with [pycor = 0] [ + sprout-counters 1 [set hgt 0 ht] + ] - r:setPlotDevice - reset-ticks + set n-occupied 0 + ask patches [ + set occupied? false + set t-colonised -1 + ] + let start-sites patches with [pycor = 0] + set perimeter-set nobody + ask start-sites [ + let f-site self + set occupied? true + set t-colonised 0 + set perimeter-set (patch-set perimeter-set neighbors4) + set pcolor white + set n-occupied n-occupied + 1 + ask counters with [xcor = ([pxcor] of f-site)] [set hgt hgt + 1] ;; f-site = myself + ] + set max-height 1 + set mean-height-list [] + set var-height-list [] + set mean-height-list lput 1 mean-height-list + set var-height-list lput 0 var-height-list + set p-length-list [] + set p-length-list lput (count perimeter-set) p-length-list + reset-ticks end to go @@ -123,8 +115,8 @@ to go [ set jump-y [pycor] of new-site + random-exponential long-jump-scale ] if ldd-distribution = "cauchy" [ - r:put "ljs" long-jump-scale - set jump-y [pycor] of new-site + r:get "abs(rcauchy(1,0,ljs))" ] + sr:set "ljs" long-jump-scale + set jump-y [pycor] of new-site + sr:runresult "abs(rcauchy(1,0,ljs))" ] if ldd-distribution = "normal" [ set jump-y [pycor] of new-site + abs (random-normal 0 long-jump-scale) ] @@ -169,8 +161,7 @@ end ;; colour patches by the time they were colonised (dark [old] to light [young]) to colour-by-time - ask patches with [occupied?] - [ + ask patches with [occupied?] [ set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207] ] t-colonised 0 ticks ] end @@ -183,15 +174,21 @@ end ;; send various graphics to R to variance-to-r - r:put "v" var-height-list - r:eval("t <- seq(1, length(v))") - r:eval("plot(v ~ t, type = 'l', las = 1, xlab = 'Time', ylab = 'Variance height')") + sr:set "v" var-height-list + sr:run "t <- seq(1, length(v))" + sr:set-plot-device + sr:run "plot(v ~ t, type = 'l', las = 1, xlab = 'Time', ylab = 'Variance height')" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end to mean-to-r - r:put "m" mean-height-list - r:eval("t <- seq(1, length(m))") - r:eval("plot(m ~ t, type = 'l', las = 1, xlab = 'Time', ylab = 'Mean height')") + sr:set "m" mean-height-list + sr:set-plot-device + sr:run "t <- seq(1, length(m))" + sr:run "plot(m ~ t, type = 'l', las = 1, xlab = 'Time', ylab = 'Mean height')" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end to-report get-mean-height @@ -512,7 +509,7 @@ max-time-slice max-time-slice 0 20000 -5427.0 +3084.0 100 1 NIL @@ -552,7 +549,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2016 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -851,7 +848,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.2.0 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.2-antLabyrinth-using-R.nlogo b/using-R/5.2-antLabyrinth-using-R.nlogo index ee5b2f5..4eebb1f 100644 --- a/using-R/5.2-antLabyrinth-using-R.nlogo +++ b/using-R/5.2-antLabyrinth-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,58 +22,48 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions[r] +extensions[sr] -turtles-own -[ +turtles-own [ startCell currCell Rhistory Rnow ] -patches-own -[ +patches-own [ occupied? ] to setup clear-all + sr:setup - ask patches - [ + ask patches [ set occupied? false set pcolor black - if random-float 1 <= p [ set occupied? true set pcolor white ] - ] - place-ant - - r:setPlotDevice - reset-ticks end to place-ant ;; place the ant - ask n-of ants patches with [occupied? = true] - [ sprout 1 - [ - set size 2 - set shape "circle" - set color red - set currCell patch-here - - set startCell patch-here - set Rhistory [] - set Rnow 0 - ] + ask n-of ants patches with [occupied? = true] [ + sprout 1 [ + set size 2 + set shape "circle" + set color red + set currCell patch-here + set startCell patch-here + set Rhistory [] + set Rnow 0 ] + ] end to go @@ -82,120 +72,103 @@ to go end to move - ask turtles - [ - ; if blind -> select one of N4 and move if occupied - ; if myopic -> select one of occupied N4 - - let new-loc currCell + ask turtles [ + ; if blind -> select one of N4 and move if occupied + ; if myopic -> select one of occupied N4 - if antBehaviour = "blind" - [ - let n one-of neighbors4 - if [occupied?] of n = true [set new-loc n] - ] - - if antBehaviour = "myopic" - [ - if any? neighbors4 with [occupied? = true] - [ - set new-loc one-of neighbors4 with [occupied? = true] - ] - ] + let new-loc currCell - if new-loc != currCell - [ - move-to new-loc - ask new-loc [ set pcolor blue ] - set currCell new-loc + if antBehaviour = "blind" [ + let n one-of neighbors4 + if [occupied?] of n = true [set new-loc n] + ] + if antBehaviour = "myopic" [ + if any? neighbors4 with [occupied? = true] [ + set new-loc one-of neighbors4 with [occupied? = true] ] - - let newR eucl-distance-on-torus startCell [pxcor] of currCell [pycor] of currCell - set RNow newR - set Rhistory lput newR Rhistory ] + if new-loc != currCell [ + move-to new-loc + ask new-loc [ set pcolor blue ] + set currCell new-loc + ] + let newR eucl-distance-on-torus startCell [pxcor] of currCell [pycor] of currCell + set RNow newR + set Rhistory lput newR Rhistory + ] end ;; Euclidean distance **on a torus** between patch p1 and point (x2,y2) to-report eucl-distance-on-torus[p1 x2 y2] -;; See: http://www.swarm.org/pipermail/modelling/2005-October/003828.html - let x1 [pxcor] of p1 - let y1 [pycor] of p1 - - let xDist min list (abs (x1 - x2)) (max-pxcor - abs (x1 - x2)) - let yDist min list (abs (y1 - y2)) (max-pycor - abs (y1 - y2)) - - report sqrt ( xDist ^ 2 + yDist ^ 2) + ;; See: http://www.swarm.org/pipermail/modelling/2005-October/003828.html + let x1 [pxcor] of p1 + let y1 [pycor] of p1 + let xDist min list (abs (x1 - x2)) (max-pxcor - abs (x1 - x2)) + let yDist min list (abs (y1 - y2)) (max-pycor - abs (y1 - y2)) + report sqrt ( xDist ^ 2 + yDist ^ 2) end ;; This plots (in R) a histogram of the current displacements to r-displ-hist - -(r:putagent "agentlist1" turtles "Rnow") - r:eval("hist(agentlist1$R, main = '', xlab = 'Distance travelled', las = 1)") - + sr:set-agent-data-frame "agentlist1" turtles "Rnow" + sr:set-plot-device + sr:run "hist(agentlist1$R, main = '', xlab = 'Distance travelled', las = 1)" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end ;; This plots (in R) a time sequence of histograms of the displacements +;; Simple R extension seems to struggle with adjusting plot parameters in base R +;; so commenting this out for now to r-displ-hist-ts - - let slice 1 - let t ticks - let idx 0 - let interval t / 10 - let r-at-slice [] - - r:eval("old.par <- par()") - r:eval("par(mfrow=c(2,5))") - - while [slice <= 10] - [ - set idx (slice * interval) - 1 - if idx > t [set idx t ] ;; make sure don't have list bounds error - - ask turtles - [ - let r item idx Rhistory - set r-at-slice lput r r-at-slice - ] - - r:put "r" r-at-slice - r:put "title" (word "Time = " round (idx + 1)) - r:eval("hist(r, main = title)") - - set slice slice + 1 - - ] - r:eval("par(old.par)") + let slice 1 + let t ticks + let idx 0 + let interval t / 10 + let r-at-slice [] + sr:set-plot-device + sr:run "old.par <- par()" + sr:run "par(mfrow = c(2, 5))" + while [slice <= 10] [ + set idx (slice * interval) - 1 + if idx > t [ set idx t ] ;; make sure don't have list bounds error + ask turtles [ + let r item idx Rhistory + set r-at-slice lput r r-at-slice + ] + sr:set "r" r-at-slice + sr:set "title" (word "Time = " round (idx + 1)) + sr:run "hist(r, main = title)" + set slice slice + 1 + ] + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end ;; This plots all of the individual R traces and overlays mean, median, ... to r-displ-trace - - r:put "n" count turtles - r:put "t" ticks - r:eval("x <- 1:t") - r:eval("traces <- matrix(0, ncol = n, nrow = t)") - - let ttl 1 + sr:set "n" count turtles + sr:set "t" ticks + sr:run "x <- 1:t" + sr:run "traces <- matrix(0, ncol = n, nrow = t)" ;; build a matrix in R with all of the traces in it (for matplot) - ask turtles - [ - r:put "r" Rhistory - r:put "col" who - r:eval("traces[,col] <- r") - ] - - r:eval("matplot(x = x, y = traces[,-n], col = 'grey', type = 'l', lty = 1, las = 1, xlab = 'Time', ylab = 'Distance travelled')") + ask turtles[ + sr:set "r" Rhistory + sr:set "col" who + sr:run "traces[,col] <- r" + ] + sr:set-plot-device + sr:run "matplot(x = x, y = traces[,-n], col = 'grey', type = 'l', lty = 1, las = 1, xlab = 'Time', ylab = 'Distance travelled')" ;; the -n is to deal with indexing issues (min who = 1, but R is zero-indexed) - r:eval("mn.disp <- apply(traces, 1, mean)") - r:eval("md.disp <- apply(traces, 1, median)") - r:eval("sd.disp <- apply(traces, 1, sd)") - - r:eval("lines(mn.disp ~ x, col = 'black', lwd = 2)") - r:eval("lines(md.disp ~ x, col = 'red', lwd = 2)") - r:eval("lines(mn.disp + sd.disp ~ x, col = 'black', lwd = 1)") - r:eval("lines(mn.disp - sd.disp ~ x, col = 'black', lwd = 1)") + sr:run "mn.disp <- apply(traces, 1, mean)" + sr:run "md.disp <- apply(traces, 1, median)" + sr:run "sd.disp <- apply(traces, 1, sd)" + sr:run "lines(mn.disp ~ x, col = 'black', lwd = 2)" + sr:run "lines(md.disp ~ x, col = 'red', lwd = 2)" + sr:run "lines(mn.disp + sd.disp ~ x, col = 'black', lwd = 1)" + sr:run "lines(mn.disp - sd.disp ~ x, col = 'black', lwd = 1)" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end @#$#@#$#@ GRAPHICS-WINDOW @@ -242,9 +215,9 @@ HORIZONTAL BUTTON 60 -13 +17 133 -46 +50 NIL setup NIL @@ -446,7 +419,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -745,7 +718,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.7-edenSimple-using-R.nlogo b/using-R/5.7-edenSimple-using-R.nlogo index 670d2e8..89d5b83 100644 --- a/using-R/5.7-edenSimple-using-R.nlogo +++ b/using-R/5.7-edenSimple-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [r palette] +extensions [sr palette] __includes ["5.x-r-clusters.nls"] globals [ @@ -39,6 +39,9 @@ patches-own [ to setup clear-all + sr:setup + sr:run "library(matlab)" + ask patches [ set occupied? false set t-colonised -1 @@ -58,8 +61,6 @@ to setup ] set p-length-list [] set p-length-list lput (count perimeter-set) p-length-list - - r:setPlotDevice reset-ticks end @@ -389,7 +390,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -688,7 +689,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.9-edenTree-using-R.nlogo b/using-R/5.9-edenTree-using-R.nlogo index c74a072..5e85659 100644 --- a/using-R/5.9-edenTree-using-R.nlogo +++ b/using-R/5.9-edenTree-using-R.nlogo @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -22,7 +22,7 @@ ;; DEALINGS IN THE SOFTWARE. ;; -extensions [palette r] +extensions [palette sr] __includes["5.x-r-clusters.nls"] globals @@ -40,6 +40,9 @@ patches-own to setup clear-all + sr:setup + sr:run "library(matlab)" + let start-site nobody ask patches [ set occupied? false @@ -57,9 +60,6 @@ to setup set t-colonised 0 set perimeter-set neighbors4 ] - - r:setPlotDevice - set p-length-list [] set p-length-list lput (count perimeter-set) p-length-list @@ -365,7 +365,7 @@ If you mention this model in a publication, please include these citations for t The MIT License (MIT) -Copyright © 2011-2018 David O'Sullivan and George Perry +Copyright © 2011-24 David O'Sullivan and George Perry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -664,7 +664,7 @@ false Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ -NetLogo 6.0.2 +NetLogo 6.4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ diff --git a/using-R/5.x-r-clusters.nls b/using-R/5.x-r-clusters.nls index a0c90be..dfebeaa 100644 --- a/using-R/5.x-r-clusters.nls +++ b/using-R/5.x-r-clusters.nls @@ -1,6 +1,6 @@ ;; The MIT License (MIT) ;; -;; Copyright (c) 2011-2018 David O'Sullivan and George Perry +;; Copyright (c) 2011-24 David O'Sullivan and George Perry ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation @@ -27,81 +27,72 @@ ;; require: r extension and matlab in R to cluster-to-r [grey-levels] - r:eval("library(matlab)") - - r:put "nr" world-height - r:put "nc" world-width - - r:put "z" map [ p -> [t-colonised] of p ] reverse sort patches - - r:put "n" grey-levels - - r:eval("grey.ramp <- grey((0:(n-1))/n)") - r:eval("z <- (matrix(z, nrow=nr, ncol=nc, byrow = TRUE))") - r:eval("z <- rot90(z)") - - r:eval("z <- ifelse(z < 0, NA, z)") - - r:eval("image(z, col = grey.ramp, asp = 1, xaxt = 'n', yaxt = 'n')") + sr:set "nr" world-height + sr:set "nc" world-width + sr:set "z" map [ p -> [t-colonised] of p ] reverse sort patches + sr:set "n" grey-levels + sr:run "grey.ramp <- grey((0:(n-1))/n)" + sr:run "z <- (matrix(z, nrow=nr, ncol=nc, byrow = TRUE))" + sr:run "z <- rot90(z)" + sr:run "z <- ifelse(z < 0, NA, z)" + sr:set-plot-device + sr:run "image(z, col = grey.ramp, asp = 1, xaxt = 'n', yaxt = 'n')" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end to cluster-to-r-bw - r:eval("library(matlab)") - - r:put "nr" world-height - r:put "nc" world-width - - r:put "z" map [ p -> [t-colonised] of p ] reverse sort patches - - r:eval("z <- (matrix(z, nrow=nr, ncol=nc, byrow = TRUE))") - r:eval("z <- rot90(z)") - - r:eval("z <- ifelse(z < 0, 0, 1)") - - r:eval("image(z, col = c('white','black'), asp = 1, xaxt = 'n', yaxt = 'n')") + sr:set "nr" world-height + sr:set "nc" world-width + sr:set "z" map [ p -> [t-colonised] of p ] reverse sort patches + sr:run "z <- (matrix(z, nrow=nr, ncol=nc, byrow = TRUE))" + sr:run "z <- rot90(z)" + sr:run "z <- ifelse(z < 0, 0, 1)" + sr:set-plot-device + sr:run "image(z, col = c('white','black'), asp = 1, xaxt = 'n', yaxt = 'n')" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end to cluster-ts-to-r - r:eval("library(matlab)") - - r:put "nr" world-height - r:put "nc" world-width - - r:put "z.raw" map [ p -> [t-colonised] of p ] reverse sort patches - ; r:put "max.z" max [occupied?] of patches - - r:eval("grey.ramp <- grey((0:7)/8)") - r:eval("z.raw <- (matrix(z.raw, nrow=nr, ncol=nc, byrow = TRUE))") - r:eval("z.raw <- rot90(z.raw)") - + sr:set "nr" world-height + sr:set "nc" world-width + sr:set "z.raw" map [ p -> [t-colonised] of p ] reverse sort patches + sr:run "grey.ramp <- grey((0:7)/8)" + sr:run "z.raw <- (matrix(z.raw, nrow=nr, ncol=nc, byrow = TRUE))" + sr:run "z.raw <- rot90(z.raw)" + let mf-cols ceiling (n-slices / 3) if ticks < max-time-slice [set max-time-slice ticks] - - r:put "n.col" mf-cols - r:eval("par(mfrow=c(3, n.col))") - + sr:set "n.col" mf-cols + sr:set-plot-device + sr:run "par(mfrow = c(3, n.col))" let slices n-values n-slices [ i -> (i + 1) * floor(max-time-slice / n-slices)] - - foreach slices - [ slice -> - r:put "t" slice - r:eval("z <- ifelse(z.raw < 0 | z.raw > t, NA, z.raw)") - r:eval("image(z, col = grey.ramp, asp = 1, xaxt = 'n', yaxt = 'n', main = paste('Time = ', t))") + foreach slices [ slice -> + sr:set "t" slice + sr:run "z <- ifelse(z.raw < 0 | z.raw > t, NA, z.raw)" + sr:run "image(z, col = grey.ramp, asp = 1, xaxt = 'n', yaxt = 'n', main = paste('Time = ', t))" ] + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end to edge-to-r - r:put "nr" world-height - r:put "nc" world-width - - r:put "z" map [ p -> [member? p perimeter-set] of p ] reverse sort patches - r:eval("z <-matrix(z, nrow=nr, ncol=nc)") - - r:eval("image(z, col = c('white', 'black'), asp = 1, xaxt = 'n', yaxt = 'n')") + sr:set "nr" world-height + sr:set "nc" world-width + sr:set "z" map [ p -> [member? p perimeter-set] of p ] reverse sort patches + sr:run "z <- matrix(z, nrow = nr, ncol = nc)" + sr:set-plot-device + sr:run "image(z, col = c('white', 'black'), asp = 1, xaxt = 'n', yaxt = 'n')" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end to perimeter-ts-to-r - r:put "p" p-length-list - r:eval("plot(p, type = 'l', las = 1, bty = 'n', xlab = 'Time', ylab = 'Perimeter length', xlim = c(0,20000), ylim = c(0,1500))") + sr:set "p" p-length-list + sr:set-plot-device + sr:run "plot(p, type = 'l', las = 1, bty = 'n', xlab = 'Time', ylab = 'Perimeter length', xlim = c(0,20000), ylim = c(0,1500))" + user-message "Plot will close when you close this dialog." + sr:run "dev.off()" end diff --git a/using-R/Rplots.pdf b/using-R/Rplots.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ea179d65efd0bcc3e7f5ca1be6e158d66cd0ef6c GIT binary patch literal 3611 zcmZ`+XH-+!8buJ0SdeZ8lnYW7xFodDloE;*>Agq{7swcrnA}K_&;_JD0Yy-%G=;}Q z1f&UybSa^Uq9}@vAV?8V5Kv#@%s8{=t#{YD>#noU_w8?=bN}ouYl}5iMyaSHWTU2| z-b68@Mm?zr6rc)_PydS0(?fv9R0szX$RsQdh5!Yu4q6qhu8L7bqcl{}YHErI(3<@spIDd!+sIdy{fxjBq>)+-7+3zz7Fzkf@P01`OJw4WZ z&?Fc(bAZ`5rKiW{V9g?}oCJoAKaC35Os$kM>|DarNlGx;sd7ye6( z@g|N-+cDe^tz7vc_Y}Gczn_B5H8Ewmxl z(zFlwvUOzicyb%Z_x#I^Zqg_Y+pOf7m5m8cq*yOT-z7)3-ljL}uDbQ0s>PtRTQu4^ zgSMjN5%xJ7;@4h9$Lb;bXoJ(x^4m%IH!0eJt;uOVNU@n+8;$5zIeZL!BF>{TLA{C=zO(}ihzUp56&$!6 zUFjo#lZRd)pdO=1IRHoDU#VkwRigTQc24fFSKXHvskn^jH`pJ0p=ZB{eLM^p_ek8i z;Ce~?Ef=@3fUU&kU9!eT=A0r1^9A-dCCcOG3jJn1W)s>};Bvqp8A6%huh3#LAwQ0ZlO28FyJgQ6}a=(DijU-h8 z(TAo+X~8ml0#X&11dBNd2G1@XDwb?aG*2t*@et-QF+tf{UEcjjQslz)jm$#lLd~Lb zJ6_w|o5#kS#uR=SO`A2P*QHdqE5$_Rc+IN3qD5!n#udO{DYXCoooDr;x%C!?ttB_kCmwIH7>{X)70 z$mlio<)`YoS-mtO$>mE;$=|mtIO2L_r^2$Z^U*N{_=u-naA|^zy5pLo=fAV6TnmG- zXU#v}67=phzgXE}=U(Di1UtTu8>vM*O_*vsY8!{tP?J`;e=`$S>P(n6er=biu%+Oy zfOm{7w}BiQ$LM3Gb8d5(y~b*#+(Y(+l3H>=Os%3wVq&gEtwo+i%A>O)iU$kDhq-3o zuc0?_oAgaxCuJuar`9>S$C{6imRCJ~cQfSX$Hx|9&mNnOy}YG1#uytNtG^X=YiiVh zkVS|+^Y+&d!y*K8eMgbnW<=$?;f?0rkV`E&+?95<@xTBjYQhk4DNzbc#MX zUjNTRVQzVg@mB2T;(bot)@B7Y#xuo(_&7v+M%v&_-!)VztU>=umu>pg6w{;@+7)US zdLeWnbbXC)Q|YVB*Mplan+`lWJW@Q|Je554dq2i0wF|d<#eI#dN=Z&Rove9)j?_mx ztL;-A)FNrLo-xuqtL5f5;zJz}#y>(^tGx&eo!FyUqh*PzK#8N{2M+dgziS?dR~`~Q zDQc9&lO%2>IGT~&PJ~k3N0eifcPlq5<+~wWJ3Rtx=IS>C0?E0g7Xgg!xYI%b4gsV1 z)r!h&pEw5Q7^%aG5t!}LTGLzCc*GTo8 z_bMUnsmIp0knDrJf>O`NY;o~3`18y%x?{_3`IpZaGX1^By``)6RXrj4f42CnNbY#f zZ047kp!>m}T>Y#Vy z-xR&MK3yiZsWjP0(Q7+ah?o+KS@?QODhRWt(N= zC9NlSTR+eLtf(*7qR(|TE$ghKxj-r37P?Mt6&+vGUz1o<+?R88!BbNfA*cZvPbA%G z?o^*(jzxB0?|7rHy~%XQSe4V#SvSw4=Bbi>8Yfn)`{Y*`tM|R5+}pf{JqkQ--}Qk@ zW*%)i4V9Nvgu2XEskrO6c9937>SF5%XCf48Rg}Q6MioCVn>6R)Yd5Mth0l8=i6okI zYH2nQZ$3|WrtlQgKv*m-x0bXFmKC$Cv^;7tMSe$W-MBK~a^)1`S$ZvWyT6dgbnbV4 zJwE?@vi_igiwYBze17Oo3yl|V)|+}&_v(jxwm28N`lQ>IcP!nJo)cb>ZC%|QgKqK3 zJjKQOe5Kz)>9Z%zA79QoVh>J~X|h+@d`QFL=YdC8@)6kViLOBEAXK^;$&cX@yNEZe1C5X{pL< z7NsnV^lYcSp0|5Kerety)zaJiW!8DKa;Ba}Votiz#2EE&^F~?{x2~;=hpT_B_L>9q zkIm`pEc>*@=;9}<<&Q((*TV13N`1j~#tvdv4?j2SmSf0+$Gta#w@-{`WS4awKl(T7sXheRV-r`FUTxXBR0b&V$eh?KR;aP^=15noh0|_KL4bavE&(g^-M1=fc1WH{U^d++* z1C2%iKz}Ok9LwY4@N~A-#S^G_dY~T>3I;%!KxBDYFc62Ql1Tt~nhLQCS)DjM9wNaA z(3ij(MI+DvP=!Q>eIY*pr2Y_zXW4xs5%)JdfKKwqQR#t1932KgvOk#woncMG{a~iC zox9iHvPdu$@CTHG+CkK9~c_NN;dz*Fxvlv zscEyK$v^7U(f`AzhC*Tfs)MOG0uiFJA{+oZ5JDjU1Ar$;eq?~1?d$>2o=k=TcCz}B XL})OM3ja8pnwpjdLRQwq#uV{iyuvQm literal 0 HcmV?d00001 diff --git a/using-R/pp-r-utils.nls b/using-R/pp-r-utils.nls new file mode 100644 index 0000000..219a4f6 --- /dev/null +++ b/using-R/pp-r-utils.nls @@ -0,0 +1,45 @@ +;; The MIT License (MIT) +;; +;; Copyright (c) 2011-24 David O'Sullivan and George Perry +;; +;; Permission is hereby granted, free of charge, to any person +;; obtaining a copy of this software and associated documentation +;; files (the "Software"), to deal in the Software without restriction, +;; including without limitation the rights to use, copy, modify, merge, +;; publish, distribute, sublicense, and/or sell copies of the Software, +;; and to permit persons to whom the Software is furnished to do so, +;; subject to the following conditions: +;; +;; The above copyright notice and this permission notice shall be included +;; in all copies or substantial portions of the Software. +;; +;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +;; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +;; DEALINGS IN THE SOFTWARE. + +to plot-K + sr:run "library(spatstat)" + sr:set "x" map [t -> [rescale-x xcor] of t] sort points + sr:set "y" map [t -> [rescale-y ycor] of t] sort points + sr:run "pp <- ppp(x = x, y = y)" + + ;; calculate and retrieve K function + sr:run "k <- Kest(pp)" + let r sr:runresult "k$r" + let iso sr:runresult "k$iso" + let theo sr:runresult "k$theo" + + ;; plot the results + clear-plot + set-plot-x-range 0 precision last r 3 + set-plot-y-range 0 precision max sentence iso theo 3 + set-current-plot "Ripley's K" + set-current-plot-pen "K(r)" + (foreach r iso [ [x y] -> plotxy x y ]) + set-current-plot-pen "theo" + (foreach r theo [ [x y] -> plotxy x y ]) +end \ No newline at end of file diff --git a/using-R/pp-utils.nls b/using-R/pp-utils.nls new file mode 100644 index 0000000..aca1089 --- /dev/null +++ b/using-R/pp-utils.nls @@ -0,0 +1,60 @@ +;; The MIT License (MIT) +;; +;; Copyright (c) 2011-24 David O'Sullivan and George Perry +;; +;; Permission is hereby granted, free of charge, to any person +;; obtaining a copy of this software and associated documentation +;; files (the "Software"), to deal in the Software without restriction, +;; including without limitation the rights to use, copy, modify, merge, +;; publish, distribute, sublicense, and/or sell copies of the Software, +;; and to permit persons to whom the Software is furnished to do so, +;; subject to the following conditions: +;; +;; The above copyright notice and this permission notice shall be included +;; in all copies or substantial portions of the Software. +;; +;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +;; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +;; DEALINGS IN THE SOFTWARE. + +to clear-pattern + clear-plot + clear-background + ask turtles [ die ] +end + +to clear-background + ask patches [ set pcolor white ] +end + +to calculate-point-intensity + ask patches [ set lambda count points-here ] + repeat smooth [ diffuse4 lambda (3 / 4) ] +end + +to plot-surface [getter] + let max-value max [(runresult getter self)] of patches + ask patches [ + set pcolor palette:scale-gradient [[239 138 98] [247 247 247] [103 169 207]] (runresult getter self) max-value 0 + ] +end + +to toggle-points + ask points [set hidden? not hidden?] +end + +to-report rescale-x [x] + report rescale x (min-pxcor - 0.5) (max-pxcor + 0.5) 0 1 +end + +to-report rescale-y [y] + report rescale y (min-pycor - 0.5) (max-pycor + 0.5) 0 1 +end + +to-report rescale [x xmin xmax newmin newmax] + report newmin + (newmax - newmin) * (x - xmin) / (xmax - xmin) +end