View source: R/08-mortality-reproduction.R
| calculate_mortality_reproduction | R Documentation |
Calculates daily mortality probability and reproductive energy loss (natural mortality, fishing mortality, predation mortality, starvation, and weight-dependent survival) for a single time step.
calculate_mortality_reproduction(
current_weight,
temperature,
day_of_year,
processed_mortality_params,
initial_weight = NULL
)
current_weight |
Current fish weight (g) |
temperature |
Water temperature (deg C) |
day_of_year |
Day of year (1-365) |
processed_mortality_params |
List with processed mortality parameters |
initial_weight |
Initial weight for relative calculations (optional) |
A named list with five elements:
Named list with seven numeric scalars (all daily
rates, 0–1): survival_rate, combined_mortality,
natural_mortality, fishing_mortality,
predation_mortality, weight_effect (increment to
mortality due to low body weight), and temperature_effect
(increment due to thermal stress).
NULL if no spawn pattern is defined in
processed_mortality_params; otherwise a named list with
weight_loss (g), energy_loss (J),
spawn_fraction (0–1), and remaining_weight (g).
Integer. Day of year, as supplied.
Numeric. Fish weight (g), as supplied.
Numeric. Water temperature (^\circC), as
supplied.
Mortality rate modelling is an **experimental feature** under active development. This function can be called directly to compute daily mortality probability for a single time step, but **mortality rates are not yet integrated** into the main 'run_fb4()' simulation loop. Full integration (automatic daily mortality application, population survival tracking, and result reporting) is planned for a future release. The API may change.
Note: **spawning energy loss** (reproductive cost) *is* already integrated into 'run_fb4()' and applies automatically when 'reproduction_data' is supplied to the 'Bioenergetic' object.
params <- list(
base_mortality = 0.001,
natural_mortality = 0.001,
fishing_mortality = 0.0005,
predation_mortality = 0.0002,
weight_threshold = 10,
starvation_factor = 2,
optimal_temp = 18,
thermal_tolerance = 8,
stress_factor = 1.5,
spawn_pattern = NULL
)
calculate_mortality_reproduction(current_weight = 100, temperature = 15,
day_of_year = 180,
processed_mortality_params = params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.