Skip to contents

The function opens a shiny gadget, an interactive web page. This page has a side panel with controls for various model parameters and a main panel with tabs for various diagnostic plots.

Usage

tuneParams(
  params,
  controls = c("predation", "fishing", "reproduction", "other", "interaction",
    "resource"),
  tabs = c("Spectra", "Abundance", "Growth", "Repro", "Catch", "Diet", "Death",
    "Resource", "Rates", "Sim"),
  match = c("none"),
  preserve = c("erepro", "reproduction_level", "R_max"),
  return_app = FALSE,
  ...
)

Arguments

params

MizerParams object to tune. If missing, the gadget tries to recover information from log files left over from aborted previous runs.

controls

A character vector of names of input parameter control sections that should be displayed in the sidebar.

tabs

A character vector of names of the tabs that should be displayed in the main section.

match

A character vector. Determines which quantities should be matched to observations each time the "steady" button is pressed. Possible entries are "growth" (using matchGrowth()), "biomass" (using matchBiomasses()) and "yield" (using mizerExperimental::matchYield()).

preserve

Specifies whether the reproduction_level should be preserved or the maximum reproduction rate R_max or the reproductive efficiency erepro (Default). See setBevertonHolt() for an explanation of the reproduction_level.

return_app

Boolean. For testing purposes only. When set to TRUE will return a shinyApp object instead of running the gadget.

...

Other params needed by individual tabs.

Value

The tuned MizerParams object

Details

This gadget is meant for tuning a model to steady state. It is not meant for tuning the dynamics of the model. That should be done in a second step using functions like setRmax() or changeResource().

While you tune, changing a parameter recalculates only the size spectrum of the selected species. The growth and mortality rates it is solved from are evaluated from the previous state, with the abundances of every species and of the resource — including the selected species itself — held fixed. The rest of the community therefore does not respond, and neither does the species' own recomputed abundance feed back into its rates, until you press the "steady" button, which runs the full model to its multi-species steady state. See vignette("extending_the_tuning_gadget") for details.

There is an "Instructions" button near the top left of the gadget that gives you a quick overview of the user interface.

After you click the "Return" button in the side panel, the function will return the parameter object in the state at that time, with Rmax set to Inf and erepro set to the value it had after the last run to steady state.

At any time the gadget allows the user to download the current params object as an .rds file via the "Download" button.

See also

tuningGadget() for the underlying engine and how to add your own controls and tabs; the article vignette("extending_the_tuning_gadget").