Description Usage Arguments Details Value Note Source Examples
View source: R/prey_survival_simulation.R
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.
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
)
|
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 |
The return value is the proportion of survivors.
the proportion of surviving fish
this function can be parallelized; e.g., by setting plan(multisession)
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"
1 | survival_simulation_driver (number_of_fish = 20, mean_length = 10, n_transects = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.