## Correction

10 Feb 2021: The PLOS Computational Biology Staff (2021) Correction: Dynamic metabolic adaptation can promote species coexistence in competitive microbial communities. PLOS Computational Biology 17(2): e1008721. https://doi.org/10.1371/journal.pcbi.1008721 View correction

## Figures

## Abstract

Microbes are capable of physiologically adapting to diverse environmental conditions by differentially varying the rates at which they uptake different nutrients. In particular, microbes can switch hierarchically between different energy sources, consuming first those that ensure the highest growth rate. Experimentally, this can result in biphasic growth curves called “diauxic shifts” that typically arise when microbes are grown in media containing several nutrients. Despite these observations are well known in microbiology and molecular biology, the mathematical models generally used to describe the population dynamics of microbial communities do not account for dynamic metabolic adaptation, thus implicitly assuming that microbes cannot switch dynamically from one resource to another. Here, we introduce dynamic metabolic adaptation in the framework of consumer-resource models, which are commonly used to describe competitive microbial communities, allowing each species to temporally change its preferred energy source to maximize its own relative fitness. We show that dynamic metabolic adaptation enables the community to self-organize, allowing several species to coexist even in the presence of few resources, and to respond optimally to a time-dependent environment, thus showing that dynamic metabolic adaptation could be an important mechanism for maintaining high levels of diversity even in environments with few energy sources. We show that introducing dynamic metabolic strategies in consumer-resource models is necessary for reproducing experimental growth curves of the baker’s yeast *Saccharomyces cerevisiae* growing in the presence of two carbon sources. Even though diauxic shifts emerge naturally from the model when two resources are qualitatively very different, the model predicts that the existence of such shifts is not a prerequisite for species coexistence in competitive communities.

## Author summary

Since a celebrated experiment by Monod in 1949, we know that microbes can adapt their metabolic strategies in response to their environment, thus uptaking different nutrients at different rates depending on their relative quality and availability. It is currently unclear whether this physiological plasticity of microbes contributes to maintaining the high degree of diversity found in natural microbial communities, even in the presence of very few resources. By introducing dynamic and optimal metabolic strategies in consumer-resource models, we show that we can correctly reproduce the experimental growth of *Saccharomyces cerevisiae* on two different resources and we show that dynamic metabolic strategies allow the community to self-organize and to ensure the coexistence of multiple species competing for few resources.

**Citation: **Pacciani-Mori L, Giometto A, Suweis S, Maritan A (2020) Dynamic metabolic adaptation can promote species coexistence in competitive microbial communities. PLoS Comput Biol 16(5):
e1007896.
https://doi.org/10.1371/journal.pcbi.1007896

**Editor: **Sergei Maslov,
University of Illinois at Urbana-Champaign, UNITED STATES

**Received: **November 26, 2019; **Accepted: **April 21, 2020; **Published: ** May 7, 2020

**Copyright: ** © 2020 Pacciani-Mori et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All relevant data are within the manuscript and its Supporting Information files.

**Funding: **A. M. and L. P.-M. acknowledge the Cariparo Foundation (www.fondazionecariparo.it), S. S. acknowledges the University of Padua (www.unipd.it) for SID2017 and STARS2018 grants. A. G. was supported by research fellowships from the Swiss National Science Foundation (www.snf.ch), Projects P2ELP2_168498 and P400PB_180823. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

Biodiversity is one of the most fascinating aspects of nature: from the microscopic to the continental scale, complex communities composed of tens to thousands of species compete for resources and yet coexist. In particular, the survival of a species depends on the availability of resources in the environment, which is not static and can be altered by the presence of other species in the community. Furthermore, biodiversity is crucial for the functioning and maintenance of whole ecosystems, directly impacting their productivity, stability and many other properties [1]. It is thus critical to understand what are the mechanisms that can promote and maintain biodiversity within natural communities. To answer this question, the coexistence of several species in the same ecosystem can be investigated experimentally using controlled microbial communities and theoretically using models of community dynamics in the presence of multiple resources. Indeed, studies in the field of microbial ecology have shown that several species can coexist in the presence of few resources [2–6], and how this is possible is a long-standing open question [6–9] that recent theoretical studies are trying to answer [10–12].

Independent and apparently unrelated experiments of microbial batch growth have shown that microbes are capable of physiologically adapting to environments containing two or more resources [13–15]. Microbes can in fact physiologically adapt to different environmental conditions in various ways, by transforming and recycling nutrients and by varying the rates with which they uptake resources with time. Already in the early 1940s, Jacques Monod [13] observed that *Escherichia coli* and *Bacillus subtilis* grown in a culture medium containing two different sugars exhibit a biphasic growth curve, which he called “diauxie”. Instead of metabolizing these two nutrients simultaneously, bacteria consumed them sequentially using the most favorable one first (i.e., the one that conferred the highest growth rate) and once it had been depleted, following a lag phase, they resumed growth using the other sugar. Since then, diauxic growth has been the subject of thorough empirical study [16–19], via experiments that have generally involved the growth of one microbe on two resources, and the occurrence of diauxic shifts has been documented to occur widely across different microbial species [20–22]. Many models have been proposed to describe this phenomenon of “metabolic dynamic adaptation”, but all are focused on the specific gene regulation and expression mechanisms of a given species [15, 23], and are generally tailored to describe the growth of such a species on a specific set of resources [24–26]. The general effects of using dynamic strategies on the maintenance of biodiversity in microbial communities, therefore, have not yet been investigated from the ecological dynamics perspective, with the exception of very few studies that have analyzed similar effects on different types of system: Valdovinos et al. [27], for example, investigated the consequences of adaptive foraging in plant-pollinator systems and found out that this effect increases species persistence and diversity.

