DOI: 10.5061/dryad.z612jm6bk
title: A modified niche model for generating food webs with stage-structured consumers: The stabilizing effects of life-history stages on complex food webs

description: 1. Almost all organisms grow in size during their lifetime and switch
 diets, trophic positions, and interacting partners as they grow. Such
 ontogenetic development introduces life-history stages and flows of
 biomass between the stages through growth and reproduction. However,
 current research on complex food webs rarely considers life-history
 stages. The few previously proposed methods do not take full advantage of
 the existing food web structural models that can produce realistic food
 web topologies. 2. We extended the niche model by Williams &
 Martinez (2000) to generate food webs that included trophic species with a
 life-history stage structure. Our method aggregated trophic species based
 on niche overlap to form a life-history structured population; therefore,
 it largely preserved the topological structure of food webs generated by
 the niche model. We applied the theory of allometric predator-prey body
 mass ratio and parameterized an allometric bioenergetic model augmented
 with biomass flow between stages via growth and reproduction to study the
 effects of a stage structure on the stability of food webs. 3. When
 life-history stages were linked via growth and reproduction, fewer food
 webs persisted while persisting food webs tended to retain more trophic
 species. Topological differences between persisting linked and unlinked
 food webs were small to modest. Temporal variability of biomass dynamics
 and slopes of biomass spectra were lower in the linked food webs than the
 unlinked ones, suggesting that a life-history stage structure enhanced
 stability of complex food webs. 4. Our results suggest a positive
 relationship between the complexity and stability of complex food webs. A
 life-history stage structure in food webs may play important roles in
 dynamics of and diversity in food webs.
description: This is a set of matlab code to 1) generate food webs (networks)
 with stage-structured consumers using the modified niche model described
 in Nonaka & Kuparinen 2021 and 2) run a bioenergetic model
 (allometric trophic network model, ATN) on the networks. It generates
 output text files of choice and optionally plots simulated time series at
 the end of each simulation. The main code is
 START_RunCluster_simple.m  Input parameters are
 specified in START_RunCluster_simple.m If you have
 questions, please contact etsuko.e.nonaka@jyu.fi
description: Specify input parameters in the first half of
 START_RunCluster_simple.m In simulations_simple.m,
 specify if evolutionary changes are included in the three phases of
 simulations (1=burn-in/no fishing, 2= fishing, 3= recovery
 periods) At the prompt,
 type START_RunCluster_simple(seed_0,simnum_0,simnum_f)
 It uses the parallel computing toolbox of Matlab but can be also
 run on a single core if appropriate lines are commented out. 
 Outputs are stored in the specified destination folder (specified
 at the top of the START_RunCluster_simple.m. Also note that, line 182 in
 START_RunCluster_simple.m and line 169 in simulation_simple.m need to be
 adjusted so that Matlab is pointed to the correct folders to
 operate.