Learn R Programming

fb4package (version 2.0.0)

Bioenergetic: Constructor for Bioenergetic Objects

Description

Creates a Bioenergetic class object that encapsulates all components of the fish bioenergetic model for streamlined simulation management.

Usage

Bioenergetic(
  species_params,
  species_info = NULL,
  environmental_data = NULL,
  diet_data = NULL,
  reproduction_data = NULL,
  model_options = list(),
  simulation_settings = list()
)

Value

An object of class "Bioenergetic": a named list with eight elements: species_info, species_params,

environmental_data, diet_data, reproduction_data,

model_options, simulation_settings, and fitted

(logical, FALSE until a simulation is run). A results

element is appended by set_environment,

set_diet, and run_fb4 when they reset or populate the object.

Arguments

species_params

List with species parameters organized by categories

species_info

List with species identification information

environmental_data

List with environmental data (temperature, etc.)

diet_data

List with diet and prey energy data

reproduction_data

List with reproduction parameters (optional)

model_options

List with model configuration options

simulation_settings

List with simulation configuration

Details

The Bioenergetic object serves as a comprehensive container for all bioenergetic model components.

Required Components:

species_params

Parameter sets for consumption, respiration, etc.

species_info

Species identification with scientific_name or common_name

Optional Components:

environmental_data

Temperature and other environmental variables

diet_data

Diet composition and prey energy densities

model_options

Sub-model toggles and advanced settings

simulation_settings

Initial conditions and duration

Examples

Run this code
# \donttest{
# Create species parameters
params <- list(
  consumption = list(CEQ = 2, CA = 0.303, CB = -0.275, CQ = 3, CTO = 15, CTM = 25),
  respiration = list(REQ = 1, RA = 0.0548, RB = -0.299, RQ = 2, RTO = 5, RTM = 25)
)

# Create species info
species_info <- list(
  scientific_name = "Salmo salar",
  common_name = "Atlantic salmon",
  life_stage = "juvenile"
)

# Create bioenergetic object
bio_obj <- Bioenergetic(
  species_params = params,
  species_info = species_info,
  simulation_settings = list(initial_weight = 10, duration = 365)
)
# }

Run the code above in your browser using DataLab