In principle, the ability of microbial species to vary the rates at which they consume different nutrients might allow them to diversify the consumption of different resources in response to both the presence of other species and to the abundance and quality of the nutrients available, and this in turn might allow them to persist in the community. To understand the general implications of dynamic metabolic strategies for the maintenance of biodiversity, one needs to abstract from the specific molecular mechanisms that regulate the preferential consumption of different resources by any given species. What is needed, instead, is a general, phenomenological framework capable of describing these phenomena in a unified way as emergent properties of complex systems of agents that interact with each other and with the environment, rather than through *ad hoc* tailored biological and/or molecular mechanisms. Recently there has been a growing effort to develop such a framework, with particular focus on the conditions leading to species coexistence [10, 11, 28–32]. The models devised in this direction typically build on MacArthur’s consumer-resource framework [33, 34], describing the competition of species for a common pool of resources, but neglecting dynamic metabolic adaptation. In fact, despite the aforementioned evidence for dynamic metabolic adaptation from studies of microbial metabolism, these models implicitly but systematically assume that the metabolic strategies (defined here as the maximum resource uptake rates) of microbial species do not change with time, and assume that a species’ consumption rate of a given resource depends solely on the concentration of the latter, and not on the presence of other species, nor on the concentration of other nutrients. There are only a few examples in the literature where metabolic strategies in microbial communities are allowed to change to a certain degree, but these studies were neither focused on deriving conditions for species coexistence, especially as a consequence of having dynamic metabolic strategies, nor did they take into account a continuous temporal dynamics for metabolic strategies. Goyal et al. [12], for example, have recently developed a conceptual model of microbial communities showing that such systems can have multiple stable states, that they can restructure themselves after external perturbations, and that complementarity in nutrient preferences allows multiple species to coexist; in this model, species can switch instantaneously between different energy sources, but the model does not explicitly describe population dynamics. Marsland et al. [35], on the other hand, have considered models where resource uptake rates can be regulated so that species use the resource that is currently the most abundant, and species can excrete secondary metabolites into the environment.

In this work we allow metabolic strategies to depend on time within a consumer-resource model. The temporal dynamics of such metabolic strategies is set to maximize the relative fitness of each species. We show that this approach is capable of quantitatively reproducing experimentally-measured growth curves of *S. cerevisiae* consuming multiple resources, in contrast to a consumer-resource model with fixed strategies. When considering a community composed of multiple species consuming multiple resources, our model suggests that dynamic metabolic adaptation plays a major role in maintaining species diversity, especially when few common resources are available. Furthermore, if the environmental conditions of the system are variable over time, or if some of the available resources degrade rapidly, our adaptive framework is capable of maintaining the coexistence of several species on few resources, while the classical MacArthur’s consumer-resource model with fixed metabolic strategies would predict the extinction of most species. Our work therefore proposes a unifying theoretical framework capable of reproducing both the existence of diauxic shifts and the coexistence of a large number of species competing for a limited number of resources in various realistic ecological settings, thus suggesting that dynamic metabolic adaptation can play an important role in maintaining high levels of biodiversity in microbial communities.

When using consumer-resource models it is of paramount importance to identify what are the ‘‘resources’’. In fact, several properties of this type of models, particularly those relative to the maintenance of species diversity, depend crucially on identifying the growth-limiting resources. In this work we consider only substitutable resources, i.e. we identify as resources those substances present in the environment that can be used interchangeably for microbial growth (e.g. different sugars as carbon sources). Finally, we point out that since our framework is based on consumer-resource ecological models, the term ‘‘adaptation’’ is used here in the system dynamics sense (i.e., indicating changes in the metabolic state of a species aimed at maximizing its growth rate over ecological time scales) and should *not* be intended in the evolutionary sense (i.e., the process by which species become better adapted to their environment via mutation, genetic drift and selection over evolutionary times).

## Results

### The MacArthur’s consumer-resource model

In the classical formulation of MacArthur’s consumer-resource model, a community of *m* species competes for *p* resources according to the following equations:
(1)
(2)
where *n*_{σ}(*t*) describes the population density of species *σ*, *c*_{i}(*t*) is the concentration of resource *i* and *δ*_{σ} is the death rate of species *σ*. The quantity *r*_{i}(*c*_{i}) is a function accounting for the fact that the dependence of a species’ growth rate on a given resource concentration saturates as *c*_{i} is increased. Without loss of generality, we assume that *r*_{i}(*c*_{i}) has the form of a Monod function [13], i.e. *r*_{i}(*c*_{i}) = *c*_{i}/(*K*_{i} + *c*_{i}) with *K*_{i} > 0 (*K*_{i} is the half-saturation constant), and so *r*_{i}(*c*_{i}) < 1 ∀ *c*_{i} > 0. The quantities *α*_{σi} ≥ 0 are the metabolic strategies, and each one of them can be interpreted as the maximum rate at which species *σ* uptakes resource *i*. The parameter *v*_{i} is often called “resource value” and is related to the resource-to-biomass conversion efficiency: the larger *v*_{i}, the larger the population growth rate that is achieved for unit resource quantity, and thus the more “favorable” resource *i* is. The parameter *s*_{i} is a constant nutrient supply rate, and the sum in (2) represents the action of all consumers on resource *i*. Such an action depends of course on the metabolic strategies *α*_{σi}. Finally, *μ*_{i} ≥ 0 is the degradation rate of resource *i*.

### Introducing dynamic metabolic adaptation

Our introduction of dynamic metabolic strategies in the consumer-resource framework starts from the requirement that each metabolic strategy changes in time to maximize the relative fitness of species *σ*, measured [36, 37] as the growth rate . This can be achieved by requiring that metabolic strategies follow a simple gradient ascent equation:
(3)

Notice that introducing adaptive metabolic strategies in the MacArthur’s consumer-resource model reduces the number of independent parameters, given that the *m* ⋅ *p* metabolic strategies become dynamical variables.

