├── 2022-Schmid-001 ├── .gitignore ├── documentation │ ├── designDetails.md │ └── tableOfContents.md ├── CHANGELOG.md ├── netlogo_implementation │ ├── documentation │ │ ├── instructions.md │ │ ├── moduleTitle interface.png │ │ └── tableOfContents.md │ └── moduleTitle.nlogo ├── LICENSE ├── README.md ├── NASSA.yml └── references.bib ├── 2022-Angourakis-001 ├── .gitignore ├── CHANGELOG.md ├── documentation │ ├── designDetails.md │ └── tableOfContents.md ├── netlogo_implementation │ └── documentation │ │ ├── instructions.md │ │ ├── referenceEvapotranspiration interface.png │ │ └── tableOfContents.md ├── LICENSE ├── README.md ├── NASSA.yml └── references.bib ├── 0000-NASSA-001-TEMPLATE ├── .gitignore ├── documentation │ ├── designDetails.md │ └── tableOfContents.md ├── CHANGELOG.md ├── netlogo_implementation │ ├── documentation │ │ ├── instructions.md │ │ ├── moduleTitle interface.png │ │ └── tableOfContents.md │ └── moduleTitle.nlogo ├── LICENSE ├── README.md ├── NASSA.yml └── references.bib ├── website_generator ├── website_source │ ├── dummy.bib │ ├── images │ │ └── NASSA-logo.png │ ├── _site.yml │ ├── styles.css │ └── index.Rmd ├── .Rbuildignore ├── website_generator.Rproj ├── DESCRIPTION ├── .gitignore ├── README.md ├── generate_source.R └── package_page_template.Rmd ├── 2021-Angourakis-001 ├── .gitignore ├── CHANGELOG.md ├── python_implementation │ ├── documentation │ │ ├── instructions.md │ │ ├── randomWalk_v01_plot.png │ │ └── tableOfContents.md │ └── randomWalk_v01.py ├── documentation │ ├── variablesAndParameters.png │ ├── variablesAndParameters.xcf │ ├── tableOfContents.md │ └── designDetails.md ├── README.md ├── LICENSE └── NASSA.yml ├── .gitignore ├── 2021-Galan-001 ├── CHANGELOG.md ├── documentation │ ├── designDetails.md │ └── tableOfContents.md ├── r_implementation │ ├── 2D-Random-walk_files │ │ └── figure-html │ │ │ ├── sequential-in-2Dgrid-1.png │ │ │ ├── simultaneous-in-2Dgrid-1.png │ │ │ └── sequential-2Dcontinuous-1.png │ ├── documentation │ │ └── tableOfContents.md │ ├── 2D Random walk.Rmd │ └── 2D-Random-walk.md ├── README.md ├── LICENSE └── NASSA.yml ├── 2022-Vlach-001 ├── CHANGELOG.md ├── netlogo_implementation │ └── documentation │ │ ├── Epidemic_Network_Model_v1 interface.png │ │ └── tableOfContents.md ├── documentation │ └── tableOfContents.md ├── README.md ├── LICENSE ├── references.bib └── NASSA.yml ├── 2021-Romanowska-001 ├── CHANGELOG.md ├── netlogo_implementation │ ├── documentation │ │ ├── ch2.1_pedestrian interface.png │ │ └── tableOfContents.md │ └── ch2.1_pedestrian.nlogo ├── LICENSE ├── documentation │ └── tableOfContents.md ├── README.md ├── references.bib └── NASSA.yml ├── 2022-Romanowska-001 ├── CHANGELOG.md ├── netlogo_implementation │ ├── worldAboveSeaLevelElevation.png │ ├── documentation │ │ ├── LoadWorldImageAndPlaceAgents interface.png │ │ └── tableOfContents.md │ └── LoadWorldImageAndPlaceAgents.nlogo ├── documentation │ └── tableOfContents.md ├── LICENSE ├── README.md ├── references.bib └── NASSA.yml ├── 2022-Romanowska-002 ├── CHANGELOG.md ├── netlogo_implementation │ ├── worldAboveSeaLevelElevation.png │ ├── documentation │ │ ├── Out of Africa dispersal - Conditional isotropic diffusion interface.png │ │ └── tableOfContents.md │ └── Out of Africa dispersal - Conditional isotropic diffusion.nlogo ├── LICENSE ├── documentation │ └── tableOfContents.md ├── README.md ├── references.bib └── NASSA.yml ├── README.md └── .github └── workflows ├── validation.yml └── buildWebsite.yml /2022-Schmid-001/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /2022-Angourakis-001/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website_generator/website_source/dummy.bib: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /2021-Angourakis-001/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | *.pyc -------------------------------------------------------------------------------- /2022-Schmid-001/documentation/designDetails.md: -------------------------------------------------------------------------------- 1 | # Design details -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | -------------------------------------------------------------------------------- /2021-Galan-001/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /2022-Schmid-001/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /2022-Vlach-001/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /website_generator/.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/documentation/designDetails.md: -------------------------------------------------------------------------------- 1 | # Design details -------------------------------------------------------------------------------- /2021-Angourakis-001/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /2021-Romanowska-001/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /2022-Romanowska-001/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /2022-Romanowska-002/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. -------------------------------------------------------------------------------- /2022-Angourakis-001/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | - Creation of the module. 3 | -------------------------------------------------------------------------------- /2022-Schmid-001/netlogo_implementation/documentation/instructions.md: -------------------------------------------------------------------------------- 1 | # Instructions -------------------------------------------------------------------------------- /2021-Angourakis-001/python_implementation/documentation/instructions.md: -------------------------------------------------------------------------------- 1 | # Instructions -------------------------------------------------------------------------------- /2022-Angourakis-001/documentation/designDetails.md: -------------------------------------------------------------------------------- 1 | # Design details 2 | 3 | TO-DO 4 | -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/netlogo_implementation/documentation/instructions.md: -------------------------------------------------------------------------------- 1 | # Instructions -------------------------------------------------------------------------------- /2021-Galan-001/documentation/designDetails.md: -------------------------------------------------------------------------------- 1 | Random walk in data frames 2 | # Design details -------------------------------------------------------------------------------- /2022-Angourakis-001/netlogo_implementation/documentation/instructions.md: -------------------------------------------------------------------------------- 1 | # Instructions 2 | 3 | TO-DO 4 | -------------------------------------------------------------------------------- /website_generator/website_source/images/NASSA-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/website_generator/website_source/images/NASSA-logo.png -------------------------------------------------------------------------------- /2021-Angourakis-001/documentation/variablesAndParameters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2021-Angourakis-001/documentation/variablesAndParameters.png -------------------------------------------------------------------------------- /2021-Angourakis-001/documentation/variablesAndParameters.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2021-Angourakis-001/documentation/variablesAndParameters.xcf -------------------------------------------------------------------------------- /2022-Romanowska-001/netlogo_implementation/worldAboveSeaLevelElevation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2022-Romanowska-001/netlogo_implementation/worldAboveSeaLevelElevation.png -------------------------------------------------------------------------------- /2022-Romanowska-002/netlogo_implementation/worldAboveSeaLevelElevation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2022-Romanowska-002/netlogo_implementation/worldAboveSeaLevelElevation.png -------------------------------------------------------------------------------- /2022-Schmid-001/netlogo_implementation/documentation/moduleTitle interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2022-Schmid-001/netlogo_implementation/documentation/moduleTitle interface.png -------------------------------------------------------------------------------- /2021-Angourakis-001/python_implementation/documentation/randomWalk_v01_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2021-Angourakis-001/python_implementation/documentation/randomWalk_v01_plot.png -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/netlogo_implementation/documentation/moduleTitle interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/0000-NASSA-001-TEMPLATE/netlogo_implementation/documentation/moduleTitle interface.png -------------------------------------------------------------------------------- /2021-Romanowska-001/netlogo_implementation/documentation/ch2.1_pedestrian interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2021-Romanowska-001/netlogo_implementation/documentation/ch2.1_pedestrian interface.png -------------------------------------------------------------------------------- /2021-Galan-001/r_implementation/2D-Random-walk_files/figure-html/sequential-in-2Dgrid-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2021-Galan-001/r_implementation/2D-Random-walk_files/figure-html/sequential-in-2Dgrid-1.png -------------------------------------------------------------------------------- /2021-Galan-001/r_implementation/2D-Random-walk_files/figure-html/simultaneous-in-2Dgrid-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2021-Galan-001/r_implementation/2D-Random-walk_files/figure-html/simultaneous-in-2Dgrid-1.png -------------------------------------------------------------------------------- /2022-Vlach-001/netlogo_implementation/documentation/Epidemic_Network_Model_v1 interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2022-Vlach-001/netlogo_implementation/documentation/Epidemic_Network_Model_v1 interface.png -------------------------------------------------------------------------------- /2021-Galan-001/r_implementation/2D-Random-walk_files/figure-html/sequential-2Dcontinuous-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2021-Galan-001/r_implementation/2D-Random-walk_files/figure-html/sequential-2Dcontinuous-1.png -------------------------------------------------------------------------------- /2022-Angourakis-001/netlogo_implementation/documentation/referenceEvapotranspiration interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2022-Angourakis-001/netlogo_implementation/documentation/referenceEvapotranspiration interface.png -------------------------------------------------------------------------------- /2022-Romanowska-001/netlogo_implementation/documentation/LoadWorldImageAndPlaceAgents interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2022-Romanowska-001/netlogo_implementation/documentation/LoadWorldImageAndPlaceAgents interface.png -------------------------------------------------------------------------------- /2022-Vlach-001/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Epidemic Network 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [NetLogo implementation](../netlogo_implementation/documentation/tableOfContents.md): documentation specific to the NetLogo implementation. -------------------------------------------------------------------------------- /2021-Romanowska-001/LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. -------------------------------------------------------------------------------- /2022-Romanowska-002/LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. -------------------------------------------------------------------------------- /2021-Angourakis-001/python_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Random walk in 2D space based on agent angle orientation 2 | # Documentation - Python implementation 3 | ## Table of contents 4 | 5 | - [`instructions.md`](instructions.md) : how to install or use the module. (**TO DO**) -------------------------------------------------------------------------------- /2021-Romanowska-001/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Pedestrian random walk in NetLogo (ch2.1) 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [NetLogo implementation](../netlogo_implementation/documentation/tableOfContents.md): documentation specific to the NetLogo implementation. -------------------------------------------------------------------------------- /2022-Romanowska-002/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Out of Africa dispersal - Conditional isotropic diffusion 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [NetLogo implementation](../netlogo_implementation/documentation/tableOfContents.md): documentation specific to the NetLogo implementation. -------------------------------------------------------------------------------- /2022-Romanowska-002/netlogo_implementation/documentation/Out of Africa dispersal - Conditional isotropic diffusion interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/NASSA-modules/main/2022-Romanowska-002/netlogo_implementation/documentation/Out of Africa dispersal - Conditional isotropic diffusion interface.png -------------------------------------------------------------------------------- /2022-Romanowska-001/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Multiple agent placement in specific geographical location 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [NetLogo implementation](../netlogo_implementation/documentation/tableOfContents.md): documentation specific to the NetLogo implementation. -------------------------------------------------------------------------------- /2021-Galan-001/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Random walk in data frames 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [`designDetails.md`](designDetails.md) : free format document describing the module process, beyond the level of implementation. 6 | 7 | - [R implementation](../r_implementation/documentation/tableOfContents.md): documentation specific to the R implementation. -------------------------------------------------------------------------------- /2022-Angourakis-001/netlogo_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Module name or title 2 | # Documentation - NetLogo implementation 3 | ## Table of contents 4 | 5 | - [`moduleTitle interface.png`](referenceEvapotranspiration%20interface.png) : screenshot of the interface (in NetLogo, using "File" -> "Export" -> "Export Interface ..."). 6 | 7 | - [`instructions.md`](instructions.md) : TO-DO 8 | -------------------------------------------------------------------------------- /2022-Angourakis-001/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Module name or title 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [`designDetails.md`](designDetails.md) : free format document describing the module process, beyond the level of implementation. 6 | 7 | - [NetLogo implementation](../netlogo_implementation/documentation/tableOfContents.md) : documentation specific to the NetLogo implementation. 8 | -------------------------------------------------------------------------------- /website_generator/website_generator.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Package 16 | PackageUseDevtools: Yes 17 | PackageInstallArgs: --no-multiarch --with-keep.source 18 | -------------------------------------------------------------------------------- /2021-Romanowska-001/netlogo_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Pedestrian random walk in NetLogo (ch2.1) 2 | # Documentation - NetLogo implementation 3 | ## Table of contents 4 | 5 | - [`ch2.1_pedestrian interface.png`](ch2.1_pedestrian%20interface.png): screenshot of the interface (in NetLogo, using "File" -> "Export" -> "Export Interface ..."). 6 | 7 | ![`ch2.1_pedestrian interface.png`](ch2.1_pedestrian%20interface.png) -------------------------------------------------------------------------------- /2022-Vlach-001/netlogo_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Epidemic Network 2 | # Documentation - NetLogo implementation 3 | ## Table of contents 4 | 5 | - [`Epidemic_Network_Model_v1 interface.png`](Epidemic_Network_Model_v1%20interface.png): screenshot of the interface (in NetLogo, using "File" -> "Export" -> "Export Interface ..."). 6 | 7 | ![`Epidemic_Network_Model_v1 interface.png`](Epidemic_Network_Model_v1%20interface.png) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![module library validation (nassa-hs)](https://github.com/Andros-Spica/NASSA-modules/actions/workflows/validation.yml/badge.svg?branch=main)](https://github.com/Andros-Spica/NASSA-modules/actions/workflows/validation.yml) 2 | 3 | # NASSA-modules 4 | The modular library of the "Network for Agent-based modelling of Socio-ecological systems in Archaeology" (NASSA) 5 | 6 | Search and access module metadata easily using the web interface: https://archaeology-abm.github.io/NASSA-modules 7 | -------------------------------------------------------------------------------- /2022-Romanowska-001/netlogo_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Multiple agent placement in specific geographical location 2 | # Documentation - NetLogo implementation 3 | ## Table of contents 4 | 5 | - [`LoadWorldImageAndPlaceAgents interface.png`](LoadWorldImageAndPlaceAgents%20interface.png): screenshot of the interface (in NetLogo, using "File" -> "Export" -> "Export Interface ..."). 6 | 7 | ![`LoadWorldImageAndPlaceAgents interface.png`](LoadWorldImageAndPlaceAgents%20interface.png) -------------------------------------------------------------------------------- /website_generator/DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: placeholder 2 | Title: This is a placeholder. 3 | Version: 0.0.1 4 | Depends: R (>= 4.1.0) 5 | Imports: 6 | fontawesome (>= 0.3.0), 7 | git2r (>= 0.30.1), 8 | htmltools (>= 0.5.2), 9 | kableExtra, 10 | tibble (>= 3.1.7), 11 | visNetwork (>= 2.1.0), 12 | dplyr (>= 1.0.9), 13 | DT (>= 0.25), 14 | knitr (>= 1.39), 15 | magrittr (>= 2.0.3), 16 | purrr (>= 0.3.4), 17 | rmarkdown (>= 2.14), 18 | yaml (>= 2.3.5) 19 | -------------------------------------------------------------------------------- /2022-Schmid-001/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Module name or title 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [`designDetails.md`](designDetails.md) : free format document describing the module process, beyond the level of implementation. 6 | 7 | - ... (other general documentation files) 8 | 9 | - [NetLogo implementation](../netlogo_implementation/documentation/tableOfContents.md) : documentation specific to the NetLogo implementation. 10 | 11 | - ... (other implementations) -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Module name or title 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [`designDetails.md`](designDetails.md) : free format document describing the module process, beyond the level of implementation. 6 | 7 | - ... (other general documentation files) 8 | 9 | - [NetLogo implementation](../netlogo_implementation/documentation/tableOfContents.md) : documentation specific to the NetLogo implementation. 10 | 11 | - ... (other implementations) -------------------------------------------------------------------------------- /2022-Vlach-001/README.md: -------------------------------------------------------------------------------- 1 | # Epidemic Network 2 | *by Marek Vlach* 3 | 4 | Experimental environment for testing of large array of theoretical conditions for development epidemic event within various quantitative, spatial and connectedness (network structure) aspects. 5 | 6 | ## License 7 | 8 | MIT 9 | 10 | ## Further information 11 | 12 | ![Interface screenshot](netlogo_implementation/documentation/Epidemic_Network_Model_v1%20interface.png) 13 | 14 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 15 | -------------------------------------------------------------------------------- /website_generator/website_source/_site.yml: -------------------------------------------------------------------------------- 1 | name: "nassa-modules" 2 | navbar: 3 | title: "nassa repository" 4 | left: 5 | - text: "Module list" 6 | icon: fa-list 7 | href: index.html 8 | # - text: "Package repository" 9 | # icon: fa-github 10 | # href: https://github.com/poseidon-framework/published_data 11 | # - text: "Poseidon website" 12 | # icon: fa-globe 13 | # href: https://poseidon-framework.github.io 14 | output: 15 | html_document: 16 | theme: spacelab 17 | highlight: textmate 18 | css: styles.css 19 | 20 | -------------------------------------------------------------------------------- /2022-Romanowska-002/netlogo_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Out of Africa dispersal - Conditional isotropic diffusion 2 | # Documentation - NetLogo implementation 3 | ## Table of contents 4 | 5 | - [`Out of Africa dispersal - Conditional isotropic diffusion interface.png`](Out%20of%20Africa%20dispersal%20-%20Conditional%20isotropic%20diffusion%20interface.png): screenshot of the interface (in NetLogo, using "File" -> "Export" -> "Export Interface ..."). 6 | 7 | ![`Out of Africa dispersal - Conditional isotropic diffusion interface.png`](Out%20of%20Africa%20dispersal%20-%20Conditional%20isotropic%20diffusion%20interface.png) -------------------------------------------------------------------------------- /2022-Schmid-001/netlogo_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Module name or title 2 | # Documentation - NetLogo implementation 3 | ## Table of contents 4 | 5 | - [`moduleTitle interface.png`](moduleTitle%20interface.png) : screenshot of the interface (in NetLogo, using "File" -> "Export" -> "Export Interface ..."). 6 | 7 | ![`moduleTitle interface.png`](moduleTitle%20interface.png) 8 | 9 | - [`instructions.md`](instructions.md) : free format document describing any instruction on how to install or use the module. 10 | 11 | - [`.md`](anyName.md) : free format document describing the module implementation. 12 | 13 | - ... -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/netlogo_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Module name or title 2 | # Documentation - NetLogo implementation 3 | ## Table of contents 4 | 5 | - [`moduleTitle interface.png`](moduleTitle%20interface.png) : screenshot of the interface (in NetLogo, using "File" -> "Export" -> "Export Interface ..."). 6 | 7 | ![`moduleTitle interface.png`](moduleTitle%20interface.png) 8 | 9 | - [`instructions.md`](instructions.md) : free format document describing any instruction on how to install or use the module. 10 | 11 | - [`.md`](anyName.md) : free format document describing the module implementation. 12 | 13 | - ... -------------------------------------------------------------------------------- /2021-Galan-001/r_implementation/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Random walk in data frames 2 | # R documentation 3 | ## Table of contents 4 | 5 | - [Code and demostration in Rmarkdown](htmlpreview.github.io/?https://github.com/Archaeology-ABM/NASSA-modules/blob/main/2021-Galan-001/r_implementation/2D-Random-walk.html) 6 | 7 | - Output examples: 8 | 9 | | | 10 | | --- | 11 | | ![Simultaneous random walk in 2D grid](../2D-Random-walk_files/figure-html/simultaneous-in-2Dgrid-1.png) | 12 | | ![Sequential random walk in 2D grid](../2D-Random-walk_files/figure-html/sequential-in-2Dgrid-1.png) | 13 | | ![Sequential random walk in continuous 2D space](../2D-Random-walk_files/figure-html/sequential-2Dcontinuous-1.png) | 14 | -------------------------------------------------------------------------------- /2021-Angourakis-001/documentation/tableOfContents.md: -------------------------------------------------------------------------------- 1 | Random walk in 2D space based on agent angle orientation 2 | # General documentation 3 | ## Table of contents 4 | 5 | - [`designDetails.md`](designDetails.md) : the description of the methods and the class (`Walker`) for random walking. 6 | 7 | - [`variablesAndParameters.xcf` and `variablesAndParameters.png`](variablesAndParameters.png) : source file (GIMP image editor) and PNG image of a infographic explaining the module variables and parameters. 8 | 9 | ![`variablesAndParameters.xcf` and `variablesAndParameters.png`](variablesAndParameters.png) 10 | 11 | - [Python implementation](../python_implementation/documentation/tableOfContents.md): documentation specific to the Python implementation. -------------------------------------------------------------------------------- /.github/workflows/validation.yml: -------------------------------------------------------------------------------- 1 | name: module library validation (nassa-hs) 2 | 3 | # Trigger the workflow on push or pull request, but only for the main branch 4 | on: 5 | pull_request: 6 | push: 7 | branches: [main] 8 | 9 | jobs: 10 | validate: 11 | name: nassa-hs validation 12 | runs-on: ubuntu-latest 13 | steps: 14 | 15 | - name: Install nassa 16 | run: | 17 | wget https://github.com/Archaeology-ABM/nassa-hs/releases/latest/download/nassa-Linux 18 | chmod +x nassa-Linux 19 | 20 | - name: Clone data repo 21 | uses: actions/checkout@v2 22 | with: 23 | path: data 24 | 25 | - name: Validation 26 | run: | 27 | ./nassa-Linux validate -d data 28 | -------------------------------------------------------------------------------- /2021-Galan-001/README.md: -------------------------------------------------------------------------------- 1 | # Random Walk in R 2 | *by Jose M Galan* (NASSA submission :rocket:) 3 | 4 | Collection of methods for producing random walks in two-dimensional space in R, including alternatives for grid and non-grid space. Uses tidyverse "tibble" to keep track of trajectories. 5 | 6 | ## License 7 | 8 | MIT 9 | 10 | ## Further information 11 | 12 | ![Example of output: sequential random walk in continuous 2D space](r_implementation/2D-Random-walk_files/figure-html/sequential-2Dcontinuous-1.png) 13 | 14 | [Code and demonstration in Rmarkdown](http://htmlpreview.github.io/?https://github.com/Archaeology-ABM/NASSA-modules/blob/main/2021-Galan-001/r_implementation/2D-Random-walk.html) 15 | 16 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 17 | -------------------------------------------------------------------------------- /2021-Angourakis-001/README.md: -------------------------------------------------------------------------------- 1 | # Random walk in 2D space based on agent angle orientation 2 | *by Andreas Angourakis* (NASSA submission :rocket:) 3 | 4 | An implementation of random walk in Python, which defines an agent class `Walker` capable of random walk movement based on random angle and movement step distance in a continuous 2D space. 5 | 6 | ## License 7 | 8 | MIT 9 | 10 | ## Further information 11 | 12 | ![Example of output: three random walk trajectories in continuous 2D space](python_implementation/documentation/randomWalk_v01_plot.png) 13 | 14 | [`demonstration.ipynb`](python_implementation/demonstration.ipynb): Jupyter Notebook using the Python implementation that sets up a workflow for executing several random walks and plotting them. It also includes a demonstration of the test methods. 15 | 16 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 17 | -------------------------------------------------------------------------------- /2021-Galan-001/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Jose M. Galan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2022-Vlach-001/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Marek Vlach 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2021-Angourakis-001/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Andreas Angourakis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2022-Romanowska-001/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Archaeology-ABM 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2022-Schmid-001/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2022-Angourakis-001/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2021-Romanowska-001/README.md: -------------------------------------------------------------------------------- 1 | # Pedestrian random walk in NetLogo (ch2.1) 2 | *by Iza Romanowska, Colin D Wren, and Stefani A Cabtree* (NASSA submission :rocket:) 3 | 4 | A collection of methods for random walk in NetLogo, including various movement restrictions, biases, and algorithm alternatives. 5 | 6 | ## License 7 | 8 | Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 9 | 10 | ## References 11 | 12 | Romanowska, I., Wren, C., Crabtree, S. 2021. Agent-Based Modeling for Archaeology: Simulating the Complexity of Societies. Santa Fe, NM: SFI Press. [https://www.sfipress.org/books/agent-based-modeling-archaeology](https://www.sfipress.org/books/agent-based-modeling-archaeology) 13 | 14 | ## Further information 15 | 16 | ![Interface screenshot](netlogo_implementation/documentation/ch2.1_pedestrian%20interface.png) 17 | 18 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 19 | -------------------------------------------------------------------------------- /website_generator/.gitignore: -------------------------------------------------------------------------------- 1 | /website_source/* 2 | !/website_source/_site.yml 3 | !/website_source/styles.css 4 | !/website_source/index.Rmd 5 | !/website_source/dummy.bib 6 | !/website_source/images/* 7 | 8 | # History files 9 | .Rhistory 10 | .Rapp.history 11 | 12 | # Session Data files 13 | .RData 14 | 15 | # User-specific files 16 | .Ruserdata 17 | 18 | # Example code in package build process 19 | *-Ex.R 20 | 21 | # Output files from R CMD build 22 | /*.tar.gz 23 | 24 | # Output files from R CMD check 25 | /*.Rcheck/ 26 | 27 | # RStudio files 28 | .Rproj.user/ 29 | 30 | # produced vignettes 31 | vignettes/*.html 32 | vignettes/*.pdf 33 | 34 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 35 | .httr-oauth 36 | 37 | # knitr and R markdown default cache directories 38 | *_cache/ 39 | /cache/ 40 | 41 | # Temporary files created by R markdown 42 | *.utf8.md 43 | *.knit.md 44 | 45 | # R Environment Variables 46 | .Renviron 47 | 48 | # data 49 | data/ 50 | 51 | # plots 52 | plots/ 53 | 54 | # tables 55 | tables/ 56 | 57 | # schemata 58 | schemata/*.png 59 | 60 | # singularity images 61 | *.sif 62 | stempdir/ 63 | 64 | # github access token 65 | .github_pat 66 | 67 | # rendered stuff 68 | *.pdf 69 | *.html 70 | *.log 71 | 72 | -------------------------------------------------------------------------------- /2022-Romanowska-001/README.md: -------------------------------------------------------------------------------- 1 | # Multiple agent placement in specific geographical location 2 | *by Iza Romanowska, Colin D Wren, and Stefani A Cabtree (original authors), and Stef Boogers and Andreas Angourakis as contributors* (NASSA submission :rocket:) 3 | 4 | Set up an input number of agents at an input location in an input world. Restart time (tickcounter). 5 | 6 | ## License 7 | 8 | Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 9 | 10 | ## References 11 | 12 | Romanowska, I., Wren, C., Crabtree, S. 2021. Agent-Based Modeling for Archaeology: Simulating the Complexity of Societies. Santa Fe, NM: SFI Press. [https://www.sfipress.org/books/agent-based-modeling-archaeology](https://www.sfipress.org/books/agent-based-modeling-archaeology) 13 | 14 | ## Further information 15 | 16 | ![Interface screenshot](netlogo_implementation/documentation/LoadWorldImageAndPlaceAgents%20interface.png) 17 | 18 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 19 | -------------------------------------------------------------------------------- /2022-Romanowska-002/README.md: -------------------------------------------------------------------------------- 1 | # Out of Africa dispersal - Conditional isotropic diffusion 2 | *by Iza Romanowska, Colin D Wren, and Stefani A Cabtree* (NASSA submission :rocket:) 3 | 4 | A reimplementation of the classical study by Young and Bettinger (1992) investigating the possible drivers behind the Out of Africa dispersal of modern humans. 5 | 6 | ## License 7 | 8 | Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 9 | 10 | ## References 11 | 12 | Romanowska, I., Wren, C., Crabtree, S. 2021. Agent-Based Modeling for Archaeology: Simulating the Complexity of Societies. Santa Fe, NM: SFI Press. [https://www.sfipress.org/books/agent-based-modeling-archaeology](https://www.sfipress.org/books/agent-based-modeling-archaeology) 13 | 14 | ## Further information 15 | 16 | ![Interface screenshot](netlogo_implementation/documentation/Out%20of%20Africa%20dispersal%20-%20Conditional%20isotropic%20diffusion%20interface.png) 17 | 18 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 19 | -------------------------------------------------------------------------------- /2022-Schmid-001/README.md: -------------------------------------------------------------------------------- 1 | # 2022-Schmid-001 2 | 3 | *by FULLNAME* (NASSA submission :rocket:) 4 | 5 | Description of what the module does. It should expand the information already given in the name/title. 6 | 7 | ## License 8 | 9 | Add any default short text about license here, if license recommends it or offers badges. For example, if using the MIT License, naming it directly will be enough as long as the `LICENSE` file is present: 10 | 11 | **MIT** 12 | 13 | ## References 14 | 15 | Use a print out version of the references in `references.bib` (any bibliographic convention). Supress section if there are no references. For example, using APA 7th edition style: 16 | 17 | Epstein, J. M. (2008). Why Model? Journal of Artificial Societies and Social Simulation, 11(4), 12. 18 | 19 | Romanowska, I. (2021). Agent-Based Modeling for Archaeology (Electronic). SFI Press. https://doi.org/10.37911/9781947864382 20 | 21 | ## Further information 22 | 23 | Add as many design details, instructions, and demonstrations as possible, particularly information that is not included in `NASSA.yml`. If the information is included as markdown or html files in the documentation folder, add links to them here (if they are absolute URLs inside the module directory, remember to update them once the module is integrated to the library). 24 | 25 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 26 | -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/README.md: -------------------------------------------------------------------------------- 1 | # Module name or title 2 | 3 | *by FULLNAME* (NASSA submission :rocket:) 4 | 5 | Description of what the module does. It should expand the information already given in the name/title. 6 | 7 | ## License 8 | 9 | Add any default short text about license here, if license recommends it or offers badges. For example, if using the MIT License, naming it directly will be enough as long as the `LICENSE` file is present: 10 | 11 | **MIT** 12 | 13 | ## References 14 | 15 | Use a print out version of the references in `references.bib` (any bibliographic convention). Supress section if there are no references. For example, using APA 7th edition style: 16 | 17 | Epstein, J. M. (2008). Why Model? Journal of Artificial Societies and Social Simulation, 11(4), 12. 18 | 19 | Romanowska, I. (2021). Agent-Based Modeling for Archaeology (Electronic). SFI Press. https://doi.org/10.37911/9781947864382 20 | 21 | ## Further information 22 | 23 | Add as many design details, instructions, and demonstrations as possible, particularly information that is not included in `NASSA.yml`. If the information is included as markdown or html files in the documentation folder, add links to them here (if they are absolute URLs inside the module directory, remember to update them once the module is integrated to the library). 24 | 25 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 26 | -------------------------------------------------------------------------------- /.github/workflows/buildWebsite.yml: -------------------------------------------------------------------------------- 1 | name: build website 2 | 3 | # Trigger the workflow when the validation action finished 4 | on: 5 | workflow_run: 6 | workflows: ["module library validation (nassa-hs)"] 7 | types: 8 | - completed 9 | branches: 10 | - "main" 11 | 12 | jobs: 13 | buildWebsite: 14 | # only run if the validation was successful and if this was an event on the main branch 15 | if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }} 16 | name: build repo website 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | 21 | - name: Clone repo 22 | uses: actions/checkout@v2 23 | 24 | - name: Setup R 25 | uses: r-lib/actions/setup-r@v2 26 | with: 27 | # Use the public version of RStudio package manager to serve binaries for Linux and Windows 28 | use-public-rspm: true 29 | 30 | - name: Install Pandoc 31 | uses: r-lib/actions/setup-pandoc@v2 32 | 33 | - name: Install R depedencies 34 | uses: r-lib/actions/setup-r-dependencies@v2 35 | with: 36 | cache-version: 1 37 | working-directory: website_generator 38 | 39 | - name: Build website 40 | run: | 41 | cd website_generator 42 | Rscript generate_source.R 43 | 44 | - name: Deploy website 45 | uses: peaceiris/actions-gh-pages@v3 46 | with: 47 | github_token: ${{ secrets.GITHUB_TOKEN }} 48 | publish_dir: website_generator/website_source/_site 49 | -------------------------------------------------------------------------------- /2021-Angourakis-001/documentation/designDetails.md: -------------------------------------------------------------------------------- 1 | 2 | Random walk in 2D space based on agent angle orientation 3 | # Design details 4 | ## class `Walker` 5 | The class includes methods for random walk (that could be extended with other walking methods). This is directly applicable to object-oriented implementations (e.g., Python), but could be adapted to build equivalent versions in other types of languages. 6 | 7 | - `MoveRandom(angleLeftMax, angleRightMax, moveDistanceMin, moveDistanceMax, worldDimensions)`: 2D random walk with parameters for direction and distance variation and limited to given world dimensions. Uses uniform distributions for random values. Sets Walker instance new position and returns new x, y, and direction in degrees. 8 | - `MoveRandomFree(angleLeftMax, angleRightMax, moveDistanceMin, moveDistanceMax)`: 2D random walk with parameters for direction and distance variation. Uses uniform distributions for random values. Returns new x, y, and direction in degrees. 9 | - `GetRandomRotation(currentDirection, angleLeftMax, angleRightMax)`: Rotate initial direction randomly within the range `(currentDirection - angleLeftMax, currentDirection + angleRightMax)`. Uses uniform distributions for random values. Returns new direction in degrees. 10 | - `IsOutsideWorld(self, x, y, worldDimensions)`: Checks if the coordinates are outside the world dimensions. Returns Boolean (true/false). 11 | - Static methods for testing instance methods. Testing is limited here to printing result in a more readable manner. 12 | 13 | ![variables and parametres](variablesAndParametres.png) -------------------------------------------------------------------------------- /website_generator/website_source/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } 4 | 5 | .moduleList { 6 | margin: auto; 7 | border-top: 1px solid #666; 8 | border-bottom: 1px solid #666; 9 | } 10 | table thead th { border-bottom: 1px solid #ddd; } 11 | th, td { padding: 5px; } 12 | thead, tfoot, tr:nth-child(even) { background: #eee; } 13 | 14 | .pageHeader { 15 | border: 0; 16 | border-collapse: collapse; 17 | width: 100%; 18 | } 19 | 20 | .pageTitle { 21 | font-family: verdana; 22 | font-style: normal; 23 | font-size: 300%; 24 | } 25 | 26 | .badge { 27 | color: white; 28 | padding: 4px 8px; 29 | text-align: center; 30 | border-radius: 5px; 31 | } 32 | 33 | #badgeModuleType { 34 | background-color: #03989E; 35 | } 36 | 37 | #badgeLanguage { 38 | background-color: #468B77; 39 | } 40 | 41 | #badgeRegions { 42 | background-color: #324B4C; 43 | } 44 | 45 | #badgePeriods { 46 | background-color: #95B0B2; 47 | } 48 | 49 | #badgeSubjects { 50 | background-color: #8284BE; 51 | } 52 | 53 | #badgeModelling { 54 | background-color: #FF8945; 55 | } 56 | 57 | #badgeProgramming { 58 | background-color: #AB3F69; 59 | } 60 | 61 | .legend { 62 | border: 0; 63 | border-collapse: collapse; 64 | text-align: right; 65 | } 66 | 67 | .row { 68 | display: flex; 69 | margin: auto; 70 | width: 100%; 71 | } 72 | 73 | .column { 74 | flex: 50%; 75 | } 76 | 77 | .readme { 78 | border:1px solid black; 79 | padding: 20px; 80 | margin: 20px; 81 | } 82 | 83 | #structGrid { 84 | border: 0; 85 | border-collapse: collapse; 86 | text-align: center; 87 | background-color: transparent; 88 | } 89 | -------------------------------------------------------------------------------- /2021-Romanowska-001/references.bib: -------------------------------------------------------------------------------- 1 | @book{romanowska_agent-based_2021, 2 | edition = {Electronic}, 3 | title = {Agent-{Based} {Modeling} for {Archaeology}}, 4 | isbn = {978-1-947864-38-2}, 5 | url = {https://www.sfipress.org/books/agent-based-modeling-archaeology}, 6 | abstract = {To fully understand not only the past, but also the trajectories, of human societies, we need a more dynamic view of human social systems. Agent-based modeling (ABM), which can create fine-scale models of behavior over time and space, may reveal important, general patterns of human activity. Agent-Based Modeling for Archaeology is the first ABM textbook designed for researchers studying the human past. Appropriate for scholars from archaeology, the digital humanities, and other social sciences, this book offers novices and more experienced ABM researchers a modular approach to learning ABM and using it effectively. Readers will find the necessary background, discussion of modeling techniques and traps, references, and algorithms to use ABM in their own work. They will also find engaging examples of how other scholars have applied ABM, ranging from the study of the intercontinental migration pathways of early hominins, to the weather–crop–population cycles of the American Southwest, to the trade networks of Ancient Rome. This textbook provides the foundations needed to simulate the complexity of past human societies, offering researchers a richer understanding of the past—and likely future—of our species.}, 7 | urldate = {2022-02-01}, 8 | publisher = {SFI Press}, 9 | author = {Romanowska, Iza}, 10 | month = aug, 11 | year = {2021}, 12 | doi = {10.37911/9781947864382}, 13 | } -------------------------------------------------------------------------------- /2022-Romanowska-001/references.bib: -------------------------------------------------------------------------------- 1 | @book{romanowska_agent-based_2021, 2 | edition = {Electronic}, 3 | title = {Agent-{Based} {Modeling} for {Archaeology}}, 4 | isbn = {978-1-947864-38-2}, 5 | url = {https://www.sfipress.org/books/agent-based-modeling-archaeology}, 6 | abstract = {To fully understand not only the past, but also the trajectories, of human societies, we need a more dynamic view of human social systems. Agent-based modeling (ABM), which can create fine-scale models of behavior over time and space, may reveal important, general patterns of human activity. Agent-Based Modeling for Archaeology is the first ABM textbook designed for researchers studying the human past. Appropriate for scholars from archaeology, the digital humanities, and other social sciences, this book offers novices and more experienced ABM researchers a modular approach to learning ABM and using it effectively. Readers will find the necessary background, discussion of modeling techniques and traps, references, and algorithms to use ABM in their own work. They will also find engaging examples of how other scholars have applied ABM, ranging from the study of the intercontinental migration pathways of early hominins, to the weather–crop–population cycles of the American Southwest, to the trade networks of Ancient Rome. This textbook provides the foundations needed to simulate the complexity of past human societies, offering researchers a richer understanding of the past—and likely future—of our species.}, 7 | urldate = {2022-02-01}, 8 | publisher = {SFI Press}, 9 | author = {Romanowska, Iza}, 10 | month = aug, 11 | year = {2021}, 12 | doi = {10.37911/9781947864382}, 13 | } -------------------------------------------------------------------------------- /2021-Galan-001/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2021-Galan-001 2 | nassaVersion: 0.3.0 3 | moduleType: Algorithm 4 | title: Random walk in data frames 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Galan, Jose M. 8 | roles: [ "Author", "Copyright Holder", "Creator" ] 9 | email: jmgalan@ubu.es 10 | orcid: 0000-0003-3360-7602 11 | - name: Angourakis, Andreas 12 | roles: [ "Contributor" ] 13 | email: andros.spica@gmail.com 14 | orcid: 0000-0002-9946-8142 15 | lastUpdateDate: 2022-09-07 16 | description: > 17 | Collection of methods for producing random walks in two-dimensional space outputting position coordinates in data frames, including alternatives for grid and non-grid space. In R, it uses tidyverse "tibble" to construct the data frames that store trajectories. 18 | domainKeywords: 19 | subjects: 20 | - random walk 21 | modellingKeywords: 22 | - agent behaviour (self) 23 | programmingKeywords: 24 | - Functional 25 | - Nondeterministic 26 | implementations: 27 | - language: R 28 | codeDir: r_implementation/ 29 | softwareDependencies: 30 | - R >= v4.0 31 | - tidyverse (R package) >= 1.3.1 32 | - ggplot2 (R package) >= 3.3.6 33 | - ggrepel (R package) >= 0.9.1 34 | inputs: 35 | - name: initialX, initialY 36 | type: float (numeric) 37 | unit: no specific unit 38 | description: initial position x and y coordinates. 39 | outputs: 40 | - name: trajectory 41 | type: data frame 42 | description: A dataframe (tibble in R) with three columns holding numeric variables (named "steps", "X", and "Y") where each row correspond to the index and xy coordinates of a step in a random walk. 43 | readmeFile: README.md 44 | docsDir: documentation/ 45 | license: MIT 46 | -------------------------------------------------------------------------------- /website_generator/README.md: -------------------------------------------------------------------------------- 1 | This directory holds the code for the https://poseidon-framework.GitHub.io/published_data website. It works as follows: 2 | 3 | - If the [validation GitHub action](https://GitHub.com/poseidon-framework/published_data/blob/master/.GitHub/workflows/validation.yml) passes, then the [buildWebsite action](https://GitHub.com/poseidon-framework/published_data/blob/master/.GitHub/workflows/buildWebsite.yml) runs. 4 | - This action installs R, pandoc and all dependencies necessary to render the website. The dependencies are listed in the minimal [DESCRIPTION file](DESCRIPTION) in this directory. 5 | - The action also runs the [generate_source.R](generate_source.R) script. This script reads the .janno files and builds the building blocks of the website in the [website_source/](website_source) directory. 6 | - As the website is an [Rmarkdown website](https://bookdown.org/yihui/rmarkdown/rmarkdown-site.html) we need .Rmd files for each package page. These are created from a template ([package_page_template.Rmd](package_page_template.Rmd)), where the name of each package can be filled in by generate_source.R. The index.Rmd file is built right in the script. Some other elements of the website are static and already in website_source/. All dynamic elements are ignored by Git. 7 | - generate_source.R finally runs `rmarkdown::render_site` to transform the generated .Rmd files to .html files (and thus the website) in website_source/_site/. 8 | - The buildWebsite GitHub action takes the content of _site/ and deploys it to the gh-pages branch, from where it is served as the website we know and love. 9 | 10 | For development/testing I suggest to open the RStudio project in this directory, make the desired changes in generate_source.R and package_page_template.Rmd and then run generate_source.R to render the website locally. Before pushing this to GitHub, remember to add new dependencies to the DESCRIPTION file. 11 | -------------------------------------------------------------------------------- /2022-Vlach-001/references.bib: -------------------------------------------------------------------------------- 1 | @incollection{vlach_2022, 2 | address = {Oxford, UK}, 3 | title = {The {Antonine} {Plague}: {Evaluation} of its {Impact} through {Epidemiological} {Modelling}}, 4 | isbn = {978-0-19-285782-8}, 5 | shorttitle = {The {Antonine} {Plague}}, 6 | url = {https://doi.org/10.1093/oso/9780192857828.003.0003}, 7 | abstract = {Since the beginning of discussions about the ‘third-century crisis’, the famous epidemic called the Antonine Plague has often been argued to be a key causal factor. During the crisis period, different segments and regions of the Roman world underwent various forms of turmoil (social unrest and uprising, economic problems, political instability, etc.) or external incursions (warfare, barbarian raids). Our current knowledge of the period suggests considerable ranges of the estimated death toll of the epidemic. The main intention of this chapter is to test the plausibility of these different estimated impacts on the basis of emulative digital modelling and simulation. A geographically explicit context, with a cellular framework, represents a workspace for spatio-temporal quantitative simulations to test various scenarios. Model input data include a reconstructed distribution of population density, infrastructural density, historical clinical data on the disease, and other factors. The vital part of simulation dynamics is defined through epidemiology mathematics (a compartment model with dynamics driven by differential equations). Coping with a large array of input variables, which are known only to a limited extent, has constrained our ability to test scenarios for assessing possible quantitative and spatial aspects of the epidemic impact within the demographic structures of the Roman Empire. Nevertheless, on the basis of simulation results it was possible to put the general plausibility of some existing estimates into a new perspective.}, 8 | urldate = {2022-10-04}, 9 | booktitle = {Simulating {Roman} {Economies}: {Theories}, {Methods}, and {Computational} {Models}}, 10 | publisher = {Oxford University Press}, 11 | author = {Vlach, Marek}, 12 | editor = {Brughmans, Tom and Wilson, Andrew}, 13 | month = aug, 14 | year = {2022}, 15 | doi = {10.1093/oso/9780192857828.003.0003}, 16 | pages = {69--108}, 17 | } 18 | -------------------------------------------------------------------------------- /2022-Schmid-001/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2022-Schmid-001 2 | nassaVersion: 0.3.0 3 | moduleType: Algorithm 4 | title: (TEMPLATE) Module name or title including a useful description of module. Max. 100 characters. 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Surname, Name (with no accent marks, first upper-case letters, and surname matching the id and root directory name) 8 | roles: [ "Author", "Compiler", "Contributor", "Copyright Holder", "Creator", "Thesis Advisor", "Translator" ] 9 | email: nassa@email.org 10 | orcid: 0000-0002-1825-0097 11 | lastUpdateDate: 1983-04-18 12 | description: > 13 | Description of what the module does. It should expand the information already given in the name/title. 14 | relatedModules: [ 0000-NASSA-002-TEMPLATE ] 15 | references: 16 | bibFile: references.bib 17 | moduleReferences: [ Epstein2008 ] 18 | useExampleReferences: [ romanowska_agent-based_2021 ] 19 | domainKeywords: 20 | regions: 21 | - Global 22 | periods: 23 | - Palaeolithic 24 | subjects: 25 | - diffusion 26 | modellingKeywords: 27 | - agent initialisation 28 | - grid initialisation 29 | - time initialisation 30 | programmingKeywords: 31 | - Functional 32 | - Point-free style 33 | implementations: 34 | - language: NetLogo 35 | codeDir: netlogo_implementation/ 36 | softwareDependencies: 37 | - language/software version x.x.x 38 | - extension version 39 | inputs: 40 | - name: Parameter/variable/file name in the module. 41 | type: Parameter/variable/file type. Use the programming language specific type. 42 | unit: Parameter/variable unit of measurement, if applicable. 43 | description: Parameter/variable/file description. Meaning, data structure, or any other relevant information for the procurement and preparation of the input. 44 | outputs: 45 | - name: Variable/object name in the module. 46 | type: Variable/object type. Use the programming language specific type. 47 | unit: Variable/object unit of measurement, if applicable. 48 | description: Variable/object description. Meaning, data structure, or any other relevant information for data analysis and interpretation or the use of the output as input in another module. 49 | readmeFile: README.md 50 | docsDir: documentation/ 51 | license: MIT 52 | -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: YEAR-Surname-000 2 | nassaVersion: 0.3.0 3 | moduleType: Algorithm 4 | title: (TEMPLATE) Module name or title including a useful description of module. Max. 100 characters. 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Surname, Name (with no accent marks, first upper-case letters, and surname matching the id and root directory name) 8 | roles: [ "Author", "Compiler", "Contributor", "Copyright Holder", "Creator", "Thesis Advisor", "Translator" ] 9 | email: nassa@email.org 10 | orcid: 0000-0002-1825-0097 11 | lastUpdateDate: 1983-04-18 12 | description: > 13 | Description of what the module does. It should expand the information already given in the name/title. 14 | relatedModules: [ 0000-NASSA-002-TEMPLATE ] 15 | references: 16 | bibFile: references.bib 17 | moduleReferences: [ Epstein2008 ] 18 | useExampleReferences: [ romanowska_agent-based_2021 ] 19 | domainKeywords: 20 | regions: 21 | - Global 22 | periods: 23 | - Palaeolithic 24 | subjects: 25 | - diffusion 26 | modellingKeywords: 27 | - agent initialisation 28 | - grid initialisation 29 | - time initialisation 30 | programmingKeywords: 31 | - Functional 32 | - Point-free style 33 | implementations: 34 | - language: NetLogo 35 | codeDir: netlogo_implementation/ 36 | softwareDependencies: 37 | - language/software version x.x.x 38 | - extension version 39 | inputs: 40 | - name: Parameter/variable/file name in the module. 41 | type: Parameter/variable/file type. Use the programming language specific type. 42 | unit: Parameter/variable unit of measurement, if applicable. 43 | description: Parameter/variable/file description. Meaning, data structure, or any other relevant information for the procurement and preparation of the input. 44 | outputs: 45 | - name: Variable/object name in the module. 46 | type: Variable/object type. Use the programming language specific type. 47 | unit: Variable/object unit of measurement, if applicable. 48 | description: Variable/object description. Meaning, data structure, or any other relevant information for data analysis and interpretation or the use of the output as input in another module. 49 | readmeFile: README.md 50 | docsDir: documentation/ 51 | license: MIT 52 | -------------------------------------------------------------------------------- /2022-Angourakis-001/README.md: -------------------------------------------------------------------------------- 1 | # Reference evapotranspiration based on FAO-56 Penman-Monteith method 2 | 3 | *by Andreas Angourakis* (NASSA submission :rocket:) 4 | 5 | Calculate a daily value of reference evapotranspiration, useful for vegetation (incl. crop) models. The module code is based on FAO-56 Penman-Monteith method. The implementation is based on several sources (see moduleReferences), but particularly useful was the Evapotranspiration R package (Guo et al. 2016, 2022 (v1.16)). Note: values of `C_n` and `C_d` are fixed for using the grass cover reference (900 and 0.34); values for the alfalfa reference are 1600 and 0.38. 6 | 7 | ## License 8 | 9 | **MIT** 10 | 11 | ## References 12 | 13 | Allen, R. G., Pereira, L. S., Raes, D., & Smith, M. (1998). Crop Evapotranspiration—FAO Irrigation and Drainage Paper No. 56 (Issue March). FAO. [http://www.fao.org/3/X0490E/x0490e00.htm](http://www.fao.org/3/X0490E/x0490e00.htm) 14 | 15 | Suleiman, A. A., & Hoogenboom, G. (2007). Comparison of Priestley-Taylor and FAO-56 Penman-Monteith for Daily Reference Evapotranspiration Estimation in Georgia. Journal of Irrigation and Drainage Engineering, 133(2), 175–182. [https://doi.org/10.1061/(ASCE)0733-9437(2007)133:2(175)](https://doi.org/10.1061/(ASCE)0733-9437(2007)133:2(175)) 16 | 17 | Jia, X. (2013). Comparison of Reference Evapotranspiration Calculations for Southeastern North Dakota. Irrigation & Drainage Systems Engineering, 2(3). [https://doi.org/10.4172/2168-9768.1000112](https://doi.org/10.4172/2168-9768.1000112) 18 | 19 | Guo, D., Westra, S., & Maier, H. R. (2016). An R package for modelling actual, potential and reference evapotranspiration. Environmental Modelling and Software, 78, 216–224. [https://doi.org/10.1016/j.envsoft.2015.12.019](https://doi.org/10.1016/j.envsoft.2015.12.019) 20 | 21 | Guo, D., Westra, S., & Peterson, T. (2022). Evapotranspiration: Modelling Actual, Potential and Reference Crop Evapotranspiration (1.16). [https://CRAN.R-project.org/package=Evapotranspiration](https://CRAN.R-project.org/package=Evapotranspiration) 22 | 23 | ## Further information 24 | 25 | ![Interface screenshot](netlogo_implementation/documentation/referenceEvapotranspiration%20interface.png) 26 | 27 | See full list of documentation resources in [`documentation`](documentation/tableOfContents.md). 28 | -------------------------------------------------------------------------------- /2021-Galan-001/r_implementation/2D Random walk.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Random walk in data frames in R" 3 | output: 4 | html_document: 5 | keep_md: true 6 | df_print: paged 7 | --- 8 | 9 | 10 | Libraries required 11 | ```{r} 12 | library(ggplot2) 13 | library(tidyverse) 14 | library(ggrepel) 15 | ``` 16 | 17 | Define initial parameters of the 2D movement 18 | ```{r} 19 | set.seed(6) 20 | n<-50 #Lenght of the walk 21 | initialX<-0.0 #initial x coordinate 22 | initialY<-0.0 #initial y coordinate 23 | ``` 24 | 25 | Create tibble to store the trajectory 26 | ```{r} 27 | steps<-1:n 28 | X<-rep(NA,n) 29 | Y<-rep(NA,n) 30 | trajectory<-tibble(steps,X,Y) 31 | ``` 32 | 33 | ## Method 1. Simultaneous movement in X and Y in a bidimensional grid 34 | ```{r} 35 | trajectory$X<-c(initialX,initialX+cumsum(sample(c(-1,1),size = n-1,replace=TRUE))) 36 | trajectory$Y<-c(initialY,initialY+cumsum(sample(c(-1,1),size = n-1,replace=TRUE))) 37 | ``` 38 | 39 | ```{r simultaneous-in-2Dgrid} 40 | ggplot(trajectory, aes(X,Y,label=steps))+ 41 | geom_path()+ 42 | geom_point()+ 43 | geom_text_repel()+ 44 | xlab("x coordinate") + 45 | ylab("y coordinate") + 46 | ggtitle("Simultaeous random walk in a grid") 47 | 48 | ``` 49 | 50 | 51 | ## Method 2. Sequential random movement in X and Y in a bidimensional grid 52 | ```{r} 53 | aux1<-sample(c(0,1),size = n-1,replace=TRUE) 54 | aux2<-1-aux1 55 | trajectory$X<-c(initialX,initialX+cumsum(aux1*sample(c(-1,1),size = n-1,replace=TRUE))) 56 | trajectory$Y<-c(initialY,initialY+cumsum(aux2*sample(c(-1,1),size = n-1,replace=TRUE))) 57 | 58 | ``` 59 | 60 | 61 | ```{r sequential-in-2Dgrid} 62 | ggplot(trajectory, aes(X,Y,label=steps))+ 63 | geom_path()+ 64 | geom_point()+ 65 | geom_text_repel()+ 66 | xlab("x coordinate") + 67 | ylab("y coordinate") + 68 | ggtitle("Sequential random walk in a grid") 69 | 70 | ``` 71 | 72 | ## Method 3. 2D Random walk not constrained to a grid (fixed step) 73 | ```{r} 74 | stepSize<-1 75 | aux1<-runif(n-1,min=0,max=2*pi) 76 | aux2<-cos(aux1)*stepSize 77 | aux3<-sin(aux1)*stepSize 78 | trajectory$X<-c(initialX,initialX+cumsum(aux2)) 79 | trajectory$Y<-c(initialY,initialY+cumsum(aux3)) 80 | 81 | ``` 82 | 83 | 84 | ```{r sequential-2Dcontinuous} 85 | ggplot(trajectory, aes(X,Y,label=steps))+ 86 | geom_path()+ 87 | geom_point()+ 88 | geom_text_repel()+ 89 | xlab("x coordinate") + 90 | ylab("y coordinate") + 91 | ggtitle("Sequential random walk in continuous 2D space") 92 | 93 | ``` 94 | -------------------------------------------------------------------------------- /2021-Romanowska-001/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2021-Romanowska-001 2 | nassaVersion: 0.3.0 3 | moduleType: Algorithm 4 | title: Pedestrian random walk in NetLogo (ch2.1) 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Romanowska, Iza 8 | roles: [ "Author", "Copyright Holder", "Creator" ] 9 | email: iromanowska@aias.au.dk 10 | orcid: 0000-0002-9487-2111 11 | - name: Wren, Colin D. 12 | roles: [ "Author", "Copyright Holder" ] 13 | email: my.stable@email.com 14 | orcid: 0000-0003-4940-3997 15 | - name: Cabtree, Stefani A. 16 | roles: [ "Author", "Copyright Holder" ] 17 | email: my.stable@email.com 18 | orcid: 0000-0001-8585-8943 19 | - name: Angourakis, Andreas 20 | roles: [ "Contributor" ] 21 | email: andros.spica@gmail.com 22 | orcid: 0000-0002-9946-8142 23 | lastUpdateDate: 2022-09-07 24 | description: > 25 | A collection of methods for random walk in NetLogo, including various movement restrictions, biases, and algorithm alternatives. 26 | references: 27 | bibFile: references.bib 28 | moduleReferences: [ romanowska_agent-based_2021 ] 29 | domainKeywords: 30 | subjects: 31 | - random walk 32 | modellingKeywords: 33 | - agent initialisation 34 | - agent behaviour (self) 35 | programmingKeywords: 36 | - Object-oriented 37 | - Nondeterministic 38 | implementations: 39 | - language: NetLogo 40 | codeDir: netlogo_implementation/ 41 | softwareDependencies: 42 | - NetLogo >= v6.1.1 43 | - Rnd (NetLogo extension) 44 | inputs: 45 | - name: (initial) xcor, ycor 46 | type: float (absolute position) or integer (patch coordinate) 47 | unit: no specific unit, but within world dimensions 48 | description: initial position of the agent (turtle) as x and y coordinates. 49 | - name: walk (name tag of the method to select) 50 | type: string 51 | unit: accepted values are "random1", "random2", "random3", "random4", "random-patches", "correlated", "target", "weighted-random", "levy", "restricted", "leap-frog", "IDD" 52 | description: this input is an intermediate reference to the procedures that perform specific variations of random walk. Therefore, it can be bypassed as an input. Note - there are some values hard-coded inside each procedure that could be used as parameters or variable inputs. 53 | outputs: 54 | - name: (current) xcor, ycor 55 | type: float (absolute position) or integer (patch coordinate) 56 | unit: no specific unit, but within world dimensions 57 | description: Current position of the agent (turtle) as x and y coordinates. 58 | readmeFile: README.md 59 | docsDir: documentation/ 60 | license: CC BY-SA 4.0 61 | -------------------------------------------------------------------------------- /2022-Romanowska-001/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2022-Romanowska-001 2 | nassaVersion: 0.3.0 3 | moduleType: Algorithm 4 | title: Multiple agent placement in specific geographical location 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Romanowska, Iza 8 | roles: [ "Author", "Copyright Holder", "Creator" ] 9 | email: iromanowska@aias.au.dk 10 | orcid: 0000-0002-9487-2111 11 | - name: Wren, Colin D. 12 | roles: [ "Author", "Copyright Holder" ] 13 | email: my.stable@email.com 14 | orcid: 0000-0003-4940-3997 15 | - name: Cabtree, Stefani A. 16 | roles: [ "Author", "Copyright Holder" ] 17 | email: my.stable@email.com 18 | orcid: 0000-0001-8585-8943 19 | - name: Boogers, Stef 20 | roles: [ "Contributor" ] 21 | email: my.stable@email.com 22 | orcid: 0000-0002-9505-1147 23 | - name: Angourakis, Andreas 24 | roles: [ "Contributor" ] 25 | email: andros.spica@gmail.com 26 | orcid: 0000-0002-9946-8142 27 | lastUpdateDate: 2022-02-01 28 | description: > 29 | Set up an input number of agents (turtles) at an input location (cell or patch) in an grid holding the input spatial data (map). 30 | relatedModules: [ 2022-Romanowska-002 ] 31 | references: 32 | bibFile: references.bib 33 | moduleReferences: [ romanowska_agent-based_2021 ] 34 | modellingKeywords: 35 | - initialisation 36 | programmingKeywords: 37 | - Object-oriented 38 | implementations: 39 | - language: NetLogo 40 | codeDir: netlogo_implementation/ 41 | softwareDependencies: 42 | - NetLogo version 6.2.2 43 | inputs: 44 | - name: map (spatial input data) 45 | type: png/bmp (grid or raster) 46 | description: image file containing the colour representation of spatial data (e.g. elevation). The example file attached ("world.png") was taken from the public repository associated to Romanowska, Wren, & Crabtree 2021 (https://github.com/SantaFeInstitute/ABMA/blob/master/ch1/ch1_map.png). 47 | - name: numberOfTurtles 48 | type: integer 49 | description: number of agents (turtles) to be created 50 | - name: inputX 51 | type: integer 52 | unit: limited by dimensions of grid width 53 | description: x coordinate of the desired/created agents’ location 54 | - name: inputY 55 | type: integer 56 | unit: limited by dimensions of grid height 57 | description: y coordinate of the desired/created agents’ location 58 | outputs: 59 | - name: agents 60 | type: object (agentset) 61 | description: agents initialised at input location 62 | - name: world 63 | type: object (world) 64 | description: world’s grid initialised with input spatial data 65 | readmeFile: README.md 66 | docsDir: documentation/ 67 | license: MIT 68 | -------------------------------------------------------------------------------- /2022-Schmid-001/references.bib: -------------------------------------------------------------------------------- 1 | @book{romanowska_agent-based_2021, 2 | edition = {Electronic}, 3 | title = {Agent-{Based} {Modeling} for {Archaeology}}, 4 | isbn = {978-1-947864-38-2}, 5 | url = {https://www.sfipress.org/books/agent-based-modeling-archaeology}, 6 | abstract = {To fully understand not only the past, but also the trajectories, of human societies, we need a more dynamic view of human social systems. Agent-based modeling (ABM), which can create fine-scale models of behavior over time and space, may reveal important, general patterns of human activity. Agent-Based Modeling for Archaeology is the first ABM textbook designed for researchers studying the human past. Appropriate for scholars from archaeology, the digital humanities, and other social sciences, this book offers novices and more experienced ABM researchers a modular approach to learning ABM and using it effectively. Readers will find the necessary background, discussion of modeling techniques and traps, references, and algorithms to use ABM in their own work. They will also find engaging examples of how other scholars have applied ABM, ranging from the study of the intercontinental migration pathways of early hominins, to the weather–crop–population cycles of the American Southwest, to the trade networks of Ancient Rome. This textbook provides the foundations needed to simulate the complexity of past human societies, offering researchers a richer understanding of the past—and likely future—of our species.}, 7 | urldate = {2022-02-01}, 8 | publisher = {SFI Press}, 9 | author = {Romanowska, Iza}, 10 | month = aug, 11 | year = {2021}, 12 | doi = {10.37911/9781947864382}, 13 | }, 14 | 15 | @article{Epstein2008, 16 | title = {Why {Model}?}, 17 | volume = {11}, 18 | url = {http://jasss.soc.surrey.ac.uk/11/4/12.html}, 19 | abstract = {This lecture treats some enduring misconceptions about modeling. One of these is that the goal is always prediction. The lecture distinguishes between explanation and prediction as modeling goals, and offers sixteen reasons other than prediction to build a model. It also challenges the common assumption that scientific theories arise from and 'summarize' data, when often, theories precede and guide data collection; without theory, in other words, it is not clear what data to collect. Among other things, it also argues that the modeling enterprise enforces habits of mind essential to freedom. It is based on the author's 2008 Bastille Day keynote address to the Second World Congress on Social Simulation, George Mason University, and earlier addresses at the Institute of Medicine, the University of Michigan, and the Santa Fe Institute.}, 20 | number = {4}, 21 | urldate = {2018-03-09}, 22 | journal = {Journal of Artificial Societies and Social Simulation}, 23 | author = {Epstein, Joshua M.}, 24 | month = oct, 25 | year = {2008}, 26 | note = {Publisher: JASSS}, 27 | keywords = {ABM, modelling, simulation}, 28 | pages = {12} 29 | } -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/references.bib: -------------------------------------------------------------------------------- 1 | @book{romanowska_agent-based_2021, 2 | edition = {Electronic}, 3 | title = {Agent-{Based} {Modeling} for {Archaeology}}, 4 | isbn = {978-1-947864-38-2}, 5 | url = {https://www.sfipress.org/books/agent-based-modeling-archaeology}, 6 | abstract = {To fully understand not only the past, but also the trajectories, of human societies, we need a more dynamic view of human social systems. Agent-based modeling (ABM), which can create fine-scale models of behavior over time and space, may reveal important, general patterns of human activity. Agent-Based Modeling for Archaeology is the first ABM textbook designed for researchers studying the human past. Appropriate for scholars from archaeology, the digital humanities, and other social sciences, this book offers novices and more experienced ABM researchers a modular approach to learning ABM and using it effectively. Readers will find the necessary background, discussion of modeling techniques and traps, references, and algorithms to use ABM in their own work. They will also find engaging examples of how other scholars have applied ABM, ranging from the study of the intercontinental migration pathways of early hominins, to the weather–crop–population cycles of the American Southwest, to the trade networks of Ancient Rome. This textbook provides the foundations needed to simulate the complexity of past human societies, offering researchers a richer understanding of the past—and likely future—of our species.}, 7 | urldate = {2022-02-01}, 8 | publisher = {SFI Press}, 9 | author = {Romanowska, Iza}, 10 | month = aug, 11 | year = {2021}, 12 | doi = {10.37911/9781947864382}, 13 | }, 14 | 15 | @article{Epstein2008, 16 | title = {Why {Model}?}, 17 | volume = {11}, 18 | url = {http://jasss.soc.surrey.ac.uk/11/4/12.html}, 19 | abstract = {This lecture treats some enduring misconceptions about modeling. One of these is that the goal is always prediction. The lecture distinguishes between explanation and prediction as modeling goals, and offers sixteen reasons other than prediction to build a model. It also challenges the common assumption that scientific theories arise from and 'summarize' data, when often, theories precede and guide data collection; without theory, in other words, it is not clear what data to collect. Among other things, it also argues that the modeling enterprise enforces habits of mind essential to freedom. It is based on the author's 2008 Bastille Day keynote address to the Second World Congress on Social Simulation, George Mason University, and earlier addresses at the Institute of Medicine, the University of Michigan, and the Santa Fe Institute.}, 20 | number = {4}, 21 | urldate = {2018-03-09}, 22 | journal = {Journal of Artificial Societies and Social Simulation}, 23 | author = {Epstein, Joshua M.}, 24 | month = oct, 25 | year = {2008}, 26 | note = {Publisher: JASSS}, 27 | keywords = {ABM, modelling, simulation}, 28 | pages = {12} 29 | } -------------------------------------------------------------------------------- /website_generator/generate_source.R: -------------------------------------------------------------------------------- 1 | library(magrittr) 2 | #library(kableExtra) 3 | library(DT) 4 | library(git2r) 5 | 6 | repo_path <- ".." 7 | 8 | #### nassa input #### 9 | 10 | nassa_yml_paths <- list.files( 11 | path = repo_path, 12 | pattern = "NASSA.yml", 13 | recursive = T, 14 | full.names = T 15 | ) 16 | 17 | badge_series <- function(x, type = 'badgeDefault') { 18 | if (length(x) > 0) { 19 | prefix <- paste0('') 20 | return(paste(prefix, x, '', collapse = ' ')) 21 | } else { 22 | return('') 23 | } 24 | } 25 | 26 | nassa_table <- purrr::map_dfr( 27 | nassa_yml_paths, 28 | function(nassa_yml_path) { 29 | nassa_yml <- yaml::read_yaml(nassa_yml_path) 30 | tibble::tibble( 31 | path = basename(dirname(nassa_yml_path)), 32 | id = nassa_yml$id, 33 | title = nassa_yml$title, 34 | moduleVersion = nassa_yml$moduleVersion, 35 | #contributors = paste(nassa_yml$contributors, collapse = ', '), # use this structure to print out nested yml fields 36 | Keywords = paste(badge_series(nassa_yml$moduleType, type = 'badgeModuleType'), 37 | badge_series(nassa_yml$implementations[[1]]$language, type = 'badgeLanguage'), 38 | '
', 39 | badge_series(nassa_yml$domainKeywords$regions, type = 'badgeRegions'), 40 | badge_series(nassa_yml$domainKeywords$periods, type = 'badgePeriods'), 41 | badge_series(nassa_yml$domainKeywords$subjects, type = 'badgeSubjects'), 42 | badge_series(nassa_yml$modellingKeywords, type = 'badgeModelling'), 43 | badge_series(nassa_yml$programmingKeywords, type = 'badgeProgramming'), 44 | collapse = ' '), 45 | `View` = paste0("View"), 46 | ) 47 | } 48 | ) 49 | 50 | #### prepare package-wise .Rmd files #### 51 | 52 | generate_Rmd <- function(x) { 53 | out_path <- file.path("website_source", paste0(x, ".Rmd")) 54 | template <- readLines("package_page_template.Rmd") 55 | template_mod <- gsub("####module_name####", x, template) 56 | writeLines(template_mod, con = out_path) 57 | } 58 | purrr::walk(nassa_table$path, generate_Rmd) 59 | 60 | # set NASSA-modules version and current date as args when rendering site 61 | libraryVersion = names(git2r::tags(git2r::discover_repository()))[-1] 62 | 63 | #### copy the .bib file for each package #### 64 | 65 | copy_bib <- function(x) { 66 | pac_path <- file.path(repo_path, x) 67 | bib_file <- list.files(pac_path, pattern = ".bib", full.names = TRUE) 68 | if (length(bib_file) == 1) { 69 | out_path <- file.path("website_source", paste0(x, ".bib")) 70 | file.copy(bib_file, out_path) 71 | } 72 | } 73 | purrr::walk(nassa_table$path, copy_bib) 74 | 75 | #### render website from .Rmd files 76 | 77 | rmarkdown::render_site(input = "website_source", envir = parent.frame()) 78 | -------------------------------------------------------------------------------- /2022-Angourakis-001/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2022-Angourakis-001 2 | nassaVersion: 0.3.0 3 | moduleType: Algorithm 4 | title: Reference evapotranspiration based on FAO-56 Penman-Monteith method 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Angourakis, Andreas 8 | roles: [ "Author", "Copyright Holder", "Creator" ] 9 | email: andros.spica@gmail.com 10 | orcid: 0000-0002-9946-8142 11 | lastUpdateDate: 2022-09-21 12 | description: > 13 | Calculate a daily value of reference evapotranspiration, useful for vegetation (incl. crop) models. The module code is based on FAO-56 Penman-Monteith method. The implementation is based on several sources (see moduleReferences), but particularly useful was the Evapotranspiration R package (Guo et al. 2016, 2022 (v1.16)). Note: values of `C_n` and `C_d` are fixed for using the grass cover reference (900 and 0.34); values for the alfalfa reference are 1600 and 0.38. 14 | relatedModules: [ ] 15 | references: 16 | bibFile: references.bib 17 | moduleReferences: [ Allen1998, Suleiman2007, jia_comparison_2013, Guo2016, guo_evapotranspiration_2022 ] 18 | useExampleReferences: [ ] 19 | domainKeywords: 20 | subjects: 21 | - soil 22 | - vegetation 23 | - weather 24 | - agriculture 25 | modellingKeywords: 26 | - grid variables 27 | - grid behaviour (self) 28 | programmingKeywords: 29 | - Functional 30 | implementations: 31 | - language: NetLogo 32 | codeDir: netlogo_implementation/ 33 | softwareDependencies: 34 | - NetLogo version 6.2.2 35 | inputs: 36 | - name: par_elevation 37 | type: float 38 | unit: meters 39 | description: elevation above sea level of the soil where the reference evapotranspiration is to be calculated. 40 | - name: par_temperature_daily_mean 41 | type: float 42 | unit: degrees celsius 43 | description: Mean daily air temperature above the ground surface where the reference evapotranspiration is to be calculated. 44 | - name: par_temperature_daily_min, par_temperature_daily_max 45 | type: float 46 | unit: degrees celsius 47 | description: Minimum and maximum daily air temperature above the ground surface where the reference evapotranspiration is to be calculated. 48 | - name: par_netSolarRadiation 49 | type: float 50 | unit: MJ*m^-2 51 | description: Solar radiation energy received by the soil surface, discounting loss by albedo reflection. 52 | - name: windSpeed 53 | type: float 54 | unit: m*s^-1 55 | description: Wind speed at 2m above the soil surface (fixed to 2 as constant in code, as per Allen et al. 1998 recommendation in absence of data). 56 | outputs: 57 | - name: ETr 58 | type: float 59 | unit: mm*day^-1 60 | description: The evapotranspiration in millimeters of water per day assuming a reference surface that is not short of water and covered by a hypothetical grass (or alfalfa) reference crop with specific characteristics. It is referenced in the bibliography also as ETo. 61 | readmeFile: README.md 62 | docsDir: documentation/ 63 | license: MIT 64 | -------------------------------------------------------------------------------- /2021-Angourakis-001/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2021-Angourakis-001 2 | nassaVersion: 0.3.0 3 | moduleType: Algorithm 4 | title: Random walk in 2D space based on agent angle orientation and step distance 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Angourakis, Andreas 8 | roles: [ "Author", "Copyright Holder", "Creator" ] 9 | email: andros.spica@gmail.com 10 | orcid: 0000-0002-9946-8142 11 | lastUpdateDate: 2022-09-22 12 | description: > 13 | An implementation of random walk in Python, which defines an agent class `Walker` capable of random walk movement based on random angle and movement step distance in a continuous 2D space. 14 | domainKeywords: 15 | subjects: 16 | - random walk 17 | modellingKeywords: 18 | - agent behaviour (self) 19 | programmingKeywords: 20 | - Object-oriented 21 | - Nondeterministic 22 | implementations: 23 | - language: Python 24 | codeDir: python_implementation/ 25 | softwareDependencies: 26 | - Python >= v.3.9 27 | - math (Python module) 28 | - random (Python module) 29 | inputs: 30 | - name: worldDimensions 31 | type: dictionary (Dict) 32 | unit: no specific unit 33 | description: The 2D world dimensions or limits. Specifically, the minimum and maximum coordinates in x and y that are considered valid positions in space. It is a dictionary with 'x' and 'y' keys, each associated to a two-item tupple of floats, representing minimum and maximum coordinates; e.g. {'x':(-50,50), 'y':(-50,50)} 34 | - name: angleLeftMax, angleRightMax 35 | type: float 36 | unit: angular degrees 37 | description: Left and right angles in relation to an agent current angular direction that mark the maximum range of stochastic variation in direction for a step in a random walks. Both values must be set within the 0-180 interval. If both are set to 180, the direction of the previous step will have no impact on the direction of the next step (i.e. angle will be sampled from a 0-360 degrees interval). 38 | - name: moveDistanceMin, moveDistanceMax 39 | type: float 40 | unit: no specific unit, but within the scale set by worldDimensions 41 | description: Minimum and maximum distance travelled after a step. When moveDistanceMin is less than moveDistanceMax, these mark the maximum range of stochastic variation in distance per step. If these are equal, distance travelled per step will be constant. MoveDistanceMin must be a positive number equal to or less than MoveDistanceMin. MoveDistanceMin must be a positive number equal to or greater than MoveDistanceMin, but less than the maximum world distance set by worldDimensions. 42 | - name: (initial) x, y 43 | type: float 44 | unit: no specific unit, but within the scale set by worldDimensions. 45 | description: Initial x and y coordinates of the agent's position. 46 | outputs: 47 | - name: positionX, positionY 48 | type: float 49 | unit: no specific unit, but within the scale set by worldDimensions 50 | description: The agent's position in x and y coordinates within the 2D space set by worldDimensions. 51 | - name: direction 52 | type: float 53 | unit: angular degrees 54 | description: The agent's angular direction in degrees. 55 | readmeFile: README.md 56 | docsDir: documentation/ 57 | license: MIT 58 | -------------------------------------------------------------------------------- /website_generator/website_source/index.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | #title: NASSA modules 3 | --- 4 | 5 | 6 | 7 | 11 | 14 | 15 | 16 | 17 | ```{r, echo=FALSE} 18 | nassa_table_print <- nassa_table[, c('id', 'title', 'moduleVersion', 19 | 'Keywords', 20 | 'View')] 21 | colDisplayNames <- c('ID', 'Title', 'Current version', 22 | 'Keywords', 23 | '') 24 | 25 | options(DT.options = list( 26 | pageLength = 25, 27 | language = list(search = 'Search by ID, Title or keyword:'), 28 | initComplete = DT::JS( 29 | "function(settings, json) {", 30 | "$(this.api().table().header()).css({'background-color': '#03989e'});", 31 | "}" 32 | ), 33 | # Define which columns are not to be used for sorting or searching 34 | columnDefs = list( 35 | list(targets = c(grep('moduleVersion', names(nassa_table_print)) - 1, grep('View', names(nassa_table_print)) - 1), 36 | orderable = FALSE), 37 | list(targets = c(grep('moduleVersion', names(nassa_table_print)) - 1, grep('View', names(nassa_table_print)) - 1), 38 | searchable = FALSE)) 39 | )) 40 | 41 | DT::datatable(nassa_table_print, 42 | rownames = FALSE, 43 | escape = FALSE, 44 | colnames = colDisplayNames) %>% 45 | DT::formatStyle('id', fontWeight = 'bold', width = '200px') %>% 46 | DT::formatStyle(c('moduleVersion', 'View'), textAlign = 'center', columnWidth = '50px') %>% 47 | DT::formatStyle(0, target = 'row', 48 | fontStyle = DT::styleRow(1, 'italic'), 49 | color = DT::styleRow(1, 'grey')) 50 | 51 | # kable approach: 52 | # knitr::kable(nassa_table[, c("id", "title", "moduleVersion", "View")], 53 | # col.names = c("ID", "Title", "Current version", ""), 54 | # align = c('l', 'l', 'c', 'c'), 55 | # format = "html", 56 | # table.attr = "class=\'moduleList\'" 57 | # ) %>% kableExtra::kable_styling() %>% kableExtra::column_spec( 58 | # # style specific for the ID column 59 | # column = 1, 60 | # width = '200px', 61 | # bold = TRUE, 62 | # border_right = TRUE 63 | # ) %>% kableExtra::row_spec( 64 | # # style specific for TEMPLATE module rows 65 | # row = c(1), # add more row numbers when adding new templates to the library. TO-DO: possibly code an automatic filter 66 | # color = 'grey', 67 | # italic = TRUE 68 | #) %>% as.character() 69 | ``` 70 | 71 | 72 | 73 | 76 | 79 | 82 | 85 | 88 | 91 | 94 | 97 | 98 |
74 | Keyword colour-coding: 75 | 77 | Module type 78 | 80 | Programming language 81 | 83 | Regions 84 | 86 | Periods 87 | 89 | Subjects 90 | 92 | Modelling 93 | 95 | Programming 96 |
99 | -------------------------------------------------------------------------------- /2022-Romanowska-002/references.bib: -------------------------------------------------------------------------------- 1 | @book{romanowska_agent-based_2021, 2 | edition = {Electronic}, 3 | title = {Agent-{Based} {Modeling} for {Archaeology}}, 4 | isbn = {978-1-947864-38-2}, 5 | url = {https://www.sfipress.org/books/agent-based-modeling-archaeology}, 6 | abstract = {To fully understand not only the past, but also the trajectories, of human societies, we need a more dynamic view of human social systems. Agent-based modeling (ABM), which can create fine-scale models of behavior over time and space, may reveal important, general patterns of human activity. Agent-Based Modeling for Archaeology is the first ABM textbook designed for researchers studying the human past. Appropriate for scholars from archaeology, the digital humanities, and other social sciences, this book offers novices and more experienced ABM researchers a modular approach to learning ABM and using it effectively. Readers will find the necessary background, discussion of modeling techniques and traps, references, and algorithms to use ABM in their own work. They will also find engaging examples of how other scholars have applied ABM, ranging from the study of the intercontinental migration pathways of early hominins, to the weather–crop–population cycles of the American Southwest, to the trade networks of Ancient Rome. This textbook provides the foundations needed to simulate the complexity of past human societies, offering researchers a richer understanding of the past—and likely future—of our species.}, 7 | urldate = {2022-02-01}, 8 | publisher = {SFI Press}, 9 | author = {Romanowska, Iza}, 10 | month = aug, 11 | year = {2021}, 12 | doi = {10.37911/9781947864382}, 13 | } 14 | 15 | @article{young_numic_1992, 16 | title = {The {Numic} {Spread}: {A} {Computer} {Simulation}}, 17 | volume = {57}, 18 | issn = {0002-7316, 2325-5064}, 19 | shorttitle = {The {Numic} {Spread}}, 20 | url = {https://www.cambridge.org/core/journals/american-antiquity/article/abs/numic-spread-a-computer-simulation/B936491F5FF137406E7E3F68D0B96FE6}, 21 | doi = {10.2307/2694836}, 22 | abstract = {We develop a mathematical model for the spread of Numic-speaking peoples across the Great Basin in the second millennium A.D., in accord with the ideas of Bettinger and Baumhoff (1982), who suggested a competitive interaction between the Numic and Prenumic peoples of the region. We construct differential equations representing two competing populations that spread by a diffusion process across an area representing the Great Basin. The demographic variables are fixed to agree with ethnographic data, while the migration rates are fitted to the estimated time for the completion of the spread. The model predicts a spatial distribution of the Numic languages in satisfactory agreement with observations and suggests new avenues of investigation. 23 | , 24 | Resumen 25 | En el presente artículo desarrollamos un modelo matemático de la dispersión de pueblos de habla Numic en la Great Basin durante el segundo milenio A.D. El modelo se basa en las ideas de Bettinger y Baumhoff (1982), quienes proponen una interactión competitiva entrepueblos Numic y Prenumic en la región. Utilizamos ecuaciones diferenciales para representar la migración de las poblaciones mediante un proceso de difusión en un área equivalente a la Great Basin. Las variables demográficas se determinaron en base a datos etnográficos, en tanto que los índices de migratión se ajustan al tiempo requerido para completar la dipersión. El modelo predice una distribución espacial de las lenguas Numic que coincide satisfactoriamente con las observaciones y sugiere nuevas líneas de investigación.}, 26 | language = {en}, 27 | number = {1}, 28 | urldate = {2022-02-02}, 29 | journal = {American Antiquity}, 30 | author = {Young, David A. and Bettinger, Robert L.}, 31 | month = jan, 32 | year = {1992}, 33 | note = {Publisher: Cambridge University Press}, 34 | pages = {85--99} 35 | } 36 | -------------------------------------------------------------------------------- /2021-Galan-001/r_implementation/2D-Random-walk.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Random walk in data frames in R" 3 | output: 4 | html_document: 5 | keep_md: true 6 | df_print: paged 7 | --- 8 | 9 | 10 | Libraries required 11 | 12 | ```r 13 | library(ggplot2) 14 | library(tidyverse) 15 | ``` 16 | 17 | ``` 18 | ## Warning: package 'tidyverse' was built under R version 3.6.3 19 | ``` 20 | 21 | ``` 22 | ## -- Attaching packages --------------------------------------- tidyverse 1.3.1 -- 23 | ``` 24 | 25 | ``` 26 | ## v tibble 3.1.1 v dplyr 1.0.6 27 | ## v tidyr 1.1.3 v stringr 1.4.0 28 | ## v readr 1.4.0 v forcats 0.5.1 29 | ## v purrr 0.3.4 30 | ``` 31 | 32 | ``` 33 | ## Warning: package 'tibble' was built under R version 3.6.3 34 | ``` 35 | 36 | ``` 37 | ## Warning: package 'tidyr' was built under R version 3.6.3 38 | ``` 39 | 40 | ``` 41 | ## Warning: package 'readr' was built under R version 3.6.3 42 | ``` 43 | 44 | ``` 45 | ## Warning: package 'purrr' was built under R version 3.6.3 46 | ``` 47 | 48 | ``` 49 | ## Warning: package 'dplyr' was built under R version 3.6.3 50 | ``` 51 | 52 | ``` 53 | ## Warning: package 'forcats' was built under R version 3.6.3 54 | ``` 55 | 56 | ``` 57 | ## -- Conflicts ------------------------------------------ tidyverse_conflicts() -- 58 | ## x dplyr::filter() masks stats::filter() 59 | ## x dplyr::lag() masks stats::lag() 60 | ``` 61 | 62 | ```r 63 | library(ggrepel) 64 | ``` 65 | 66 | ``` 67 | ## Warning: package 'ggrepel' was built under R version 3.6.3 68 | ``` 69 | 70 | Define initial parameters of the 2D movement 71 | 72 | ```r 73 | set.seed(6) 74 | n<-50 #Lenght of the walk 75 | initialX<-0.0 #initial x coordinate 76 | initialY<-0.0 #initial y coordinate 77 | ``` 78 | 79 | Create tibble to store the trajectory 80 | 81 | ```r 82 | steps<-1:n 83 | X<-rep(NA,n) 84 | Y<-rep(NA,n) 85 | trajectory<-tibble(steps,X,Y) 86 | ``` 87 | 88 | ## Method 1. Simultaneous movement in X and Y in a bidimensional grid 89 | 90 | ```r 91 | trajectory$X<-c(initialX,initialX+cumsum(sample(c(-1,1),size = n-1,replace=TRUE))) 92 | trajectory$Y<-c(initialY,initialY+cumsum(sample(c(-1,1),size = n-1,replace=TRUE))) 93 | ``` 94 | 95 | 96 | ```r 97 | ggplot(trajectory, aes(X,Y,label=steps))+ 98 | geom_path()+ 99 | geom_point()+ 100 | geom_text_repel()+ 101 | xlab("x coordinate") + 102 | ylab("y coordinate") + 103 | ggtitle("Simultaeous random walk in a grid") 104 | ``` 105 | 106 | ![](2D-Random-walk_files/figure-html/simultaneous-in-2Dgrid-1.png) 107 | 108 | 109 | ## Method 2. Sequential random movement in X and Y in a bidimensional grid 110 | 111 | ```r 112 | aux1<-sample(c(0,1),size = n-1,replace=TRUE) 113 | aux2<-1-aux1 114 | trajectory$X<-c(initialX,initialX+cumsum(aux1*sample(c(-1,1),size = n-1,replace=TRUE))) 115 | trajectory$Y<-c(initialY,initialY+cumsum(aux2*sample(c(-1,1),size = n-1,replace=TRUE))) 116 | ``` 117 | 118 | 119 | 120 | ```r 121 | ggplot(trajectory, aes(X,Y,label=steps))+ 122 | geom_path()+ 123 | geom_point()+ 124 | geom_text_repel()+ 125 | xlab("x coordinate") + 126 | ylab("y coordinate") + 127 | ggtitle("Sequential random walk in a grid") 128 | ``` 129 | 130 | ![](2D-Random-walk_files/figure-html/sequential-in-2Dgrid-1.png) 131 | 132 | ## Method 3. 2D Random walk not constrained to a grid (fixed step) 133 | 134 | ```r 135 | stepSize<-1 136 | aux1<-runif(n-1,min=0,max=2*pi) 137 | aux2<-cos(aux1)*stepSize 138 | aux3<-sin(aux1)*stepSize 139 | trajectory$X<-c(initialX,initialX+cumsum(aux2)) 140 | trajectory$Y<-c(initialY,initialY+cumsum(aux3)) 141 | ``` 142 | 143 | 144 | 145 | ```r 146 | ggplot(trajectory, aes(X,Y,label=steps))+ 147 | geom_path()+ 148 | geom_point()+ 149 | geom_text_repel()+ 150 | xlab("x coordinate") + 151 | ylab("y coordinate") + 152 | ggtitle("Sequential random walk in continuous 2D space") 153 | ``` 154 | 155 | ![](2D-Random-walk_files/figure-html/sequential-2Dcontinuous-1.png) 156 | -------------------------------------------------------------------------------- /2022-Romanowska-002/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2022-Romanowska-002 2 | nassaVersion: 0.3.0 3 | moduleType: Submodel 4 | title: Out of Africa dispersal - Conditional isotropic diffusion 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Romanowska, Iza 8 | roles: [ "Author", "Copyright Holder", "Creator" ] 9 | email: iromanowska@aias.au.dk 10 | orcid: 0000-0002-9487-2111 11 | - name: Wren, Colin D. 12 | roles: [ "Author", "Copyright Holder" ] 13 | email: my.stable@email.com 14 | orcid: 0000-0003-4940-3997 15 | - name: Cabtree, Stefani A. 16 | roles: [ "Author", "Copyright Holder" ] 17 | email: my.stable@email.com 18 | orcid: 0000-0001-8585-8943 19 | - name: Angourakis, Andreas 20 | roles: [ "Contributor" ] 21 | email: andros.spica@gmail.com 22 | orcid: 0000-0002-9946-8142 23 | lastUpdateDate: 2022-02-01 24 | description: > 25 | A generalisation of a demic diffusion model, where a number of agents (turtles) are initialised at a given region in a given map, and then reproduce themselves at each time step with a certain probability and only if there is a free adjacent grid cell (patch). A reimplementation of the classical study by Young and Bettinger (1992) investigating the possible drivers behind the Out of Africa dispersal of modern humans. The module code is an adaptation of the content of "ch1_Y&Bdispersal.nlogo" in the public repository associated to Romanowska, Wren, & Crabtree 2021 (https://github.com/SantaFeInstitute/ABMA/blob/master/ch1). 26 | relatedModules: [ 2022-Romanowska-001 ] 27 | references: 28 | bibFile: references.bib 29 | moduleReferences: [ romanowska_agent-based_2021, young_numic_1992 ] 30 | domainKeywords: 31 | regions: 32 | - Global 33 | periods: 34 | - Palaeolithic 35 | subjects: 36 | - diffusion 37 | - dispersal 38 | - colonisation 39 | modellingKeywords: 40 | - initialisation 41 | - run-time 42 | programmingKeywords: 43 | - Object-oriented 44 | - Nondeterministic 45 | implementations: 46 | - language: NetLogo 47 | codeDir: netlogo_implementation/ 48 | softwareDependencies: 49 | - NetLogo version 6.2.2 50 | inputs: 51 | - name: map (input spatial data) 52 | type: png/bmp (grid or raster) 53 | description: image file containing the colour representation of spatial data differentiating land and sea. The sea must be represented in white. The example file attached ("world.png") was taken from the public repository associated to Romanowska, Wren, & Crabtree 2021 (https://github.com/SantaFeInstitute/ABMA/blob/master/ch1/ch1_map.png). 54 | - name: number-turtles 55 | type: integer 56 | description: number of agents to be created and placed in the 2D array (the world) 57 | - name: inputX 58 | type: integer 59 | unit: limited by dimensions of grid width 60 | description: initial x coordinate of the center of the region where agents are created in initialisation 61 | - name: inputY 62 | type: integer 63 | unit: limited by dimensions of grid height 64 | description: initial y coordinate of the center of the region where agents are created in initialisation 65 | - name: maxInitialDistanceFromPoint 66 | type: integer 67 | unit: patches (grid cells) 68 | description: maximum distance from input point where agents are created in initialisation 69 | - name: numberOfTurtles 70 | type: integer 71 | unit: turtles (agents) 72 | description: number of agents to be created and placed in the 2D array (the world) 73 | - name: pop_growth 74 | type: float 75 | description: probability of an agent reproducing once each time step. Value set through slider in interface (0 - 1, 0.05 increment). 76 | outputs: 77 | - name: world 78 | type: object (world) 79 | description: world’s grid initialised with input spatial data 80 | - name: agents 81 | type: object (agentset) 82 | description: agents positioned over land patches (grid cells) with a particular colour as a proxy of their lineage. 83 | - name: tickcounter 84 | type: integer 85 | description: simulation time step counter 86 | readmeFile: README.md 87 | docsDir: documentation/ 88 | license: CC BY-SA 4.0 89 | -------------------------------------------------------------------------------- /2022-Angourakis-001/references.bib: -------------------------------------------------------------------------------- 1 | 2 | @article{Suleiman2007, 3 | title = {Comparison of {Priestley}-{Taylor} and {FAO}-56 {Penman}-{Monteith} for {Daily} {Reference} {Evapotranspiration} {Estimation} in {Georgia}}, 4 | volume = {133}, 5 | issn = {0733-9437}, 6 | url = {http://ascelibrary.org/doi/10.1061/%28ASCE%290733-9437%282007%29133%3A2%28175%29}, 7 | doi = {10.1061/(ASCE)0733-9437(2007)133:2(175)}, 8 | number = {2}, 9 | urldate = {2019-11-25}, 10 | journal = {Journal of Irrigation and Drainage Engineering}, 11 | author = {Suleiman, Ayman A. and Hoogenboom, Gerrit}, 12 | month = apr, 13 | year = {2007}, 14 | keywords = {climate, evapotranspiration}, 15 | pages = {175--182}, 16 | } 17 | 18 | @article{jia_comparison_2013, 19 | title = {Comparison of {Reference} {Evapotranspiration} {Calculations} for {Southeastern} {North} {Dakota}}, 20 | volume = {2}, 21 | doi = {10.4172/2168-9768.1000112}, 22 | number = {3}, 23 | journal = {Irrigation \& Drainage Systems Engineering}, 24 | author = {Jia, Xinhua}, 25 | year = {2013}, 26 | keywords = {Reference evapotranspiration, asce, ASCE standardized reference ET, jensen-haise, Jensen-Haise, reference evapotranspiration, standardized reference et}, 27 | } 28 | 29 | @article{Guo2016, 30 | title = {An {R} package for modelling actual, potential and reference evapotranspiration}, 31 | volume = {78}, 32 | issn = {13648152}, 33 | doi = {10.1016/j.envsoft.2015.12.019}, 34 | abstract = {Evapotranspiration (ET) is a vital component of the hydrological cycle and there are a large number of alternative models for representing ET processes. However, implementing ET models in a consistent manner is difficult due to the significant diversity in process representations, assumptions, nomenclature, terminology, units and data requirements. An R package is therefore introduced to estimate actual, potential and reference ET using 17 well-known models. Data input is flexible, and customized data checking and pre-processing methods are provided. Results are presented as summary text and plots. Comparisons of alternative ET estimates can be visualized for multiple models, and alternative input data sets. The ET estimates also can be exported for further analysis, and used as input to rainfall-runoff models.}, 35 | urldate = {2020-09-01}, 36 | journal = {Environmental Modelling and Software}, 37 | author = {Guo, Danlu and Westra, Seth and Maier, Holger R.}, 38 | month = apr, 39 | year = {2016}, 40 | note = {Publisher: Elsevier Ltd}, 41 | keywords = {R package, Evaporation, Ensemble modelling, Evapotranspiration (ET), Evapotranspiration software}, 42 | pages = {216--224}, 43 | } 44 | 45 | @book{Allen1998, 46 | address = {Rome}, 47 | title = {Crop {Evapotranspiration} - {FAO} {Irrigation} and {Drainage} {Paper} {No}. 56}, 48 | isbn = {92-5-104219-5}, 49 | url = {http://www.fao.org/3/X0490E/x0490e00.htm}, 50 | abstract = {This publication presents an updated procedure for calculating reference and crop evapotranspiration from meteorological data and crop coefficients. The procedure, first presented in the FAO Irrigation and Drainage Paper No. 24 'Crop Water Requirements', ETo' approach, whereby the effect of the climate on crop water requirements is given by the reference evapotranspiration ETo and the effect of the crop by the crop coefficient Kc. Other procedures developed in FAO Irrigation and Drainage Paper No. 24 such as the estimation of is termed the 'Kc dependable and effective rainfall, the calculation of irrigation requirements and the design of irrigation schedules are not presented in this publication but will be the subject of later papers in the series.}, 51 | publisher = {FAO}, 52 | author = {Allen, Richard G. and Pereira, Luis S. and Raes, Dirk and Smith, Martin}, 53 | year = {1998}, 54 | note = {Issue: March}, 55 | keywords = {agriculture, climate, crops, evapotranspiration, modeling, water management}, 56 | } 57 | 58 | @misc{guo_evapotranspiration_2022, 59 | title = {Evapotranspiration: {Modelling} {Actual}, {Potential} and {Reference} {Crop} {Evapotranspiration}}, 60 | copyright = {GPL-2 {\textbar} GPL-3 [expanded from: GPL (≥ 2)]}, 61 | shorttitle = {Evapotranspiration}, 62 | url = {https://CRAN.R-project.org/package=Evapotranspiration}, 63 | abstract = {Uses data and constants to calculate potential evapotranspiration (PET) and actual evapotranspiration (AET) from 21 different formulations including Penman, Penman-Monteith FAO 56, Priestley-Taylor and Morton formulations.}, 64 | urldate = {2022-09-23}, 65 | author = {Guo, Danlu and Westra, Seth and Peterson, Tim}, 66 | month = jan, 67 | year = {2022}, 68 | keywords = {Agriculture, Hydrology}, 69 | } 70 | -------------------------------------------------------------------------------- /2022-Vlach-001/NASSA.yml: -------------------------------------------------------------------------------- 1 | id: 2022-Vlach-001 2 | nassaVersion: 0.3.0 3 | moduleType: Submodel 4 | title: Epidemic Network 5 | moduleVersion: 1.0.0 6 | contributors: 7 | - name: Vlach, Marek 8 | roles: [ "Author", "Copyright Holder", "Creator" ] 9 | email: vlach@arub.cz 10 | orcid: 0000-0003-0805-4938 11 | - name: Angourakis, Andreas 12 | roles: [ "Contributor" ] 13 | email: andros.spica@gmail.com 14 | orcid: 0000-0002-9946-8142 15 | lastUpdateDate: 2022-09-07 16 | description: > 17 | Experimental environment for testing of large array of theoretical conditions for development epidemic event within various quantitative, spatial and connectedness (network structure) aspects. 18 | references: 19 | bibFile: references.bib 20 | moduleReferences: [ vlach_2022 ] 21 | domainKeywords: 22 | regions: 23 | - Global 24 | - European 25 | periods: 26 | - Undifferentiated 27 | - Pre-modern 28 | subjects: 29 | - demography 30 | - household 31 | - epidemics 32 | - networks 33 | modellingKeywords: 34 | - initialisation 35 | - run-time 36 | programmingKeywords: 37 | - Object-oriented 38 | - Nondeterministic 39 | implementations: 40 | - language: NetLogo 41 | codeDir: netlogo_implementation/ 42 | softwareDependencies: 43 | - NetLogo version 6.2.2 44 | inputs: 45 | - name: seed 46 | type: integer 47 | description: random generator seed number used as `random-seed seed`. 48 | - name: initial-households 49 | type: integer 50 | unit: households 51 | description: initial count of households. 52 | - name: population-coefficient 53 | type: integer 54 | unit: people 55 | description: household size variance coefficient (mean of exponential distribution). 56 | - name: initial-clusters 57 | type: integer 58 | unit: clusters/settlements 59 | description: initial count of clusters/settlements. 60 | - name: cluster-radius-min, cluster-radius-max 61 | type: integer 62 | unit: patch-widths 63 | description: minimum/maximum cluster radius used to sample a random cluster radius from an uniform distribution, as `in-radius (min-cluster-radius + (random max-cluster-radius))`. 64 | - name: search-radius 65 | type: integer 66 | unit: patch-widths 67 | description: maximum search distance to establish links. 68 | - name: max-connections 69 | type: integer 70 | unit: connections 71 | description: maximum number of connections (links) per distance range. 72 | - name: initial-infected 73 | type: integer 74 | unit: people 75 | description: number of initial cases or people agents initialised with the "incubation" stage and a stochastic state of stage 1 counter. 76 | - name: max-daily-contacts 77 | type: integer 78 | unit: connections 79 | description: maximum number of connections to be considered contacts each day. 80 | - name: duration-latent-mean, duration-latent-stddev 81 | type: float 82 | unit: ticks 83 | description: Mean and standard deviation of duration of the latent stage of the disease, used in `random-normal duration-latent-mean duration-latent-stddev`. 84 | - name: duration-prodromal-mean, duration-prodromal-stddev 85 | type: float 86 | unit: ticks 87 | description: Mean and standard deviation of duration of the prodromal stage of the disease, used in `random-normal duration-prodromal-mean duration-prodromal-stddev`. 88 | - name: duration-contagious-mean, duration-contagious-stddev 89 | type: float 90 | unit: ticks 91 | description: Mean and standard deviation of duration of the contagious stage of the disease, used in `random-normal duration-contagious-mean duration-contagious-stddev`. 92 | - name: mortality-rate 93 | type: float 94 | unit: percentage of population 95 | description: Average mortality rate applied to all individuals (`people`) in the population. 96 | - name: transmission-prob-range1-mean, transmission-prob-range1-stddev 97 | type: float 98 | unit: ticks 99 | description: Mean and standard deviation of transmission probability towards people within range 1 (search-radius * 0.125), used in `random-normal transmission-prob-range1-mean transmission-prob-range1-stddev`. 100 | - name: transmission-prob-range2-mean, transmission-prob-range2-stddev 101 | type: float 102 | description: Mean and standard deviation of transmission probability towards people within range 2 (search-radius * 0.25), used in `random-normal transmission-prob-range2-mean transmission-prob-range2-stddev`. 103 | - name: transmission-prob-range3-mean, transmission-prob-range3-stddev 104 | type: float 105 | description: Mean and standard deviation of transmission probability towards people within range 3 (search-radius * 0.5), used in `random-normal transmission-prob-range3-mean transmission-prob-range3-stddev`. 106 | - name: transmission-prob-range4-mean, transmission-prob-range4-stddev 107 | type: float 108 | description: Mean and standard deviation of transmission probability towards people within range 4 (search-radius), used in `random-normal transmission-prob-range4-mean transmission-prob-range4-stddev`. 109 | - name: range1-search-radius-share, range2-search-radius-share, range3-search-radius-share, range4-search-radius-share 110 | type: float 111 | description: the proportion of `search-radius` effective for each transmission range. 112 | - name: range1-initial-connections-share, range2-initial-connections-share, range3-initial-connections-share, range4-initial-connections-share 113 | type: float 114 | description: the proportion of `max-connections` from which a random sample is taken as initial contacts of the infected people for each distance range. 115 | outputs: 116 | - name: pos-spread 117 | type: integer 118 | description: Count of positive disease transmission encounter of an individual (passed to other person) 119 | - name: neg-spread 120 | type: integer 121 | description: Count of negative disease transmission encounter of an individual (not passed to other person) 122 | - name: count-spread 123 | type: integer 124 | description: Cumulative number of daily contacts 125 | - name: count-daily-contact 126 | type: integer 127 | description: Sum of all daily contacts for the actual day (reset each day) 128 | - name: count-daily-transmission 129 | type: integer 130 | description: Sum of all daily disease transmission encounter for the actual day (reset each day) 131 | - name: count-daily-transmission-pers 132 | type: integer 133 | description: Number of people with the potential to performing a disease transmission encounter for the actual day (reset each day) 134 | - name: nw-betcen 135 | type: float 136 | description: Network metrics':' betweenness centrality 137 | - name: nw-eigcen 138 | type: float 139 | description: Network metrics':' eigenvector centrality 140 | - name: nw-clocen 141 | type: float 142 | description: Network metrics':' closeness centrality 143 | - name: nw-clucoe 144 | type: float 145 | description: Network metrics':' clustering coefficient 146 | - name: nw-mod 147 | type: float 148 | description: Network metrics':' modularity 149 | readmeFile: README.md 150 | docsDir: documentation/ 151 | license: CC BY-SA 4.0 152 | -------------------------------------------------------------------------------- /website_generator/package_page_template.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | editor_options: 3 | chunk_output_type: console 4 | link-citations: false 5 | output: 6 | html_document: 7 | css: styles.css #website_source/styles.css 8 | bibliography: "`r cur_bib <- paste0('####module_name####', '.bib'); if (file.exists(cur_bib)) { cur_bib } else { 'dummy.bib' }`" 9 | nocite: '@*' #add all items to the bibliography 10 | --- 11 | 12 | ```{r setup, include=FALSE} 13 | knitr::opts_chunk$set( 14 | echo = FALSE, 15 | message = FALSE, 16 | warning = FALSE 17 | ) 18 | ``` 19 | 20 | ```{r dependencies} 21 | library(magrittr) 22 | library(visNetwork) 23 | library(fontawesome) 24 | library(htmltools) 25 | ``` 26 | 27 | ```{r ymlfile} 28 | module_name <- "####module_name####" #"2022-Romanowska-002" 29 | module_path <- file.path("../..", module_name) #file.path("..", module_name) 30 | nassa_yml_file <- list.files(module_path, pattern = "NASSA.yml", full.names = TRUE) 31 | nassa_yml <- yaml::read_yaml(nassa_yml_file) 32 | ``` 33 | 34 | # `r nassa_yml$title` 35 | 36 | `r nassa_yml$id`, (Last updated: `r nassa_yml$lastUpdateDate`) 37 | 38 |
39 | 40 |
41 |
42 | 43 |

Authors

44 | 45 | ```{r authors, results='asis'} 46 | authors <- purrr::map_chr( 47 | nassa_yml$contributors, \(x) { 48 | author = x$name 49 | roles = paste(x$roles, collapse = ", ") 50 | email = x$email 51 | orcid = x$orcid 52 | paste( 53 | strong(author), 54 | paste( 55 | htmltools::tags$a( 56 | fontawesome::fa("envelope", fill = "#03989E"), 57 | target = "_blank", 58 | href = paste0("mailto:", email) 59 | ), 60 | htmltools::tags$a( 61 | fontawesome::fa("orcid", fill = "#03989E"), 62 | target = "_blank", 63 | href = paste0("https://orcid.org/", orcid) 64 | ) 65 | ), 66 | paste0("(", roles, ")") 67 | ) 68 | } 69 | ) 70 | 71 | cat(paste(authors, collapse = "
")) 72 | ``` 73 | 74 |
75 | 76 |

Module files

77 | 78 | ```{r} 79 | dir_size <- function(path, recursive = TRUE) { 80 | stopifnot(is.character(path)) 81 | files <- list.files(path, full.names = T, recursive = recursive) 82 | vect_size <- sapply(files, function(x) file.size(x)) 83 | size_files <- sum(vect_size) 84 | return(round(size_files/10**6, digits = 2)) # in MB, rounded to two decimal digits 85 | } 86 | 87 | moduleSize <- paste(dir_size(module_path), "MB") 88 | ``` 89 | 90 | ```{r} 91 | github_link <- htmltools::tags$a( 92 | fontawesome::fa("github", fill = "#03989E", height = '100px'), 93 | target = "_blank", 94 | href = paste0("https://github.com/Archaeology-ABM/NASSA-modules/tree/main/", module_name) 95 | ) 96 | download_link <- htmltools::tags$a( 97 | fontawesome::fa("download", fill = "#03989E", height = '100px'), 98 | target = "_blank", 99 | href = paste0( 100 | "https://minhaskamal.github.io/DownGit/#/home?url=", # using DownGit tool 101 | "https://github.com/Archaeology-ABM/NASSA-modules/tree/main/", 102 | module_name) 103 | ) 104 | ### TO-DO: get a schematic printout of the file structure to be shown at the right side of the GiHub icon? 105 | ``` 106 | 107 | 108 | 109 | 112 | 115 | 116 | 117 | 120 | 123 | 124 | 125 | 126 |
127 | 128 |
129 | 130 |

Module type

131 | 132 | `r badge_series(nassa_yml$moduleType, "badgeModuleType")` 133 | 134 | ```{r} 135 | languages <- purrr::map(nassa_yml$implementations, function(y) { 136 | htmltools::tags$span(class = "badge", id = "badgeLanguage", y$language) 137 | }) 138 | ``` 139 | 140 |

Languages

141 | 142 | `r languages` 143 | 144 |

Tags

145 | 146 | ```{r tags} 147 | badge_series <- function(x, type = 'badgeLanguage') { 148 | if (length(x) > 0) { 149 | prefix <- paste0('') 150 | return(paste(prefix, x, '', collapse = ' ')) 151 | } else { 152 | return('') 153 | } 154 | } 155 | # ba <- function(x, type = "badgeDefault") { 156 | # purrr::map(x, function(y) { 157 | # htmltools::tags$span(class = "badge", id = type, y) 158 | # }) 159 | # } 160 | ``` 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 |
Modelling:`r badge_series(nassa_yml$modellingKeywords, "badgeModelling")`
Programming:`r badge_series(nassa_yml$programmingKeywords, "badgeProgramming")`
Regions:`r badge_series(nassa_yml$domainKeywords$regions, "badgeRegions")`
Periods:`r badge_series(nassa_yml$domainKeywords$periods, "badgePeriods")`
Subjects:`r badge_series(nassa_yml$domainKeywords$subjects, "badgeSubjects")`
169 | 170 |
171 |
172 | 173 |
174 | 175 |

Input and output

176 | 177 | ```{r in_and_out, results='asis'} 178 | if (!is.null(nassa_yml$inputs) & !is.null(nassa_yml$outputs)) { 179 | 180 | inputs <- purrr::map_dfr(nassa_yml$inputs, \(x) { tibble::as_tibble(x) }) %>% 181 | dplyr::transmute( 182 | id = seq_len(dplyr::n()) + 1, 183 | label = name, 184 | group = "input", 185 | title = paste0( 186 | "Data type: ", type, "
", 187 | "Description: ", description 188 | ) 189 | ) 190 | outputs <- purrr::map_dfr(nassa_yml$outputs, \(x) { tibble::as_tibble(x) }) %>% 191 | dplyr::transmute( 192 | id = seq_len(dplyr::n()) + max(inputs$id), 193 | label = name, 194 | group = "output", 195 | title = paste0( 196 | "Data type: ", type, "
", 197 | "Description: ", description 198 | ) 199 | ) 200 | 201 | nodes <- dplyr::bind_rows(inputs, outputs, tibble::tibble(id = 1, group = "module")) 202 | edges <- dplyr::bind_rows( 203 | toCenter = data.frame(from = inputs$id, to = 1), 204 | fromCenter = data.frame(from = 1, to = outputs$id) 205 | ) 206 | 207 | maxNumberOfNodesInColumn_default = 5 # aprox. number of nodes fitting the display with zoom scale = 1 208 | maxNumberOfNodesInColumn = max(c(nrow(inputs), nrow(outputs))) 209 | 210 | labelSizeMin = 18 211 | labelSizeIncreaseByNode = 1 212 | labelSizeAdj = labelSizeMin + labelSizeIncreaseByNode * max(c(0, maxNumberOfNodesInColumn - maxNumberOfNodesInColumn_default)) 213 | 214 | initZoomMax = 0.7 215 | initZoomDecreaseByNode = 0.1 216 | initZoomAdj = initZoomMax - initZoomDecreaseByNode * max(c(0, maxNumberOfNodesInColumn - maxNumberOfNodesInColumn_default)) 217 | 218 | visNetwork(nodes, edges, width = "100%") %>% 219 | visGroups( 220 | groupname = "input", 221 | color = list(border = "black", background = "white") 222 | ) %>% 223 | visGroups( 224 | shape = "diamond", 225 | groupname = "output", 226 | color = list(border = "black", background = "lightgrey") 227 | ) %>% 228 | visGroups( 229 | shape = "hexagon", 230 | size = 40, 231 | groupname = "module", color = list(border = "black", background = "#03989E") 232 | ) %>% 233 | visNodes( 234 | font = list(size = labelSizeAdj), 235 | shadow = TRUE 236 | ) %>% 237 | visEdges( 238 | color = list(color = "darkgrey"), 239 | arrows = list(to = list(enabled = TRUE, scaleFactor = 1)) 240 | ) %>% 241 | # set a hierarchical layout 242 | visHierarchicalLayout(direction = 'LR', sortMethod = 'directed', levelSeparation = 500) %>% 243 | # initialise zoom in proportion to the number of nodes 244 | visEvents(startStabilizing = paste0("function() {this.moveTo({scale:", initZoomAdj, "})}"), type = "once") %>% visPhysics(stabilization = FALSE) %>% 245 | visInteraction( 246 | tooltipStyle = 247 | 'position: fixed;visibility:hidden;padding: 5px; 248 | font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed; 249 | -moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px; 250 | border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); 251 | max-width:300px;word-break: normal' 252 | ) 253 | 254 | } else { cat("Module in- and output not provided") } 255 | ``` 256 | 257 |
258 | 259 |

README

260 | 261 |
262 | 263 | ```{r readme, results='asis'} 264 | if (!is.null(nassa_yml$readmeFile)) { 265 | readme_file <- file.path(module_path, nassa_yml$readmeFile) 266 | readme <- readLines(readme_file) 267 | ### correct rocket emoticon (used to mark NASSA oficial member submission) 268 | readme <- gsub("\\(NASSA submission \\:rocket\\:\\)", "(NASSA submission 🚀)", readme) 269 | ### correct relative paths 270 | for (aLineIndex in 1:length(readme)) 271 | { 272 | if (!grepl("\\]\\(http", readme[aLineIndex])) # or ignore all html links by using "\\.htm" 273 | { 274 | ### position relative path at the module root as intended in README.md 275 | readme[aLineIndex] <- gsub("\\]\\(", paste0("](https://github.com/Archaeology-ABM/NASSA-modules/tree/main/", nassa_yml$id, "/"), readme[aLineIndex]) 276 | } 277 | ### correct images URLs to use raw version instead 278 | for (imageExtension in c("png", "PNG", "jpg", "JPG", "tif", "TIF", "gif", "GIF")) { 279 | if (grepl(imageExtension, readme[aLineIndex])) { 280 | readme[aLineIndex] <- gsub("tree", "raw", readme[aLineIndex]) 281 | } 282 | } 283 | } 284 | #readme <- gsub("\\]\\(", paste0("](../../../", nassa_yml$id, "/"), readme) # TO-DO: find passing regular expression that selects fragment while excluding html links 285 | cat(readme, sep = "\n\n") 286 | } 287 | ``` 288 | 289 |
290 | 291 |
292 | 293 |

References

294 | 295 |
296 | -------------------------------------------------------------------------------- /2021-Angourakis-001/python_implementation/randomWalk_v01.py: -------------------------------------------------------------------------------- 1 | ############################ 2 | # Random walk module - version 01 3 | # by Andreas Angourakis (18/03/2021) 4 | # test script for the Network for Agent-based modelling of Socio-ecological systems in Archaeology (NASA) 5 | 6 | import math 7 | import random 8 | 9 | class Walker: 10 | ''' 11 | Walker is an agent class that includes methods for random walking 12 | (could be extended with other walking methods): 13 | 14 | positionX, positionY: agent's position in 2D coordinates 15 | direction: agent's angular direction in degrees 16 | 17 | Methods: 18 | 19 | MoveRandom(angleLeftMax, angleRightMax, moveDistanceMin, moveDistanceMax, worldDimensions) 20 | 21 | MoveRandomFree(angleLeftMax, angleRightMax, moveDistanceMin, moveDistanceMax) 22 | 23 | GetRandomRotation(currentDirection, angleLeftMax, angleRightMax) 24 | 25 | IsOutsideWorld(self, x, y, worldDimensions) 26 | 27 | Static methods for testing instance methods. 28 | Testing is limited here to printing result in a more readable manner. 29 | ''' 30 | def __init__(self, x, y, direction): 31 | self.positionX = x 32 | self.positionY = y 33 | self.direction = 0.0 34 | 35 | def MoveRandom(self, 36 | angleLeftMax = 180, 37 | angleRightMax = 180, 38 | moveDistanceMin = 1.0, 39 | moveDistanceMax = 1.0, 40 | worldDimensions = {'x':(-50,50), 'y':(-50,50)}): 41 | ''' 42 | 2D random walk with parameters for direction and distance variation 43 | and limited to given world dimensions. Uses uniform distributions for random values. 44 | Sets Walker instance new position and returns new x, y, and direction in degrees. 45 | ''' 46 | ### get new position 47 | x,y,newDirection = self.MoveRandomFree(angleLeftMax, angleRightMax, 48 | moveDistanceMin, moveDistanceMax) 49 | ### assure that new position is within world dimensions 50 | while self.IsOutsideWorld(x, y, worldDimensions): 51 | x,y,newDirection = self.MoveRandomFree(angleLeftMax, angleRightMax, 52 | moveDistanceMin, moveDistanceMax) 53 | ### set new position 54 | self.positionX = x 55 | self.positionY = y 56 | self.direction = newDirection 57 | ### return position coordinates and direction (display or testing purposes) 58 | return x,y,newDirection 59 | 60 | def MoveRandomFree(self, 61 | angleLeftMax = 180, 62 | angleRightMax = 180, 63 | moveDistanceMin = 1.0, 64 | moveDistanceMax = 1.0): 65 | ''' 66 | 2D random walk with parameters for direction and distance variation. 67 | Uses uniform distributions for random values. Returns new x, y, and direction in degrees. 68 | ''' 69 | ### set new random direction 70 | newDirection = self.GetRandomRotation(self.direction, angleLeftMax, angleRightMax) 71 | ### convert angle to radians 72 | directionInRadians = newDirection * math.pi / 180 73 | ### get movement distance 74 | moveDist = moveDistanceMin + (moveDistanceMax - moveDistanceMin) * random.uniform(0,1) 75 | ### get new position 76 | x = math.cos(directionInRadians) * moveDist 77 | y = math.sin(directionInRadians) * moveDist 78 | ### return position coordinates and direction 79 | return x,y,newDirection 80 | 81 | def GetRandomRotation(self, 82 | currentDirection, 83 | angleLeftMax = 180, 84 | angleRightMax = 180): 85 | ''' 86 | Rotate initial direction randomly within the range 87 | (currentDirection - angleLeftMax, currentDirection + angleRightMax). 88 | Uses uniform distributions for random values. Returns new direction in degrees. 89 | ''' 90 | ### get new random direction from previous direction 91 | ### within the range -angleLeftMax, +angleRightMax 92 | newDirection = random.uniform(currentDirection - angleLeftMax, 93 | currentDirection + angleRightMax) 94 | ### convert negative angle to positive 95 | if newDirection < 0.0: 96 | newDirection += 360 97 | return newDirection 98 | 99 | def IsOutsideWorld(self, x, y, worldDimensions): 100 | return x < worldDimensions['x'][0] or x > worldDimensions['x'][1] or y < worldDimensions['y'][0] or y > worldDimensions['y'][1] 101 | 102 | ################################################################### 103 | ####### tests ##################################################### 104 | ################################################################### 105 | 106 | def Test_IsOutsideWorld(x, y, worldDimensions): 107 | ''' 108 | Checks if the coordinates are outside the world dimensions. Returns Boolean (true/false). 109 | ''' 110 | ### create class instance 111 | randomWalker = Walker(x, y, 0.0) 112 | 113 | return ("IsOutsideWorld(" 114 | + "x = " + str(x) 115 | + ", y = " + str(y) 116 | + ", worldDimensions = " + str(worldDimensions) 117 | + ") -> " 118 | + str(randomWalker.IsOutsideWorld(x, y, worldDimensions))) 119 | 120 | Test_IsOutsideWorld = staticmethod(Test_IsOutsideWorld) 121 | 122 | def Test_GetRandomRotation(currentDirection, angleLeftMax = 180, angleRightMax = 180): 123 | ''' 124 | Checks if GetRandomRotation() returns an angle within the given specifications. Returns message ending with Boolean (true/false). 125 | ''' 126 | ### create class instance 127 | randomWalker = Walker(0.0, 0.0, currentDirection) 128 | 129 | ### find left and right angle limits 130 | rightLimit = (currentDirection + angleRightMax) 131 | if rightLimit > 360: rightLimit = rightLimit - 360 132 | leftLimit = (currentDirection - angleLeftMax) 133 | if leftLimit < 0: leftLimit = 360 + leftLimit 134 | 135 | ### get new direction 136 | newDirection = randomWalker.GetRandomRotation(currentDirection, angleLeftMax, angleRightMax) 137 | 138 | ### test 139 | passTest = False 140 | ### case 1: the whole range is greater than 0 and lower than 360 141 | if (newDirection >= leftLimit) & (newDirection <= rightLimit): 142 | passTest = True 143 | ### other cases, the range overlaps with the limit 360-0 144 | ### case 2: newDirection falls on the left of 0-360 145 | elif (newDirection >= leftLimit) & (newDirection <= 360 + rightLimit): 146 | passTest = True 147 | ### case 3: newDirection falls on the right of 0-360 148 | elif (newDirection >= leftLimit - 360) & (newDirection <= rightLimit): 149 | passTest = True 150 | ### case 4: newDirection equals 0-360 151 | elif ((newDirection == 0) | (newDirection == 360)) & ((leftLimit <= 360) & (rightLimit >= 0)): 152 | passTest = True 153 | 154 | return ("GetRandomRotation(" 155 | + "currentDirection = " + str(currentDirection) 156 | + ", angleLeftMax = " + str(angleLeftMax) 157 | + ", angleRightMax = " + str(angleRightMax) 158 | + ") -> newDirection = " 159 | + str(newDirection) + " | pass test = " + str(passTest)) 160 | 161 | Test_GetRandomRotation = staticmethod(Test_GetRandomRotation) 162 | 163 | def Test_MoveRandomFree(x, y, currentDirection, 164 | angleLeftMax = 180, 165 | angleRightMax = 180, 166 | moveDistanceMin = 1.0, 167 | moveDistanceMax = 1.0): 168 | ''' 169 | Checks if MoveRandomFree() returns a position and direction within the given specifications. Returns message. 170 | ''' 171 | ### create class instance 172 | randomWalker = Walker(x, y, currentDirection) 173 | 174 | return ("Walker(" 175 | + "x = " + str(x) 176 | + ", y = " + str(y) 177 | + ", currentDirection = " + str(currentDirection) + ") -> " 178 | + "MoveRandomFree(" 179 | + "angleLeftMax = " + str(angleLeftMax) 180 | + ", angleRightMax = " + str(angleRightMax) 181 | + ", moveDistanceMin = " + str(moveDistanceMin) 182 | + ", moveDistanceMax = " + str(moveDistanceMax) 183 | + ") -> (x,y,newDirection) = " 184 | + str(randomWalker.MoveRandomFree(angleLeftMax, angleRightMax, moveDistanceMin, moveDistanceMax))) 185 | 186 | Test_MoveRandomFree = staticmethod(Test_MoveRandomFree) 187 | 188 | def Test_MoveRandom(x, y, currentDirection, 189 | angleLeftMax = 180, 190 | angleRightMax = 180, 191 | moveDistanceMin = 1.0, 192 | moveDistanceMax = 1.0, 193 | worldDimensions = {'x':(-50,50), 'y':(-50,50)}): 194 | ''' 195 | Checks if MoveRandom() returns a position and direction within the given specifications. Returns message. 196 | ''' 197 | ### create class instance 198 | randomWalker = Walker(x, y, currentDirection) 199 | 200 | return ("Walker(" 201 | + "x = " + str(x) 202 | + ", y = " + str(y) 203 | + ", currentDirection = " + str(currentDirection) + ") -> " 204 | + "MoveRandom(" 205 | + "angleLeftMax = " + str(angleLeftMax) 206 | + ", angleRightMax = " + str(angleRightMax) 207 | + ", moveDistanceMin = " + str(moveDistanceMin) 208 | + ", moveDistanceMax = " + str(moveDistanceMax) 209 | + ", worldDimensions = " + str(worldDimensions) 210 | + ") returns (x,y,newDirection) = " 211 | + str(randomWalker.MoveRandom(angleLeftMax, angleRightMax, moveDistanceMin, moveDistanceMax, worldDimensions))) 212 | 213 | Test_MoveRandom = staticmethod(Test_MoveRandom) 214 | -------------------------------------------------------------------------------- /2022-Schmid-001/netlogo_implementation/moduleTitle.nlogo: -------------------------------------------------------------------------------- 1 | 2 | @#$#@#$#@ 3 | GRAPHICS-WINDOW 4 | 210 5 | 10 6 | 647 7 | 448 8 | -1 9 | -1 10 | 13.0 11 | 1 12 | 10 13 | 1 14 | 1 15 | 1 16 | 0 17 | 1 18 | 1 19 | 1 20 | -16 21 | 16 22 | -16 23 | 16 24 | 0 25 | 0 26 | 1 27 | ticks 28 | 30.0 29 | 30 | @#$#@#$#@ 31 | ## WHAT IS IT? 32 | 33 | (a general understanding of what the model is trying to show or explain) 34 | 35 | ## HOW IT WORKS 36 | 37 | (what rules the agents use to create the overall behavior of the model) 38 | 39 | ## HOW TO USE IT 40 | 41 | (how to use the model, including a description of each of the items in the Interface tab) 42 | 43 | ## THINGS TO NOTICE 44 | 45 | (suggested things for the user to notice while running the model) 46 | 47 | ## THINGS TO TRY 48 | 49 | (suggested things for the user to try to do (move sliders, switches, etc.) with the model) 50 | 51 | ## EXTENDING THE MODEL 52 | 53 | (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) 54 | 55 | ## NETLOGO FEATURES 56 | 57 | (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) 58 | 59 | ## RELATED MODELS 60 | 61 | (models in the NetLogo Models Library and elsewhere which are of related interest) 62 | 63 | ## CREDITS AND REFERENCES 64 | 65 | (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) 66 | @#$#@#$#@ 67 | default 68 | true 69 | 0 70 | Polygon -7500403 true true 150 5 40 250 150 205 260 250 71 | 72 | airplane 73 | true 74 | 0 75 | Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 76 | 77 | arrow 78 | true 79 | 0 80 | Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 81 | 82 | box 83 | false 84 | 0 85 | Polygon -7500403 true true 150 285 285 225 285 75 150 135 86 | Polygon -7500403 true true 150 135 15 75 150 15 285 75 87 | Polygon -7500403 true true 15 75 15 225 150 285 150 135 88 | Line -16777216 false 150 285 150 135 89 | Line -16777216 false 150 135 15 75 90 | Line -16777216 false 150 135 285 75 91 | 92 | bug 93 | true 94 | 0 95 | Circle -7500403 true true 96 182 108 96 | Circle -7500403 true true 110 127 80 97 | Circle -7500403 true true 110 75 80 98 | Line -7500403 true 150 100 80 30 99 | Line -7500403 true 150 100 220 30 100 | 101 | butterfly 102 | true 103 | 0 104 | Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 105 | Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 106 | Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 107 | Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 108 | Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 109 | Circle -16777216 true false 135 90 30 110 | Line -16777216 false 150 105 195 60 111 | Line -16777216 false 150 105 105 60 112 | 113 | car 114 | false 115 | 0 116 | Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 117 | Circle -16777216 true false 180 180 90 118 | Circle -16777216 true false 30 180 90 119 | Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 120 | Circle -7500403 true true 47 195 58 121 | Circle -7500403 true true 195 195 58 122 | 123 | circle 124 | false 125 | 0 126 | Circle -7500403 true true 0 0 300 127 | 128 | circle 2 129 | false 130 | 0 131 | Circle -7500403 true true 0 0 300 132 | Circle -16777216 true false 30 30 240 133 | 134 | cow 135 | false 136 | 0 137 | Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 138 | Polygon -7500403 true true 73 210 86 251 62 249 48 208 139 | Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 140 | 141 | cylinder 142 | false 143 | 0 144 | Circle -7500403 true true 0 0 300 145 | 146 | dot 147 | false 148 | 0 149 | Circle -7500403 true true 90 90 120 150 | 151 | face happy 152 | false 153 | 0 154 | Circle -7500403 true true 8 8 285 155 | Circle -16777216 true false 60 75 60 156 | Circle -16777216 true false 180 75 60 157 | Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 158 | 159 | face neutral 160 | false 161 | 0 162 | Circle -7500403 true true 8 7 285 163 | Circle -16777216 true false 60 75 60 164 | Circle -16777216 true false 180 75 60 165 | Rectangle -16777216 true false 60 195 240 225 166 | 167 | face sad 168 | false 169 | 0 170 | Circle -7500403 true true 8 8 285 171 | Circle -16777216 true false 60 75 60 172 | Circle -16777216 true false 180 75 60 173 | Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 174 | 175 | fish 176 | false 177 | 0 178 | Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 179 | Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 180 | Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 181 | Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 182 | Circle -16777216 true false 215 106 30 183 | 184 | flag 185 | false 186 | 0 187 | Rectangle -7500403 true true 60 15 75 300 188 | Polygon -7500403 true true 90 150 270 90 90 30 189 | Line -7500403 true 75 135 90 135 190 | Line -7500403 true 75 45 90 45 191 | 192 | flower 193 | false 194 | 0 195 | Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 196 | Circle -7500403 true true 85 132 38 197 | Circle -7500403 true true 130 147 38 198 | Circle -7500403 true true 192 85 38 199 | Circle -7500403 true true 85 40 38 200 | Circle -7500403 true true 177 40 38 201 | Circle -7500403 true true 177 132 38 202 | Circle -7500403 true true 70 85 38 203 | Circle -7500403 true true 130 25 38 204 | Circle -7500403 true true 96 51 108 205 | Circle -16777216 true false 113 68 74 206 | Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 207 | Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 208 | 209 | house 210 | false 211 | 0 212 | Rectangle -7500403 true true 45 120 255 285 213 | Rectangle -16777216 true false 120 210 180 285 214 | Polygon -7500403 true true 15 120 150 15 285 120 215 | Line -16777216 false 30 120 270 120 216 | 217 | leaf 218 | false 219 | 0 220 | Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 221 | Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 222 | 223 | line 224 | true 225 | 0 226 | Line -7500403 true 150 0 150 300 227 | 228 | line half 229 | true 230 | 0 231 | Line -7500403 true 150 0 150 150 232 | 233 | pentagon 234 | false 235 | 0 236 | Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 237 | 238 | person 239 | false 240 | 0 241 | Circle -7500403 true true 110 5 80 242 | Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 243 | Rectangle -7500403 true true 127 79 172 94 244 | Polygon -7500403 true true 195 90 240 150 225 180 165 105 245 | Polygon -7500403 true true 105 90 60 150 75 180 135 105 246 | 247 | plant 248 | false 249 | 0 250 | Rectangle -7500403 true true 135 90 165 300 251 | Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 252 | Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 253 | Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 254 | Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 255 | Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 256 | Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 257 | Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 258 | 259 | sheep 260 | false 261 | 15 262 | Circle -1 true true 203 65 88 263 | Circle -1 true true 70 65 162 264 | Circle -1 true true 150 105 120 265 | Polygon -7500403 true false 218 120 240 165 255 165 278 120 266 | Circle -7500403 true false 214 72 67 267 | Rectangle -1 true true 164 223 179 298 268 | Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 269 | Circle -1 true true 3 83 150 270 | Rectangle -1 true true 65 221 80 296 271 | Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 272 | Polygon -7500403 true false 276 85 285 105 302 99 294 83 273 | Polygon -7500403 true false 219 85 210 105 193 99 201 83 274 | 275 | square 276 | false 277 | 0 278 | Rectangle -7500403 true true 30 30 270 270 279 | 280 | square 2 281 | false 282 | 0 283 | Rectangle -7500403 true true 30 30 270 270 284 | Rectangle -16777216 true false 60 60 240 240 285 | 286 | star 287 | false 288 | 0 289 | Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 290 | 291 | target 292 | false 293 | 0 294 | Circle -7500403 true true 0 0 300 295 | Circle -16777216 true false 30 30 240 296 | Circle -7500403 true true 60 60 180 297 | Circle -16777216 true false 90 90 120 298 | Circle -7500403 true true 120 120 60 299 | 300 | tree 301 | false 302 | 0 303 | Circle -7500403 true true 118 3 94 304 | Rectangle -6459832 true false 120 195 180 300 305 | Circle -7500403 true true 65 21 108 306 | Circle -7500403 true true 116 41 127 307 | Circle -7500403 true true 45 90 120 308 | Circle -7500403 true true 104 74 152 309 | 310 | triangle 311 | false 312 | 0 313 | Polygon -7500403 true true 150 30 15 255 285 255 314 | 315 | triangle 2 316 | false 317 | 0 318 | Polygon -7500403 true true 150 30 15 255 285 255 319 | Polygon -16777216 true false 151 99 225 223 75 224 320 | 321 | truck 322 | false 323 | 0 324 | Rectangle -7500403 true true 4 45 195 187 325 | Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 326 | Rectangle -1 true false 195 60 195 105 327 | Polygon -16777216 true false 238 112 252 141 219 141 218 112 328 | Circle -16777216 true false 234 174 42 329 | Rectangle -7500403 true true 181 185 214 194 330 | Circle -16777216 true false 144 174 42 331 | Circle -16777216 true false 24 174 42 332 | Circle -7500403 false true 24 174 42 333 | Circle -7500403 false true 144 174 42 334 | Circle -7500403 false true 234 174 42 335 | 336 | turtle 337 | true 338 | 0 339 | Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 340 | Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 341 | Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 342 | Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 343 | Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 344 | Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 345 | 346 | wheel 347 | false 348 | 0 349 | Circle -7500403 true true 3 3 294 350 | Circle -16777216 true false 30 30 240 351 | Line -7500403 true 150 285 150 15 352 | Line -7500403 true 15 150 285 150 353 | Circle -7500403 true true 120 120 60 354 | Line -7500403 true 216 40 79 269 355 | Line -7500403 true 40 84 269 221 356 | Line -7500403 true 40 216 269 79 357 | Line -7500403 true 84 40 221 269 358 | 359 | wolf 360 | false 361 | 0 362 | Polygon -16777216 true false 253 133 245 131 245 133 363 | Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 364 | Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 365 | 366 | x 367 | false 368 | 0 369 | Polygon -7500403 true true 270 75 225 30 30 225 75 270 370 | Polygon -7500403 true true 30 75 75 30 270 225 225 270 371 | @#$#@#$#@ 372 | NetLogo 6.2.2 373 | @#$#@#$#@ 374 | @#$#@#$#@ 375 | @#$#@#$#@ 376 | @#$#@#$#@ 377 | @#$#@#$#@ 378 | default 379 | 0.0 380 | -0.2 0 0.0 1.0 381 | 0.0 1 1.0 0.0 382 | 0.2 0 0.0 1.0 383 | link direction 384 | true 385 | 0 386 | Line -7500403 true 150 150 90 180 387 | Line -7500403 true 150 150 210 180 388 | @#$#@#$#@ 389 | 0 390 | @#$#@#$#@ 391 | -------------------------------------------------------------------------------- /0000-NASSA-001-TEMPLATE/netlogo_implementation/moduleTitle.nlogo: -------------------------------------------------------------------------------- 1 | 2 | @#$#@#$#@ 3 | GRAPHICS-WINDOW 4 | 210 5 | 10 6 | 647 7 | 448 8 | -1 9 | -1 10 | 13.0 11 | 1 12 | 10 13 | 1 14 | 1 15 | 1 16 | 0 17 | 1 18 | 1 19 | 1 20 | -16 21 | 16 22 | -16 23 | 16 24 | 0 25 | 0 26 | 1 27 | ticks 28 | 30.0 29 | 30 | @#$#@#$#@ 31 | ## WHAT IS IT? 32 | 33 | (a general understanding of what the model is trying to show or explain) 34 | 35 | ## HOW IT WORKS 36 | 37 | (what rules the agents use to create the overall behavior of the model) 38 | 39 | ## HOW TO USE IT 40 | 41 | (how to use the model, including a description of each of the items in the Interface tab) 42 | 43 | ## THINGS TO NOTICE 44 | 45 | (suggested things for the user to notice while running the model) 46 | 47 | ## THINGS TO TRY 48 | 49 | (suggested things for the user to try to do (move sliders, switches, etc.) with the model) 50 | 51 | ## EXTENDING THE MODEL 52 | 53 | (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) 54 | 55 | ## NETLOGO FEATURES 56 | 57 | (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) 58 | 59 | ## RELATED MODELS 60 | 61 | (models in the NetLogo Models Library and elsewhere which are of related interest) 62 | 63 | ## CREDITS AND REFERENCES 64 | 65 | (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) 66 | @#$#@#$#@ 67 | default 68 | true 69 | 0 70 | Polygon -7500403 true true 150 5 40 250 150 205 260 250 71 | 72 | airplane 73 | true 74 | 0 75 | Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 76 | 77 | arrow 78 | true 79 | 0 80 | Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 81 | 82 | box 83 | false 84 | 0 85 | Polygon -7500403 true true 150 285 285 225 285 75 150 135 86 | Polygon -7500403 true true 150 135 15 75 150 15 285 75 87 | Polygon -7500403 true true 15 75 15 225 150 285 150 135 88 | Line -16777216 false 150 285 150 135 89 | Line -16777216 false 150 135 15 75 90 | Line -16777216 false 150 135 285 75 91 | 92 | bug 93 | true 94 | 0 95 | Circle -7500403 true true 96 182 108 96 | Circle -7500403 true true 110 127 80 97 | Circle -7500403 true true 110 75 80 98 | Line -7500403 true 150 100 80 30 99 | Line -7500403 true 150 100 220 30 100 | 101 | butterfly 102 | true 103 | 0 104 | Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 105 | Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 106 | Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 107 | Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 108 | Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 109 | Circle -16777216 true false 135 90 30 110 | Line -16777216 false 150 105 195 60 111 | Line -16777216 false 150 105 105 60 112 | 113 | car 114 | false 115 | 0 116 | Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 117 | Circle -16777216 true false 180 180 90 118 | Circle -16777216 true false 30 180 90 119 | Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 120 | Circle -7500403 true true 47 195 58 121 | Circle -7500403 true true 195 195 58 122 | 123 | circle 124 | false 125 | 0 126 | Circle -7500403 true true 0 0 300 127 | 128 | circle 2 129 | false 130 | 0 131 | Circle -7500403 true true 0 0 300 132 | Circle -16777216 true false 30 30 240 133 | 134 | cow 135 | false 136 | 0 137 | Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 138 | Polygon -7500403 true true 73 210 86 251 62 249 48 208 139 | Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 140 | 141 | cylinder 142 | false 143 | 0 144 | Circle -7500403 true true 0 0 300 145 | 146 | dot 147 | false 148 | 0 149 | Circle -7500403 true true 90 90 120 150 | 151 | face happy 152 | false 153 | 0 154 | Circle -7500403 true true 8 8 285 155 | Circle -16777216 true false 60 75 60 156 | Circle -16777216 true false 180 75 60 157 | Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 158 | 159 | face neutral 160 | false 161 | 0 162 | Circle -7500403 true true 8 7 285 163 | Circle -16777216 true false 60 75 60 164 | Circle -16777216 true false 180 75 60 165 | Rectangle -16777216 true false 60 195 240 225 166 | 167 | face sad 168 | false 169 | 0 170 | Circle -7500403 true true 8 8 285 171 | Circle -16777216 true false 60 75 60 172 | Circle -16777216 true false 180 75 60 173 | Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 174 | 175 | fish 176 | false 177 | 0 178 | Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 179 | Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 180 | Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 181 | Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 182 | Circle -16777216 true false 215 106 30 183 | 184 | flag 185 | false 186 | 0 187 | Rectangle -7500403 true true 60 15 75 300 188 | Polygon -7500403 true true 90 150 270 90 90 30 189 | Line -7500403 true 75 135 90 135 190 | Line -7500403 true 75 45 90 45 191 | 192 | flower 193 | false 194 | 0 195 | Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 196 | Circle -7500403 true true 85 132 38 197 | Circle -7500403 true true 130 147 38 198 | Circle -7500403 true true 192 85 38 199 | Circle -7500403 true true 85 40 38 200 | Circle -7500403 true true 177 40 38 201 | Circle -7500403 true true 177 132 38 202 | Circle -7500403 true true 70 85 38 203 | Circle -7500403 true true 130 25 38 204 | Circle -7500403 true true 96 51 108 205 | Circle -16777216 true false 113 68 74 206 | Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 207 | Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 208 | 209 | house 210 | false 211 | 0 212 | Rectangle -7500403 true true 45 120 255 285 213 | Rectangle -16777216 true false 120 210 180 285 214 | Polygon -7500403 true true 15 120 150 15 285 120 215 | Line -16777216 false 30 120 270 120 216 | 217 | leaf 218 | false 219 | 0 220 | Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 221 | Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 222 | 223 | line 224 | true 225 | 0 226 | Line -7500403 true 150 0 150 300 227 | 228 | line half 229 | true 230 | 0 231 | Line -7500403 true 150 0 150 150 232 | 233 | pentagon 234 | false 235 | 0 236 | Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 237 | 238 | person 239 | false 240 | 0 241 | Circle -7500403 true true 110 5 80 242 | Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 243 | Rectangle -7500403 true true 127 79 172 94 244 | Polygon -7500403 true true 195 90 240 150 225 180 165 105 245 | Polygon -7500403 true true 105 90 60 150 75 180 135 105 246 | 247 | plant 248 | false 249 | 0 250 | Rectangle -7500403 true true 135 90 165 300 251 | Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 252 | Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 253 | Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 254 | Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 255 | Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 256 | Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 257 | Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 258 | 259 | sheep 260 | false 261 | 15 262 | Circle -1 true true 203 65 88 263 | Circle -1 true true 70 65 162 264 | Circle -1 true true 150 105 120 265 | Polygon -7500403 true false 218 120 240 165 255 165 278 120 266 | Circle -7500403 true false 214 72 67 267 | Rectangle -1 true true 164 223 179 298 268 | Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 269 | Circle -1 true true 3 83 150 270 | Rectangle -1 true true 65 221 80 296 271 | Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 272 | Polygon -7500403 true false 276 85 285 105 302 99 294 83 273 | Polygon -7500403 true false 219 85 210 105 193 99 201 83 274 | 275 | square 276 | false 277 | 0 278 | Rectangle -7500403 true true 30 30 270 270 279 | 280 | square 2 281 | false 282 | 0 283 | Rectangle -7500403 true true 30 30 270 270 284 | Rectangle -16777216 true false 60 60 240 240 285 | 286 | star 287 | false 288 | 0 289 | Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 290 | 291 | target 292 | false 293 | 0 294 | Circle -7500403 true true 0 0 300 295 | Circle -16777216 true false 30 30 240 296 | Circle -7500403 true true 60 60 180 297 | Circle -16777216 true false 90 90 120 298 | Circle -7500403 true true 120 120 60 299 | 300 | tree 301 | false 302 | 0 303 | Circle -7500403 true true 118 3 94 304 | Rectangle -6459832 true false 120 195 180 300 305 | Circle -7500403 true true 65 21 108 306 | Circle -7500403 true true 116 41 127 307 | Circle -7500403 true true 45 90 120 308 | Circle -7500403 true true 104 74 152 309 | 310 | triangle 311 | false 312 | 0 313 | Polygon -7500403 true true 150 30 15 255 285 255 314 | 315 | triangle 2 316 | false 317 | 0 318 | Polygon -7500403 true true 150 30 15 255 285 255 319 | Polygon -16777216 true false 151 99 225 223 75 224 320 | 321 | truck 322 | false 323 | 0 324 | Rectangle -7500403 true true 4 45 195 187 325 | Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 326 | Rectangle -1 true false 195 60 195 105 327 | Polygon -16777216 true false 238 112 252 141 219 141 218 112 328 | Circle -16777216 true false 234 174 42 329 | Rectangle -7500403 true true 181 185 214 194 330 | Circle -16777216 true false 144 174 42 331 | Circle -16777216 true false 24 174 42 332 | Circle -7500403 false true 24 174 42 333 | Circle -7500403 false true 144 174 42 334 | Circle -7500403 false true 234 174 42 335 | 336 | turtle 337 | true 338 | 0 339 | Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 340 | Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 341 | Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 342 | Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 343 | Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 344 | Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 345 | 346 | wheel 347 | false 348 | 0 349 | Circle -7500403 true true 3 3 294 350 | Circle -16777216 true false 30 30 240 351 | Line -7500403 true 150 285 150 15 352 | Line -7500403 true 15 150 285 150 353 | Circle -7500403 true true 120 120 60 354 | Line -7500403 true 216 40 79 269 355 | Line -7500403 true 40 84 269 221 356 | Line -7500403 true 40 216 269 79 357 | Line -7500403 true 84 40 221 269 358 | 359 | wolf 360 | false 361 | 0 362 | Polygon -16777216 true false 253 133 245 131 245 133 363 | Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 364 | Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 365 | 366 | x 367 | false 368 | 0 369 | Polygon -7500403 true true 270 75 225 30 30 225 75 270 370 | Polygon -7500403 true true 30 75 75 30 270 225 225 270 371 | @#$#@#$#@ 372 | NetLogo 6.2.2 373 | @#$#@#$#@ 374 | @#$#@#$#@ 375 | @#$#@#$#@ 376 | @#$#@#$#@ 377 | @#$#@#$#@ 378 | default 379 | 0.0 380 | -0.2 0 0.0 1.0 381 | 0.0 1 1.0 0.0 382 | 0.2 0 0.0 1.0 383 | link direction 384 | true 385 | 0 386 | Line -7500403 true 150 150 90 180 387 | Line -7500403 true 150 150 210 180 388 | @#$#@#$#@ 389 | 0 390 | @#$#@#$#@ 391 | -------------------------------------------------------------------------------- /2022-Romanowska-001/netlogo_implementation/LoadWorldImageAndPlaceAgents.nlogo: -------------------------------------------------------------------------------- 1 | ; Set up a certain number of agents at a certain location in a given world. 2 | ; Input: world file, number of agents, x-starting location, y-starting location 3 | 4 | to setup 5 | 6 | clear-all 7 | 8 | ;; import spatial input data 9 | ;; (BMP, JPG, GIF, and PNG; see import-pcolors in Help > NetLogo Dictionary) 10 | import-pcolors worldDataFile ; example file name is "worldAboveSeaLevelElevation.png" 11 | ;; NOTE: this will work whatever is the size of the world set in NetLogo's interface ("Settings") 12 | ;; However, you may want to match the world size with the input data dimensions (width and height to max-pxcor and max-pycor). 13 | 14 | let number-turtles numberOfTurtles ; example: 10 agents 15 | 16 | let x inputX 17 | let y inputY 18 | 19 | create-turtles number-turtles 20 | [ 21 | ;; agents are created and placed at a specific point (x, y) 22 | setxy x y ; x and y can be float 23 | ;; or equivalent alternative using move-to primitive 24 | ; move-to patch x y ; x and y MUST be integers 25 | ] 26 | 27 | ;; use this to mark the point where agents where created 28 | ask patch x y [ set plabel "X" set plabel-color black] 29 | 30 | end 31 | @#$#@#$#@ 32 | GRAPHICS-WINDOW 33 | 208 34 | 10 35 | 816 36 | 370 37 | -1 38 | -1 39 | 1.0 40 | 1 41 | 10 42 | 1 43 | 1 44 | 1 45 | 0 46 | 1 47 | 0 48 | 1 49 | 0 50 | 599 51 | 0 52 | 350 53 | 0 54 | 0 55 | 1 56 | ticks 57 | 30.0 58 | 59 | BUTTON 60 | 70 61 | 220 62 | 133 63 | 253 64 | NIL 65 | setup 66 | NIL 67 | 1 68 | T 69 | OBSERVER 70 | NIL 71 | NIL 72 | NIL 73 | NIL 74 | 1 75 | 76 | INPUTBOX 77 | 38 78 | 149 79 | 100 80 | 209 81 | inputX 82 | 361.0 83 | 1 84 | 0 85 | Number 86 | 87 | INPUTBOX 88 | 106 89 | 149 90 | 174 91 | 209 92 | inputY 93 | 176.0 94 | 1 95 | 0 96 | Number 97 | 98 | INPUTBOX 99 | 2 100 | 16 101 | 209 102 | 76 103 | worldDataFile 104 | worldAboveSeaLevelElevation.png 105 | 1 106 | 0 107 | String 108 | 109 | INPUTBOX 110 | 29 111 | 83 112 | 184 113 | 143 114 | numberOfTurtles 115 | 20.0 116 | 1 117 | 0 118 | Number 119 | 120 | @#$#@#$#@ 121 | ## WHAT IS IT? 122 | 123 | (a general understanding of what the model is trying to show or explain) 124 | 125 | ## HOW IT WORKS 126 | 127 | (what rules the agents use to create the overall behavior of the model) 128 | 129 | ## HOW TO USE IT 130 | 131 | (how to use the model, including a description of each of the items in the Interface tab) 132 | 133 | ## THINGS TO NOTICE 134 | 135 | (suggested things for the user to notice while running the model) 136 | 137 | ## THINGS TO TRY 138 | 139 | (suggested things for the user to try to do (move sliders, switches, etc.) with the model) 140 | 141 | ## EXTENDING THE MODEL 142 | 143 | (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) 144 | 145 | ## NETLOGO FEATURES 146 | 147 | (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) 148 | 149 | ## RELATED MODELS 150 | 151 | (models in the NetLogo Models Library and elsewhere which are of related interest) 152 | 153 | ## CREDITS AND REFERENCES 154 | 155 | (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) 156 | @#$#@#$#@ 157 | default 158 | true 159 | 0 160 | Polygon -7500403 true true 150 5 40 250 150 205 260 250 161 | 162 | airplane 163 | true 164 | 0 165 | Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 166 | 167 | arrow 168 | true 169 | 0 170 | Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 171 | 172 | box 173 | false 174 | 0 175 | Polygon -7500403 true true 150 285 285 225 285 75 150 135 176 | Polygon -7500403 true true 150 135 15 75 150 15 285 75 177 | Polygon -7500403 true true 15 75 15 225 150 285 150 135 178 | Line -16777216 false 150 285 150 135 179 | Line -16777216 false 150 135 15 75 180 | Line -16777216 false 150 135 285 75 181 | 182 | bug 183 | true 184 | 0 185 | Circle -7500403 true true 96 182 108 186 | Circle -7500403 true true 110 127 80 187 | Circle -7500403 true true 110 75 80 188 | Line -7500403 true 150 100 80 30 189 | Line -7500403 true 150 100 220 30 190 | 191 | butterfly 192 | true 193 | 0 194 | Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 195 | Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 196 | Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 197 | Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 198 | Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 199 | Circle -16777216 true false 135 90 30 200 | Line -16777216 false 150 105 195 60 201 | Line -16777216 false 150 105 105 60 202 | 203 | car 204 | false 205 | 0 206 | Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 207 | Circle -16777216 true false 180 180 90 208 | Circle -16777216 true false 30 180 90 209 | Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 210 | Circle -7500403 true true 47 195 58 211 | Circle -7500403 true true 195 195 58 212 | 213 | circle 214 | false 215 | 0 216 | Circle -7500403 true true 0 0 300 217 | 218 | circle 2 219 | false 220 | 0 221 | Circle -7500403 true true 0 0 300 222 | Circle -16777216 true false 30 30 240 223 | 224 | cow 225 | false 226 | 0 227 | Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 228 | Polygon -7500403 true true 73 210 86 251 62 249 48 208 229 | Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 230 | 231 | cylinder 232 | false 233 | 0 234 | Circle -7500403 true true 0 0 300 235 | 236 | dot 237 | false 238 | 0 239 | Circle -7500403 true true 90 90 120 240 | 241 | face happy 242 | false 243 | 0 244 | Circle -7500403 true true 8 8 285 245 | Circle -16777216 true false 60 75 60 246 | Circle -16777216 true false 180 75 60 247 | Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 248 | 249 | face neutral 250 | false 251 | 0 252 | Circle -7500403 true true 8 7 285 253 | Circle -16777216 true false 60 75 60 254 | Circle -16777216 true false 180 75 60 255 | Rectangle -16777216 true false 60 195 240 225 256 | 257 | face sad 258 | false 259 | 0 260 | Circle -7500403 true true 8 8 285 261 | Circle -16777216 true false 60 75 60 262 | Circle -16777216 true false 180 75 60 263 | Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 264 | 265 | fish 266 | false 267 | 0 268 | Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 269 | Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 270 | Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 271 | Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 272 | Circle -16777216 true false 215 106 30 273 | 274 | flag 275 | false 276 | 0 277 | Rectangle -7500403 true true 60 15 75 300 278 | Polygon -7500403 true true 90 150 270 90 90 30 279 | Line -7500403 true 75 135 90 135 280 | Line -7500403 true 75 45 90 45 281 | 282 | flower 283 | false 284 | 0 285 | Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 286 | Circle -7500403 true true 85 132 38 287 | Circle -7500403 true true 130 147 38 288 | Circle -7500403 true true 192 85 38 289 | Circle -7500403 true true 85 40 38 290 | Circle -7500403 true true 177 40 38 291 | Circle -7500403 true true 177 132 38 292 | Circle -7500403 true true 70 85 38 293 | Circle -7500403 true true 130 25 38 294 | Circle -7500403 true true 96 51 108 295 | Circle -16777216 true false 113 68 74 296 | Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 297 | Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 298 | 299 | house 300 | false 301 | 0 302 | Rectangle -7500403 true true 45 120 255 285 303 | Rectangle -16777216 true false 120 210 180 285 304 | Polygon -7500403 true true 15 120 150 15 285 120 305 | Line -16777216 false 30 120 270 120 306 | 307 | leaf 308 | false 309 | 0 310 | Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 311 | Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 312 | 313 | line 314 | true 315 | 0 316 | Line -7500403 true 150 0 150 300 317 | 318 | line half 319 | true 320 | 0 321 | Line -7500403 true 150 0 150 150 322 | 323 | pentagon 324 | false 325 | 0 326 | Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 327 | 328 | person 329 | false 330 | 0 331 | Circle -7500403 true true 110 5 80 332 | Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 333 | Rectangle -7500403 true true 127 79 172 94 334 | Polygon -7500403 true true 195 90 240 150 225 180 165 105 335 | Polygon -7500403 true true 105 90 60 150 75 180 135 105 336 | 337 | plant 338 | false 339 | 0 340 | Rectangle -7500403 true true 135 90 165 300 341 | Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 342 | Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 343 | Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 344 | Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 345 | Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 346 | Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 347 | Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 348 | 349 | sheep 350 | false 351 | 15 352 | Circle -1 true true 203 65 88 353 | Circle -1 true true 70 65 162 354 | Circle -1 true true 150 105 120 355 | Polygon -7500403 true false 218 120 240 165 255 165 278 120 356 | Circle -7500403 true false 214 72 67 357 | Rectangle -1 true true 164 223 179 298 358 | Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 359 | Circle -1 true true 3 83 150 360 | Rectangle -1 true true 65 221 80 296 361 | Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 362 | Polygon -7500403 true false 276 85 285 105 302 99 294 83 363 | Polygon -7500403 true false 219 85 210 105 193 99 201 83 364 | 365 | square 366 | false 367 | 0 368 | Rectangle -7500403 true true 30 30 270 270 369 | 370 | square 2 371 | false 372 | 0 373 | Rectangle -7500403 true true 30 30 270 270 374 | Rectangle -16777216 true false 60 60 240 240 375 | 376 | star 377 | false 378 | 0 379 | Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 380 | 381 | target 382 | false 383 | 0 384 | Circle -7500403 true true 0 0 300 385 | Circle -16777216 true false 30 30 240 386 | Circle -7500403 true true 60 60 180 387 | Circle -16777216 true false 90 90 120 388 | Circle -7500403 true true 120 120 60 389 | 390 | tree 391 | false 392 | 0 393 | Circle -7500403 true true 118 3 94 394 | Rectangle -6459832 true false 120 195 180 300 395 | Circle -7500403 true true 65 21 108 396 | Circle -7500403 true true 116 41 127 397 | Circle -7500403 true true 45 90 120 398 | Circle -7500403 true true 104 74 152 399 | 400 | triangle 401 | false 402 | 0 403 | Polygon -7500403 true true 150 30 15 255 285 255 404 | 405 | triangle 2 406 | false 407 | 0 408 | Polygon -7500403 true true 150 30 15 255 285 255 409 | Polygon -16777216 true false 151 99 225 223 75 224 410 | 411 | truck 412 | false 413 | 0 414 | Rectangle -7500403 true true 4 45 195 187 415 | Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 416 | Rectangle -1 true false 195 60 195 105 417 | Polygon -16777216 true false 238 112 252 141 219 141 218 112 418 | Circle -16777216 true false 234 174 42 419 | Rectangle -7500403 true true 181 185 214 194 420 | Circle -16777216 true false 144 174 42 421 | Circle -16777216 true false 24 174 42 422 | Circle -7500403 false true 24 174 42 423 | Circle -7500403 false true 144 174 42 424 | Circle -7500403 false true 234 174 42 425 | 426 | turtle 427 | true 428 | 0 429 | Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 430 | Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 431 | Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 432 | Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 433 | Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 434 | Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 435 | 436 | wheel 437 | false 438 | 0 439 | Circle -7500403 true true 3 3 294 440 | Circle -16777216 true false 30 30 240 441 | Line -7500403 true 150 285 150 15 442 | Line -7500403 true 15 150 285 150 443 | Circle -7500403 true true 120 120 60 444 | Line -7500403 true 216 40 79 269 445 | Line -7500403 true 40 84 269 221 446 | Line -7500403 true 40 216 269 79 447 | Line -7500403 true 84 40 221 269 448 | 449 | wolf 450 | false 451 | 0 452 | Polygon -16777216 true false 253 133 245 131 245 133 453 | Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 454 | Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 455 | 456 | x 457 | false 458 | 0 459 | Polygon -7500403 true true 270 75 225 30 30 225 75 270 460 | Polygon -7500403 true true 30 75 75 30 270 225 225 270 461 | @#$#@#$#@ 462 | NetLogo 6.0.4 463 | @#$#@#$#@ 464 | @#$#@#$#@ 465 | @#$#@#$#@ 466 | @#$#@#$#@ 467 | @#$#@#$#@ 468 | default 469 | 0.0 470 | -0.2 0 0.0 1.0 471 | 0.0 1 1.0 0.0 472 | 0.2 0 0.0 1.0 473 | link direction 474 | true 475 | 0 476 | Line -7500403 true 150 150 90 180 477 | Line -7500403 true 150 150 210 180 478 | @#$#@#$#@ 479 | 0 480 | @#$#@#$#@ 481 | -------------------------------------------------------------------------------- /2022-Romanowska-002/netlogo_implementation/Out of Africa dispersal - Conditional isotropic diffusion.nlogo: -------------------------------------------------------------------------------- 1 | ;;; Global procedures 2 | 3 | to setup 4 | 5 | clear-all 6 | 7 | ;; import spatial input data 8 | ;; (BMP, JPG, GIF, and PNG; see import-pcolors in Help > NetLogo Dictionary) 9 | import-pcolors worldDataFile ; example file name is "worldAboveSeaLevelElevation.png" 10 | ;; NOTE: this will work whatever is the size of the world set in NetLogo's interface ("Settings") 11 | ;; However, you may want to match the world size with the input data dimensions (width and height to max-pxcor and max-pycor). 12 | 13 | let number-turtles numberOfTurtles 14 | 15 | let x inputX 16 | let y inputY 17 | 18 | create-turtles number-turtles 19 | [ ; with the following state variables: 20 | set color random 140 ; random color from NetLogo palette (from 0 to 140) 21 | set size 2 ; size 22 | set shape "turtle" ; shape 23 | ;; agents are created and placed randomly within a distance from a specific point (x, y) 24 | let thisAgentX (x - maxInitialDistanceFromPoint) + random (2 * maxInitialDistanceFromPoint) 25 | let thisAgentY (y - maxInitialDistanceFromPoint) + random (2 * maxInitialDistanceFromPoint) 26 | setxy x y ; x and y can be float 27 | ;; or equivalent alternative using move-to primitive 28 | ; move-to patch x y ; x and y MUST be integers 29 | ] 30 | 31 | ;; use this to mark the point where turtles where created 32 | ask patch x y [ set plabel "X" set plabel-color black] 33 | 34 | reset-ticks 35 | 36 | end 37 | 38 | to go 39 | 40 | reproduce-population 41 | 42 | tick 43 | 44 | end 45 | 46 | to reproduce-population 47 | 48 | ;; iterate for each turtle 49 | ask turtles 50 | [ 51 | try-to-reproduce 52 | ] 53 | 54 | end 55 | 56 | ;;; Turtle (agent) procedures 57 | 58 | to try-to-reproduce 59 | 60 | ;; reproduce with a probability equal to the pop_growth (slider) 61 | if (random-float 1 <= pop_growth) 62 | [ 63 | ;; try to select a neibouring free land patch 64 | let emptyPatch one-of neighbors4 with [count turtles-here = 0 AND pcolor != white] 65 | 66 | if (emptyPatch != nobody) 67 | [ 68 | ;; if there is a neibouring free land patch, reproduce the turtle there 69 | reproduce-at emptyPatch 70 | ] 71 | ] 72 | 73 | end 74 | 75 | to reproduce-at [ aPatch ] 76 | 77 | hatch 1 78 | [ 79 | set color color + 0.1 ; new turtles are clones of parents but we change the color a bit 80 | move-to aPatch ; move the newly hatched turtle to a new patch 81 | ] 82 | 83 | end 84 | @#$#@#$#@ 85 | GRAPHICS-WINDOW 86 | 208 87 | 10 88 | 816 89 | 370 90 | -1 91 | -1 92 | 1.0 93 | 1 94 | 10 95 | 1 96 | 1 97 | 1 98 | 0 99 | 1 100 | 0 101 | 1 102 | 0 103 | 599 104 | 0 105 | 350 106 | 0 107 | 0 108 | 1 109 | ticks 110 | 30.0 111 | 112 | BUTTON 113 | 8 114 | 13 115 | 75 116 | 46 117 | NIL 118 | setup 119 | NIL 120 | 1 121 | T 122 | OBSERVER 123 | NIL 124 | NIL 125 | NIL 126 | NIL 127 | 1 128 | 129 | BUTTON 130 | 82 131 | 13 132 | 145 133 | 46 134 | NIL 135 | go 136 | T 137 | 1 138 | T 139 | OBSERVER 140 | NIL 141 | NIL 142 | NIL 143 | NIL 144 | 1 145 | 146 | SLIDER 147 | 21 148 | 304 149 | 193 150 | 337 151 | pop_growth 152 | pop_growth 153 | 0 154 | 1 155 | 0.3 156 | 0.05 157 | 1 158 | NIL 159 | HORIZONTAL 160 | 161 | INPUTBOX 162 | 9 163 | 54 164 | 205 165 | 114 166 | worldDataFile 167 | worldAboveSeaLevelElevation.png 168 | 1 169 | 0 170 | String 171 | 172 | INPUTBOX 173 | 60 174 | 115 175 | 153 176 | 175 177 | numberOfTurtles 178 | 20.0 179 | 1 180 | 0 181 | Number 182 | 183 | INPUTBOX 184 | 8 185 | 176 186 | 105 187 | 236 188 | inputX 189 | 361.0 190 | 1 191 | 0 192 | Number 193 | 194 | INPUTBOX 195 | 108 196 | 176 197 | 205 198 | 236 199 | inputY 200 | 176.0 201 | 1 202 | 0 203 | Number 204 | 205 | SLIDER 206 | 0 207 | 244 208 | 207 209 | 277 210 | maxInitialDistanceFromPoint 211 | maxInitialDistanceFromPoint 212 | 0 213 | 10 214 | 2.0 215 | 1 216 | 1 217 | patches 218 | HORIZONTAL 219 | 220 | @#$#@#$#@ 221 | ## WHAT IS IT? 222 | 223 | A reimplementation of the classical study by Young and Bettinger (1992) investigating the possible drivers behind the Out of Africa dispersal of modern humans. 224 | 225 | Young, D. A., \& Bettinger, R. L. (1992). The Numic Spread: A Computer 226 | Simulation. American Antiquity, 57 (1), 85--99. 227 | 228 | This is an example model used in chapter 1 of Romanowska, I., Wren, C., Crabtree, S. 2021. Agent-Based Modeling for Archaeology: Simulating the Complexity of Societies. Santa Fe, NM: SFI Press. 229 | 230 | Chapter 1. Code Blocks: 1.0-1.11 231 | 232 | ## HOW IT WORKS 233 | 234 | Agents reproduce with a probability equal to population-growth (user setting) and the availability of empty cells in their immediate neighbourhood that are not water cells. 235 | 236 | ## HOW TO USE IT 237 | 238 | Use the pop-growth slider to explore the relationship between population growth and the rate of dispersal. Use the speed slider at the top of the interface to slow down the model and see the dynamics. 239 | 240 | ## EXTENDING THE MODEL 241 | 242 | See the exercise solutions. 243 | @#$#@#$#@ 244 | default 245 | true 246 | 0 247 | Polygon -7500403 true true 150 5 40 250 150 205 260 250 248 | 249 | airplane 250 | true 251 | 0 252 | Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 253 | 254 | arrow 255 | true 256 | 0 257 | Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 258 | 259 | box 260 | false 261 | 0 262 | Polygon -7500403 true true 150 285 285 225 285 75 150 135 263 | Polygon -7500403 true true 150 135 15 75 150 15 285 75 264 | Polygon -7500403 true true 15 75 15 225 150 285 150 135 265 | Line -16777216 false 150 285 150 135 266 | Line -16777216 false 150 135 15 75 267 | Line -16777216 false 150 135 285 75 268 | 269 | bug 270 | true 271 | 0 272 | Circle -7500403 true true 96 182 108 273 | Circle -7500403 true true 110 127 80 274 | Circle -7500403 true true 110 75 80 275 | Line -7500403 true 150 100 80 30 276 | Line -7500403 true 150 100 220 30 277 | 278 | butterfly 279 | true 280 | 0 281 | Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 282 | Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 283 | Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 284 | Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 285 | Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 286 | Circle -16777216 true false 135 90 30 287 | Line -16777216 false 150 105 195 60 288 | Line -16777216 false 150 105 105 60 289 | 290 | car 291 | false 292 | 0 293 | Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 294 | Circle -16777216 true false 180 180 90 295 | Circle -16777216 true false 30 180 90 296 | Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 297 | Circle -7500403 true true 47 195 58 298 | Circle -7500403 true true 195 195 58 299 | 300 | circle 301 | false 302 | 0 303 | Circle -7500403 true true 0 0 300 304 | 305 | circle 2 306 | false 307 | 0 308 | Circle -7500403 true true 0 0 300 309 | Circle -16777216 true false 30 30 240 310 | 311 | cow 312 | false 313 | 0 314 | Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 315 | Polygon -7500403 true true 73 210 86 251 62 249 48 208 316 | Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 317 | 318 | cylinder 319 | false 320 | 0 321 | Circle -7500403 true true 0 0 300 322 | 323 | dot 324 | false 325 | 0 326 | Circle -7500403 true true 90 90 120 327 | 328 | face happy 329 | false 330 | 0 331 | Circle -7500403 true true 8 8 285 332 | Circle -16777216 true false 60 75 60 333 | Circle -16777216 true false 180 75 60 334 | Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 335 | 336 | face neutral 337 | false 338 | 0 339 | Circle -7500403 true true 8 7 285 340 | Circle -16777216 true false 60 75 60 341 | Circle -16777216 true false 180 75 60 342 | Rectangle -16777216 true false 60 195 240 225 343 | 344 | face sad 345 | false 346 | 0 347 | Circle -7500403 true true 8 8 285 348 | Circle -16777216 true false 60 75 60 349 | Circle -16777216 true false 180 75 60 350 | Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 351 | 352 | fish 353 | false 354 | 0 355 | Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 356 | Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 357 | Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 358 | Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 359 | Circle -16777216 true false 215 106 30 360 | 361 | flag 362 | false 363 | 0 364 | Rectangle -7500403 true true 60 15 75 300 365 | Polygon -7500403 true true 90 150 270 90 90 30 366 | Line -7500403 true 75 135 90 135 367 | Line -7500403 true 75 45 90 45 368 | 369 | flower 370 | false 371 | 0 372 | Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 373 | Circle -7500403 true true 85 132 38 374 | Circle -7500403 true true 130 147 38 375 | Circle -7500403 true true 192 85 38 376 | Circle -7500403 true true 85 40 38 377 | Circle -7500403 true true 177 40 38 378 | Circle -7500403 true true 177 132 38 379 | Circle -7500403 true true 70 85 38 380 | Circle -7500403 true true 130 25 38 381 | Circle -7500403 true true 96 51 108 382 | Circle -16777216 true false 113 68 74 383 | Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 384 | Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 385 | 386 | house 387 | false 388 | 0 389 | Rectangle -7500403 true true 45 120 255 285 390 | Rectangle -16777216 true false 120 210 180 285 391 | Polygon -7500403 true true 15 120 150 15 285 120 392 | Line -16777216 false 30 120 270 120 393 | 394 | leaf 395 | false 396 | 0 397 | Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 398 | Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 399 | 400 | line 401 | true 402 | 0 403 | Line -7500403 true 150 0 150 300 404 | 405 | line half 406 | true 407 | 0 408 | Line -7500403 true 150 0 150 150 409 | 410 | pentagon 411 | false 412 | 0 413 | Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 414 | 415 | person 416 | false 417 | 0 418 | Circle -7500403 true true 110 5 80 419 | Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 420 | Rectangle -7500403 true true 127 79 172 94 421 | Polygon -7500403 true true 195 90 240 150 225 180 165 105 422 | Polygon -7500403 true true 105 90 60 150 75 180 135 105 423 | 424 | plant 425 | false 426 | 0 427 | Rectangle -7500403 true true 135 90 165 300 428 | Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 429 | Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 430 | Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 431 | Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 432 | Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 433 | Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 434 | Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 435 | 436 | sheep 437 | false 438 | 15 439 | Circle -1 true true 203 65 88 440 | Circle -1 true true 70 65 162 441 | Circle -1 true true 150 105 120 442 | Polygon -7500403 true false 218 120 240 165 255 165 278 120 443 | Circle -7500403 true false 214 72 67 444 | Rectangle -1 true true 164 223 179 298 445 | Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 446 | Circle -1 true true 3 83 150 447 | Rectangle -1 true true 65 221 80 296 448 | Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 449 | Polygon -7500403 true false 276 85 285 105 302 99 294 83 450 | Polygon -7500403 true false 219 85 210 105 193 99 201 83 451 | 452 | square 453 | false 454 | 0 455 | Rectangle -7500403 true true 30 30 270 270 456 | 457 | square 2 458 | false 459 | 0 460 | Rectangle -7500403 true true 30 30 270 270 461 | Rectangle -16777216 true false 60 60 240 240 462 | 463 | star 464 | false 465 | 0 466 | Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 467 | 468 | target 469 | false 470 | 0 471 | Circle -7500403 true true 0 0 300 472 | Circle -16777216 true false 30 30 240 473 | Circle -7500403 true true 60 60 180 474 | Circle -16777216 true false 90 90 120 475 | Circle -7500403 true true 120 120 60 476 | 477 | tree 478 | false 479 | 0 480 | Circle -7500403 true true 118 3 94 481 | Rectangle -6459832 true false 120 195 180 300 482 | Circle -7500403 true true 65 21 108 483 | Circle -7500403 true true 116 41 127 484 | Circle -7500403 true true 45 90 120 485 | Circle -7500403 true true 104 74 152 486 | 487 | triangle 488 | false 489 | 0 490 | Polygon -7500403 true true 150 30 15 255 285 255 491 | 492 | triangle 2 493 | false 494 | 0 495 | Polygon -7500403 true true 150 30 15 255 285 255 496 | Polygon -16777216 true false 151 99 225 223 75 224 497 | 498 | truck 499 | false 500 | 0 501 | Rectangle -7500403 true true 4 45 195 187 502 | Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 503 | Rectangle -1 true false 195 60 195 105 504 | Polygon -16777216 true false 238 112 252 141 219 141 218 112 505 | Circle -16777216 true false 234 174 42 506 | Rectangle -7500403 true true 181 185 214 194 507 | Circle -16777216 true false 144 174 42 508 | Circle -16777216 true false 24 174 42 509 | Circle -7500403 false true 24 174 42 510 | Circle -7500403 false true 144 174 42 511 | Circle -7500403 false true 234 174 42 512 | 513 | turtle 514 | true 515 | 0 516 | Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 517 | Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 518 | Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 519 | Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 520 | Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 521 | Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 522 | 523 | wheel 524 | false 525 | 0 526 | Circle -7500403 true true 3 3 294 527 | Circle -16777216 true false 30 30 240 528 | Line -7500403 true 150 285 150 15 529 | Line -7500403 true 15 150 285 150 530 | Circle -7500403 true true 120 120 60 531 | Line -7500403 true 216 40 79 269 532 | Line -7500403 true 40 84 269 221 533 | Line -7500403 true 40 216 269 79 534 | Line -7500403 true 84 40 221 269 535 | 536 | wolf 537 | false 538 | 0 539 | Polygon -16777216 true false 253 133 245 131 245 133 540 | Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 541 | Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 542 | 543 | x 544 | false 545 | 0 546 | Polygon -7500403 true true 270 75 225 30 30 225 75 270 547 | Polygon -7500403 true true 30 75 75 30 270 225 225 270 548 | @#$#@#$#@ 549 | NetLogo 6.0.4 550 | @#$#@#$#@ 551 | @#$#@#$#@ 552 | @#$#@#$#@ 553 | @#$#@#$#@ 554 | @#$#@#$#@ 555 | default 556 | 0.0 557 | -0.2 0 0.0 1.0 558 | 0.0 1 1.0 0.0 559 | 0.2 0 0.0 1.0 560 | link direction 561 | true 562 | 0 563 | Line -7500403 true 150 150 90 180 564 | Line -7500403 true 150 150 210 180 565 | @#$#@#$#@ 566 | 0 567 | @#$#@#$#@ 568 | -------------------------------------------------------------------------------- /2021-Romanowska-001/netlogo_implementation/ch2.1_pedestrian.nlogo: -------------------------------------------------------------------------------- 1 | extensions [ Rnd ] 2 | patches-own [prob habitat_quality] 3 | to setup 4 | ca 5 | crt 1 [ 6 | setxy max-pxcor / 2 max-pycor / 2 7 | pen-down ; to visualize the path taken 8 | set size 5 9 | ] 10 | 11 | if walk = "target" [ ask n-of 30 patches [set pcolor white]] 12 | if walk = "restricted" [ ask patches with [pxcor = 50] [set pcolor white]] 13 | if walk = "IDD" [ 14 | ask patches [ 15 | set habitat_quality 100 16 | set pcolor scale-color green habitat_quality 0 100 17 | ] 18 | ] 19 | if walk = "weighted-random" [ 20 | ask patches [ 21 | set habitat_quality pxcor 22 | set pcolor scale-color green habitat_quality 0 100 23 | ] 24 | ] 25 | reset-ticks 26 | end 27 | 28 | to go 29 | if walk = "random1" [random-walk1] 30 | if walk = "random2" [random-walk2] 31 | if walk = "random3" [random-walk3] 32 | if walk = "random4" [random-walk4] 33 | if walk = "random-patches" [random-walk-patches] 34 | if walk = "correlated" [random-correlated-walk] 35 | if walk = "target" [target-walk] 36 | if walk = "levy" [levy-walk] 37 | if walk = "weighted-random" [weighted-random-walk] 38 | if walk = "restricted" [restricted-walk] 39 | tick 40 | end 41 | 42 | to random-walk1 43 | ; Turtles have 50% probability of not moving 44 | ; the movement length is always the same (1) 45 | ask turtle 0 [ 46 | if random 2 = 1 [ ;this results in nothing happening 50% of the time 47 | ;right random 360 ; alternative but identical implementation 48 | set heading random 360 49 | fd 1 50 | ] 51 | ] 52 | end 53 | 54 | to random-walk2 55 | ; Turtles also have 50% probability of not moving 56 | ; the movement length is always the same (1) 57 | ask turtle 0 [ 58 | set heading random 360 59 | fd random 2 ; 50% of the time this is zero distance, so no move occurs 60 | ] 61 | end 62 | 63 | to random-walk3 64 | ; Turtles have 1/9th probability of not moving 65 | ; the movement length is always the same (1) 66 | ask turtle 0 [ 67 | if random 9 > 0 [ 68 | set heading random 360 69 | fd 1 70 | ] 71 | ] 72 | end 73 | 74 | to random-walk4 75 | ; Here the turtles always move 76 | ; the movement length is always the same (1) 77 | ask turtle 0 [ 78 | rt 360 79 | fd 1 80 | ] 81 | end 82 | 83 | to random-walk-patches 84 | ; Here the turtles have 1/9th probability of not moving 85 | ; the movement length differs between the compass directions (1) and diagonals (1.41) 86 | ask turtle 0 [ 87 | move-to one-of patches in-radius 1.5 88 | ;move-to one-of neighbors ; turtles always move 89 | ] 90 | end 91 | 92 | to random-correlated-walk 93 | ; Here the turtles have 50% probability of staying put 94 | ; the movement length is always the same (1) 95 | ; the direction of movement is not fully random 96 | ask turtle 0 [ 97 | rt random-normal 0 45 98 | fd random 2 99 | ] 100 | end 101 | 102 | to target-walk 103 | ;;; Turtles move straight to one of the target calls if it is in their sensing radius 104 | ;;; otherwise they engage in random walk 105 | ;;; turtles always move 106 | ask turtle 0 [ 107 | ; detect a target in the vision radius 108 | let target one-of patches with [pcolor = white] in-radius 3 109 | ; if there is one move to it 110 | ifelse target != nobody [ 111 | move-to target 112 | ; remove the target (otherwise the turtle will get stuck here) 113 | ask patch-here [set pcolor grey] 114 | ] 115 | ; if there is no target move at random 116 | [ 117 | set heading random-float 360 118 | fd 1 119 | ] 120 | ] 121 | end 122 | 123 | to weighted-random-walk 124 | ;;; requires the Rnd extension included at the top of the code 125 | ;;; Agent will always move unless all neighboring patches are taken 126 | ask turtle 0 [ 127 | ; choose a target patch 128 | let target rnd:weighted-one-of patches in-radius 2 with [not any? turtles-here] [habitat_quality] 129 | ; move to target patch if it exists 130 | if target != nobody [face target move-to target] 131 | ] 132 | end 133 | 134 | to levy-walk 135 | ;;; this code has been adapted from Perry & O'Sullivan 2013 136 | ;;; the agent always moves 137 | ;;; the length of their step is modelled as cauchy distribution 138 | ask turtle 0 [ 139 | set heading random-float 360 140 | let step-length r-cauchy 0 1 141 | fd step-length 142 | ] 143 | end 144 | 145 | to-report r-cauchy [loc scl] 146 | ;;; auxilary function to levy-walk 147 | let X (pi * (random-float 1)) ;; Netlogo tan takes degrees not radians 148 | report loc + scl * tan(X * (180 / pi)) 149 | end 150 | 151 | to restricted-walk 152 | ;;; Turtles move forward until they come across an obstacle, then they turn randomly 153 | ask turtles 154 | [ 155 | ifelse [pcolor] of patch-ahead 1 = white 156 | [ lt random-float 360 ] ;; We see a white patch in front of us. Turn a random amount. 157 | [ fd 1 ] ;; Otherwise, it is safe to move forward. 158 | ] 159 | end 160 | @#$#@#$#@ 161 | GRAPHICS-WINDOW 162 | 210 163 | 10 164 | 666 165 | 467 166 | -1 167 | -1 168 | 4.44 169 | 1 170 | 10 171 | 1 172 | 1 173 | 1 174 | 0 175 | 1 176 | 1 177 | 1 178 | 0 179 | 100 180 | 0 181 | 100 182 | 0 183 | 0 184 | 1 185 | ticks 186 | 30.0 187 | 188 | BUTTON 189 | 126 190 | 71 191 | 189 192 | 104 193 | NIL 194 | go 195 | T 196 | 1 197 | T 198 | OBSERVER 199 | NIL 200 | NIL 201 | NIL 202 | NIL 203 | 1 204 | 205 | BUTTON 206 | 124 207 | 31 208 | 191 209 | 64 210 | NIL 211 | setup 212 | NIL 213 | 1 214 | T 215 | OBSERVER 216 | NIL 217 | NIL 218 | NIL 219 | NIL 220 | 1 221 | 222 | CHOOSER 223 | 58 224 | 149 225 | 204 226 | 194 227 | walk 228 | walk 229 | "random1" "random2" "random3" "random4" "random-patches" "correlated" "target" "weighted-random" "levy" "restricted" 230 | 0 231 | 232 | BUTTON 233 | 127 234 | 116 235 | 190 236 | 149 237 | step 238 | go 239 | NIL 240 | 1 241 | T 242 | OBSERVER 243 | NIL 244 | NIL 245 | NIL 246 | NIL 247 | 1 248 | 249 | @#$#@#$#@ 250 | ## WHAT IS IT? 251 | 252 | (a general understanding of what the model is trying to show or explain) 253 | 254 | ## HOW IT WORKS 255 | 256 | (what rules the agents use to create the overall behavior of the model) 257 | 258 | ## HOW TO USE IT 259 | 260 | (how to use the model, including a description of each of the items in the Interface tab) 261 | 262 | ## THINGS TO NOTICE 263 | 264 | (suggested things for the user to notice while running the model) 265 | 266 | ## THINGS TO TRY 267 | 268 | (suggested things for the user to try to do (move sliders, switches, etc.) with the model) 269 | 270 | ## EXTENDING THE MODEL 271 | 272 | (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) 273 | 274 | ## NETLOGO FEATURES 275 | 276 | (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) 277 | 278 | ## RELATED MODELS 279 | 280 | (models in the NetLogo Models Library and elsewhere which are of related interest) 281 | 282 | ## CREDITS AND REFERENCES 283 | 284 | (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) 285 | @#$#@#$#@ 286 | default 287 | true 288 | 0 289 | Polygon -7500403 true true 150 5 40 250 150 205 260 250 290 | 291 | airplane 292 | true 293 | 0 294 | Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 295 | 296 | arrow 297 | true 298 | 0 299 | Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 300 | 301 | box 302 | false 303 | 0 304 | Polygon -7500403 true true 150 285 285 225 285 75 150 135 305 | Polygon -7500403 true true 150 135 15 75 150 15 285 75 306 | Polygon -7500403 true true 15 75 15 225 150 285 150 135 307 | Line -16777216 false 150 285 150 135 308 | Line -16777216 false 150 135 15 75 309 | Line -16777216 false 150 135 285 75 310 | 311 | bug 312 | true 313 | 0 314 | Circle -7500403 true true 96 182 108 315 | Circle -7500403 true true 110 127 80 316 | Circle -7500403 true true 110 75 80 317 | Line -7500403 true 150 100 80 30 318 | Line -7500403 true 150 100 220 30 319 | 320 | butterfly 321 | true 322 | 0 323 | Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 324 | Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 325 | Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 326 | Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 327 | Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 328 | Circle -16777216 true false 135 90 30 329 | Line -16777216 false 150 105 195 60 330 | Line -16777216 false 150 105 105 60 331 | 332 | car 333 | false 334 | 0 335 | Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 336 | Circle -16777216 true false 180 180 90 337 | Circle -16777216 true false 30 180 90 338 | Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 339 | Circle -7500403 true true 47 195 58 340 | Circle -7500403 true true 195 195 58 341 | 342 | circle 343 | false 344 | 0 345 | Circle -7500403 true true 0 0 300 346 | 347 | circle 2 348 | false 349 | 0 350 | Circle -7500403 true true 0 0 300 351 | Circle -16777216 true false 30 30 240 352 | 353 | cow 354 | false 355 | 0 356 | Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 357 | Polygon -7500403 true true 73 210 86 251 62 249 48 208 358 | Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 359 | 360 | cylinder 361 | false 362 | 0 363 | Circle -7500403 true true 0 0 300 364 | 365 | dot 366 | false 367 | 0 368 | Circle -7500403 true true 90 90 120 369 | 370 | face happy 371 | false 372 | 0 373 | Circle -7500403 true true 8 8 285 374 | Circle -16777216 true false 60 75 60 375 | Circle -16777216 true false 180 75 60 376 | Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 377 | 378 | face neutral 379 | false 380 | 0 381 | Circle -7500403 true true 8 7 285 382 | Circle -16777216 true false 60 75 60 383 | Circle -16777216 true false 180 75 60 384 | Rectangle -16777216 true false 60 195 240 225 385 | 386 | face sad 387 | false 388 | 0 389 | Circle -7500403 true true 8 8 285 390 | Circle -16777216 true false 60 75 60 391 | Circle -16777216 true false 180 75 60 392 | Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 393 | 394 | fish 395 | false 396 | 0 397 | Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 398 | Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 399 | Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 400 | Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 401 | Circle -16777216 true false 215 106 30 402 | 403 | flag 404 | false 405 | 0 406 | Rectangle -7500403 true true 60 15 75 300 407 | Polygon -7500403 true true 90 150 270 90 90 30 408 | Line -7500403 true 75 135 90 135 409 | Line -7500403 true 75 45 90 45 410 | 411 | flower 412 | false 413 | 0 414 | Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 415 | Circle -7500403 true true 85 132 38 416 | Circle -7500403 true true 130 147 38 417 | Circle -7500403 true true 192 85 38 418 | Circle -7500403 true true 85 40 38 419 | Circle -7500403 true true 177 40 38 420 | Circle -7500403 true true 177 132 38 421 | Circle -7500403 true true 70 85 38 422 | Circle -7500403 true true 130 25 38 423 | Circle -7500403 true true 96 51 108 424 | Circle -16777216 true false 113 68 74 425 | Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 426 | Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 427 | 428 | house 429 | false 430 | 0 431 | Rectangle -7500403 true true 45 120 255 285 432 | Rectangle -16777216 true false 120 210 180 285 433 | Polygon -7500403 true true 15 120 150 15 285 120 434 | Line -16777216 false 30 120 270 120 435 | 436 | leaf 437 | false 438 | 0 439 | Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 440 | Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 441 | 442 | line 443 | true 444 | 0 445 | Line -7500403 true 150 0 150 300 446 | 447 | line half 448 | true 449 | 0 450 | Line -7500403 true 150 0 150 150 451 | 452 | pentagon 453 | false 454 | 0 455 | Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 456 | 457 | person 458 | false 459 | 0 460 | Circle -7500403 true true 110 5 80 461 | Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 462 | Rectangle -7500403 true true 127 79 172 94 463 | Polygon -7500403 true true 195 90 240 150 225 180 165 105 464 | Polygon -7500403 true true 105 90 60 150 75 180 135 105 465 | 466 | plant 467 | false 468 | 0 469 | Rectangle -7500403 true true 135 90 165 300 470 | Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 471 | Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 472 | Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 473 | Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 474 | Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 475 | Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 476 | Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 477 | 478 | sheep 479 | false 480 | 15 481 | Circle -1 true true 203 65 88 482 | Circle -1 true true 70 65 162 483 | Circle -1 true true 150 105 120 484 | Polygon -7500403 true false 218 120 240 165 255 165 278 120 485 | Circle -7500403 true false 214 72 67 486 | Rectangle -1 true true 164 223 179 298 487 | Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 488 | Circle -1 true true 3 83 150 489 | Rectangle -1 true true 65 221 80 296 490 | Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 491 | Polygon -7500403 true false 276 85 285 105 302 99 294 83 492 | Polygon -7500403 true false 219 85 210 105 193 99 201 83 493 | 494 | square 495 | false 496 | 0 497 | Rectangle -7500403 true true 30 30 270 270 498 | 499 | square 2 500 | false 501 | 0 502 | Rectangle -7500403 true true 30 30 270 270 503 | Rectangle -16777216 true false 60 60 240 240 504 | 505 | star 506 | false 507 | 0 508 | Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 509 | 510 | target 511 | false 512 | 0 513 | Circle -7500403 true true 0 0 300 514 | Circle -16777216 true false 30 30 240 515 | Circle -7500403 true true 60 60 180 516 | Circle -16777216 true false 90 90 120 517 | Circle -7500403 true true 120 120 60 518 | 519 | tree 520 | false 521 | 0 522 | Circle -7500403 true true 118 3 94 523 | Rectangle -6459832 true false 120 195 180 300 524 | Circle -7500403 true true 65 21 108 525 | Circle -7500403 true true 116 41 127 526 | Circle -7500403 true true 45 90 120 527 | Circle -7500403 true true 104 74 152 528 | 529 | triangle 530 | false 531 | 0 532 | Polygon -7500403 true true 150 30 15 255 285 255 533 | 534 | triangle 2 535 | false 536 | 0 537 | Polygon -7500403 true true 150 30 15 255 285 255 538 | Polygon -16777216 true false 151 99 225 223 75 224 539 | 540 | truck 541 | false 542 | 0 543 | Rectangle -7500403 true true 4 45 195 187 544 | Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 545 | Rectangle -1 true false 195 60 195 105 546 | Polygon -16777216 true false 238 112 252 141 219 141 218 112 547 | Circle -16777216 true false 234 174 42 548 | Rectangle -7500403 true true 181 185 214 194 549 | Circle -16777216 true false 144 174 42 550 | Circle -16777216 true false 24 174 42 551 | Circle -7500403 false true 24 174 42 552 | Circle -7500403 false true 144 174 42 553 | Circle -7500403 false true 234 174 42 554 | 555 | turtle 556 | true 557 | 0 558 | Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 559 | Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 560 | Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 561 | Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 562 | Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 563 | Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 564 | 565 | wheel 566 | false 567 | 0 568 | Circle -7500403 true true 3 3 294 569 | Circle -16777216 true false 30 30 240 570 | Line -7500403 true 150 285 150 15 571 | Line -7500403 true 15 150 285 150 572 | Circle -7500403 true true 120 120 60 573 | Line -7500403 true 216 40 79 269 574 | Line -7500403 true 40 84 269 221 575 | Line -7500403 true 40 216 269 79 576 | Line -7500403 true 84 40 221 269 577 | 578 | wolf 579 | false 580 | 0 581 | Polygon -16777216 true false 253 133 245 131 245 133 582 | Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 583 | Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 584 | 585 | x 586 | false 587 | 0 588 | Polygon -7500403 true true 270 75 225 30 30 225 75 270 589 | Polygon -7500403 true true 30 75 75 30 270 225 225 270 590 | @#$#@#$#@ 591 | NetLogo 6.2.2 592 | @#$#@#$#@ 593 | @#$#@#$#@ 594 | @#$#@#$#@ 595 | @#$#@#$#@ 596 | @#$#@#$#@ 597 | default 598 | 0.0 599 | -0.2 0 0.0 1.0 600 | 0.0 1 1.0 0.0 601 | 0.2 0 0.0 1.0 602 | link direction 603 | true 604 | 0 605 | Line -7500403 true 150 150 90 180 606 | Line -7500403 true 150 150 210 180 607 | @#$#@#$#@ 608 | 0 609 | @#$#@#$#@ 610 | --------------------------------------------------------------------------------