Model to accompany Module 12.4, "Modeling an 'Able' Invader?the 'Cane' Toad," from "Introduction to Computational Science: Modeling and Simulation for the Sciences," 2nd ed., by Angela B. Shiflet and George W. Shiflet, Princeton University Press. Copyright 2013.In the vast parts of arid Australia during the dry season, artificial water points (AWPs), such as troughs or dams for livestock, can serve as invasion hubs for cane toads. Thus, targeting AWPs might help prevent the spread of this invasive species. This model studies the effect of fencing AWPs on adult cane toad invasion.
Number of agents: 4
Number of methods: 2
Count number of StartBorder tiles (numStartBorder). Put food and moisture on borders: -1 for both on StartBorder and Border so that Toads do not go there. 2 on FinishBorder so that Toads are attracted there.
Number of rules: 3
IfCreate toad with probability INIT_PERCENT_TOADS/100
Number of rules: 1
IfNumber of methods: 9
Initialize moisture and food. Make both -1 for FencedAwp so that a toad does not move towards that location.
Number of rules: 6
IfInitialize desert color
Number of rules: 1
IfPlace AWPs, fenced AWPs, and moist areas on desert. Chance of changing a Desert agent to an Awp agent is PERCENT_AWPS/100. Chance of changing a Desert agent to a MoistArea agent is PERCENT_MOIST_AREAS/100.
Number of rules: 1
IfChance of changing an Awp agent to a FencedAwp is PERCENT_AWPS_FENCED/100.
Number of rules: 1
IfIf current agent is a Desert agent that is staced below another desert agent (such as an Awp agent), erase the current agent. If The current agent is a Desert agent that is adjacent to an Awp or a FencedAwp agent, change the current agent to an AwpAdjacent agent.
Number of rules: 2
IfIf The current agent is a Desert agent that is adjacent to an AwpAdjacent agent, change the current agent to an AwpOver2 agent.
Number of rules: 1
IfUpdate the food for a desert agent after a toad on top of it has eaten.
Number of rules: 4
IfMake fenced AWP unfenced
Number of rules: 1
IfMake unfenced AWP fenced
Number of rules: 1
IfNumber of methods: 4
Simulation. Phase 0: initialization of area aroud AWPs and creation of cane toads on starting boarder. Phase 1: Toads eating and drinking. Phase 2: Toads moving. Phase 3: Toads changing state.
Number of rules: 4
IfCheck if the simulation should terminate because no more toads exist on the grid
Number of rules: 1
IfProcedure to ask all AWPs to become unfenced - for creating a landscape of unfenced AWPs
Number of rules: 1
IfProcedure to ask all AWPs to become fenced - for creating a landscape of fenced AWPs
Number of rules: 1
IfNumber of methods: 21
'food' and 'moisture' set to -1 to avoid more than 1 toad in same position
Number of rules: 1
IfToad behavior regarding eating
Number of rules: 2
IfFunction to update a toad's energy and water after it eats
Number of rules: 1
IfCalculate amtEat the minimum of @AMT_EAT, food, and 1 - energy.
Number of rules: 1
IfUpdate toad's water obtained from food
Number of rules: 2
IfToad behavior regarding drinlomg
Number of rules: 1
IfFunction to update a toad's water after it drinks
Number of rules: 2
IfFor toad hidden by desert agent, move forward, update availableFood (possibly changed for desert agent), and back so that it shows.
Number of rules: 1
IfPossibly move the toad
Number of rules: 4
IfFunction to change the position of a very thirsty toad
Number of rules: 4
IfFunction to move toad towards maximum moisture when toad was at current location at last time step. Called by lookForMoisture.
Number of rules: 2
IfFunction to update a toad's state when staying in the current location
Number of rules: 1
IfProcedure for toad to stay in current location
Number of rules: 1
IfProcedure when toad hops to current location
Number of rules: 1
IfFunction to update a toad's state when moving to the west
Number of rules: 1
IfFunction to have a toad go to/remain at a vacant neighborhood location with the maximum amount of food
Number of rules: 3
IfFunction to update a toad's location to hop in a random "legal" direction with the most amount of food
Number of rules: 2
IfProcedure to reduce a toad's energy and water after sitting
Number of rules: 3
IfProcedure to reduce a toad's energy and water after hopping
Number of rules: 3
IfFunction to update a toad's location to hop in a random "legal" direction if possible
Number of rules: 4
IfMethod to eliminate a toad that should be dead or migrated
Number of rules: 3
If