Eq (3) is missing an important biological constraint, which is related to intrinsic limitations to any species’ resource uptake and metabolic rates: by necessity, microbes have limited amounts of energy that they can use to produce the metabolites necessary for resource uptake, so we must introduce such a constraint in (3). To do so, we require that each species has a maximum total resource uptake rate that it can achieve, i.e. . The choice of imposing a soft constraint in the form of an inequality is not arbitrary, as it is rooted in the experimental evidence that microbes cannot devote an unbounded amount of energy to metabolizing nutrients. Experiments [38] have shown, in fact, that introducing a constraint for metabolic fluxes in the form of an upper bound (perfectly analogous to the one we adopted in this work, see Eq. (4) in [38]) allows one to improve the agreement between Flux Balance Analysis modeling and experimental data on *E. coli* growth on different substrates.

The constraint on the species’ maximum total resource uptake rates introduces a trade-off between the use of different resources. In S1 Text we present a geometrical interpretation of the maximization problem given by (3), i.e. where is the gradient with respect to the components of . In particular, since we want to change so that the constraint is satisfied, we remove from the component parallel to as soon as . Furthermore, we prevent the metabolic strategies from becoming negative. Eventually, the final equation for the metabolic strategies’ dynamics is given by (see S1 Text for the full derivation):
(4)
where we have written *r*_{i} = *r*_{i}(*c*_{i}), Θ is Heaviside’s step function (i.e. Θ(*x*) = 1 when *x* ≥ 0 and Θ(*x*) = 0 otherwise) and λ_{σ} is the ‘‘learning rate’’ of species *σ*. Here, we assume that all the degradation rates *μ*_{i} are null, but we discuss a more general case below. Table 1 summarizes the parameters used in the model. See S1 Text for the detailed dimensional analysis of the parameters.

### Diauxic shifts

If we introduce dynamic metabolic adaptation in a consumer-resource model so that each species changes its metabolic strategies to maximize its own growth rate, the new model is capable not only of reproducing qualitatively the growth dynamics of diauxic shifts, but to do so in quantitative agreement with experimental observations. To show this, we measured growth curves of the baker’s yeast, *S. cerevisiae*, grown in the presence of galactose as the primary carbon source. In these growth conditions, *S. cerevisiae* partially respires and partially ferments the sugar. As a byproduct of fermentation, yeast cells release ethanol in the growth medium, which can then be respired by the cells once the concentration of galactose in the medium is reduced. To model the growth of *S. cerevisiae* in these conditions, we modified the equations to account for the fact that the second resource, ethanol, is produced by the yeast cells themselves, while the first one, galactose, is consumed. We have then fitted the model to the data using a Markov Chain Monte Carlo (MCMC) algorithm [39] (see Methods). In Fig 1A, we show that our adaptive consumer-resource model can fit the experimental data with parameters that are compatible with values found in the literature (see Table A in S1 Text). When fitting the “classic” MacArthur’s consumer-resource model with fixed metabolic strategies, on the other hand, the same MCMC fitting algorithm returns two possible different outcomes, depending on the ranges that the parameters are allowed to explore in the Markov chain dynamics. When the parameters are constrained to vary within a few orders of magnitude from experimentally-measured values found in the literature (Table A in S1 Text), the fixed-strategies model is incapable of reproducing even a diauxic behavior (Fig 1B). When the parameters are subject to looser constraints on the value they can take, instead, the model can reproduce the data (Figure A in S1 Text), although not as well as the adaptive-strategies model, but some of the best fit parameters have biologically unreasonable values (see Table A in S1 Text). The Akaike Information Criterion, used to compare the relative quality of the two models discounting the number of parameters, selects unambiguously the model with adaptive strategies as the best fitting one when comparing it to either fits of the fixed-strategies model (see Methods).

Shown are the mean (black lines) and the standard error (gray bands) across *n* = 8 replicate populations. In (A) the model is not only capable to reproduce very well the experimental data, but the best fit returns parameters whose values are biologically reasonable when contrasted with experimentally-measured ones found in the literature (see Table A in S1 Text). On the other hand, the fit in (B) cannot reproduce a diauxic behavior when the parameters are constrained to vary within a few orders of magnitude away from biologically reasonable values (see Table A in S1 Text). See S1 Text for details on how the fits were performed and the resulting values of the best fit parameters.

### Species coexistence

The MacArthur’s consumer-resource model also makes predictions for the coexistence of *m* species on *p* shared resources and reproduces the so-called “Competitive Exclusion Principle” [40] (CEP), a theoretical argument that has sparked a lively debate in the ecological community [41–45]. According to the CEP, the maximum number of species that can stably coexist is equal to *p*. In nature, however, there are many situations in which the CEP appears to be violated: the most famous example of such violation is the “Paradox of the Plankton” [7], whereby a very high number of phytoplankton species is observed to coexist in the presence of a limited set of resources [46]. Many different mechanisms have been proposed to explain the violation of the CEP, ranging from non-equilibrium phenomena [7] to the existence of additional limiting factors like the presence of predators [47], cross-feeding relationships [6], toxin production [48], and complex or higher-order interactions [49, 50]; see [8] and [9] for comprehensive reviews.

Considering now our model in the general case of *m* species and *p* resources, if the total maximum resource uptake rates are completely uncorrelated to the death rates *δ*_{σ} (e.g. if , with drawn randomly from a given distribution with average and standard deviation Σ) we observe extinctions, i.e. in the infinite time limit, we cannot have more than *p* coexisting species (see S1 Text). We focus on the idealized case of infinite temporal coexistence to avoid the introduction of too many finite temporal scales, as would be the case when considering the inevitable perturbations experienced by communities that jeopardize their coexistence. In Fig 2 we show how the times of first and seventh extinction change as we vary the coefficient of variation of the normal distribution from which we draw the in a system of *m* = 10 species and *p* = 3 resources. As shown, these extinction times increase sensibly as is reduced. In other words, for more and more peaked around their mean value, the species present in the system can coexist for increasingly longer times. As we can see, the extinction times exhibit a power law-like behavior as a function of the coefficient of variation . In particular, we find that the times to extinction of the first *m* − *p* species scale approximately as . This observation suggests that adaptive strategies promote species biodiversity for finite time scales and that coexistence for an *infinite* time interval could be possible if the ratio between the maximum resource uptake rate and the death rate of each species *δ*_{σ}, which we call the Characteristic Timescale Ratio (CTR), does not depend on the species’ identities. In mathematical terms, if , then *m* > *p* species can coexist. This requirement is compatible with the experimental observations that led to the formulation of the metabolic theory of ecology [51] (see S1 Text for a detailed mathematical justification of this statement), according to which these two rates ( and *δ*_{σ}) depend only on the characteristic mass of a species. It is indeed possible to show analytically that our model can strictly violate the CEP if the CTR does not depend on the species’ identities (see S1 Text for details on the proof). In this latter case, since a single time scale characterizes each species, we set λ_{σ} = *dδ*_{σ}, where *d* > 0 regulates the speed of adaptation.

