directionalMove: This function controls the movements of lobsters toward the...

View source: R/directionalMove.R

directionalMoveR Documentation

This function controls the movements of lobsters toward the trap. There are both directional and random move components considered in this function. The proximity of a lobster to a trap controls the magnitude of each components, i.e closer a lobster gets to the trap the smaller the random component of movement. The directional move depends on radius of influence of a trap and current zone of influence.

Description

This function controls the movements of lobsters toward the trap. There are both directional and random move components considered in this function. The proximity of a lobster to a trap controls the magnitude of each components, i.e closer a lobster gets to the trap the smaller the random component of movement. The directional move depends on radius of influence of a trap and current zone of influence.

Usage

directionalMove(
  Lobster,
  dStep,
  minDistoTrap,
  Trap,
  radiusOfInfluence,
  currentZoI
)

Arguments

Lobster

location of lobster in the grid in x and y coordinates.

dStep

defines the distance that each lobster moves in each time step.

minDistoTrap

defines the minimum distance to the trap.

Trap

location of trap in the grid in x and y coordinates.

radiusOfInfluence

trap's radius of influence.

currentZoI

initial zone of influence

Value

Returns the new coordinates of each lobster in the grid after a directional move is applied.


vpourfaraj/lobsterCatch documentation built on May 17, 2023, 1:37 p.m.