detectpar
is a named list with values of the detection parameters for the chosen detectfn. Usually this will be just lambda0 (baseline hazard of detection) and sigma (spatial scale of detection).
The genetic algorithm is provided by function kofnGA
from package kofnGA (Wolters 2015). The first three arguments of kofnGA
(i.e., n, k, OF) are set by GAoptim
. Others may be adjusted by the user via the ... argument. Specifically,
Argument | Default | Description |
ngen | 500 | number of generations to run |
popsize | 200 | size of the population; equivalently, the number of offspring produced each generation |
mutprob | 0.01 | mutation rate |
verbose | 0 | integer controlling the display of progress during search. If a positive value, then the iteration number and best objective function value are displayed at the console every 'verbose' generations. Otherwise nothing is displayed. The default gives no display. |
cluster | NULL | number of parallel cores or a prebuilt parallel cluster |
The default for ngen may (or may not) be larger than is needed for routine use. Durbach et al. (2021) used ngen = 50, popsize = 1000 and mutprob = 0.01.
Density D may be a scalar or a vector of length equal to the number of mask cells. No value need be specified if the sole aim is to optimize trap placement, but D is required for predictions of E(\(n\)) and E(\(r\)).
Pathological detector layouts (sensu Efford and Boulanger 2019) may be avoided by adding a penalty to the objective.
No penalty is applied by default. To apply a penalty, penalty
should be a list with named components pen_wt>0 and pen_gridsigma). If a penalty is applied, the default compares the number of trap pairs with close spacing (2.5-3.5 sigma, 3.5-4.5 sigma) to the number in a compact sample from a regular grid with spacing sigma * pen_gridsigma (see internal functions GApenfn
and compactSample
and the vignette). An alternative penalty function may be supplied as component `pen_fn' of penalty
.
The default criterion is the minimum of E(n) and E(r) as used by Durbach et al. (2021).
The full list of builtin possibilities is:
Code | Description | Note |
1 | E(n) | number of distinct individuals |
2 | E(r) | number of recaptures |
3 | E(m) | number of movement recaptures |
4 | min(E(n), E(r)) | minimum E(n), E(r) |
5 | E(n2) | expected number of animals detected at 2 or more sites (cf Qpm Dupont et al. 2021) |
6 | E(n) + E(n2) | (1) + (5) (cf Qpb Dupont et al. 2021) |
Criteria 1--4 are computed with function Enrm
(see also Efford and Boulanger 2019). Criteria 5--6 are computed with function En2
. Any penalty is applied only when criterion = 4.
The criterion may also be a function that returns a single numeric value to be maximised. Arguments of the function should match those of En2
, although ... may suffice for some or all (see Examples).