We used *m* = 10, *p* = 3 and with drawn from a normal distribution with mean and standard deviation Σ; see S1 Text for more details on the parameters used. The extinction times were computed as the instants at which the densities of the species fell below 1 cell/mL. Both axes are in logarithmic scale, the error bars represent one standard deviation across 50 iterations of the model and the dashed lines are the best power-law fits. The behavior of the extinction times suggests that if Σ = 0 then all species could coexist indefinitely. Indeed, it is possible to show analytically that when , all species coexist at the stationary state of the system (see S1 Text for details). The green points show, for comparison, the time of first extinction for a system with the same parameters but where metabolic strategies are fixed. As we can see, even when each species has its own CTR, , using dynamic metabolic strategies increases by several orders of magnitude the length of the time interval over which species manage to coexist. The results shown do not change noticeably if the initial conditions on the populations are increased, even if by some orders of magnitude.

For comparison, in Fig 2 we also show the times of first extinction for the same system with the same parameter distributions but where metabolic strategies are fixed. As we can see, these extinction times are all approximately equal independently of , and are orders of magnitude smaller than the ones obtained with dynamic metabolic strategies. It is therefore clear that even when each species has its own CTR, , using dynamic metabolic strategies increases by several orders of magnitude the length of the time interval over which species coexist.

MacArthur’s consumer-resource model with fixed *α*_{σi} has been shown to violate the CEP only if (where *E* > 0 is a constant independent of *σ*, i.e. the maximum resource uptake rate is the same for all species), if *δ*_{σ} = *δ*∀*σ* (where *δ* > 0 is a constant independent of *σ*, i.e. the death rate is the same for all species) and if , the vector whose components are the nutrient supply rates *s*_{i}, belongs to the convex hull of the metabolic strategies [10]. In general, any looser constraint (including with arbitrary *E*_{σ}) will lead to the extinction of at least *m* − *p* species, i.e. the system will obey the CEP; in this sense the system allows coexistence only when fine-tuned, a situation that is unlikely to be true for all natural communities. However, if we now use (4) for the dynamics of *α*_{σi}, it is possible to show analytically that the system gains additional degrees of freedom which make it possible to find steady states where an arbitrary number of species can coexist, even when the initial conditions are not favorable. More specifically, if we denote by and some appropriately rescaled versions of the nutrient supply rate vector and the metabolic strategies (see S1 Text for more information), the system reaches a steady state where all species coexist even when initially does not belong to the convex hull of . In Fig 3, we show the initial and final states of a temporal integration of the model: even though was initially outside the convex hull of , the metabolic strategies changed to bring within the convex hull and thus allowed coexistence. Therefore, the community modeled by Eqs (1–4) is capable to *self-organize*. Notice that if we used fixed metabolic strategies in this case, almost all species would go extinct and the CEP would hold (see Figure D in S1 Text).

These results have been obtained for a system with *m* = 10 species and *p* = 3 resources using the graphical representation method introduced by Posfai et al. [10] and using a common value of the CTR for all species. In particular, in this case this method prescribes that the rescaled metabolic strategies and nutrient supply rate vector (black star) all lie on a 2-dimensional simplex (i.e. the triangle in the figure), where each vertex corresponds to one of the resources; for details on the parameters used, and for the plots of the temporal dynamics of the population densities and metabolic strategies, see Figure D in S1 Text. In the final state, the have incorporated in their convex hull.

#### Minimization of energy waste.

