Extinctions

Simulations can be run with rewiring by using the rewiring_method keyword in model_parameters. This allows species to form new links following extinctions according to some set of rules. There are four options for the rewiring_method argument:

  • :none - Default setting with no rewiring
  • :ADBM - The allometric diet breadth model (ADBM) as described in Petchey et al. (2008). Based on optimal foraging theory.
  • :DS - The rewiring mechanism used by Gilljam et al. (2015) based on diet similarity.
  • :DO - The rewiring mechanism used by Staniczenko et al. (2010) based on diet overlap.

The simulate function will automatically perform the rewiring depending on which option is chosen. Further arguments can also be supplied to model_parameters to change the parameters of the rewiring models.

Simulations with rewiring are run in the same way as those without, for example using ADBM rewiring:

A = nichemodel(10, 0.3)
p = model_parameters(A,rewire_method = :ADBM)
b = rand(size(A, 1))

s = simulate(p, b, start=0, stop=50, steps=1000)

Rewiring parameters

As for all other parameters, rewiring parameters can be passed to model_parameters. The parameters' default values follow the litterature (see references above). When no alternative value is provided, any value can be passed, as long as it is of the same type as the default value.

For more details on the parameters meaning and value, see the references

Petchey's ADBM model

For this particular model, it is possible to chose how rewiring is triggered: on extinctions (default) or periodically (see example below the table).

NameMeaningDefault valueAlternative value
NmethodMethod used to calculate the resource density:original:biomass
HmethodMethod used to calculate the handling time:ratio:power
nScaling constant for the resource density1.0
niSpecies-specific scaling exponent for the resource density0.75
bScaling constant for handling time0.401
h_adbmScaling constant for handling time1.0
hiConsumer specific scaling exponent for handling time1.0
hjResource specific scaling constant for handling time1.0
eScaling constant for the net energy gain1.0
a_adbmScaling constant for the attack rate0.0189
aiConsumer specific scaling exponent for the attack rate-0.491
ajResource specific scaling exponent for the attack rate-0.465

Example:

# food web
A = [0 0 0 0 0; 0 1 0 0 0; 0 0 0 0 0; 0 1 1 0 0; 0 1 1 1 1]
# setting the model parameters for ADBM periodic rewiring using biomass to calculate resource densities
p = model_parameters(
                     A #food web
                     , Z = 10.0 #consumer/resource body mass scaling
                     , rewire_method = :ADBM #ADBM reiwring
                     , adbm_trigger = :interval #rewiring triggered periodically ...
                     , adbm_interval = 100 #... with Δt = 100
                     , Nmethod = :biomass #densities = biomass
                     )
# set initial biomass as to have immediate extinction of species 4
Bi = [1.0,1.0,1.0,0.0,1.0]
# perform the simulations
s = simulate(p, Bi)
# you can check the identity of the extinct species :
p[:extinctions]
# extinction times for each species:
p[:extinctionstime]
# and the temporary matrix (A is recorded just before each extinction)
p[:tmpA][1] # original matrix, just befor extinction of species 4
p[:tmpA][2] # matrix after extinction of species 4, before extinction of species 2
# the new interaction matrix, after the last extinction:
p[:A]

Gilljam's diet similarity model

NameMeaningDefault valueAlternative value
costRewiring cost (a consumer decrease in efficiency when exploiting novel resource)0.0
specialistPrefMagStrength of the consumer preference for one prey species if preferenceMethod = :specialist0.9
preferenceMethodScenarios with respect to prey preferences of consumers:generalist:specialist

Staniczenko's diet overlap model

No extra parameters are needed for this rewiring method.

References

  • Gilljam, D., Curtsdotter, A., & Ebenman, B. (2015). Adaptive rewiring aggravates the effects of species loss in ecosystems. Nature communications, 6, 8412.

  • Petchey, O. L., Beckerman, A. P., Riede, J. O., & Warren, P. H. (2008). Size, foraging, and food web structure. Proceedings of the National Academy of Sciences, 105(11), 4191-4196.

  • Staniczenko, P., Lewis, O. T., Jones, N. S., & Reed‐Tsochas, F. (2010). Structural dynamics and robustness of food webs. Ecology letters, 13(7), 891-899.