updateGrid: This function updates the coordinate of each lobster at each...

Description Usage Arguments Value

View source: R/updateGrid.R

Description

This function updates the coordinate of each lobster at each timestep, The distanceToTrap function calculates the distance to the closest trap

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
updateGrid(
  lobsterCoordinates,
  trapCoordinates,
  trapCatch,
  lobSize,
  radius_of_influence = 15,
  dstep = 5,
  currentZoI,
  how_close = 0.1,
  q0 = 0.5,
  qmin = 0,
  saturationThreshold = 5,
  trapSaturation = T,
  lengthBased = F
)

Arguments

lobsterCoordinates

is the coordinates (x,y) of each lobster at each time step

trapCoordinates

is the coordinate of trap(s)

trapCatch

number of lobsters caught

lobSize

size of caught lobster

radius_of_influence

is set to 15 by default

dstep

is set to 5 by default

currentZoI

is the bait's area of influence at each timestpe

how_close

is set to 0.1 by default

q0

is set to 0.5 by default

qmin

is set to 0 by default

trapSaturation

is set to TRUE by default

lengthBased

is set to FALSE by default

saturationThresholdis

set to 5 by default

Value

a list of new coordinates, number of catch and their size


vpourfaraj/lobsterCatch0.1 documentation built on Feb. 25, 2021, 2:56 p.m.