IBM

Individual-Based-Model for NetLogo: runs NetLogo's Java-code using a generalized reactor

Contents

Syntax

txNL23W = IBM (species, tT, tJX, X_0, V_X, h, t_R, t_max, tickRate, runNetLogo)

Description

Individual-Based-Model for NetLogo: Plots population trajectories in a generalised reactor for a selected species of cohorts that reproduce using a choice of 3 reproduction-buffer-handling rules: (1) as soon as buffer allows (2) at accumulation during period a_b {3} at accumulation during period t_R. Opens 2 html-pages in system browser to report species traits and IBM parameter settings, and plots 4 figures. The parameters of species are obtained either from allStat.mat, or from a cell-string {par, metaPar, metaData}. The 3 cells are obtained by loading a copy of results_my_pet.mat. Structure metaData is required to get species-name, T_typical and ecoCode, metaPar to get model. Sex allocation is randomised. If dioecy applies, the default (mean) sex-ratio is 1:1. Fertilisation is assumed to be sure. Males might differ in {p_Am} and/or E_Hp. The initial population is a single fertilized (female) egg from a well-fed mother. Starvation parameters are added to parameter structure, if not present. Like all parameters, default settings can be changed by changing structure par in cell-string input. If specified background hazards in 6th input are too high, the population goes extinct.

Input:

  - 0 for spawning as soon as reproduction buffer allows (default)
  - 1 for spawning after accumulation over an incubation period
  - time between spawning events

Output:

Remarks

The function assumes that NetLogo (version 6.2.0 was tested) and java.exe has been installed and a path to them specified. Model DEBtool_M/popDyn/IBMnlogo/std.nlogo (and other DEB models) can also be loaded directly into NetLogo (via dropdown File, item Open), after running this function with runNetLogo = 0, to set parameters. The parameters in NetLogo are set by hitting setup in NetLogo's gui and can subsequently be modified. See, however, info in NetLogo for restrictions. Hitting setup initiates the output file txNL23W.txt.

If species is specified by string (rather than by data), its parameters are obtained from allStat.mat. The starvation parameters can only be set different from the default values by first input in the form of data and adding them to the par-structure. Empty inputs are allowed, default values are then used. The (first) html-page has traits at inidvidual level using the possibly modified parameter values. This function IBM only controls input/output; computations are done in NetLogo. Temperature changes during embryo-period are ignored; age at birth uses T(0); All embryo's start with f=1. Background hazards do not depend on temperature, ageing hazards do.

Be aware that the required computation time is roughly proportional to the number of individuals in the reactor, which can be very large, depending on the parameter settings. Progress can be monitored by inspecting output-file txNL23W.txt NetLogo uses Euler integration with stepsize 1/tickRate, which should be small relative to the state that changes fastest. For this reason, embryo dynamics is not included explicitly, but its states are "frozen" till birth.

Example of use

plotting

report_my_pet.html

IBMnlogo_my_pet.html