NBSINFRA Aveiro
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
The Aveiro agent-based model is structured according to the ODD protocol's three blocks—overview, design concepts, and details—to assess the performance of Nature-Based Solutions through a standardized simulation framework. Using this protocol, the model integrates site-specific initialization and submodels developed in NetLogo 3D to simulate dynamic processes such as soil water retention and biodiversity assessment based on environmental and socio-demographic input data.
HOW IT WORKS
The Aveiro agent-based model operates within a NetLogo 3D environment by integrating spatial data, such as soil permeability and land cover, with socio-demographic inputs to simulate the local urban environment. It functions by executing specialized submodels that dynamically calculate performance indicators for Nature-Based Solutions, specifically focusing on soil water retention, biodiversity assessment, and air quality.
The Aveiro agent-based model defines agent behavior through specialized submodels and procedural rules that simulate the interactions between environmental elements and the local community. The agents, which include categories such as vegetation elements and specific community groups, follow rules based on environmental and socio-demographic inputs to generate the model's overall behavior:
Soil Water Retention Rules: The model determines water retention capacity as a function of the ground surface status, specifically accounting for vegetation volume and surface roughness, alongside soil characteristics like humidity, suction, and wilting point.
Vegetation Status Rules: Agent behavior regarding plant health and growth is governed by the estimated density of vegetation-covered areas and the fertility levels of the soil.
Biodiversity and Cultural Assessment: The model executes rules to assess the biodiversity of the site and its recreational and cultural value to the community, responding to changing environmental conditions.
Spatial Interaction Logic: Agents interact within a NetLogo 3D environment where their state is influenced by site-specific parameters such as ground characteristics, heritage sites, and the state of biotic elements.
These rules are integrated into a sequential workflow of initialization and submodels to dynamically calculate performance indicators for Nature-Based Solutions.
HOW TO USE IT
To use the Aveiro model, you begin by using the setup buttons to initialize the spatial domain—including patches and agents—and then adjust site-specific parameters via sliders before executing the simulation to monitor performance over a 12-month timeframe. During the run, users interact with toggle switches to implement different Nature-Based Solution alternatives and disruptive events, while observing real-time outputs through dedicated monitors and plot tabs.
The Interface tab of the Aveiro model includes the following items:
Setup and Execution Buttons: These are used to launch the simulation environment and start/stop the procedural execution.
Ecosystem Indicator Sliders and Monitors: These are organized in columns to control and track parameters for soil (water retention, temperature, humidity), vegetation (fertility, flora condition), biodiversity, and socio-economic systems (community activity and NBS attractiveness).
NBS Toggle Switches: Located on the right-hand side, these allow users to enable or disable specific Nature-Based Solution features or compare diverse design alternatives.
Disruptive Event Controls: A set of sliders and switches used to select and modify extreme weather scenarios, such as floods or droughts, to test urban resilience.
Ecosystem Services Sections: Categorized toggle switches (regulating, provisioning, and cultural) that determine whether specific calculations, such as microclimate regulation or cultural use of space, are performed.
Plot Windows and Monitors: Graphic displays that provide real-time visualization of performance scores, soil water retention over time, and a dedicated monitor to track seasonal changes throughout the simulation's "ticks".
THINGS TO NOTICE
While running the Aveiro model, users should observe how the simulated urban environment responds to both the implementation of Nature-Based Solutions and the introduction of disruptive stressors. Key elements to monitor include:
Seasonal Dynamics and Indicators: Users should notice the fluctuation of indicators over the 12-month simulation period, represented by "ticks". Specifically, observe the "Flora Condition" and "Soil Humidity" monitors to see how vegetation health and moisture levels change in response to seasonal shifts.
Response to Disruptive Events: When activating the disruptive event controls—such as floods or droughts—users should observe the immediate impact on the "Soil Water Retention" plot. Notice how quickly the system recovers or fails when extreme weather scenarios are introduced via the interface sliders.
NBS Performance Comparison: By toggling different NBS alternatives on the right side of the interface, users can compare real-time performance scores. Pay close attention to the "Regulating," "Provisioning," and "Cultural" ecosystem service monitors to see which NBS design provides the highest resilience for specific site needs.
Community and Social Activity: Watch the socio-economic indicators to notice changes in "Community Activity" and "NBS Attractiveness". This reveals how the social system interacts with the environmental improvements and whether the NBS successfully draws community use.
Real-time Spatial Changes: In the NetLogo 3D world view, users should observe the visual state of patches and agents, such as the ground surface status and the presence of heritage elements, which dynamically update based on the model's submodels.
THINGS TO TRY
When using the Aveiro agent-based model, you can interact with several interface elements to explore how different design choices and environmental conditions affect urban resilience. Based on the model's design, here are suggested actions to try:
Implement Design Alternatives: Use the toggle switches on the right side of the interface to enable or disable specific Nature-Based Solutions. By switching between different design alternatives, you can compare how each one affects the site's overall performance scores.
Simulate Environmental Stressors: Interact with the disruptive event controls by moving sliders to select and modify the intensity of extreme weather scenarios, such as floods or droughts. This allows you to test the resilience of your NBS designs under pressure.
Calibrate Site Conditions: Before running the simulation, adjust the sliders for ecosystem indicators such as soil humidity, temperature, and fertility. You can also modify socio-demographic inputs to see how the initial state of the urban environment influences the final outcomes.
Toggle Ecosystem Services: Use the switches categorized under regulating, provisioning, and cultural services to choose which specific calculations—such as air quality, microclimate regulation, or recreational value—are active during the simulation.
Track Temporal Changes: After setting up your parameters, click the execution buttons and observe the "ticks" monitor to see the simulation progress through its 12-month timeframe. While it runs, watch the real-time plots for "Soil Water Retention" to see how the system stabilizes or responds to the inputs you have selected.
EXTENDING THE MODEL
To improve the model's predictive accuracy, users can modify the Code tab to include more granular soil hydrology algorithms that account for subsurface lateral flow and specific transpiration rates for different vegetation species. Furthermore, the complexity of the simulation could be enhanced by adding autonomous decision-making rules for individual community agents, allowing for a more detailed analysis of how diverse socio-demographic groups interact with and perceive the cultural value of Nature-Based Solutions.
NETLOGO FEATURES
The Aveiro model utilizes several sophisticated features of NetLogo 3D 6.4.0 to simulate urban resilience, often employing creative logic to bridge environmental and spatial data within the Code tab.
Unusual Features and Implementations
Volumetric Patch Categorization: Unlike standard 2D models, this version organizes its 3D environment into a cubic space patches. To maintain visibility while filling the entire simulation volume, the model uses "transparent air" patches as a distinct ontological category, allowing users to see the underlying "ground," "underground," and "built environment" layers.
Inter-system Procedure Logic: The code is designed to link variables across different types of agents and patches. For instance, the 'evapotranspiration' procedure is executed by flora agents but relies on water content and temperature variables stored in "ground" patches to calculate changes that are then applied to the "air" patches.
Workarounds for Spatial Integration
Graphic Underlay vs. GIS Extensions: Rather than relying on complex GIS extensions for spatial data, the model uses a "graphic underlay" workaround. Spatial data from QGIS 3.30 is processed into a color-coded image that is imported into NetLogo 3D; the code then uses an automated routine to categorize patches based on these underlying colors (e.g., differentiating between high-density forest and lower-density urban green areas).
Layered Static Components: To handle the vertical complexity of urban sites, the model explicitly defines the "underground" at the base of the cubic space, separate from the "ground" surface. This allows the code to assign distinct variables—such as acidity and humidity—specifically to soil patches while excluding them from "paved surface" patches in the same layer.
RELATED MODELS
NBSINFRA Prague, NBSINFRA Cologne
CREDITS AND REFERENCES
NBSINFRA Aveiro https://modelingcommons.org/browse/one_model/7894#model_tabs_browse_info
NBSINFRA_CLAveiro-ABM
https://github.com/tzioutzi/NBSINFRA_CLAveiro-ABM
https://zenodo.org/records/17251369 / https://doi.org/10.5281/zenodo.17251369
Xenidis, Y., Tzioutziou, A., Zarghami, A., Texeira, E., Lickert, B., Fehling-Kaschek, M., Habeeb, B., Bastidas-Arteaga, E., Borg, R. P., & Sharma, H. (2025). Methodology Specification for Resilience and Sustainability Quantification Framework.
Comments and Questions
extensions [ gis ] globals [ ;; seasons ;; season ; conditions of weather, temperature, humidity in different seasons of the year ;; soil water retention variables ;; soil_humidity soil_suction ; related to soil humidity ;; vegetation variables ;; ntree_num ; number of patches with trees of naturally green areas nshrub_num ; number of patches with shrubs of naturally green areas nveg_ratio ; ratio of trees over shrubs of naturally green areas fshrub_num ; number of patches with vegetation of fluvial areas utree_num ; number of patches with trees of urban green areas ushrub_num ; number of patches with shrubs of urban green areas uveg_ratio ; ratio of trees over shrubs of urban green areas flora ; IVI, composite index to monitor the diversity and density of flora species veg_cover ; ratio between vegetation elements (vgts) and total area (patches) ideal_veg ; intial IVI at tick 0, estimated at 79.33 for woody plants in urban green spaces by Muthulingam & Thangavel, 2012 current_regeneration_rate ; the regeneration rate of every tick, as defined by soil humidity and fertility sfi ; soil fertility index calculated as: SFI= organic C% + pH adjusted from Panwar et al. 2011 ideal_sfi ; soil fertility index for min carbon content 5% and max soil acidity 6.0 vegetation ; composite index to monitor the condition of the flora and the soil fertility ;; biodiversity variables ;; flora_diversity ; Shannon's divesity index (H') -Σp*lnp (Morris et al. 2014) at the beginning of the simulation fl_d ; Shannon's divesity index (H') at every tick fauna_diversity ; correlated to flora_diversity and soil quality according to Qian 2007 fn_d ; fauna diversity at every tick ideal_biodiversity ; ideal biodiversity value calculated at the begginging of the run biodiversity ; total biodiversity performance index assessed in every tick ;; community variables ;; initial_community_index ; density of people attracted by culture and recreation at the beginning of the run community_index ; density of people attracted by culture and recreation in every tick community ; assessed community index (percentage difference form initial state) in every tick ;; air quality variables ;; air ; composite index to monitor the quality of air (cooling + aqii) air_sample ; total patches of atmosphere in contact with NBS area - sample for the assessment cool_patches ; total patches of atmosphere in contact with vegetation agents (vgts) aqii ; composite index Air Quality Impact Index (AQII) by Datta et al. 2021, ;adjusted only for the physical characterisits of plants ;assuming that all examined plants have similar Air Pollution Tolerance Index (API) ideal_aqii ; reference AQII index for the specific NBS ;;; ECOSYSYEM SERVICES ;;; regulating ; services that regulate the elements and functions of the examined ecosystem erosion_control_value ; gas_regulation_value ; microclimate_regulation_value ; nutrient_cycling_value ; pollination_value ; refugia_value ; soil_formation_value ; water_regulation_value ; waste_treatment_value ; provisioning ; services that provide additional properties to the examined ecosystem food_production_value ; genetic_resources_value ; raw_materials_value ; water_supply_value ; cultural ; services that provide cultural, recreational, aesthetic aspects to the examined ecosystems cultural_use_value ; recreation_value ; ;; BUTTONS, SWITCHES, AND SLIDERS ;; ;; NBS Alternatives defined by the City Lab of Aveiro ;; ; meander_restoration ; restore the stream's natural curves; leaky dams ; retention_basins ; natural rainwater retention ponds in fluvial areas ; green_enhancement ; planting native vegetation species (roots structures, filter pollutants); promotion of permeable pavements (in private property) ; urban_agriculture ; agricultural production, vegetable gardens ; soil_temperature ; absolute temperature of soil as estimated per season ; NBS_attractiveness ; quantitive estimation of attractiveness of local community to NBS infrastructure ; flood ; switch to initiate the disruptive event of flood ] breed [nvgts nvgt] breed [uvgts uvgt] breed [fvgts fvgt] breed [agrls agrl] breed [ppls ppl] breed [anms anm] patches-own [ is-natural? ;whether a patch represents natural green surface is-urban? ;whether a patch represents urban green surface is-fluvial? ;whether a patch represents fluvial surface is-agric? ;whether a patch represents agricultutal surface is-paved? ;whether a patch represents paved surface atmosphere? ;whether a patch represents atmospheric volume ; related to cultural / social aspects hist-bld? ;whether a patch represents a historical building ; related to soil water retention surface ; composite index of surface characterisitcs (LID BMP parameter) ; storage depth/berm height/barrel height, vegetation volume, surface roughness, surface slope soil ; composite index of soil characterisitcs (LID BMP parameter) ; wilting point, humidity soil_water_retention ; index combining both the surfance and soil indices surface_roughness; 0.1 for soil and different vegetation roughness ideal_roughness; 0.1 for RG vegetation_volume ; average size of vegetation agents in radius 3 of the examined patch ideal_vegetation_volume ;5/100 for RG ideal_soil_humidity; 0.32 /32% for normal clay (Minnesota Stormwater Manual, 2022) s_h; soil humidity of patches max_soil_humidity; 0.45 for average normal clay wilting_point; 0.20 minimum amount of water in the soil that the plant requires not to wilt min_wilting_point; 0.15 for normal clay (Minnesota Stormwater Manual, 2022) ideal_soil_suction ; max soil suction for 32% relative humidity in 25oC ; related to vegetation organic_content; percnetage of organic material in soil, necessary for the vegetation ; related to air quality - cooling due to shading and evapotranspiration and reduction of the pollution levels cooling ; percentage of air patches with reduced temperature * mean temperature reduction cool_dif ; absolute mean temperature difference during daytime determined by Kim et al. 2024 ] turtles-own [ aqii_habit ; subindex of tree habit, based on plant's appearance, growth form and architecture aqii_canopy ; density of canopy structure: sparse-semidense-dense aqii_leaf ; Leaf Area Index (LAI) for each species original_size ; the reference size of vegetation agents at the beginning of the run ] to setup clear-all import-pcolors "background.png" setup-model setup-vegetation setup-soil-water-retention setup-community setup-fauna setup-biodiversity setup-NBS_alternatives reset-ticks end to go seasons_change assess-soil-water-retention assess-vegetation assess-biodiversity assess-community assess-air assess-ES if flood = true [toflood if flood = false [retain_water recover_flood_ecosystem]] tick if ticks >= 12 [stop] end ;;; SETUP PROCEDURES ;;; SETUP PROCEDURES ;;; SETUP PROCEDURES ;;; to setup-model ask patches [set is-natural? false set is-fluvial? false set atmosphere? false] ;; setup natural green ;; ask patches with [pcolor > 0 and pcolor <= 5.5] [set is-natural? true set is-paved? false set pcolor green] ; green = 55 ;; setup urban green ;; ask patches with [pcolor > 5.5 and pcolor <= 7.5] [set is-urban? true set is-paved? false set pcolor 57] ;; setup agricultural land ;; ask patches with [pcolor > 38 and pcolor < 39] [set is-agric? true set is-paved? false set pcolor 37] ;; setup built environment ;; ask patches with [pcolor >= 9 and pcolor < 10] [ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = 1 ] [set is-natural? false set is-paved? true set pcolor grey]] ask patches with [pcolor != 55 and pcolor != 57 and pcolor != 37 and pzcor = 0] [set is-natural? false set is-paved? true set pcolor grey] ;; setup atmosphere ;; ask patches with [pzcor > 0] [set atmosphere? true] ;; setup contours ;; ask patches with [pxcor >= -26 and pxcor <= -22 and pycor >= 12 and pycor <= 30 and pzcor = 0 and is-paved? = false ] [ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = -1 ] [set pcolor [pcolor] of myself] set pcolor 0 set atmosphere? true] ask patches with [pxcor >= -21 and pxcor <= -15 and pycor >= 12 and pycor <= 16 and pzcor = 0 and is-natural? = true] [ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = -1 ] [set pcolor [pcolor] of myself] set pcolor 0 set atmosphere? true] ask (patch-set patch -14 8 0 patch 11 -22 0 patch 12 -20 0) [ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = -1 ] [set pcolor [pcolor] of myself] set pcolor 0 set atmosphere? true] ask patches with [pxcor >= -17 and pxcor <= -12 and pycor >= -6 and pycor <= 11 and pzcor = 0 and is-natural? = true] [ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = -1 ] [set pcolor [pcolor] of myself] set pcolor 0 set atmosphere? true] ask patches with [pxcor >= 10 and pxcor <= 17 and pycor >= -27 and pycor <= -16 and pzcor = 0 and is-natural? = true] [ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = -1 ] [set pcolor [pcolor] of myself] set pcolor 0 set atmosphere? true] ask patches with [pcolor = green and pzcor = -1] [set is-natural? true set is-paved? false] ask patches with [pcolor = 57 and pzcor = -1] [set is-urban? true set is-paved? false] ask patches with [pcolor = 37 and pzcor = -1] [set is-agric? true set is-paved? false] ;; setup fluvial areas ;; ask (patch-set patch -24 30 -1 patch -24 29 -1 patch -24 28 -1 patch -24 27 -1 patch -23 26 -1 patch -23 25 -1 patch -24 24 -1 patch -24 23 -1 patch -24 22 -1 patch -25 21 -1 patch -26 20 -1 patch -26 19 -1 patch -25 18 -1 patch -25 17 -1 patch -25 16 -1 patch -24 15 -1 patch -23 14 -1 patch -22 14 -1 patch -21 14 -1 patch -20 14 -1 patch -19 14 -1 patch -18 14 -1 patch -17 14 -1 patch -17 13 -1 patch -16 12 -1 patch -16 11 -1 patch -16 10 -1 patch -16 9 -1 patch -15 8 -1 patch -15 7 -1 patch -14 6 -1 patch -14 5 -1 patch -13 4 -1 patch -13 3 -1 patch -13 2 -1 patch -13 1 -1 patch -13 0 -1) [set pcolor cyan set is-fluvial? true] ask (patch-set patch 11 -19 -1 patch 11 -20 -1 patch 11 -21 -1 patch 12 -21 -1 patch 13 -21 -1 patch 14 -21 -1 patch 15 -22 -1 patch 16 -23 -1 patch 17 -24 -1 patch 17 -25 -1 patch 17 -26 -1) [set pcolor cyan set is-fluvial? true] end to setup-vegetation ;;; natural green ;;; set ntree_num 60 set nshrub_num ntree_num set nveg_ratio 2 let ntrees n-of ntree_num patches with [is-natural? = true] ask ntrees [sprout-nvgts 1 [set color green set zcor [pzcor] of myself + size set shape "circle" set size (random-normal 0.719 0.09)]] ; mean size and sd adapted from Tarrega et al. (2011) ask ntrees [let nshrubs n-of nshrub_num other patches with [is-natural? = true] ask nshrubs [sprout-nvgts nveg_ratio [set color green set shape "circle" set size (random-normal 0.24 0.03) set zcor [pzcor] of myself + size + 0.3 forward 0.5]]] ;;; urban green ;;; set utree_num 50 set ushrub_num utree_num set uveg_ratio 2 let utrees n-of utree_num patches with [pcolor = 57] ask utrees [sprout-uvgts 1 [set color green set zcor [pzcor] of myself + size set shape "circle" set size (random-normal 0.719 0.09) ]] ask utrees [let ushrubs n-of ushrub_num other patches with [pcolor = 57] ask ushrubs [sprout-nvgts uveg_ratio [set color green set shape "circle" set size (random-normal 0.24 0.03) set zcor [pzcor] of myself + size + 0.3 forward random-float 0.5]]] ;;; fluvial green ;;; set fshrub_num 3 let fshrubs patches with [is-fluvial? = true] ask fshrubs [sprout-fvgts fshrub_num [set color cyan set shape "circle" set size (random-normal 0.24 0.03) set zcor [pzcor] of myself + size + 0.3 forward random-float 0.5]] ;;; agricultural land ;;; ask patches with [is-agric? = true and count (neighbors4 with [is-agric? = true]) > 1] [sprout-agrls 3 [set color 57 set shape "circle" set size (random-normal 0.24 0.03) set zcor [pzcor] of myself + size + 0.3 forward random-float 0.5]] end to setup-soil-water-retention ask patches with [pcolor != 0] [set ideal_vegetation_volume 0.05 set ideal_roughness 0.1 set ideal_soil_humidity 0.32 set s_h ideal_soil_humidity set soil_humidity mean [s_h] of patches with [pcolor != 0 and pycor > 0 and pycor < 40 and pxcor < 0 and pxcor > -32] ;set this variable to specific number for quick runs set max_soil_humidity 0.40 set min_wilting_point 0.15 set ideal_soil_suction -0.00001 * ((8.314 * 298)/ 1 * 18.016) * ln(0.32)] ifelse soil_humidity != 0 [set soil_suction -0.00001 * ((8.314 * soil_temperature)/ 1 * 18.016) * ln(soil_humidity)] [set soil_suction -0.00001 * (8.314 * soil_temperature)/ 1 * 18.016 ] ask patches with [pzcor = 0] [ifelse any? turtles-here [set vegetation_volume mean [size] of (turtle-set nvgts uvgts fvgts agrls) in-radius 1] [set vegetation_volume 0]] ask patches [ifelse vegetation_volume > 0.001 [set surface_roughness vegetation_volume ] [set surface_roughness 0.10] ] ask patches with [is-natural? = true] [set organic_content 28] ask patches with [is-urban? = true] [set organic_content 8] ask patches with [is-agric? = true] [set organic_content 6] ask patches with [is-fluvial? = true] [set organic_content 10] end to setup-community ;; historical buildings ;; ask patches with [pzcor = 1] [set hist-bld? false] ask patches with [pzcor = 1 and pxcor > -10 and pxcor < 10 and pycor > 0 and pycor < 50 and is-paved? = true ] [;set pcolor orange set hist-bld? true] ask patches with [pzcor = 1 and pxcor > -20 and pxcor < -12 and pycor > -10 and pycor < 30 and is-paved? = true ] [;set pcolor orange set hist-bld? true] ask patches with [pzcor = 1 and pxcor > 20 and pxcor < 40 and pycor > -20 and pycor < -5 and is-paved? = true ] [;set pcolor orange set hist-bld? true] ask patches with [pzcor = 1 and pxcor > -30 and pxcor < -15 and pycor > -20 and pycor < -5 and is-paved? = true ] [;set pcolor orange set hist-bld? true] ;; community agents ;; ask patches with [hist-bld? = true and count (neighbors with [pzcor = 0 and is-paved? = false]) > 4] [sprout-ppls 1 [set color orange set zcor [pzcor] of myself set shape "square" set size 0.10 forward 1]] ask patches with [is-fluvial? = true and count (neighbors with [is-paved? = false]) > 4] [ifelse NBS_attractiveness <= 0.50 [sprout-ppls 1 [set color orange set zcor [pzcor] of myself set shape "square" set size 0.10 forward 0.50]] [sprout-ppls 2 [set color orange set zcor [pzcor] of myself set shape "square" set size 0.10 forward 1]] ] set initial_community_index count ppls / count patches with [pcolor != 0] end to setup-fauna create-anms 16 * (count nvgts with [size > 2 ]) ; nest per tree density from Alonso et al. 1991 [set color yellow set size random-float 0.3 setxyz random-xcor random-ycor -2] create-anms 2.75 * (count nvgts with [size <= 2 and size > 0.5 ]) ; nest per tree density from Alonso et al. 1991 [set color yellow set size random-float 0.5 setxyz random-xcor random-ycor -3] create-anms 2.75 * (count uvgts with [size <= 2 and size > 0.5 ]) ; nest per tree density from Alonso et al. 1991 [set color yellow set size random-float 0.5 setxyz random-xcor random-ycor -3] create-anms 3 * (count fvgts with [size >= 0.20 ]) [set color yellow set size random-float 0.5 setxyz random-xcor random-ycor -3] create-anms 1 * (count agrls with [size >= 0.30 ]) [set color yellow set size random-float 0.5 setxyz random-xcor random-ycor -3] end to setup-biodiversity let floral_agents (turtle-set nvgts fvgts uvgts agrls) ask turtles [let diversity_1 (count nvgts with [size <= 0.30] / count floral_agents) ; Shannon's divesity index (H') in Morris et al. 2014 let diversity_2 (count nvgts with [size > 0.30] / count floral_agents) let diversity_3 (count fvgts / count floral_agents) let diversity_4 (count uvgts with [size <= 0.70] / count floral_agents) let diversity_5 (count uvgts with [size > 0.70] / count floral_agents) let diversity_6 (count agrls / count floral_agents) set flora_diversity -1 * diversity_1 * ln diversity_1 + -1 * diversity_2 * ln diversity_2 + -1 * diversity_3 * ln diversity_3 + -1 * diversity_4 * ln diversity_4 + -1 * diversity_5 * ln diversity_5] ask anms [let diversity_7 (count anms / count anms) ; Shannon's divesity index (H') in Morris et al. 2014 set fauna_diversity -1 * diversity_7 * ln diversity_7 ] set ideal_biodiversity flora_diversity + fauna_diversity end to setup-NBS_alternatives if meander_restoration = true [ask patches with [is-natural? = true and count (neighbors4 with [is-natural? = true and pzcor = -1]) > 3 and pzcor = -1 and pycor > 0] [set pcolor cyan set is-fluvial? true] ask patches with [is-urban? = true and count (neighbors4 with [is-paved? = false and pzcor = -1]) > 3 and pzcor = -1 and pycor > 0 ] [set pcolor cyan set is-fluvial? true]] if retention_basins = true [ask patch -17 14 -1 [ask patches in-radius 3 with [pzcor = -1 and is-paved? = false] [set pcolor cyan set is-fluvial? true]] ask patch -13 3 -1 [ask neighbors with [pzcor = -1] [set pcolor cyan set is-fluvial? true]] ask patch -22 26 -1 [set pcolor cyan set is-fluvial? true] ask (patch-set patch -21 26 0 patch -20 26 0 patch -20 25 0 patch -20 27 0 patch -19 26 0 patch -19 25 0 patch -19 27 0 patch -18 25 0 patch -18 26 0) [ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = -1 ] [set pcolor cyan set is-fluvial? true] set pcolor 0 set atmosphere? true]] if green_enhancement = true [ask patches with [pzcor = -1 and pycor > 0 and pcolor != 0] [ask patches in-radius 2 with [pzcor = 0 and pcolor != 0] [set is-natural? true set pcolor green sprout-nvgts nveg_ratio [set color green set shape "circle" set size (random-normal 0.20 0.03) set zcor [pzcor] of myself + size + 0.20 forward 0.50]]] ] if urban_agriculture = true [ask n-of 50 patches with [is-agric? = true and pycor > 0] [sprout-agrls 3 [set color 57 set shape "circle" set size (random-normal 0.10 0.03) set zcor [pzcor] of myself + size + 0.4 forward random-float 0.5]] ] end ;;; ASSESSMENT PROCEDURES ;;; ASSESSMENT PROCEDURES ;;; ASSESSMENT PROCEDURES ;;; to seasons_change if ticks <= 3 ; normal spring [set season "spring" ask patches with [is-natural? = true] [sprout-ppls count patches with [is-fluvial? = true] [set color orange set shape "square" set size 0.10] ]] if ticks > 3 and ticks <= 6 ; hot and dry summer [set season "summer" ask patches with [is-natural? = true] [sprout-ppls count patches with [is-fluvial? = true] [set color orange set shape "square" set size 0.10] ] ask patches with [is-paved? = false and pcolor != 0] [set soil_temperature 305 set s_h 0.20] ask patches with [is-paved? = true] [set soil_temperature 313 set s_h 0.15] ] if ticks > 6 and ticks <= 9 ; normal autumn [set season "automn" ask n-of count patches with [is-fluvial? = true] ppls [die] ask patches with [pcolor != 0] [set soil_temperature soil_temperature - 6 set s_h s_h + 0.10 ] ] if ticks > 9 and ticks <= 12 ; normal winter [set season "winter" ask n-of count patches with [is-fluvial? = true] ppls [die] ask patches with [pcolor != 0] [set soil_temperature 298 set s_h 0.32 ]] end to assess-soil-water-retention ask patches with [ideal_vegetation_volume > 0] [set surface (((vegetation_volume - ideal_vegetation_volume)/ ideal_vegetation_volume) / 2 + ((surface_roughness - ideal_roughness) / ideal_roughness) / 2 ) * 100 set soil (((max_soil_humidity - s_h) / ideal_soil_humidity) / 3 + ((s_h - min_wilting_point ) / min_wilting_point) / 3 + ((soil_suction) / ideal_soil_suction) / 3 ) * 100 ] ask patches [set soil_water_retention (surface / 2) + (soil / 2)] end to assess-vegetation ask patches with [atmosphere? = false] [ifelse organic_content > 1 ;and soil_humidity > 0 min_wilting_point and soil_humidity < max_soil_humidity [set sfi (organic_content / 100) + (soil_humidity / min_wilting_point) + (max_soil_humidity / soil_humidity)] ;average soil pH at 6.5 [set sfi 0] set ideal_sfi 21.785 + (32 / 15) + (60 / 32)] ;21.785 :mean [organic_content] of patches of the ground set veg_cover count (turtle-set nvgts fvgts uvgts) / count patches with [pzcor = 0] if ticks = 1 [set ideal_veg count patches with [is-natural? ] * 3 / count patches with [pzcor = 0] ] if ideal_veg > 0 ;; set a standard ideal_veg for this type of city [set flora (veg_cover - ideal_veg) / ideal_veg] ; let sfi_perf (sfi - ideal_sfi / ideal_sfi) set vegetation flora + sfi_perf end to assess-biodiversity ask (turtles) [let diversity_1 (count nvgts with [size <= 0.30] / count turtles) ; Shannon's divesity index (H') in Morris et al. 2014 let diversity_2 (count nvgts with [size > 0.30] / count turtles) let diversity_3 (count fvgts / count turtles) let diversity_4 (count uvgts with [size <= 0.70] / count turtles) let diversity_5 (count uvgts with [size > 0.70] / count turtles) set fl_d -1 * diversity_1 * ln diversity_1 + -1 * diversity_2 * ln diversity_2 + -1 * diversity_3 * ln diversity_3 + -1 * diversity_4 * ln diversity_4 + -1 * diversity_5 * ln diversity_5] set fn_d (fl_d * 0.80) + (mean [soil] of patches * 0.20) set biodiversity ((fl_d + fn_d) - ideal_biodiversity ) / ideal_biodiversity end to assess-community set community_index count ppls / count patches with [pcolor != 0] set community (community_index - initial_community_index)/ initial_community_index end to assess-air let vgts (turtle-set nvgts fvgts uvgts) set ideal_aqii count vgts * (2 + 1.8 + 3) ask patches with [atmosphere? = true] [set air_sample count patches with [atmosphere? = true and pzcor <= 5 and pycor >= 0 and pcolor = 0]] set cool_patches count patches with [atmosphere? = true and any? nvgts-here = true or any? uvgts-here = true or any? fvgts-here = true] * 8 * mean [size] of vgts ask patches with [atmosphere? = true] [set cooling (cool_patches / air_sample) * 1.5 * 100] ask vgts [set aqii mean [aqii_habit] of vgts + mean [aqii_canopy] of vgts + 3 set air ((aqii - ideal_aqii) / ideal_aqii) + (cooling)] end to assess-ES let vgts (turtle-set nvgts fvgts uvgts) ifelse erosion_control = true [set erosion_control_value mean [soil_water_retention] of patches ] [set erosion_control_value 0] ifelse gas_regulation = true [set gas_regulation_value aqii] [set gas_regulation_value 0 ] ifelse microclimate_regulation = true [set microclimate_regulation_value mean [cooling] of patches ] [set microclimate_regulation_value 0] ifelse nutrient_cycling = true [set nutrient_cycling_value (sfi - ideal_sfi / ideal_sfi)] ;soil reftility perfomance [set nutrient_cycling_value 0] ifelse pollination = true [set pollination_value (cool_patches / count patches with [is-natural? = true and any? neighbors with [atmosphere? = true]]) ] [set pollination_value 0] ifelse refugia = true [set refugia_value 1 * (count anms / count patches with [is-natural? = true and any? neighbors with [atmosphere? = true]]) ] [set refugia_value 0] ifelse soil_formation = true [set soil_formation_value mean [soil] of patches] [set soil_formation_value 0] ifelse water_regulation = true [set water_regulation_value 0.10 * abs ((mean [soil_suction] of patches - mean [ideal_soil_suction] of patches) / mean [ideal_soil_suction] of patches) ] [set water_regulation_value 0] ifelse waste_treatment = true [set waste_treatment_value (-0.010 * count anms / count patches with [is-natural? = true and any? neighbors with [atmosphere? = true]]) + (-0.010 * count vgts * mean [size] of vgts)] [set waste_treatment_value 0] set regulating (erosion_control_value + gas_regulation_value + microclimate_regulation_value + nutrient_cycling_value + pollination_value + refugia_value + soil_formation_value + water_regulation_value + waste_treatment_value) / 9 ; average of all regulating services ifelse food_production = true [set food_production_value 0.1 * count agrls * mean [size] of agrls] [set food_production_value 0] ifelse genetic_resources = true [set genetic_resources_value (0.001 * count vgts) + (0.001 * count anms)] [set genetic_resources_value 0] ifelse raw_materials_value = true [set raw_materials_value 0.1 * count vgts] [set raw_materials_value 0] ifelse water_supply = true [set water_supply_value (- 0.010 * count patches with [is-natural? = true and any? neighbors with [atmosphere? = true]]) ] [set water_supply_value 0] set provisioning (food_production_value + genetic_resources_value + raw_materials_value + water_supply_value) / 4 ; average of all provisioning services ifelse cultural_use = true [set cultural_use_value 0.10 * usage_level * count ppls ] [set cultural_use_value 0] ifelse recreation = true [set recreation_value 0.10 * satisfaction_level * count ppls] [set recreation_value 0] set cultural (cultural_use_value + recreation_value) / 2 ; average of all cultural services end ;;; NORMAL PROCEDURES OF NBS ;;; NORMAL PROCEDURES OF NBS;;; NORMAL PROCEDURES OF NBS;;; to retain_water ask patches with [pcolor != 0] [if any? patches with [s_h > ideal_soil_humidity] [ask patches with [is-natural? = true or is-fluvial? = true or is-urban? = true or is-agric? = true] [set s_h s_h * (1 - soil_suction)] ask patches with [is-paved? = true] [set s_h s_h * (1 - soil_suction / 2)]]] ask patches with [pcolor != 0] [if s_h > ideal_soil_humidity [set pcolor (s_h * 100) + 60]] ask patches with [is-paved? = false and pcolor != 0] [if not any? patches with [s_h > ideal_soil_humidity] [set s_h ideal_soil_humidity]] end to recover_flood_ecosystem ask patches with [pzcor = -1 and pycor > 0] [ask neighbors with [is-natural? = true] [sprout-uvgts (1 - (s_h - ideal_soil_humidity)) [set color green set zcor [pzcor] of myself + size set shape "circle" set size (random-normal 0.719 0.09) ] sprout-anms 1 [set color yellow set size random-float 0.5 setxyz random-xcor random-ycor -3]] ask neighbors with [is-urban? = true] [sprout-uvgts (1 - (s_h - ideal_soil_humidity)) [set color green set zcor [pzcor] of myself + size set shape "circle" set size (random-normal 0.719 0.09) ]] ask neighbors with [is-fluvial? = true] [sprout-fvgts (1 - (s_h - ideal_soil_humidity)) [set color cyan set shape "circle" set size (random-normal 0.24 0.03) set zcor [pzcor] of myself + size + 0.3 forward random-float 0.5] sprout-anms 1 [set color yellow set size random-float 0.5 setxyz random-xcor random-ycor -3]]] if any? patches with [pzcor = -1 and pycor > 0 and s_h = ideal_soil_humidity] [create-ppls (count patches with [pzcor = -1 and pycor > 0 and s_h = ideal_soil_humidity]) [set color orange forward 1]] end ;;; DISRUPTIVE EVENTS ;;; DISRUPTIVE EVENTS ;;; DISRUPTIVE EVENTS ;;; to toflood if flood = true and ticks = 6 [ask patches with [pzcor = -1 and pycor > 0] [set s_h 1 ask neighbors with [pzcor = 0 and pcolor != 0] [set s_h 0.60 ask nvgts-here [die] ask fvgts-here [die] ask anms-here [die] ask ppls-here [die] ]] ] if flood = true and ticks > 6 [set flood false] end
There are 2 versions of this model.
Attached files
| File | Type | Description | Last updated | |
|---|---|---|---|---|
| NBSINFRA Aveiro.png | preview | Preview for 'NBSINFRA Aveiro' | 17 days ago, by Anastasia Tzioutziou | Download |
This model does not have any ancestors.
This model does not have any descendants.
Download this model