An independent prediction of our model is that if one of the available resources, e.g. resource *j*, is too energetically unfavorable, then dynamic metabolic adaptation will bring all the *j*-th components of the metabolic strategies to zero, i.e. species will stop using that resource. By what measure resource *i* is unfavorable is quantified by 1/*v*_{i}. When the metabolic strategies are not allowed to adapt, it is possible to prove that a nontrivial stationary state (i.e. one where the CEP is violated) is possible only if ; this means that if even just one of the resources is unfavorable, i.e. for one *j*, then there will be extinctions and in the end the CEP will hold (see S1 Text and Figure E in S1 Text for more details). However, when we allow the strategies to adapt following (4), the system reaches a non-trivial stationary state even if there is one (or possibly more) resource *j* for which . In this case, in fact, resource *j* becomes too unfavorable, and it is possible to show that the system decouples from it, i.e. the *j*-th component of *all* the metabolic strategies becomes null (see Figure E in S1 Text). Something analogous happens also when degradation rates are present, i.e. *μ*_{i} > 0 in (2): in this case, at stationarity, the convex hull of the rescaled metabolic strategies will include the vector with components with the stationary value of *c*_{i}(*t*) (see S1 Text), and if one of the *μ*_{i} is sufficiently large, this vector will lie on one of the sides of the (*p* − 1)-dimensional simplex where our system can be represented. In other words, we find that if the degradation rate *μ*_{j} of resource *j* becomes too large, then again all the *j*-th components of the metabolic strategies will become null (see Figures S5 and S7). On the other hand, if we introduce the resource degradation rates in MacArthur’s consumer-resource model with fixed metabolic strategies, extinctions will occur and the CEP will hold (see Figure F in S1 Text) for any choice of *E*_{σ}. Therefore, species in our model minimize the energy they use to metabolize resources that are unfavorable or volatile, and they invest their energy budget on the more convenient ones.

#### Variable environmental conditions.

Having adaptive metabolic strategies also allows the system to better respond to variable environmental conditions, i.e. when is a function of time . Let us consider a scenario where the nutrient supply rates change periodically; this can be implemented by shifting between two different values at regular time intervals: one inside the convex hull of the initial (rescaled) metabolic strategies and one outside of it. We found that when the metabolic strategies are allowed to adapt, the species’ populations oscillate between two values and manage to coexist, while when the metabolic strategies are fixed in time, some species go extinct due to the perturbations and the CEP is recovered, unless spends enough time inside the convex hull of the metabolic strategies—see Fig 4. Also in the case of environmental conditions that vary with time, we find that when we introduce resource degradation rates that are sufficiently large, all the *i*-th components of the metabolic strategies vanish (see Figure H in S1 Text). Therefore, adaptive metabolic strategies allow species in the community to self-organize and efficiently deal with variable environmental conditions and a mix of (energetically) favorable and unfavorable resources, features characterizing natural ecosystems.

Here, we simulated a system with *m* = 20 species, *p* = 3 resources, and with the nutrient supply rate vector switching at regular intervals between the two values shown (black star and diamond) in (A). Specifically, in (B) we made alternate periodically between for *τ*_{in} = 12 h and for *τ*_{out} = 48 h, with chosen within the convex hull of the initial rescaled metabolic strategies and chosen outside of it (see Figure G in S1 Text for more information on the parameters used). Panel (C) shows the same quantities, with *τ*_{in} = *τ*_{out} = 48 h. See Figure G in S1 Text for the dynamics of the species’ populations in the consumer-resource model with adaptive metabolic strategies.

#### Adaptation velocity.

A physically relevant parameter characterizing the capacity of a species to adapt to a new environment is *d*, which regulates the velocity of dynamic metabolic adaptation for the metabolic strategies (see (3) with λ_{σ} = *dδ*_{σ}, by which *d* has units of g of resource/cell). Increasing the value of *d* leads to metabolic strategies that adapt more rapidly, and as a consequence species’ growth rates will be optimized for longer periods of time. Thus, in a community in which the CTR is the same for all species, stationary population densities will be higher for larger values of *d*. When *d* tends to zero, instead, we recover the case of fixed metabolic strategies and thus the CEP will determine the fate of the community. As shown in Fig 5, the distribution of stationary species’ populations can indeed change sensibly with the adaptation velocity *d*. On the other hand, if the system is subject to variable environmental conditions like the ones discussed previously (i.e. changes with time), as *d* increases the species’ are more able to promptly respond to perturbation and thus their populations will be less variable (see Figure K in S1 Text).

The lines represent the average value over 100 iterations, while the opaque bands outline the standard error of the mean. For *d* = 0 (blue line) the rank distribution is very steep and only the first few species have a population density over 1 cell/mL (corresponding to ), while as *d* increases the distribution becomes more even. Setting as the extinction threshold, approximately two thirds of the species in the system go extinct with *d* = 10^{−7} (yellow line), while all of them survive with *d* = 10^{−5}.

## Discussion

Community dynamics in the presence of multiple resources has traditionally been modeled via the MacArthur’s consumer-resource model, which prescribes the temporal dynamics of the population abundances of different competing species and of the resource densities. At present, the rates at which different species uptake different resources in such models have been treated as fixed parameters, in contrast with the experimental evidence that microbes can dynamically adapt nutrient uptake rates in response to environmental conditions. With fixed metabolic strategies, we find that the MacArthur’s consumer-resource model cannot reproduce the growth dynamics of a single microbial species in the presence of two resources, which shows that one must account for the temporal dynamics of nutrient uptake even in very simple ecological settings. For more complex communities, the MacArthur’s model with fixed metabolic strategies reproduces the so-called Competitive Exclusion Principle, whereby only *m* ≤ *p* species can survive if *p* resources are present, an observation that is in contrast with abundant empirical observations.

To understand if and how the classical MacArthur’s consumer-resource model can describe the coexistence of multiple competing species, we have introduced dynamic metabolic adaptation such that each species varies its metabolic strategies to maximize its growth rate. This new theoretical framework provides therefore a unified description of dynamic metabolic adaptation and community-level coexistence. We show that consumer-resource models with adaptive metabolic strategies can quantitatively describe the growth of a single microbial species on multiple resources through a fit of experimental data that gives physiologically reasonable best fit estimates for the model parameters. Furthermore, we show that the adaptive dynamics of metabolic strategies has a fundamental impact on species coexistence: the coexistence time interval of multiple species competing for few resources diverges as the characteristic timescale ratio (CTR) becomes less and less variable across different species. We suggest that this requirement is compatible with the experimental measurements of the scaling of vital and metabolic rates with body size that led to the metabolic theory of ecology [51], according to which the rates involved in the CTR depend only on the characteristic mass of the species. Fluctuations around such scaling patterns can be non-negligible [52–54] and thus it is likely that the coefficient of variation, Σ/〈*Q*〉, in natural communities is not exactly equal to zero. Thus, it is reasonable to postulate that such patterns may be responsible for reducing the coefficient of variation and thus prolonging extinction times, giving time to other processes not explicitly considered here to promote species coexistence, such as trade-offs in life-history traits [55–57] (e.g. the fact that some species grow faster when resources are abundant and others when resources are scarce, or that some species grow fast on a primary resource while growing more slowly on a secondary one). Therefore, we suggest that dynamic metabolic adaptation and the metabolic theory of ecology provide a fundamental mechanism for promoting the coexistence of a large number of species on a limited number of resources. Without invoking the metabolic theory of ecology, each species would have its own CTR and extinctions would be unavoidable, ultimately leading to the CEP. We find that the crucial parameter controlling the rate at which biodiversity is lost is the adaptation velocity, such that the CEP holds when dynamic metabolic adaptation is too slow with respect to the population dynamics.

Although we have focused only on competitive interactions, these are clearly not the only kind of interactions found in natural communities. Recent studies have shown that phenomena such as cross-feeding and syntrophy are ubiquitous in the microbial world [58], and have crucial roles in shaping the structure and function of microbial communities [6, 31, 59]. Future work will therefore be dedicated to incorporating cross-feeding and other types of inter-specific interactions in our theoretical framework. It has also been recently found that natural microbial communities are often composed of metabolically distinct and interdependent groups of species, each specialized in a particular function [2, 4, 60–62]. While the properties of interconnected ecological networks have been investigated in the past [63], a possible future development of our work consists in investigating if a modular organization of microbial species according to their metabolic function can be an emergent property of microbial communities, and in which conditions it stabilizes and is beneficial for such systems.

## Methods

### Comparison between the model and experimental measures of diauxic growth curves for *S. cerevisiae*

The *S. cerevisiae* strain used in this study, yAG47, is identical to strain yJHK459 of [64] and is in the W303 background. Its genotype is *MATa*, *can1-100*, *ura3* Δ0, *BUD4-S288C*. A culture of yAG47 was grown overnight in complete synthetic medium (CSM) + 2% (w/v) glucose. 1 mL of the overnight culture was spun down and resuspended in CSM + 0.5% (w/v) galactose to a concentration of 1.6 ⋅ 10^{5} cell/mL. Eight wells of a 96-well plate were inoculated with 150 *μ*L of the resuspended culture and incubated with constant shaking at 30°C in a plate reader. The 96-well plate was sealed with a sealing membrane that allowed gas exchange. The temperature on the top of the 96-well plate was kept at 31°C to avoid condensation on the membrane. Optical density (OD) measurements were taken every 10 min, for a total duration of about 70 h. To build the calibration curve used to convert OD to cell density, 1.4 mL of the same overnight culture were spun down and resuspended in 1 mL of CSM + 0.5% (w/v) galactose. The density of this suspension was measured using a Coulter counter and serial dilutions of this suspension were inoculated in a 96-well plate covered with the same sealing membrane used for the growth curve measurement. The OD of the wells containing the serial dilution of the suspension was measured after equilibration to 30°C using the same plate reader used to measure the growth curves, and these measurements were used to build the calibration curve converting OD to cell density.

When *S. cerevisiae* is grown on galactose as the primary carbon source, the sugar is partially respired and partially fermented. Yeast cells excrete ethanol as a byproduct of fermentation, which can then be used as a carbon resource. For this reason, in order to describe such system we use our adaptive consumer-resource model with *m* = 1, *p* = 2 and we slightly modify the equations for the temporal dynamics of ethanol concentration to take into account the fact that this resource is not initially present in the system but is produced by the yeast. In particular, the equations we used in order to describe the system are (5–9), where in (7) we have inserted an ethanol production rate that is proportional to the galactose consumption rate; in other words, *Y* can be interpreted as the galactose-to-ethanol yield.
(5)
(6)
(7)
(8)
(9)

Notice that since the model has several parameters (10 in total, some of which are phenomenological) there can be several different choices that lead to apparently equivalent fits. We therefore used a Markov Chain Monte Carlo algorithm [39] to fit this consumer-resource model to the experimental measurements of the population density of *S. cerevisiae*, both in the case of adaptive and fixed metabolic strategies, and to estimate the posterior distributions of the parameters. The comparison between the data and the best fits in the two cases are shown in Fig 1, while the values of the parameters obtained are shown in Table A in S1 Text. We used the same algorithm to fit the model with fixed metabolic strategies. Even if the model with fixed metabolic strategies is technically capable of reproducing the data (at the cost of returning parameters with biologically unrealistic values, see Figure A and Table A in S1 Text), we can use the Akaike Information Criterion (AIC) [65] to compare how it performs against the model with adaptive metabolic strategies. In fact, if we call Δ_{AIC} ≔ AIC_{adaptive} − AIC_{fixed} the difference between the AIC in the two cases, it is possible to show [65] that exp(Δ_{AIC}/2) is the relative likelihood of the two models, and as such measures the probability that the model with fixed metabolic strategies minimizes the information loss (i.e. it is a better fit to the data than the one with adaptive metabolic strategies). In our case, by comparing the fits shown in Fig 1A and Figure A in S1 Text we found Δ_{AIC} = −938, so the probability that the results could be better explained using the model with fixed metabolic strategies is infinitesimal, even if the curve can nevertheless reproduce a diauxic behavior. The situation is of course even more extreme if we compare the fits shown in Fig 1A and 1B, since in this case we find Δ_{AIC} = −1327. We show in Figure C in S1 Text the predicted temporal dynamics of the resources concentrations, metabolic strategies and also of the constraint (9) using the best fit parameters of the model with adaptive metabolic strategies.

## Supporting information

### S1 Text. Additional details and computations on the model.

https://doi.org/10.1371/journal.pcbi.1007896.s001

(PDF)

### S1 Data. Data on the growth of *S. cerevisiae* on galactose.

https://doi.org/10.1371/journal.pcbi.1007896.s002

(XLS)

## References

- 1. Tilman D, Isbell F, Cowles JM. Biodiversity and Ecosystem Functioning. Annual Review of Ecology, Evolution, and Systematics. 2014;45(1):471–493.
- 2. Celiker H, Gore J. Clustering in community structure across replicate ecosystems following a long-term bacterial evolution experiment. Nature communications. 2014;5:4643. pmid:25105738
- 3. Carrara F, Giometto A, Seymour M, Rinaldo A, Altermatt F. Inferring species interactions in ecological communities: a comparison of methods at different levels of complexity. Methods in Ecology and Evolution. 2015;6(8):895–906.
- 4. Zelezniak A, Andrejev S, Ponomarova O, Mende DR, Bork P, Patil KR. Metabolic dependencies drive species co-occurrence in diverse microbial communities. Proceedings of the National Academy of Sciences. 2015;112(20):6449–6454.
- 5. Friedman J, Higgins LM, Gore J. Community structure follows simple assembly rules in microbial microcosms. Nature Ecology and Evolution. 2017;1(5):1–7.
- 6. Goldford JE, Lu N, Bajić D, Estrela S, Tikhonov M, Sanchez-Gorostiaga A, et al. Emergent simplicity in microbial community assembly. Science. 2018;361(6401):469–474. pmid:30072533
- 7. Hutchinson GE. The Paradox of the Plankton. The American Naturalist. 1961;95(882):137–145.
- 8. Scheffer M, Rinaldi S, Huisman J, Weissing FJ. Why plankton communities have no equilibrium: solutions to the paradox. Hydrobiologia. 2003;491(1):9–18.
- 9. Roy S, Chattopadhyay J. Towards a resolution of ‘the paradox of the plankton’: A brief overview of the proposed mechanisms. Ecological Complexity. 2007;4(1-2):26–33.
- 10. Posfai A, Taillefumier T, Wingreen NS. Metabolic Trade-Offs Promote Diversity in a Model Ecosystem. Physical Review Letters. 2017;118(2):28103.
- 11. Tikhonov M, Monasson R. Collective Phase in Resource Competition in a Highly Diverse Ecosystem. Physical Review Letters. 2017;118(4):1–5.
- 12. Goyal A, Dubinkina V, Maslov S. Multiple stable states in microbial communities explained by the stable marriage problem. ISME Journal. 2018. pmid:30022156
- 13. Monod J. The growth of bacterial cultures. Annual Review of Microbiology. 1949;3(1):371–394.
- 14. Stülke J, Hillen W. Carbon catabolite repression in bacteria. Current opinion in microbiology. 1999;2(2):195–201. pmid:10322165
- 15. Görke B, Stülke J. Carbon catabolite repression in bacteria: Many ways to make the most out of nutrients. Nature Reviews Microbiology. 2008;6(8):613–624. pmid:18628769
- 16. Kompala DS, Ramkrishna D, Jansen NB, Tsao GT. Investigation of bacterial growth on mixed substrates: Experimental evaluation of cybernetic models. Biotechnology and Bioengineering. 1986;28(7):1044–1055. pmid:18555426
- 17. Boulineau S, Tostevin F, Kiviet DJ, ten Wolde PR, Nghe P, Tans SJ. Single-Cell Dynamics Reveals Sustained Growth during Diauxic Shifts. PLOS ONE. 2013;8(4):1–9.
- 18. New AM, Cerulus B, Govers SK, Perez-Samper G, Zhu B, Boogmans S, et al. Different Levels of Catabolite Repression Optimize Growth in Stable and Variable Environments. PLOS Biology. 2014;12(1):1–22.
- 19. Solopova A, van Gestel J, Weissing FJ, Bachmann H, Teusink B, Kok J, et al. Bet-hedging during bacterial diauxic shift. Proceedings of the National Academy of Sciences. 2014;111(20):7427–7432.
- 20. Loomis WF, Magasanik B. Glucose-lactose diauxie in Escherichia coli. Journal of Bacteriology. 1967;93(4):1397–1401. pmid:5340309
- 21. Lee IH, Fredrickson AG, Tsuchiya HM. Diauxic Growth of Propionibacterium shermanii. Applied Microbiology. 1974;28(5):831–835. pmid:4441064
- 22. George SE, Costenbader CJ, Melton T. Diauxic Growth in Azotobacter Vinelandii. Journal of Bacteriology. 1985;164(2):866–871. pmid:3863813
- 23. Deutscher J. The mechanisms of carbon catabolite repression in bacteria. Current Opinion in Microbiology. 2008;11(2):87–93. pmid:18359269
- 24. Narang A. Comparative analysis of some models of gene regulation in mixed-substrate microbial growth. Journal of Theoretical Biology. 2006;242(2):489–501. pmid:16650437
- 25. Chu DF. In silico evolution of diauxic growth. BMC Evolutionary Biology. 2015;15(1):1–17.
- 26. Chu D, Barnes DJ. The lag-phase during diauxic growth is a trade-off between fast adaptation and high growth rate. Scientific Reports. 2016;6(April):1–15.
- 27. Valdovinos FS, Moisset de Espanés P, Flores JD, Ramos-Jiliberto R. Adaptive foraging allows the maintenance of biodiversity of pollination networks. Oikos. 2013;122(6):907–917.
- 28. Tikhonov M. Community-level cohesion without cooperation. eLife. 2016;5(JUN2016). pmid:27310530
- 29. Fried Y, Shnerb NM, Kessler DA. Alternative steady states in ecological networks. Phys Rev E. 2017;96:012412. pmid:29347089
- 30. Advani M, Bunin G, Mehta P. Statistical physics of community ecology: a cavity solution to MacArthur’s consumer resource model. Journal of Statistical Mechanics: Theory and Experiment. 2018;2018(3):033406.
- 31. Butler S, O’Dwyer JP. Stability criteria for complex microbial communities. Nature Communications. 2018;9:2970. pmid:30061657
- 32. Landmann S, Engel A. Systems of random linear equations and the phase transition in MacArthur’s resource-competition model. Epl. 2018;124(1).
- 33. MacArthur R. Species packing and competitive equilibrium for many species. Theoretical Population Biology. 1970;1(1):1–11. pmid:5527624
- 34. Chesson P. MacArthur’s consumer-resource model. Theoretical Population Biology. 1990;37(1):26–38.
- 35. Marsland R, Cui W, Goldford J, Mehta P. The Community Simulator: A Python package for microbial ecology. PLOS ONE. 2020;15(3):1–18.
- 36. Lenski RE, Rose MR, Simpson SC, Tadler SC. Long-Term Experimental Evolution in Escherichia coli. I. Adaptation and Divergence During 2,000 Generations. The American Naturalist. 1991;138(6):1315–1341.
- 37. Allen Orr H. Fitness and its role in evolutionary genetics. Nature Review Genetics. 2009;10:531–539.
- 38. Beg QK, Vazquez A, Ernst J, de Menezes MA, Bar-Joseph Z, Barabasi AL, et al. Intracellular crowding defines the mode and sequence of substrate uptake by Escherichia coli and constrains its metabolic activity. Proceedings of the National Academy of Sciences. 2007;104(31):12663–12668.
- 39. Vrugt JA, ter Braak CJF, Diks CGH, Robinson BA, Hyman JM, Higdon D. Accelerating Markov Chain Monte Carlo Simulation by Differential Evolution with Self-Adaptive Randomized Subspace Sampling. International Journal of Nonlinear Sciences and Numerical Simulation. 2009;10:273–290.
- 40. Hardin G. The Competitive Exclusion Principle. Science. 1960;131(November):1292–1297. pmid:14399717
- 41. Levin SA, Paine RT. Disturbance, Patch Formation, and Community Structure. Proceedings of the National Academy of Sciences. 1974;71(7):2744–2747.
- 42. Chesson P. A need for niches? Trends in Ecology & Evolution. 1991;6(1):26–28. https://doi.org/10.1016/0169-5347(91)90144-M
- 43. Chesson P. Mechanisms of Maintenance of Species Diversity. Annual Review of Ecology and Systematics. 2000;31(1):343–366.
- 44. Meszéna G, Gyllenberg M, Pásztor L, Metz JAJ. Competitive exclusion and limiting similarity: A unified theory. Theoretical Population Biology. 2006;69(1):68–87. https://doizorg/10.1016/j.tpb.2005.07.001 pmid:16243372
- 45. Barabás G, D’Andrea R, Stump SM. Chesson’s coexistence theory. Ecological Monographs. 2018;88(3):277–303.
- 46. de Vargas C, Audic S, Henry N, Decelle J, Mahé F, Logares R, et al. Eukaryotic plankton diversity in the sunlit ocean. Science. 2015;348 (6237).
- 47. Roughgarden J, Feldman M. Species Packing and Predation Pressure. Ecology. 1975;56(2):489–492.
- 48. Roy S, Alam S, Chattopadhyay J. Competing Effects of Toxin-Producing Phytoplankton on Overall Plankton Populations in the Bay of Bengal. Bulletin of Mathematical Biology. 2006;68(8):2303–2320. pmid:16804650
- 49. Bairey E, Kelsic ED, Kishony R. High-order species interactions shape ecosystem diversity. Nature Communications. 2016. pmid:27481625
- 50. Grilli J, Barabás G, Michalska-Smith MJ, Allesina S. Higher-order interactions stabilize dynamics in competitive network models. Nature. 2017;548:210–213. pmid:28746307
- 51. Brown JH, Gillooly JF, Allen AP, Savage VM, West GB. Toward a metabolic theory of ecology. Ecology. 2004;85(7):1771–1789.
- 52. Labra FA, Marquet PA, Bozinovic F. Scaling metabolic rate fluctuations. Proceedings of the National Academy of Sciences of the United States of America. 2007;104(26):10900–10903. pmid:17578913
- 53. Giometto A, Altermatt F, Carrara F, Maritan A, Rinaldo A. Scaling body size fluctuations. Proceedings of the National Academy of Sciences of the United States of America. 2013;110(12):4646–4650. pmid:23487793
- 54. Zaoli S, Giometto A, Marañón E, Escrig S, Meibom A, Ahluwalia A, et al. Generalized size scaling of metabolic rates based on single-cell measurements with freshwater phytoplankton. Proceedings of the National Academy of Sciences of the United States of America. 2019;116(35):17323–17329. pmid:31409712
- 55. Stewart FM, Levin BR. Partitioning of Resources and the Outcome of Interspecific Competition: A Model and Some General Considerations. The American Naturalist. 1973;107(954):171–198.
- 56. Manhart M, Adkar BV, Shakhnovich EI. Trade-offs between microbial growth phases lead to frequency-dependent and non-transitive selection. Proceedings of the Royal Society B: Biological Sciences. 2018;285(1872):20172459. pmid:29445020
- 57. Manhart M, Shakhnovich EI. Growth tradeoffs produce complex microbial communities on a single limiting resource. Nature Communications. 2018;9 (2018). pmid:30097583
- 58. Seth EC, Taga ME. Nutrient cross-feeding in the microbial world. Frontiers in Microbiology. 2014;5(July):1–6.
- 59. Sanchez-Gorostiaga A, Bajić D, Osborne ML, Poyatos JF, Sanchez A. High-order interactions dominate the functional landscape of microbial consortia. bioRxiv. 2018.
- 60. Louca S, Jacques SMS, Pires APF, Leal JS, Srivastava DS, Parfrey LW, et al. High taxonomic variability despite stable functional structure across microbial communities. Nature Ecology & Evolution. 2016;1(1):0015.
- 61. Rivett DW, Bell T. Abundance determines the functional role of bacterial phylotypes in complex communities. Nature Microbiology. 2018;3(7):767–772. pmid:29915204
- 62. Enke TN, Datta MS, Schwartzman J, Cermak N, Schmitz D, Barrere J, et al. Modular Assembly of Polysaccharide-Degrading Marine Microbial Communities. Current Biology. 2019;29:1–8.
- 63. Pilosof S, Porter MA, Pascual M, Kéfi S. The multilayer nature of ecological networks. Nature Ecology & Evolution. 2017;1:1–9.
- 64. Koschwanez JH, Foster KR, Murray AW. Improved use of a public good selects for the evolution of undifferentiated multicellularity. eLife. 2013;2:e00367. pmid:23577233
- 65.
Burnham KP, Anderson DR. Model Selection and Multimodel Inference: A practical information-theoretic approach. 2nd ed. Springer Verlad; 2002.