MyNixOS website logo
Description

'Fish Bioenergetics 4.0' Model Implementation with High-Performance 'TMB' Backend.

An implementation of the 'Fish Bioenergetics 4.0' framework described in Deslauriers et al. (2017) <doi:10.1080/03632415.2017.1377558>. Provides automated parameter optimization, multi-prey diet modeling, and comprehensive energy budget simulations for fisheries research and aquaculture applications. An optional 'TMB' (Template Model Builder) backend delivers 10-50x speedup in maximum likelihood estimation while maintaining full backward compatibility. Includes species-specific parameter databases and tools for modeling fish growth, consumption, and metabolism under varying environmental conditions.

fb4package fb4package logo

An R implementation of Fish Bioenergetics 4.0 (Deslauriers et al. 2017). The model partitions consumed energy among metabolism, waste, and growth to produce daily estimates of fish consumption and weight gain.

Installation

# Stable release from CRAN
install.packages("fb4package")

# Development version from GitHub
# install.packages("devtools")
devtools::install_github("HansTtito/fb4package")

Usage

library(fb4package)

data(fish4_parameters)
chinook <- fish4_parameters[["Oncorhynchus tshawytscha"]]

bio <- Bioenergetic(
  species_params     = chinook$life_stages$adult,
  species_info       = chinook$species_info,
  environmental_data = list(
    temperature = data.frame(Day = 1:100,
                             Temperature = 10 + 5 * sin(2 * pi * (1:100) / 365))
  ),
  diet_data = list(
    proportions = data.frame(Day = 1:100, Alewife = 0.7, Shrimp = 0.3),
    prey_names  = c("Alewife", "Shrimp"),
    energies    = data.frame(Day = 1:100, Alewife = 4900, Shrimp = 3200)
  ),
  simulation_settings = list(initial_weight = 1800, duration = 100)
)

# Fit p to a target final weight
res <- run_fb4(bio, strategy = "binary_search", fit_to = "Weight", fit_value = 3000)
print(res)

Full documentation, vignettes, and function reference are available at https://hansttito.github.io/fb4package/.

Documentation

Reference

Deslauriers D, Chipps SR, Breck JE, Rice JA, Madenjian CP (2017). Fish Bioenergetics 4.0: An R-Based Modeling Application. Fisheries 42(11):586–596. https://doi.org/10.1080/03632415.2017.1377558

Code of Conduct

Please note that fb4package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

MIT.

Metadata

Version

2.1.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows