; Neture - a NetLogo model that simulates how Nature works ; ; Equations in usage in the model are all taken from: ; G.B. West, J.M. Brwon & B.J. Enquist (2001): A genereral model for ontogenetic growth. Nature 413, pp. 628-631 ; For translation of concepts: ; WBE (2001) = Neture ; B o = basic_energy_input (average of mammalian species: 0.37 W/g^3/4, from 1; plant cells: 0.01147 W/g^3/4, from 3; B o = a x E c / m c; ; bacteria: 0.0166 W/g^3/4, from 3) ; ; E c = cellular_energy_content (mammalian tissue: 7 x 10^6 J / kg => 0.000021 J, from 1; plant tissue: 19.5 x 10^6 J / kg => 0.0001638, from 2; ; bacterium: assuming m c / E c = const, 6.25 x 10^-10 / 3 x 10^-9 x 7 x 10^6 J / kg = 1.458 x 10^6 J / kg => 0.00000091146) ; ; m c = cellular_mass (mammalian cell: 3 x 10^-9 g, from 1; plant cell: assuming m c / E c = cont, 19.5/7 x 3 x 10^-9 = 8.4 x 10^-9 g; ; bacterium (E.coli): 6.25 x 10^-10 g, from 4) ; ; M = maximum_mass ; ; References: ; 1 = G.B. West, J.M. Brwon & B.J. Enquist (2001): A genereral model for ontogenetic growth. Nature 413, pp. 628-631 ; 2 = W. Larcher (2003): Physiological plant ecology. Springer ; 3 = J.F. Gilloly et al. (2001): Effects of size and temerperature on metabolic rate. Science 293, pp. 2248-2251 ; 4 = G. Elert: The Physics Factbook: Mass of a bacterium. http://hypertextbook.com/facts/2003/LouisSiu.shtml globals [ time color_list ; world-related ; energy total_energy_input unused_energy_input total_energy_producer_growth total_energy_decomposer_growth total_energy_in_producer_mass total_energy_in_decomposer_mass total_energy_in_organic_matter total_energy_output_producer_maintenance total_energy_output_decomposer_maintenance total_energy_output_decomposer_movement total_mass_producers total_mass_decomposers total_organic_matter ; species-related mutation ; producer-related producersInserted? number_producer_species boundaries_birth_mass_producers boundaries_generative_fraction_producers boundaries_maximum_mass_producers boundaries_seed_dormancy_producers boundaries_germination_probability_producers ; decomposer-related decomposersInserted? number_decomposer_species boundaries_gene_transfer_probability_decomposers boundaries_movement/maintenance_ratio_decomposers boundaries_spore_metabolic_fraction_decomposers ] ; producers take up energy from the patches, ; they use energy for their metabolism, ; they do not move, except for the time step ; following reproduction, moving producers is passive and not associated with energy cost breed [ producers producer ] ; decomposers take up energy from the organic matter stored in the patches (i.e. mass of dead producers, consumers or dceomposers ; they use energy for maintenance, movement and growth breed [ decomposers decomposer ] patches-own [ penergy usable_penergy penergy_change organic_matter mean_Ec/Mc_ratio ] turtles-own [ energy_for_maintenance energy_for_movement energy_for_growth mass birth_mass min_birth_mass max_birth_mass maximum_mass min_maximum_mass max_maximum_mass generative_fraction min_generative_fraction max_generative_fraction generative_mass no_seeds cellular_mass cellular_energy_content basic_energy_input ] producers-own [ producer_species isSeed? time_in_seedbank seed_dormancy min_seed_dormancy max_seed_dormancy germination_probability min_germination_probability max_germination_probability ] decomposers-own [ decomposer_species isSpore? gene_transfer_probability min_gene_transfer_probability max_gene_transfer_probability movement/maintenance_ratio min_movement/maintenance_ratio max_movement/maintenance_ratio spore_metabolic_fraction min_spore_metabolic_fraction max_spore_metabolic_fraction ] ;=============================================================================================================== ; setup procedures: to setup ca setup-global-lists setup-patches set mutation species_range set producersInserted? false set decomposersInserted? false set time 0 end to setup-global-lists set color_list (list (0) (15)) repeat 1000 [ let new_color 10 * random 12 + 15 ; pure colors, not black set color_list lput new_color color_list ] set boundaries_birth_mass_producers setup-species-boundaries birth_mass_new_producers min_birth_mass_producers max_birth_mass_producers set boundaries_birth_mass_producers fput min_birth_mass_producers boundaries_birth_mass_producers set boundaries_birth_mass_producers lput max_birth_mass_producers boundaries_birth_mass_producers set boundaries_generative_fraction_producers setup-species-boundaries generative_fraction_new_producers min_generative_fraction_producers max_generative_fraction_producers set boundaries_generative_fraction_producers fput min_generative_fraction_producers boundaries_generative_fraction_producers set boundaries_generative_fraction_producers lput max_generative_fraction_producers boundaries_generative_fraction_producers set boundaries_maximum_mass_producers setup-species-boundaries maximum_mass_new_producers min_maximum_mass_producers max_maximum_mass_producers set boundaries_maximum_mass_producers fput min_maximum_mass_producers boundaries_maximum_mass_producers set boundaries_maximum_mass_producers lput max_maximum_mass_producers boundaries_maximum_mass_producers set boundaries_seed_dormancy_producers setup-species-boundaries seed_dormancy_new_producers min_seed_dormancy_producers max_seed_dormancy_producers set boundaries_seed_dormancy_producers fput min_seed_dormancy_producers boundaries_seed_dormancy_producers set boundaries_seed_dormancy_producers lput max_seed_dormancy_producers boundaries_seed_dormancy_producers set boundaries_germination_probability_producers setup-species-boundaries germination_probability_new_producers min_germination_probability_producers max_germination_probability_producers set boundaries_germination_probability_producers fput min_germination_probability_producers boundaries_germination_probability_producers set boundaries_germination_probability_producers lput max_germination_probability_producers boundaries_germination_probability_producers set boundaries_gene_transfer_probability_decomposers setup-species-boundaries gene_transfer_probability_new_decomposers min_gene_transfer_probability_decomposers max_gene_transfer_probability_decomposers set boundaries_gene_transfer_probability_decomposers fput min_gene_transfer_probability_decomposers boundaries_gene_transfer_probability_decomposers set boundaries_gene_transfer_probability_decomposers lput max_gene_transfer_probability_decomposers boundaries_gene_transfer_probability_decomposers set boundaries_movement/maintenance_ratio_decomposers setup-species-boundaries movement/maintenance_ratio_new_decomposers min_movement/maintenance_ratio_decomposers max_movement/maintenance_ratio_decomposers set boundaries_movement/maintenance_ratio_decomposers fput min_movement/maintenance_ratio_decomposers boundaries_movement/maintenance_ratio_decomposers set boundaries_movement/maintenance_ratio_decomposers lput max_movement/maintenance_ratio_decomposers boundaries_movement/maintenance_ratio_decomposers set boundaries_spore_metabolic_fraction_decomposers setup-species-boundaries spore_metabolic_fraction_new_decomposers min_spore_metabolic_fraction_decomposers max_spore_metabolic_fraction_decomposers set boundaries_spore_metabolic_fraction_decomposers fput min_spore_metabolic_fraction_decomposers boundaries_spore_metabolic_fraction_decomposers set boundaries_spore_metabolic_fraction_decomposers lput max_spore_metabolic_fraction_decomposers boundaries_spore_metabolic_fraction_decomposers end to setup-patches ask patches [ set penergy (random 100)] repeat smoothness [ diffuse penergy 1 ] rescale ask patches [ set usable_penergy penergy * penergy_multiplicator set organic_matter 1E-3 ; arbitrary low, just to fill in some amount set mean_Ec/Mc_ratio 19500 ; initially producer-specific ] color-landscape end ;=============================================================================================================== ; go to go tick ; patch procedures if changing-landscape? [ diffuse penergy_change 1 ; this will diffuse "smoothness" number of times before the fitness is changed. if time > smoothness [update-landscape set time 0 ] set time time + 1 ] ask patches [ set usable_penergy penergy * penergy_multiplicator ] set total_energy_input sum [usable_penergy] of patches ; prducer procedures if producersInserted? [ ifelse (showProducers? = true) [ ask producers with [hidden? = true] [show-turtle] ] [ ask producers with [hidden? = false] [hide-turtle] ] germinate-seeds take-up-usable-penergy set unused_energy_input sum [usable_penergy] of patches set total_energy_output_producer_maintenance sum [energy_for_maintenance] of producers set total_energy_producer_growth sum [energy_for_growth] of producers maintain-producers grow-producers reproduce-producers set total_mass_producers sum [mass] of producers set total_energy_in_producer_mass sum [mass / cellular_mass * cellular_energy_content] of producers ] ; decomposer_procedures if decomposersInserted? [ ifelse (showDecomposers? = true) [ ask decomposers with [hidden? = true] [show-turtle] ] [ ask decomposers with [hidden? = false] [hide-turtle] ] decompose-organic-matter set total_energy_output_decomposer_maintenance sum [energy_for_maintenance] of decomposers set total_energy_output_decomposer_movement sum [energy_for_movement] of decomposers set total_energy_decomposer_growth sum [energy_for_growth] of decomposers maintain-decomposers move-decomposers transfer-genes grow-decomposers divide-decomposers set total_mass_decomposers sum [mass] of decomposers set total_energy_in_decomposer_mass sum [mass / cellular_mass * cellular_energy_content] of decomposers ] set total_energy_in_organic_matter sum [organic_matter * mean_Ec/Mc_ratio] of patches set total_organic_matter sum [organic_matter] of patches color-landscape do-plots end ;=============================================================================================================== ; patch procedures to rescale let highest max [ penergy ] of patches let lowest min [ penergy ] of patches ifelse (highest - lowest) = 0 [ask patches [set penergy 50 set usable_penergy penergy * penergy_multiplicator] ] [ask patches [ set penergy range * (penergy - lowest) / (highest - lowest) + (99 - range) / 2 set usable_penergy penergy * penergy_multiplicator] ] end to update-landscape ask patches [set penergy penergy + penergy_change set usable_penergy penergy * penergy_multiplicator set penergy_change (random landscape-change-rate) ] rescale end to color-landscape ask patches [ if patch_color = "showEnergy?" [ set pcolor scale-color green penergy 0 100] if patch_color = "showUsableEnergy?" [ set pcolor scale-color blue usable_penergy 0 (100 * penergy_multiplicator) ] if patch_color = "showOrganicMatter?" [ set pcolor scale-color yellow organic_matter 0 1E3 ] ] end ;=============================================================================================================== ; general turtle procedures to set-dead set mean_Ec/Mc_ratio (organic_matter * mean_Ec/Mc_ratio + mass * cellular_energy_content / cellular_mass) / (organic_matter + mass) set organic_matter organic_matter + mass die end to-report setup-species-boundaries [ value lower_boundary upper_boundary] let max_value (2 * value * 1 / (2 - species_range / 100)) let min_value (2 * value - max_value) let boundary_list list (min_value) (max_value) while [min_value > lower_boundary] [ set min_value min_value * (1 - species_range / 100) set boundary_list fput min_value boundary_list ] while [max_value < upper_boundary] [ set max_value max_value / (1 - species_range / 100) set boundary_list lput max_value boundary_list ] set boundary_list but-first boundary_list set boundary_list but-last boundary_list report boundary_list end to-report find-min/max-boundary [value boundary_list] let i 0 let boundary item 0 boundary_list while [boundary < value] [ set i i + 1 set boundary item i boundary_list ] let min/max list (item (i - 1) boundary_list) (item i boundary_list) report min/max end ;=============================================================================================================== ; producer procedures: to insert-producers setup-producers number_producers xcor_producers ycor_producers set producersInserted? true end to setup-producers [no_producers i j] create-producers no_producers [ set shape "triangle 3" set size 0.3 setxy i j set isSeed? false ; at the beginning seeds germinate immediately set birth_mass birth_mass_new_producers set mass birth_mass set generative_fraction generative_fraction_new_producers set maximum_mass maximum_mass_new_producers set seed_dormancy seed_dormancy_new_producers set germination_probability germination_probability_new_producers set basic_energy_input 0.01147 * 60 * 60 * 24 ; assuming a time step of 1 d, the original W/g^3/4 have to be adjusted (s -> d) set cellular_energy_content 0.0001638 set cellular_mass 8.4 * 10 ^ -9 find-producer-min/max set producer_species find-my-producer-species min_birth_mass max_birth_mass min_generative_fraction max_generative_fraction min_maximum_mass max_maximum_mass min_seed_dormancy max_seed_dormancy min_germination_probability max_germination_probability set color item producer_species color_list ] end to take-up-usable-penergy ask producers [ set energy_for_maintenance 0 let cellular_metabolic_rate basic_energy_input * cellular_mass / maximum_mass ^ (1 / 4) let no_of_cells mass / cellular_mass let maintenance_energy no_of_cells * cellular_metabolic_rate ifelse usable_penergy >= maintenance_energy [ set usable_penergy usable_penergy - maintenance_energy set energy_for_maintenance maintenance_energy ] [ set-dead ] if mass < generative_fraction / 100 * maximum_mass [ set energy_for_growth 0 ] let a basic_energy_input * cellular_mass / cellular_energy_content let delta_mass a * mass ^ (3 / 4) * (1 - (mass / maximum_mass) ^ (1 / 4)) let delta_no_of_cells delta_mass / cellular_mass let growth_energy delta_no_of_cells * cellular_energy_content if usable_penergy >= growth_energy [ set usable_penergy usable_penergy - growth_energy set energy_for_growth energy_for_growth + growth_energy ] ] end to maintain-producers ask producers [ set energy_for_maintenance 0 ] end to grow-producers ask producers [ if (mass < generative_fraction / 100 * maximum_mass and energy_for_growth > 0) [ let a basic_energy_input * cellular_mass / cellular_energy_content let delta_mass a * mass ^ (3 / 4) * (1 - ( mass / maximum_mass) ^ (1 / 4)) set mass mass + delta_mass ] ] end to reproduce-producers ask producers with [isSeed? = false] [ if mass >= generative_fraction / 100 * maximum_mass [let possible_mating_partners other producers with [producer_species = [producer_species] of myself and distance myself <= pollination_range and mass >= generative_fraction / 100 * maximum_mass and energy_for_growth > 0] let mother_plant one-of possible_mating_partners if is-producer? mother_plant ; and not nobody [ let father_birth_mass birth_mass let father_generative_fraction generative_fraction let father_maximum_mass maximum_mass let father_seed_dormancy seed_dormancy let father_germination_probability germination_probability ask mother_plant [ let a basic_energy_input * cellular_mass / cellular_energy_content let delta_mass a * (mass + generative_mass) ^ (3 / 4) * (1 - ((mass + generative_mass) / maximum_mass) ^ (1 / 4)) set generative_mass generative_mass + delta_mass let no_offspring 0 while [ generative_mass >= (no_seeds + 1) * birth_mass ] [ set no_seeds no_seeds + 1 set no_offspring no_offspring + 1 ] if no_offspring > 0 [ let delta_no_of_cells no_offspring * birth_mass / cellular_mass let growth_energy delta_no_of_cells * cellular_energy_content set energy_for_growth energy_for_growth + growth_energy let mass_dependent_dispersal (log maximum_mass 10) let seed_dependent_dispersal (log birth_mass 10) hatch no_offspring [ set isSeed? true set shape "square 3" set size 0.2 set mass birth_mass ; mass at birth of mother plant set generative_mass 0 ; reset set no_seeds 0 ; reset set birth_mass recombine birth_mass father_birth_mass set birth_mass mutate birth_mass min_birth_mass_producers max_birth_mass_producers set generative_fraction recombine generative_fraction father_generative_fraction set generative_fraction mutate generative_fraction min_generative_fraction_producers max_generative_fraction_producers set maximum_mass recombine maximum_mass father_maximum_mass set maximum_mass mutate maximum_mass min_maximum_mass_producers max_maximum_mass_producers set seed_dormancy recombine seed_dormancy father_seed_dormancy set seed_dormancy mutate seed_dormancy min_seed_dormancy_producers max_seed_dormancy_producers set germination_probability recombine germination_probability father_germination_probability set germination_probability mutate germination_probability min_germination_probability_producers max_germination_probability_producers find-producer-min/max set producer_species find-my-producer-species min_birth_mass max_birth_mass min_generative_fraction max_generative_fraction min_maximum_mass max_maximum_mass min_seed_dormancy max_seed_dormancy min_germination_probability max_germination_probability set color item producer_species color_list rt random 360 jump random-float dispersal_range * (mass_dependent_dispersal - (seed_dependent_dispersal - 1)) ; - 1 gives both dependencies ; the same magnitude of order, note: if you change the birth_mass or maximum_mass boundaries this has to be replaced ] ] if (mass + generative_mass >= 0.99 * maximum_mass) [ set-dead ;determinate growth ] ] ] ] ] end to germinate-seeds ask producers with [isSeed? = true] [ set time_in_seedbank time_in_seedbank + 1 if time_in_seedbank >= seed_dormancy and random-float 100 < germination_probability [ set isSeed? false set shape "triangle 3" set size 0.3 ] if random-float 100 < seed_mortality [set-dead] ] end to find-producer-min/max let min/max find-min/max-boundary birth_mass boundaries_birth_mass_producers set min_birth_mass item 0 min/max set max_birth_mass item 1 min/max set min/max find-min/max-boundary generative_fraction boundaries_generative_fraction_producers set min_generative_fraction item 0 min/max set max_generative_fraction item 1 min/max set min/max find-min/max-boundary maximum_mass boundaries_maximum_mass_producers set min_maximum_mass item 0 min/max set max_maximum_mass item 1 min/max set min/max find-min/max-boundary seed_dormancy boundaries_seed_dormancy_producers set min_seed_dormancy item 0 min/max set max_seed_dormancy item 1 min/max set min/max find-min/max-boundary germination_probability boundaries_germination_probability_producers set min_germination_probability item 0 min/max set max_germination_probability item 1 min/max end to-report find-my-producer-species [ my_min_birth_mass my_max_birth_mass my_min_generative_fraction my_max_generative_fraction my_min_maximum_mass my_max_maximum_mass my_min_seed_dormancy my_max_seed_dormancy my_min_germination_probability my_max_germination_probability ] let my_producer_species 0 let another_producer_of_my_species one-of other producers with [ min_birth_mass = my_min_birth_mass and max_birth_mass = my_max_birth_mass and min_generative_fraction = my_min_generative_fraction and max_generative_fraction = my_max_generative_fraction and min_maximum_mass = my_min_maximum_mass and max_maximum_mass = my_max_maximum_mass and min_seed_dormancy = my_min_seed_dormancy and max_seed_dormancy = my_max_seed_dormancy and min_germination_probability = my_min_germination_probability and max_germination_probability = my_max_germination_probability ] ifelse (is-producer? another_producer_of_my_species) [ set my_producer_species [producer_species] of another_producer_of_my_species ] [ if producersInserted? = true [ set my_producer_species get-max-number-of-producer-species + 1] ] report my_producer_species end to-report get-number-of-producer-species let species_list [producer_species] of producers set species_list remove-duplicates species_list set number_producer_species length species_list report number_producer_species end to-report get-max-number-of-producer-species let species_list [producer_species] of producers set species_list remove-duplicates species_list let max_number_producer_species max species_list report max_number_producer_species end ;=============================================================================================================== ; decomposer procedures to insert-decomposers let i min-pxcor let j min-pycor while [i < max-pxcor + 1] [ while [j < max-pycor + 1] [ setup-decomposers i j set j j + 1 ] set j min-pycor set i i + 1 ] set decomposersInserted? true end to setup-decomposers [i j] create-decomposers number_decomposers [ set shape "bacterium" set size 0.5 set isSpore? false setxy i j set basic_energy_input 0.0166 * 60 * 60 * 24 ; assuming a time step of 1 d, the original W/g^3/4 have to be adjusted (s -> d) set cellular_energy_content 0.00000091146 set cellular_mass 6.25E-10 set maximum_mass population_size * cellular_mass set birth_mass 49.5 / 100 * maximum_mass set mass birth_mass set generative_fraction 99 set gene_transfer_probability gene_transfer_probability_new_decomposers set movement/maintenance_ratio movement/maintenance_ratio_new_decomposers set spore_metabolic_fraction spore_metabolic_fraction_new_decomposers find-decomposer-min/max set decomposer_species find-my-decomposer-species min_gene_transfer_probability max_gene_transfer_probability min_movement/maintenance_ratio max_movement/maintenance_ratio min_spore_metabolic_fraction max_spore_metabolic_fraction set color item (decomposer_species + 1) color_list ] end to decompose-organic-matter ask decomposers [ if isSpore? = false and random-float 100 < decomposer_mortality [ set-dead ] ; maintenance let cellular_metabolic_rate basic_energy_input * cellular_mass / maximum_mass ^ (1 / 4) let no_of_cells mass / cellular_mass let maintenance_energy_bacterium no_of_cells * cellular_metabolic_rate let maintenance_energy_spore maintenance_energy_bacterium * spore_metabolic_fraction / 100 let energy_in_organic_matter organic_matter * mean_Ec/Mc_ratio set energy_for_maintenance 0 ifelse energy_in_organic_matter >= maintenance_energy_bacterium [ if (isSpore? = true) [ set isSpore? false set shape "bacterium" set size 0.5 ] set organic_matter organic_matter - maintenance_energy_bacterium / mean_Ec/Mc_ratio set energy_for_maintenance maintenance_energy_bacterium ] [ if (isSpore? = false) [ transfer-my-genes set isSpore? true set shape "square" set size 0.3 ] let energy_in_spore mass / cellular_mass * cellular_energy_content ifelse (energy_in_spore >= maintenance_energy_spore) [ set mass mass - maintenance_energy_spore / cellular_energy_content * cellular_mass set energy_for_maintenance maintenance_energy_spore ] [ set-dead ] ] if (isSpore? = false) [ ; movement let movement_energy movement/maintenance_ratio * maintenance_energy_bacterium set energy_in_organic_matter organic_matter * mean_Ec/Mc_ratio set energy_for_movement 0 if energy_in_organic_matter >= movement_energy [ set organic_matter organic_matter - movement_energy / mean_Ec/Mc_ratio set energy_for_movement movement_energy ] ; growth let a basic_energy_input * cellular_mass / cellular_energy_content let delta_mass a * mass ^ (3 / 4) * (1 - (mass / maximum_mass) ^ (1 / 4)) let delta_no_of_cells delta_mass / cellular_mass let growth_energy delta_no_of_cells * cellular_energy_content set energy_in_organic_matter organic_matter * mean_Ec/Mc_ratio set energy_for_growth 0 if energy_in_organic_matter >= growth_energy [ set organic_matter organic_matter - growth_energy / mean_Ec/Mc_ratio set energy_for_growth growth_energy ] ] ] end to maintain-decomposers ask decomposers [ set energy_for_maintenance 0 ] end to move-decomposers ask decomposers with [isSpore? = false] [ jump energy_for_movement * 1E-6 set energy_for_movement 0 let direction_change random 360 rt direction_change jump passive_movement rt (- direction_change) ] end to grow-decomposers ask decomposers with [isSpore? = false] [ if (mass < generative_fraction / 100 * maximum_mass and energy_for_growth > 0) [ let a basic_energy_input * cellular_mass / cellular_energy_content let delta_mass a * mass ^ (3 / 4) * (1 - ( mass / maximum_mass) ^ (1 / 4)) set mass mass + delta_mass ] ] end to divide-decomposers ask decomposers with [isSpore? = false] [ if (mass >= generative_fraction / 100 * maximum_mass and energy_for_growth > 0) [ set mass birth_mass set energy_for_maintenance 0 set energy_for_movement 0 set energy_for_growth 0 hatch 1 [ rt random 360 ] ] ] end to transfer-genes ask decomposers with [isSpore? = false] [ transfer-my-genes ] end to transfer-my-genes if (random 100 < gene_transfer_probability) [ let transfer_partner one-of other decomposers-here with [isSpore? = false and decomposer_species = [decomposer_species] of myself] if (is-decomposer? transfer_partner) [ let gene_transfer_probability_partner [gene_transfer_probability] of transfer_partner let movement/maintenance_ratio_partner [movement/maintenance_ratio] of transfer_partner let spore_metabolic_fraction_partner [spore_metabolic_fraction] of transfer_partner let my_gene_transfer_probability gene_transfer_probability let my_movement/maintenance_ratio movement/maintenance_ratio let my_spore_metabolic_fraction spore_metabolic_fraction set gene_transfer_probability recombine gene_transfer_probability gene_transfer_probability_partner set gene_transfer_probability mutate gene_transfer_probability min_gene_transfer_probability_decomposers max_gene_transfer_probability_decomposers set movement/maintenance_ratio recombine movement/maintenance_ratio movement/maintenance_ratio_partner set movement/maintenance_ratio mutate movement/maintenance_ratio min_movement/maintenance_ratio_decomposers max_movement/maintenance_ratio_decomposers set spore_metabolic_fraction recombine spore_metabolic_fraction spore_metabolic_fraction_partner set spore_metabolic_fraction mutate spore_metabolic_fraction min_spore_metabolic_fraction_decomposers max_spore_metabolic_fraction_decomposers find-decomposer-min/max set decomposer_species find-my-decomposer-species min_gene_transfer_probability max_gene_transfer_probability min_movement/maintenance_ratio max_movement/maintenance_ratio min_spore_metabolic_fraction max_spore_metabolic_fraction set color item (decomposer_species + 1) color_list ask transfer_partner [ set gene_transfer_probability recombine gene_transfer_probability my_gene_transfer_probability set gene_transfer_probability mutate gene_transfer_probability min_gene_transfer_probability_decomposers max_gene_transfer_probability_decomposers set movement/maintenance_ratio recombine movement/maintenance_ratio my_movement/maintenance_ratio set movement/maintenance_ratio mutate movement/maintenance_ratio min_movement/maintenance_ratio_decomposers max_movement/maintenance_ratio_decomposers set spore_metabolic_fraction recombine spore_metabolic_fraction my_spore_metabolic_fraction set spore_metabolic_fraction mutate spore_metabolic_fraction min_spore_metabolic_fraction_decomposers max_spore_metabolic_fraction_decomposers find-decomposer-min/max set decomposer_species find-my-decomposer-species min_gene_transfer_probability max_gene_transfer_probability min_movement/maintenance_ratio max_movement/maintenance_ratio min_spore_metabolic_fraction max_spore_metabolic_fraction set color item (decomposer_species + 1) color_list ] ] ] end to find-decomposer-min/max let min/max find-min/max-boundary gene_transfer_probability boundaries_gene_transfer_probability_decomposers set min_gene_transfer_probability item 0 min/max set max_gene_transfer_probability item 1 min/max set min/max find-min/max-boundary movement/maintenance_ratio boundaries_movement/maintenance_ratio_decomposers set min_movement/maintenance_ratio item 0 min/max set max_movement/maintenance_ratio item 1 min/max set min/max find-min/max-boundary spore_metabolic_fraction boundaries_spore_metabolic_fraction_decomposers set min_spore_metabolic_fraction item 0 min/max set max_spore_metabolic_fraction item 1 min/max end to-report find-my-decomposer-species [ my_min_gene_transfer_probability my_max_gene_transfer_probability my_min_movement/maintenance_ratio my_max_movement/maintenance_ratio my_min_spore_metabolic_fraction my_max_spore_metabolic_fraction ] let my_decomposer_species 0 let another_decomposer_of_my_species one-of other decomposers with [ isSpore? = false and min_gene_transfer_probability = my_min_gene_transfer_probability and max_gene_transfer_probability = my_max_gene_transfer_probability and min_movement/maintenance_ratio = my_min_movement/maintenance_ratio and max_movement/maintenance_ratio = my_max_movement/maintenance_ratio and min_spore_metabolic_fraction = my_min_spore_metabolic_fraction and max_spore_metabolic_fraction = my_max_spore_metabolic_fraction ] ifelse (is-decomposer? another_decomposer_of_my_species) [ set my_decomposer_species [decomposer_species] of another_decomposer_of_my_species ] [ if decomposersInserted? = true [ set my_decomposer_species get-max-number-of-decomposer-species + 1] ] report my_decomposer_species end to-report get-number-of-decomposer-species let species_list [decomposer_species] of decomposers set species_list remove-duplicates species_list set number_decomposer_species length species_list report number_decomposer_species end to-report get-max-number-of-decomposer-species let species_list [decomposer_species] of decomposers set species_list remove-duplicates species_list let max_number_decomposer_species max species_list report max_number_decomposer_species end ;=============================================================================================================== ; auxilliary procedures to-report recombine [val1 val2] let valueList list (val1) (val2) let minVal min valueList let maxVal max valueList report minVal + random-float (maxVal - minVal) end to-report mutate [mutatable lower_boundary upper_boundary] if (random-float 100 < mutation_probability) [ set mutatable mutatable + (random-float 2 - 1) * mutation / 100 * mutatable if (mutatable < lower_boundary) [ set mutatable lower_boundary ] if (mutatable > upper_boundary) [set mutatable upper_boundary] ] report mutatable end to do-plots set-current-plot "Energetics: Energy input" set-current-plot-pen "Energy input" plot total_energy_input set-current-plot-pen "Energy input used" plot total_energy_input - unused_energy_input set-current-plot "Energetics: Energy stocks" set-current-plot-pen "Energy in producers" plot total_energy_in_producer_mass set-current-plot-pen "Energy in decomposers" plot total_energy_in_decomposer_mass set-current-plot-pen "Energy in organic matter" plot total_energy_in_organic_matter ; set-current-plot "Energetics: Energy flows" ; let energy_input_used total_energy_input - unused_energy_input ; set-current-plot-pen "Energy for producer growth" ; plot total_energy_producer_growth / energy_input_used ; set-current-plot-pen "Energy for decomposer growth" ; plot total_energy_decomposer_growth / energy_input_used ; set-current-plot-pen "Energy for producer maintenance" ; plot total_energy_output_producer_maintenance / energy_input_used ; set-current-plot-pen "Energy for decomposer maintenance" ; plot total_energy_output_decomposer_maintenance / energy_input_used ; set-current-plot-pen "Energy for decomposer movement" ; plot total_energy_output_decomposer_movement / energy_input_used set-current-plot "Mass stocks" set-current-plot-pen "Producer mass" plot total_mass_producers set-current-plot-pen "Decomposer mass" plot total_mass_decomposers set-current-plot-pen "Organic matter" plot total_organic_matter set-current-plot "Count producers" set-current-plot-pen "producers" plot count producers with [isSeed? = false] set-current-plot-pen "seeds" plot count producers with [isSeed? = true] set-current-plot "Count decomposers" set-current-plot-pen "bacteria" plot count decomposers with [isSpore? = false] set-current-plot-pen "spores" plot count decomposers with [isSpore? = true] let producer_species_list [producer_species] of producers set producer_species_list remove-duplicates producer_species_list set producer_species_list sort producer_species_list let x_range length producer_species_list set-current-plot "Producer species counts" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach producer_species_list [ let producers_of_same_species producers with [producer_species = ?] let count_producers count producers_of_same_species if count_producers > 0 [set-plot-pen-color [color] of one-of producers_of_same_species] plot count_producers ] set-current-plot "Mass at birth" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach producer_species_list [ let producers_of_same_species producers with [producer_species = ?] let birth_mass_min [min_birth_mass] of one-of producers_of_same_species let birth_mass_max [max_birth_mass] of one-of producers_of_same_species if is-number? birth_mass_max and is-number? birth_mass_min [set-plot-pen-color [color] of one-of producers_of_same_species] plot birth_mass_min plot birth_mass_max ] set-current-plot "Maximum mass" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach producer_species_list [ let producers_of_same_species producers with [producer_species = ?] let maximum_mass_min [min_maximum_mass] of one-of producers_of_same_species let maximum_mass_max [max_maximum_mass] of one-of producers_of_same_species if is-number? maximum_mass_max and is-number? maximum_mass_min [set-plot-pen-color [color] of one-of producers_of_same_species] plot maximum_mass_min plot maximum_mass_max ] set-current-plot "Generative fraction" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach producer_species_list [ let producers_of_same_species producers with [producer_species = ?] let generative_fraction_min [min_generative_fraction] of one-of producers_of_same_species let generative_fraction_max [max_generative_fraction] of one-of producers_of_same_species if is-number? generative_fraction_max and is-number? generative_fraction_min [set-plot-pen-color [color] of one-of producers_of_same_species] plot generative_fraction_min plot generative_fraction_max ] set-current-plot "Seed dormancy" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach producer_species_list [ let producers_of_same_species producers with [producer_species = ?] let seed_dormancy_min [min_seed_dormancy] of one-of producers_of_same_species let seed_dormancy_max [max_seed_dormancy] of one-of producers_of_same_species if is-number? seed_dormancy_max and is-number? seed_dormancy_min [set-plot-pen-color [color] of one-of producers_of_same_species] plot seed_dormancy_min plot seed_dormancy_max ] set-current-plot "Germination probability" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach producer_species_list [ let producers_of_same_species producers with [producer_species = ?] let germination_probability_min [min_germination_probability] of one-of producers_of_same_species let germination_probability_max [max_germination_probability] of one-of producers_of_same_species if is-number? germination_probability_max and is-number? germination_probability_min [set-plot-pen-color [color] of one-of producers_of_same_species] plot germination_probability_min plot germination_probability_max ] let decomposer_species_list [decomposer_species] of decomposers set decomposer_species_list remove-duplicates decomposer_species_list set decomposer_species_list sort decomposer_species_list set x_range length decomposer_species_list set-current-plot "Gene transfer probability" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach decomposer_species_list [ let decomposers_of_same_species decomposers with [decomposer_species = ?] let gene_transfer_probability_min [min_gene_transfer_probability] of one-of decomposers_of_same_species let gene_transfer_probability_max [max_gene_transfer_probability] of one-of decomposers_of_same_species if is-number? gene_transfer_probability_max and is-number? gene_transfer_probability_min [set-plot-pen-color [color] of one-of decomposers_of_same_species] plot gene_transfer_probability_min plot gene_transfer_probability_max ] set-current-plot "Movement/maintenance ratio" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach decomposer_species_list [ let decomposers_of_same_species decomposers with [decomposer_species = ?] let movement/maintenance_ratio_min [min_movement/maintenance_ratio] of one-of decomposers_of_same_species let movement/maintenance_ratio_max [max_movement/maintenance_ratio] of one-of decomposers_of_same_species if is-number? movement/maintenance_ratio_max and is-number? movement/maintenance_ratio_min [set-plot-pen-color [color] of one-of decomposers_of_same_species] plot movement/maintenance_ratio_min plot movement/maintenance_ratio_max ] set-current-plot "Spore metabolic fraction" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach decomposer_species_list [ let decomposers_of_same_species decomposers with [decomposer_species = ?] let spore_metabolic_fraction_min [min_spore_metabolic_fraction] of one-of decomposers_of_same_species let spore_metabolic_fraction_max [max_spore_metabolic_fraction] of one-of decomposers_of_same_species if is-number? spore_metabolic_fraction_max and is-number? spore_metabolic_fraction_min [set-plot-pen-color [color] of one-of decomposers_of_same_species] plot spore_metabolic_fraction_min plot spore_metabolic_fraction_max ] set-current-plot "Decomposer species counts" ; The HISTOGRAM primitive doesn't support giving different bars ; different colors, so we roll our own histogramming code here. plot-pen-reset set-plot-x-range 0 x_range foreach decomposer_species_list [ let decomposers_of_same_species decomposers with [decomposer_species = ?] let count_decomposers count decomposers_of_same_species if count_decomposers > 0 [set-plot-pen-color [color] of one-of decomposers_of_same_species] plot count_decomposers ] end ; experiments to-report monocultureReached? ifelse decomposersinserted? = true and number_producer_species = 1 [report true] [report false] end @#$#@#$#@ GRAPHICS-WINDOW 185 10 627 473 4 4 48.0 1 10 1 1 1 0 1 1 1 -4 4 -4 4 1 1 1 ticks SLIDER 5 162 177 195 species_range species_range 0 100 10 1 1 NIL HORIZONTAL SLIDER 2 315 174 348 mutation_probability mutation_probability 0 100 0 1 1 NIL HORIZONTAL BUTTON 186 497 249 530 setup setup NIL 1 T OBSERVER NIL NIL NIL NIL BUTTON 249 497 312 530 go go T 1 T OBSERVER NIL NIL NIL NIL SLIDER 6 37 178 70 smoothness smoothness 0 50 10 1 1 NIL HORIZONTAL SLIDER 6 64 178 97 range range 0 100 100 1 1 NIL HORIZONTAL SWITCH 4 159 175 192 changing-landscape? changing-landscape? 1 1 -1000 SLIDER 5 129 178 162 landscape-change-rate landscape-change-rate 0 200 200 1 1 NIL HORIZONTAL SLIDER 147 798 288 831 number_producers number_producers 0 20 4 2 1 NIL HORIZONTAL PLOT 1216 384 1557 534 Mass at birth species birth mass 0.0 10.0 0.0 0.01 true false PENS "min birth mass" 1.0 1 -16777216 true "max birth mass" 5.0 1 -16777216 true PLOT 1216 532 1559 682 Maximum mass species maximum mass 0.0 10.0 0.0 0.3 true false PENS "default" 1.0 1 -16777216 true MONITOR 656 590 802 635 count producers count producers with [isSeed? = false] 0 1 11 PLOT 1216 58 1559 208 Count producers time number producers 0.0 10.0 0.0 10.0 true true PENS "producers" 1.0 0 -2674135 true "seeds" 1.0 0 -5825686 true MONITOR 656 546 801 591 No. producer species get-number-of-producer-species 0 1 11 SLIDER 5 97 178 130 penergy_multiplicator penergy_multiplicator 0 10000 1500 100 1 NIL HORIZONTAL SLIDER 1 458 174 491 dispersal_range dispersal_range 0 10 0.2 0.1 1 NIL HORIZONTAL BUTTON 432 495 571 528 insert decomposers insert-decomposers NIL 1 T OBSERVER NIL NIL NIL NIL MONITOR 800 590 947 635 count decomposers count decomposers with [isSpore? = false] 0 1 11 PLOT 1558 58 1900 208 Count decomposers time NIL 0.0 10.0 0.0 20.0 true true PENS "bacteria" 1.0 0 -2674135 true "spores" 1.0 0 -5825686 true CHOOSER 5 194 177 239 patch_color patch_color "showEnergy?" "showUsableEnergy?" "showOrganicMatter?" 0 SWITCH 3 393 174 426 showProducers? showProducers? 0 1 -1000 SWITCH 5 559 172 592 showDecomposers? showDecomposers? 1 1 -1000 SLIDER 2 425 174 458 pollination_range pollination_range 0 10 10 1 1 NIL HORIZONTAL SLIDER 2 282 173 315 species_range species_range 0 100 10 1 1 NIL HORIZONTAL TEXTBOX 10 10 160 35 Landscape: 20 65.0 1 TEXTBOX 7 253 157 278 Species: 20 0.0 1 TEXTBOX 7 364 157 389 Producers: 20 105.0 1 TEXTBOX 10 532 160 557 Decomposers: 20 15.0 1 SLIDER 445 830 599 863 number_decomposers number_decomposers 1 10 1 1 1 NIL HORIZONTAL INPUTBOX 5 592 172 652 population_size 10000000000 1 0 Number MONITOR 994 196 1169 241 Energy input total_energy_input 3 1 11 MONITOR 997 611 1170 656 Energy deocmposer movement total_energy_output_decomposer_movement 3 1 11 MONITOR 994 240 1170 285 Unused energy input unused_energy_input 3 1 11 MONITOR 995 445 1171 490 Energy producer growth total_energy_producer_growth 3 1 11 MONITOR 995 524 1170 569 Energy producer maintenance total_energy_output_producer_maintenance 3 1 11 MONITOR 994 312 1169 357 Energy producer mass total_energy_in_producer_mass 3 1 11 MONITOR 993 357 1169 402 Energy decomposer mass total_energy_in_decomposer_mass 3 1 11 MONITOR 993 401 1169 446 Energy organic matter total_energy_in_organic_matter 3 1 11 MONITOR 996 569 1170 614 Energy decomposer maintenance total_energy_output_decomposer_maintenance 3 1 11 MONITOR 996 486 1171 531 Energy decomposer growth total_energy_decomposer_growth 3 1 11 MONITOR 940 56 1074 101 Mass of producers total_mass_producers 3 1 11 MONITOR 941 101 1073 146 Mass of decomposers total_mass_decomposers 3 1 11 MONITOR 941 145 1074 190 Organic matter total_organic_matter 3 1 11 PLOT 660 229 996 379 Energetics: Energy input time energy 0.0 10.0 0.0 10.0 true true PENS "Energy input" 1.0 0 -11221820 true "Energy input used" 1.0 0 -8630108 true PLOT 660 379 996 529 Energetics: Energy stocks energy stock time 0.0 10.0 0.0 10.0 true true PENS "Energy in producers" 1.0 0 -10899396 true "Energy in decomposers" 1.0 0 -2674135 true "Energy in organic matter" 1.0 0 -1184463 true SLIDER 5 652 172 685 passive_movement passive_movement 0 5 0.1 0.1 1 NIL HORIZONTAL MONITOR 802 546 947 591 No. decomposer species get-number-of-decomposer-species 0 1 11 TEXTBOX 668 201 818 226 Energetics: 20 115.0 1 TEXTBOX 667 10 817 40 Masses: 20 0.0 1 PLOT 661 47 941 197 Mass stocks time mass 0.0 10.0 0.0 10.0 true true PENS "Producer mass" 1.0 0 -13840069 true "Decomposer mass" 1.0 0 -2674135 true "Organic matter" 1.0 0 -1184463 true PLOT 1218 206 1559 383 Producer species counts species count 0.0 10.0 0.0 10.0 true false PENS "Producer species counts" 1.0 1 -16777216 true PLOT 1558 208 1900 384 Decomposer species counts species counts 0.0 10.0 0.0 700.0 true false PENS "default" 1.0 1 -16777216 true INPUTBOX 8 894 148 954 min_birth_mass_producers 0.0050 1 0 Number INPUTBOX 148 894 289 954 max_birth_mass_producers 1 1 0 Number INPUTBOX 8 982 148 1042 min_generative_fraction_producers 60 1 0 Number INPUTBOX 147 983 289 1043 max_generative_fraction_producers 100 1 0 Number INPUTBOX 8 1073 147 1133 min_maximum_mass_producers 2 1 0 Number INPUTBOX 144 1073 290 1133 max_maximum_mass_producers 200 1 0 Number SLIDER 8 864 289 897 birth_mass_new_producers birth_mass_new_producers min_birth_mass_producers + precision (1 / 200 * (max_birth_mass_producers - min_birth_mass_producers)) 3 max_birth_mass_producers - precision (1 / 200 * (max_birth_mass_producers - min_birth_mass_producers)) 3 0.03 precision (1 / 200 * (max_birth_mass_producers - min_birth_mass_producers)) 3 1 NIL HORIZONTAL SLIDER 8 953 289 986 generative_fraction_new_producers generative_fraction_new_producers min_generative_fraction_producers + round 1 / 100 * (max_generative_fraction_producers - min_generative_fraction_producers) max_generative_fraction_producers - round 1 / 100 * (max_generative_fraction_producers - min_generative_fraction_producers) 80 round 1 / 100 * (max_generative_fraction_producers - min_generative_fraction_producers) 1 NIL HORIZONTAL SLIDER 8 1042 290 1075 maximum_mass_new_producers maximum_mass_new_producers min_maximum_mass_producers + round (1 / 100 * (max_maximum_mass_producers - min_maximum_mass_producers)) max_maximum_mass_producers - round (1 / 100 * (max_maximum_mass_producers - min_maximum_mass_producers)) 20 round (1 / 100 * ( max_maximum_mass_producers - min_maximum_mass_producers)) 1 NIL HORIZONTAL BUTTON 312 496 433 529 insert producers insert-producers NIL 1 T OBSERVER NIL NIL NIL NIL SLIDER 7 831 147 864 xcor_producers xcor_producers min-pxcor max-pxcor 3 1 1 NIL HORIZONTAL SLIDER 147 832 288 865 ycor_producers ycor_producers min-pycor max-pycor 0 1 1 NIL HORIZONTAL SLIDER 288 863 599 896 gene_transfer_probability_new_decomposers gene_transfer_probability_new_decomposers min_gene_transfer_probability_decomposers + 0.1 max_gene_transfer_probability_decomposers - 0.1 5 0.1 1 NIL HORIZONTAL SLIDER 291 952 600 985 movement/maintenance_ratio_new_decomposers movement/maintenance_ratio_new_decomposers min_movement/maintenance_ratio_decomposers + 0.01 max_movement/maintenance_ratio_decomposers - 0.01 1.99 0.01 1 NIL HORIZONTAL SLIDER 289 1042 600 1075 spore_metabolic_fraction_new_decomposers spore_metabolic_fraction_new_decomposers min_spore_metabolic_fraction_decomposers + 0.1 max_spore_metabolic_fraction_decomposers - 0.1 1 0.1 1 NIL HORIZONTAL INPUTBOX 289 895 444 955 min_gene_transfer_probability_decomposers 0.1 1 0 Number INPUTBOX 444 894 599 954 max_gene_transfer_probability_decomposers 10 1 0 Number INPUTBOX 289 984 444 1044 min_movement/maintenance_ratio_decomposers 0.01 1 0 Number INPUTBOX 445 985 600 1045 max_movement/maintenance_ratio_decomposers 2 1 0 Number INPUTBOX 290 1074 445 1134 min_spore_metabolic_fraction_decomposers 0.1 1 0 Number INPUTBOX 444 1074 599 1134 max_spore_metabolic_fraction_decomposers 5 1 0 Number PLOT 1216 682 1559 832 Generative fraction species NIL 0.0 10.0 0.0 10.0 true false PENS "default" 1.0 1 -16777216 true PLOT 1558 384 1902 534 Gene transfer probability species NIL 0.0 10.0 0.0 6.0 true false PENS "default" 1.0 1 -16777216 true PLOT 1558 534 1902 684 Movement/maintenance ratio species NIL 0.0 10.0 0.0 1.5 true false PENS "default" 1.0 1 -16777216 true TEXTBOX 1222 20 1413 53 Producer species: 20 0.0 1 TEXTBOX 1564 22 1781 50 Decomposer species: 20 0.0 1 TEXTBOX 15 744 416 792 Species parameters: 32 0.0 1 PLOT 1560 682 1902 832 Spore metabolic fraction species spore metabolic fraction 0.0 10.0 0.0 1.0 true false PENS "default" 1.0 1 -16777216 true SLIDER 5 684 172 717 decomposer_mortality decomposer_mortality 0 3 1.8 0.1 1 NIL HORIZONTAL SLIDER 9 1132 292 1165 seed_dormancy_new_producers seed_dormancy_new_producers min_seed_dormancy_producers + 5 max_seed_dormancy_producers - 5 10 30 1 NIL HORIZONTAL INPUTBOX 9 1165 146 1225 min_seed_dormancy_producers 5 1 0 Number INPUTBOX 144 1165 292 1225 max_seed_dormancy_producers 390 1 0 Number SLIDER 9 1224 292 1257 germination_probability_new_producers germination_probability_new_producers min_germination_probability_producers + 1 max_germination_probability_producers - 1 2 1 1 NIL HORIZONTAL INPUTBOX 8 1257 147 1317 min_germination_probability_producers 1 1 0 Number INPUTBOX 146 1257 293 1317 max_germination_probability_producers 51 1 0 Number SLIDER 1 491 174 524 seed_mortality seed_mortality 0 50 1 1 1 NIL HORIZONTAL MONITOR 656 634 801 679 count seeds count producers with [isSeed? = true] 0 1 11 MONITOR 800 634 946 679 count spores count decomposers with [isSpore? = true] 17 1 11 PLOT 1216 832 1559 982 Seed dormancy species seed dormancy 0.0 10.0 0.0 10.0 true false PENS "default" 1.0 1 -16777216 true PLOT 1218 980 1560 1130 Germination probability species germination probability 0.0 10.0 0.0 10.0 true false PENS "default" 1.0 1 -16777216 true @#$#@#$#@ WHAT IS IT? ----------- Neture is a NetLogo model that simulates how Nature works. Neture simulates a terrestrial ecosystem at the interface of ecology and evolution. The model embraces the three main ecosystem components: (1) the landscape environment, (2) the producers, and (3) the decomposers. It assembles processes that operate on a local spatial scale, endure decades, but progress with daily time steps. HOW IT WORKS ------------ Producer and decomposer species are both defined by a set of attributes. For an organism to belong to a certain species its attributes have to stay within the species-specific range. Exchange of genes leads to recombination of attributes. Mutation of attributes may take place - thereby giving rise to evolution and speciation. As all living things in Neture producers and decomposers have energy supply either from sunlight or from organic matter and undergo metabolism for their maintenance, growth and reproduction. In Neture maintenance and growth metabolism is governed by "universal scaling laws" given by West, Brown & Enquist (2001) and Gilloly et al. (2001). Additional parameters with respect to plants and bacteria were obtained from Larcher (2003) and Elert, respectively. (1) The landscape environment supplies energy to the biotic subsystem of producers. Allowance is made for spatial and/or temporal heterogeneity of the energy supplied across the landscape. (2) The producers - or say - plants take up energy in the form of sunlight from the environment and use it for their metabolism. A producer (species) is defined by its mass at birth, its maximum mass at maturity, the fraction of maximum mass at which generative reporduction starts, the seed dormancy and the germination probability. Generative reproduction between a father and a mother plant takes place in the pollination range around the father plant. Supposing that lighter seeds are dispersed farther, the range of dispersal is made negatively dependent on the log mass at birth. Further assuming that heavier plants are taller and thus disperse their seeds farther, the dispersal range is made dependent on the log maximum mass. The effects considered to be additive are finally adjustable by you. The dispersed seeds enter the soil seed bank, reside there at least for the species-specific seed dormancy and exhibit hardly any metabolism during that time (compare Solbrig 1980). After seed dormancy has passed by a seed germinates with a certain daily probability or it dies with the user-defined probability which summarizes effects of (biotic) soil mixing and predation on seed viability (Solbrig 1980). An established producer either dies when its maintenance requirements are not fulfilled or when it has reached 99% of its maximum mass (determinate growth). Its residues enter the organic matter pool of the landscape patch, where it died. (3) The decomposers are simulated as populations of bacteria that behave like single bacterium cells. This strategy for scaling down from the producer to the decomposer level shall cope with the consequences of the body sizes being distinct between the two groups. A decomposer (species) is defined by its "spore" metabolic fraction, by the gene transfer probability and the movement to maintenance ratio. When organic matter is scarce, bacteria tend to transform either into GASP phenotypes with reduced metabolism or into spores with negligible metabolism (Colwell & Huq 1994, Storz & Hengge-Aronis 2000). Their metabolism is fed by stored reserves and is used merely for maintenance. Under those threatening conditions bacteria are simulated to transfer genes and eventually develop mutations. When maintenance requirements cannot be satisfied any longer, the enduring form dies from starvation. With plenty of organic matter bacteria are assumed to transfer genes with the probability set by the user. Bacteria are at the bottom trophic level of the soil food web (Chapin (III.), Matson & Mooney 2002). Since true integration of higher trophic levels is beyond the scope of this model, their effect on bacteria populations is simulated as a decomposer mortality to be set by you. Soil bacteria tend to form microfilms along soil macropores; they are considered to be translocated primarily by the activity of the soil meso- and macrofauna (Chapin (III.), Matson & Mooney 2002). You can choose the extent of this passive movement. Apart from that the movement to maintenance ratio allows to simulate effects of active movement. The residues of dead bacteria or spores enter the organic matter pool of the landscape patch - thereby forming sort of a closed loop. HOW TO USE IT ------------- Before you start a model run please choose a SPECIES_RANGE, which defines the % deviation a species attribute is allowed to have before an organism is considered to belong to a different species. The default is 10%. (1) Landscape environment: You may wish to manage settings of the landscape right before you start a model run, but it is also possible to change those settings later. The SMOOTHNESS and RANGE sliders allow for spatial heterogeeneity. The SMOOTHNESS slider alters the patch-to-patch change in the energy supply. When the RANGE slider is set to zero you are dealing with a homogeneous landscape, when RANGE is set to the maximum 100 the energy supply is made heterogeneous and varies between 0 and 100. Turning on the CHANGING-LANDSCAPE? switch leads to temporal heterogeneity. The LANDSCAPE-CHANGE-RATE slider alters the speed with which the energy supply changes. The PENERGY_MULTIPLICATOR slider allows to adjust the energy input to realistic units. With the PATCH_COLOR chooser you can color the landscape by the energy, the usable energy or by the organic matter. As usual pressing the SETUP button prepares for a model run. (2) Producers: Afterwards you may populate the landscape with producers by pressing the INSERT PRODUCERS button. Before doing so you can set the NUMBER_PRODUCERS and the location of producers (XCOR_PRODUCERS, YCOR_PRODUCERS) to be inserted. Below are sliders for setting the attributes of the producers within the min-/max-limits given by the inputs. External effects on the behavior of producers are on sliders located on the left hand side (POLLINATION_RANGE, DISPERSAL_RANGE, SEED_MORTALITY). Seeds are being displayed on the landscape as empty squares, whereas established producers are shown as empty triangles. Producers belonging to different species are depicted in different colors. (3) Decomposers: Subsequently, it is required to insert decomposers. You can do so by pressing the INSERT_DECOMPOSERS button. The landscape is then homogeneously populated with NUMBER_DECOMPOSERS representing the number of decomposers to be inserted per patch. Once again you can choose decomposer attributes within limits using the sliders at the bottom. Sliders for introducing external effects, such as PASSIVE_MOVEMENT and DECOMPOSER_MORTALITY, are located on the left hand side. Spores are being displayed as filled squares, while fully active decomposers are displayed using a bacterium-like shape. As with producers the color of a decomposer depends on the species which it belongs to. After you have made those arrangements start the model run by pressing the GO button. Have fun to watch the unfolding mass and enery dynamics on top-level monitors and plots. At any time you can initiate evolutionary processes and speciation by setting the MUTATION_PROBABILITY to a non-zero value. Enjoy watching the attributes of new species and their population dynamics on species-specific plots located at the very right. THINGS TO TRY AND NOTICE ---------------- I am still at the beginning of model exploration. Initially, my principal interest was to find regions of species coexistence in the vast multi-dimensional parameter space. This is what I would recommend you to try first as well. Developing hypotheses about species coexistence and testing them with Behavior Space experiments will give you many opporutinities to learn how Neture works. Here are some basic results and ideas that emerged from them: I was unsuccessful to detect regions of producer species coexistence by varying the energy supply in planned two-species experiments on a homogeneous landscape (-> Is spatial or temporal heterogeneity a sine qua non for coexistence and diversity?). Almost always the species with higher maximum mass won. There was one exception from that: At very low energy supplies even the first generation of heavier plants was not able to reproduce and died already. Next I tried to compensate the consequences of higher maximum mass in terms of dispersal by reducing the mass at birth for the heavier species in experiments. I thought that might change the outcome of the competition. But unfortunately, this did not change anything. The heavier species remained the winner. My next attempt was to study the effects of the external factor "dispersal range" on the experimental results. Although reduced dispersal range was likely to increase intra-species competition, it did not alter the outcome of the competition. Returning to the above mentioned exception I conducted an experiment with extreme landscape heterogeneity (RANGE = 100). The idea here was that the competition by the heavier species would be excluded on very low energy patches. It did not work out that way - since even dispersal of seeds by the heavier species drove the lighter species to extinction. I thought further that some extra space would be necessary to prevent seed dispersal from reaching those patches and achieving protection. Whatsoever, I have not tried it yet. Nonetheless, I was finally successful and found a region of species coexistence, but the result was surprising and unexpected in many respects: The region was located at a high energy supply. Lighter plants resided on patches with high energy supply, while low energy patches were populated by heavier plants. I can send you the experimental settings. So do not hesitate to ask me at uwegrueters@users.sourceforge.net . Otherwise try to find this region yourself. Can you explain why this happens at all? Since it is well known that high species richness is frequently associated with infertile conditions, try also to find regions of coexistence in the domain of overall low energy supply. However, this all involves filling spatial niches with species. But is there a way to fill temporal niches with species as well? Recall that seed dormancy may open up such possibilities. Play around with that parameter and try to address the above question. Extend the search for species coexistence also to the realms of temporal landscape heterogeneity (by turning on the changing-landscape? switch). The potentials of filling temporal niches seem promising, since the energy used often falls remarkably behind the available energy when temporal fluctuation is allowed for. Try to do similar planned experiments with inserted decomposer species. An option might be to let "non-sporulating" species of higher active motility compete with spore-forming species that are merely moved passively. When you think you have learned enough about how Neture works, give up the initial constraints and allow evolution and speciation to enter the scene. I would recommend to insert a number of diverging producer and decomposer species, let a dynamic equilibrium develop and then - by setting the MUTATION_PROBABILITY non-zero - let the "evolutionary damn burst". This setting will alter your search fundamentally: Try now to find regions of maximum species packaging or - in other words - regions of maximum species richness and diversity. Please send me your insights of how Neture works together with the experimental settings from which you gained your insights. My e-mail address is: uwegrueters@users.sourceforge.net EXTENDING THE MODEL ------------------- Here are just few hints: - Based on your insights make Neture as diverse as Nature. - Integrate an above-ground consumer food web. - Integrate a sol food web consisting of nematodes, micro-arthropods, enchythraeids and earthworms. West, Brown & Enquist (2001) and Gilloly et al. (2001), respectively, have parameters for other groups of organisms as well. Let actions of these animals afffect the bacterial populations directly (by predation) and indirectly (by soil mixing). - Think about alternatives for scaling down from producers to decomposers - alternatives, that take into account spatial heterogeneity in the decomposers' world. NETLOGO FEATURES ---------------- Code for the implementation of the landscape was taken from the NetLogo User Community model "Fitness_Landscape". http://ccl.northwestern.edu/netlogo/models/community/Fitness_Landsacape The species counts and species attributes plots followed the example given in the "Echo" model contained in the NetLogo Models Librariy. http://ccl.northwestern.edu/netlogo/models/Echo RELATED MODELS -------------- UIBM - the Universal Individual-Based Model. Project website: http://uibm-de.sourceforge.net Project administrator: Dr. Uwe Grueters, uwegrueters@users.sourceforge.net REFERENCES ---------------------- - West G.B., Brwon J.M. & Enquist B.J.(2001): A genereral model for ontogenetic growth. Nature 413, pp. 628-631 - Gilloly J.F. et al. (2001): Effects of size and temerperature on metabolic rate. Science 293, pp. 2248-2251 - Larcher W. (2003): Physiological plant ecology. Springer - Elert G.: The Physics Factbook: Mass of a bacterium. http://hypertextbook.com/facts/2003/LouisSiu.shtm - Solbrig O.T. (1980): Demography and evolution in plant populations. University of California Press - Colwell R.R. & Huq A. (1994: Chapter 9: Vibrios in the environment: Viable but non-culturalble Vibrio cholerae. pp. 117-135 In: Wachsmuth K., Blake P.A. & Olsvik Ø. (1994): Vibrio cholerae and cholera: molecular to global perspectives. ASM Press - Storz G. & Hengge-Aronis R. (2000): Bacterial stress responses. ASM Press - Chapin (III.) F.S. , Matson P.A., Mooney H.A. (2002): Principles of terrestrial ecosystem ecology. Birkhäuser COPYRIGHT NOTICE ---------------- In academic publications any references to this model should refer to: - Grueters U. (2011): Neture - a NetLogo model that simulates how Nature works. http://ccl.northwestern.edu/netlogo/models/community/Neture In all other publications please use: Copyright 2011 Dr. Uwe Grueters. All rights reserved. Permission to use, modify or redistribute this model is hereby granted, provided that both of the following requirements are followed: a) this copyright notice is included. b) this model will not be redistributed for profit without permission from Uwe Grueters. Contact Uwe Grueters at uwegrueters@users.sourceforge.net for appropriate licenses related to redistribution for profit. @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 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 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 bacterium true 0 Circle -7500403 true true 103 207 95 Circle -7500403 true true 103 -3 95 Rectangle -7500403 true true 105 45 195 255 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 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 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 circle 3 false 0 Circle -7500403 false true 15 15 270 cow false 0 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 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 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 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 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 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 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 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 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 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 0 Rectangle -7500403 true true 151 225 180 285 Rectangle -7500403 true true 47 225 75 285 Rectangle -7500403 true true 15 75 210 225 Circle -7500403 true true 135 75 150 Circle -16777216 true false 165 76 116 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 square 3 false 0 Rectangle -7500403 false true 45 45 255 255 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 triangle 3 true 0 Polygon -7500403 false true 45 255 255 255 150 0 45 255 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 4.1 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup set xcor_producers -3 set birth_mass_new_producers 0.01 set maximum_mass_new_producers 10 insert-producers set xcor_producers 3 set birth_mass_new_producers 0.03 set maximum_mass_new_producers 20 insert-producers insert-decomposers go monocultureReached? count producers with [producer_species = 0] count producers with [producer_species = 1] @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 1.0 0.0 0.0 1 1.0 0.0 0.2 0 1.0 0.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@