updateGrid | R Documentation |
This function updates the coordinate of each lobster at each timestep, The distanceToTrap function calculates the distance to the closest trap
updateGrid(
Lobster,
Trap,
trapCatch,
lobSize,
lobSex,
radiusOfInfluence,
currentZoI,
dStep,
howClose,
q0,
qmin,
saturationThreshold,
trapSaturation,
lengthBased,
lobLengthThreshold,
sexBased
)
Lobster |
is the x & y coordinates of each lobster |
Trap |
is the x & y coordinates of trap(s) |
trapCatch |
number of captured lobster |
lobSize |
size of captured lobster |
lobSex |
to-do-list: check with Vahab |
radiusOfInfluence |
is the initial radius of influence (I0 in the paper) |
currentZoI |
is the bait's area of influence at each timestep |
dStep |
is how much a lobster moves in each time step |
howClose |
sets the distance from the trap within which catch occurs |
q0 |
is the initial probability of entry into an empty trap(i.e. 0.5) |
qmin |
is the asymptotic minimum probability of entry (i.e. 0) |
saturationThreshold |
is the number of lobsters in a trap at which the probability of another lobster entering the trap drops to qmin |
trapSaturation |
is a logical parameter |
lengthBased |
is a logical parameter |
lobLengthThreshold |
is a length threshold (i.e. CL in centimeters) beyond which there is no chance of catching another lobster |
sexBased |
is a logical parameter |
a list of new coordinates, number of catch and their sizes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.