survival_simulation_driver: Run a Full Simulation

Description Usage Arguments Details Value Note Source Examples

View source: R/prey_survival_simulation.R

Description

Runs a full simulation with a user-specified number of fish. Users can also adjust fish mean length and sd, environment size, grid size, and predator reaction distance. The model runs through the following: calculates predators and their positions, calculates grid cells and their encounter probabilities, calculates a unique path for each fish, simulates and resolves encounters for each fish in each cell, determines survival after all fish have gone through each cell.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
survival_simulation_driver(
  number_of_fish,
  mean_length,
  n_transects,
  sd_length = (1.7/14) * mean_length,
  transect_length = 1000,
  lit_zone_size = 5,
  channel_width = 100,
  grid_size = 15,
  reaction_dis = 0.5
)

Arguments

number_of_fish

number (pos integer) of prey fish desired

mean_length

mean length of fish in cm

n_transects

integer of transects in the model

sd_length

std dev of fish length in cm; default is 1.7 and scales with mean

transect_length

length of each transect in meters; default is 1000

lit_zone_size

the size of the littoral zone (i.e., nearshore area) in meters; default is 5

channel_width

width of the channel in meters; default is 100

grid_size

length of side of raster grid in meters; default is 15

reaction_dis

maximum distance (in m) away from a predator that can trigger an encounter; default is 0.50

Details

The return value is the proportion of survivors.

Value

the proportion of surviving fish

Note

this function can be parallelized; e.g., by setting plan(multisession)

Source

defaults based on Steel et al. 2020. "Applying the mean free-path length model to juvenile Chinook salmon migrating in the Sacramento River, California" and Michel et al. 2018. "Non-native fish predator density and molecular-based diet estimates suggest differing effects of predator species on Juvenile Salmon in the San Joaquin River, California"

Examples

1
survival_simulation_driver (number_of_fish = 20, mean_length = 10, n_transects = 5)

mrguyperson/predpackplus documentation built on Dec. 21, 2021, 10:08 p.m.