The process of building a new multi-species model by adding the species to a generic trait-based background has better support.
tuneParams()
starts a shiny gadget that allows for interactive tuning of model parameters while various plots update automatically.addSpecies()
can now add several species at once, all at low abundancepruneSpecies()
, renameSpecies()
, rescaleAbundance()
, retuneReproductionEfficiency()
.retuneBackground()
, Singular Value Decomposition is used to retune background species to keep the community close to power law. Background species with very low abundances are automatically removed.setRmax()
.After setting up a mizer model, it is possible to change specific model parameters with the new functions
setPredKernel()
setSearchVolume()
setInteraction()
setIntakeMax()
setMetab()
setBMort()
setReproduction()
setFishing()
setPlankton()
The new function setParams()
is a wrapper for all of the above functions and is also used when setting up a new model with newMultispeciesParams()
. (#51)
plotlyBiomass()
as the plotly version of plotBiomass()
, and so on.plotGrowthCurves()
plots growth curves and compares them to the von Bertalanffy growth curve.plotDiet()
plots the diet composition as a function of predator size.highlight
argument to all plot functions that display curves for multiple species. Displays highlighted species with wider lines.plot()
method for MizerParams object to plot the initial state.print_it
argument in plot functions to FALSE
.wlim
argument to plotSpectra()
in analogy to the existing ylim
argument to limit the w range in the plot.xlab
and ylab
for displayFrames()
.linecolour
slot.solid
but this can be changed via the linetype
slot.box_pred_kernel()
implements a box-shaped kernel as an alternative to the default lognormal_pred_kernel()
.power_law_pred_kernel()
implements a power-law kernel with sigmoidal cutoffs at both ends. This is suitable for filter feeders.setPredKernel()
). Mizer automatically falls back on the old non-FFT code to handle this. (#41)getPredKernel()
returns the full 3-dimensional predation kernel array, even when this is not stored in MizerParams object.fc
can now be specified as a species parameter and will be used to calculate the metabolic rate parameter ks
if it is not supplied.newSheldonParams()
that sets up a single species in a power-law background.upgradeParams()
can upgrade MizerParams objects from previous versions of mizer so they work with the new version.project()
now shows a progress bar while a simulation is running. Can be turned off with progress_bar = FALSE
argument.getDiet()
calculates the diet of predators. (#43)srrRicker()
and srrSheperd()
.Inf
.plankton_semichemostat()
.interaction_p
column in the species parameter data frame.double_sigmoid_length()
allows modelling of escape of large individuals.sigmoidal_weight()
is weight-based trawl selectivity function. (Ken H Andersen)w_mat25
column in the species parameter dataframe, which gives the size at which 25% of the individuals of a species are mature.m
column in the species parameter data frame.project()
can now continue projection from last time step of a previous simulation if the first argument is a MizerSim object. The new append
argument then controls whether the new results are appended to the old.getGrowthCurves()
calculates the growth curves (size at age).newMultispeciesParams()
.getRates()
calculates all the rates needed in the model and collects them in a list.setInitial()
.initial_n
, initial_n_pp
and initial_B
arguments from the corresponding slot in the params
argument.perfect_scaling
argument allows newTraitParams()
to produce a perfectly scale-invariant model.bmort_prop
argument in newTraitParams()
allows the inclusion of background death.newMultispeciesParams()
.getmM2()
-> getPredMort()
plotM2
-> plotPredMort()
getM2background()
-> getPlanktonMort()
getZ()
-> getMort()
getESpawning()
-> getERepro()
MizerParams()
-> emptyParams()
or set_multispecies_model()
Added ecosystems from N.S. Jacobsen, M. Burgess and K.H. Andersen (2017): Efficiency of fisheries is increasing at the ecosystem level. Fish and Fisheries 18(2) 199- 211. doi:10.1111/faf.12171:
data(Benguela_params)
with five species: Anchovy, Sardine, Kingklip, Shallow water hake, and Deep water hake.data(Baltic_params)
with three species: sprat, herring, and cod.data(Barents_params)
with six species.data(NEUSCS_params)
with 24 species.data(NorthSea_params)
with 10 species.getSSB()
, the calculation of the spawning stock biomass is done correctly using the maturity ogive instead of the proportion of energy allocated to reproduction. (#47)getEncounter()
and getPredRate()
now set names on the returned arrays.ylim
argument is not handled correctly in plots.display_frame()
is now exported.get_gamma_default()
, get_h_default()
and get_ks_default()
, making it easier to change or extend these in the future.set_species_param_default()
makes it easier to set default values for species parameters.@inherit
functionality of roxygen2 to reduce duplication in roxygen documentation.getPhiPrey()
is replaced by getEncounter()
which now returns the full encounter rate, including the contribution from other components. Even in the absence of other components, getEncounter()
differs from the old getPhiPrey()
because it includes the search volume factor.params
to refer to an argument of class MizerParams, sim
to refer to an argument of class MizerSim, and object
to an argument that can be either.setClass()
to follow the new guidelines, replacing representation
by class
and removing prototype
and validity
.shiny_progress
renamed to progress_bar
because they control any type of progress bar.outer()
instead of tapply()
where possible to improve readability.hasArg()
and anyNA()
because they were not available in R 3.1std_metab
and activity
slots into a single metab
slot.w_min_idx
out of species_params
into its own slot.maturity
to hold the maturity ogive.pred_kernel
to hold predation kernel if it has variable predator/prey ratio.plankton_dynamics
to allow user to specify alternative plankton dynamics.srr
to hold the name of the stock recruitment function rather than the function itself, see #91.print_it
argument from plot functions.all.sizes = TRUE
.set_scaling_model()
, see section 12 in the vignette.PlotYield()
no longer fails when species names are numbers or when a species abundance is zerototal
parameter to several plot functions to add the curve for the total community (sum over all species and plankton)species
parameter to all plot functions to allow for only a selection of species to be plottedgetPhiPrey()
and getPredRate()
.getPhiPrey()
and getPredRate()
.