Skip to contents

Updates the simulation configuration of a Bioenergetic object.

Usage

set_simulation_settings(x, initial_weight = NULL, duration = NULL)

Arguments

x

Bioenergetic object

initial_weight

Initial weight in grams

duration

Simulation duration in days (auto-detected if NULL)

Value

The Bioenergetic object x with simulation_settings$initial_weight and/or simulation_settings$duration updated, and fitted reset to FALSE. If duration is NULL and none was previously set, the duration is auto-detected from the maximum Day in environmental or diet data.

Examples

# \donttest{
bio <- Bioenergetic(
  species_params = list(
    consumption = list(CEQ = 1, CA = 0.303, CB = -0.275, CQ = 0.06)
  ),
  species_info = list(common_name = "Example fish")
)
#> Bioenergetic object created for: Example fish
bio <- set_simulation_settings(bio, initial_weight = 50, duration = 365)
bio$simulation_settings$initial_weight
#> [1] 50
# }