Coffee Berry Borer (Hypothenemus hampei) and its role in the evolutionary diversification of the coffee market

The Coffee Berry Borer (CBB) is the main pest that affects coffee crops around the world, causing major economic losses and diminishing beverage quality. A mathematical model is formulated, from the perspective of the Adaptive Dynamics (AD) framework, to describe the evolution of coffee quality as a continuous differentiating attribute related to the mix of healthy and bored coffee. The study involves three stages: first, an agro-ecological model describes coffee production and growth of the CBB population prior to the processing of different qualities of coffee; second, a market model describes the competition between different blends of standard and special coffee; finally, the AD canonical equation is derived to describe the evolution of coffee quality resulting from innovations in the quality attribute filtered by market competition. Interestingly, AD allows to derive conditions for the emergence of diversity, i.e., the establishment of a second type of coffee that coexists with the former and, similarly, for subsequent branching in the quality attributes. The full model provides insights on the impact of CBB control strategies on the long-term market structure. Specifically, a strong control aimed at increasing coffee quality may impoverish the market diversity, independently of the consumers’ budget limitations and corresponding preference for either high or low quality.


Introduction
There are many elements which combine to make colombian coffee a unique product. Firstly, coffee farmers manually harvest only ripe coffee cherries, which requires great effort due to the topography of the colombian Andes. Secondly, farmers carry out post-harvest processes, which entail the elimination of defective grains, pulping, washing, and drying. Later, the coffee is threshed to obtain parchment coffee, the raw roasting material. The economic importance of coffee as an export good is well justified by the impact it has on thousands of colombian families and millions of consumers around the world (Fedecafé 2019).
According to the National Federation of Coffee Growers, 1 (FNC for the acronym in Spanish), about 560000 families grow coffee in Colombia on farms of less than 5 hectares and they are responsible for 69% of production. Of the 940000 hectares of coffee grown in Colombia, around 780000 correspond to technified crops, which means they are planted with improved coffee varieties, such as rust resistant trees (about 80% compared to only 35% that were in 2010). The annual production of Colombian coffee from 1956 to 2018, reported in Fig. 1a, shows a positive trend, with turnarounds typically related to climatic phenomena (such as El Niño). It is however evident from Fig. 1b that the revenue from exportations is not directly related to production. Global economic factors, such as the interaction with other international coffee markets, and even changes in the currency exchange rates, definitely influence the revenue, but there is a growing consensus on the role played by the coffee quality attributes, with respect to which the production is nowadays increasingly diversified. Indeed, a wide variety of specialty coffees are currently produced, and consumers around the world are learning the value of high quality coffee, for which they are willing to pay higher prices. The FNC defines the special coffees as those obtained through (i) the development of new equipment and new forms of preparation, which guarantee better beverage quality, (ii) the association of coffee production with concepts such as sustainability, (iii) caring for the environment, (iv) social responsibility, and (v) economic equity. Special coffees are becoming a source of income for small producers who mainly market their product locally or through alternative trade shops, or who manage to export their coffee with certificated origin and production. According to the report "Global Specialty Coffee Market Size by [90][91][92][93][94][95][96][97][98][99][100] by Application (Home, Commercial) by Region and Forecast 2019 to 2025", 2 the world market for coffee reached revenues up to USD 35.9 billion in 2018, with a prospect of USD 83.6 billion by 2025. Unfortunately, in Colombia, the systematic collection, analysis, and dissemination of accurate information on the production, processing, and sales of special coffees is not yet consolidated, mainly because special coffees are often produced in small quantities and marketed directly by the producer. Currently, the FNC statistical records of coffee exports are only available by type: green, decaffeinated green, roasted in beans, roasted and ground, and extract and soluble (Fedecafé 2019). a b Fig. 1 a Anual registered Colombian coffee production in thousands of bags of 60 kg of green coffee. b Value of exports to all destinations-Anual total. Unit: Millions of dollars (Fedecafé 2019) Beyond the main denominations (i)-(v) of special coffees, one of the factors that most impacts the quality of coffee is the cultivation protocols, that must be optimized to minimize the attack of pests and diseases, eliminate outer fruit layers, and control humidity (Montoya-Restrepo 1999). The most widespread coffee pest worldwide is a beetle, the coffee berry borer (CBB) Hypothenemus hampei (Coleoptera: Curculionidae: Scolytinae) (Pardey 2006). CBB adult females bore into coffee beans through the navel and into the endosperm, where it makes galleries to deposit its eggs. CBB causes different types of damage to the product, which are caused by (i) boring and feeding habits of adult and immature insects, which cause a reduction in yield and final product quality, and (ii) physical damage, which causes bored beans to become vulnerable to infection and further pest attacks (Damon 2000). Montoya's investigation (Montoya-Restrepo 1999) strove to define what CBB infestation percentages and what levels of damage permit to obtain a coffee drink of acceptable quality. Specifically, the investigation supports the hypothesis that, beyond the damage, the CBB directly impacts the coffee market, by introducing a variety of different coffee types/qualities, classified depending on the proportion of bored grains that pass to production.
As a result of this situation, significant efforts have been made to identify the best CBB control strategies, among biological control, carried out via parasitism and predation (Follett et al. 2016;Infante 2018;Monagan et al. 2017; Morris and Perfecto 2016;Rodríguez et al. 2017), chemical control methods, by means of insecticides (Pardey 2006), and cultural control, the safest of all possible, that refers to agricultural practices, such as collecting overripe and dry grains (black grains no longer useful) to prevent adult CBB insects from finding refuge (Alarcón et al. 2017;Pardey 2006). Institutions supporting coffee production in Colombia, such as the FNC, recommend a combination of the three strategies, known as the Integrated CBB Control (Constantino et al. 2017;Pardey 2006).
The situation however calls for a more comprehensive view of the CBB phenomenon, that includes the market dynamics and its feedback on coffee production and on the whole agro-ecological context. It is indeed the final coffee consumer who exerts the selection to determine which new products invade the market and which get established or eliminated. In turn, strategic decisions on the production and commercialization sides are source of innovation for coffee types and qualities, innovations that are then filtered by the market competition. In this sense, it is important to study this feedback loop between market and production of coffee, when CBB damage is considered a cause of quality differentiation. Such a study should be able to determine the conditions under which an innovative special coffee, characterized by some quality attribute that differentiates it from standard coffee, can invade the market and either replace or coexist with standard coffee. In particular, conditions for coexistence open up the possibility for further diversification, even of two initially similar products. Under this comprehensive view, the role CBB control strategies will be particularly highlighted, not only limited at the pest containment, but extended to control the emergence of market niches for different coffee products.
These kinds of questions are addressed by evolutionary modeling approaches, and particularly by the Adaptive Dynamics (AD) framework Dieckmann and Law 1996;Geritz et al. 1997Geritz et al. , 1998Metz et al. 1996). AD is a theoretical modeling framework which originated in evolutionary biology and describes the long-term evolution of quantitative traits (i.e., continuous attributes determined by the cumulative contributions of many genes). The key feature of AD is to explicitly consider the feedback loop that binds demographic and evolutionary change. In biology, demography selects the traits who win the competition and evolution proceeds through sequences of genetic mutations that are selected by demography. In economics, the role of mutations and selection are played by innovations on the production side and market competition on the consumer side. By focusing on incremental innovations, put forward at a frequency that is low compared to the market dynamics, AD describes the evolution of the products' traits (the coffee quality in our case) in terms of a differential equation, called the AD canonical equation, thus characterizing evolutionary equilibria as well as transients and non-stationary regimes (Dercole et al. , 2006Dieckmann et al. 1995). Most importantly, AD endogenously integrates the changing system's diversity, as the number of coexisting product types increases when innovative and established products coexist and further differentiate, evolutionary branching, and is pruned when evolution eliminates outcompeted products, evolutionary extinction Doebeli and Dieckmann 2000;Geritz et al. 1997Geritz et al. , 1998) (see Champagnat et al. 2006;Dercole 2016;Dercole and Geritz 2016;Genieys et al. 2009 for further theoretical developments). This is the most important added value of AD to the economic literature on diversification. As extensively discussed in , product diversity is both a means and a result of economic development and growth in variety is crucial and not independent from growth in production (Grübler 1998;Saviotti 1996Saviotti , 2001Stirling 1998). In the AD framework, product diversity indeed emerges as a result of the feedback between innovation and competition processes.
Since its introduction, a wide range of applications have been published. Biologically oriented applications have addressed competition Doebeli and Dieckmann 2000;Johansson et al. 2010), and predator-prey interactions (Abrams 1997(Abrams , 2003Dercole et al. 2003Dercole et al. , 2006Dieckmann et al. 1995;Landi et al. 2013), food chains , mutualistic (Dercole 2005;Dieckmann and Law 1996;Doebeli and Dieckmann 2000;Ferriere et al. 2002) and cannibalistic interactions (Dercole 2003;, evolution of dispersal (Colombo et al. 2008;Dercole et al. 2007;Parvinen 2002), and even evolution at the genetic level (Collet et al. 2013;Kisdi and Geritz 1999). In the socio-economic context, technological innovations Toro-Zapata et al. 2018) and the evolution of fashion traits  have been investigated with the tools of AD. However, to the best of our knowledge, no application have addressed an agro-industrial phenomena, such as coffee production.
Here, a stylized AD model is formulated and analyzed to describe the evolution of coffee quality. An agro-ecological model describes the growth and harvest of the coffee plantation coupled with the demography of a CBB population, the latter explicitly structured into immature and adult individuals to reflect the damage caused by their reproduction and feeding habits. A market model describes the competition of different coffee types, defined by the proportion of healthy versus bored grains used in their production. Consumer preference favoring high or low quality is considered in competition describe their budget limitations, therefore, the model indirectly considers the rol of coffee prices. The model is, e.g., useful to derive the conditions under which a special coffee invades a market dominated by standard one; and conditions under which the special coffee eventually eliminates the standard one from the market, product substitution, or the two types coexist by sharing the market. Linking this conditions to the consumers' preference for low or hight quality coffees is a way to consider their budget limitations and the roles of coffee price in market diversification. Finally, the AD canonical equation describes the evolution of coffee quality, closing the feedback loop between the introduction of new coffee types and their competition in the market. The analysis of the model provides insights on the impact of CBB population on the evolving structure of the coffee market. The major result is that, independently of the consumers' preference for high or low quality, a mild control of the CBB population allows the emergence of several coffee types/qualities through evolutionary branching, whereas a strong (and expensive) pest control would impoverish the market diversity and could therefore lead to an economic loss.

Standard-special coffee model
We consider a coffee plantation of H hectares and n trees per hectare, each tree with the average productivity ρ (kilos of mature coffee beans on a healthy, unharvested tree, on average (Arcila et al. 2007)). We do not consider seasonality, so the product k = nHρ gives us the biomass of coffee beans reached at equilibrium by the healthy, unexploited plantation (factors such as soil, climate, care, affecting production, are included in the parameter ρ, see Arcila et al. 2007). This simplification allows us to use the logistic equation to describe the growth of the healthy coffee biomass C(t) available in the plantation on a daily basis, with net growth rate r (the difference between daily production rate and loss of overripe and dry grains at low density) and carrying capacity k.
To include the effect of CBB on coffee production, we model the CBB population with two classes, according to the state of maturity of individuals. Let I (t) be the density of immatures (eggs, larvae, and pupae) and M(t) be the density of adult females in the plantation. Because adult females cause damage, by boring healthy beans to oviposit, we consider an average daily production of bored coffee given by the term βC(t)M(t). Bored coffee beans translate into a new class of unhealthy coffee, denoted by C b (t), for which we use a loss rate d possibly higher than the one included in the net growth rate r of healthy coffee.
Assuming that coffee growers harvest coffee (healthy and bored) proportionally to the available biomass (constant harvesting effort h), we get the following two equations for the growth of coffee: At the same time, the demography of the CBB population is described bẏ where parameter ω is the maturation rate (1/ω is the average duration of the immature stage), is the CBB reproductive efficiency (the food-to-oviposition conversion rate), and δ and μ are the mortality rates (from natural causes or as a result of control strategies by the farmer) in the two classes. Equations (1) and (2) constitute the agroecological model. Harvested coffee is used for the production of parchment coffee and subsequent commercialization. Depending on the mix of healthy and bored coffee beans, we consider parchment coffee of two different qualities, which share the market with sold quantities (kg per day, on average) denoted by N 1 (t) and N 2 (t), respectively. These will henceforth be referred to as "standard coffee" for N 1 , of quality q 1 , and as "special coffee" for N 2 , of quality q 2 . The quality q is assumed to be a continuous attribute that controls the mix of healthy and bored coffee beans. Specifically, we use the smooth sigmoid function from 0 (at q = 0) to 1 (when q → ∞), for the fraction of the harvest of healthy coffee to be used in production, the complementary fraction 1−Q(q) taken from the harvest of bored coffee. The resulting quality therefore depends of the quality attribute q, but also on the agro-ecological context. The threshold parameter q 0 separates low quality coffee (q i < q 0 , so that Q(q i ) < 1/2), promoting the use of bored coffee beans, from high quality coffee (q i > q 0 , Q(q i ) > 1/2), promoting the use of healthy beans, i = 1 or 2. Consumers' demand is not explicitly considered in this model. However, consumers' budget constraints are translated into the preference for high or low quality coffees. Consumers' preference is a source of competition between the two types of coffee, that we include in the following Lotka-Volterra market competition model: where P i = Q(q i )hC + (1 − Q(q i ))hC b is the production of coffee type i and f (q i , q j ) is the competition function, measuring the loss of market share for coffee type i for each unit sold of coffee type j (f (q i , q i ) = 1). In the absence of special coffee (type 2) and with a constant production P i (at an equilibrium of the agroecological model (1, 2)), standard coffee (type 1) penetrates the market logistically, with initial rate (Ṅ 1 /N 1 at low N 1 ) assumed to be the production itself. Eventually, the sold amount reaches production (market clearing, i.e., N 1 = P 1 ), that sets a single-coffee market with quality q 1 .
For the competition function, we use the log-normal formulation proposed in  in a context of technological change: See Fig. 2a for a graphical representation. Coffee qualities with low or high ratio q 1 /q 2 are assumed to weakly compete (f tends to zero as the ratio goes to either zero or infinity), because targeted by customers with widely different budgets. On the contrary, similar coffees do compete. How competition fades as the ratio q 1 /q 2 leaves 1 is controlled by parameter f 2 , that plays the role of the log-normal standard deviation. A key competition parameter is f 1 : it indicates the consumers' preference for higher (f 1 > 1) or lower (f 1 < 1) coffee quality, depending on budget constraints. Indeed, if f 1 > 1, the share loss f (q 1 , q 2 ) for coffee type 1 is larger/smaller than 1 if q 2 is larger/smaller than (and close to) q 1 , while the loss f (q 2 , q 1 ) is reciprocally smaller/larger than 1 (see Fig. 2b, orange curve), which gives a competitive advantage to the larger quality. Vice-versa, f 1 < 1 gives a competitive advantage to the lower quality (see Fig. 2b, blue curve), while competition is symmetric for f 1 = 1.
The agro-ecological and market model (1, 2, 4) constitute our henceforth called "standard-special coffee model." It is subject to non-negative initial conditions. In Table 1, we summarize the state variables and parameters, respectively indicating the initial conditions and the baseline values used in simulations. a b Fig. 2 a Competition function f (q 1 , q 2 ) with f 1 = 1.1 and f 2 = 1. The restriction to q 1 = 1 is shown by the orange curve. b Planar representation of the restriction to q 1 = 1 for both f 1 = 1.1 (orange) and f 1 = 1/1.1 (blue). As highlighted in the zoomed inset, for f 1 = 1.1 (consumers' preference for higher coffee quality; orange curve), the share loss for coffee type 1 (with quality q 1 = 1) is larger than 1 and maximum when q 2 = f 1 = 1.1 (f (1, 1.1) = 1.0046). At this value of q 2 , the share loss f (q 2 , q 1 ) for coffee type 2 can be read on the orange curve, because f ( Similarly, for f 1 = 1/1.1 (consumers' preference for lower coffee quality; blue curve), the maximal share loss for coffee type 1 (again equal to 1.0046) is realized for q 2 = 1/1.1 = 0.9090, while the corresponding share loss for coffee type 2 can be read (on the blue curve) as f (1, q 1 /q 2 ) = f (1, 1.1) (again equal to 0.9865)

Standard coffee model, invasion fitness, and invasion conditions
Before special coffee enters the market, standard coffee (type 1) is the only option, and the two eqs. (4a,b) of the standard-special coffee model degenerate into the single equationṄ Eq. (6), jointly with the agro-ecological eqs.
(1, 2) constitute our henceforth called "standard coffee model." As already discussed in Section 2.1, the model directs the market dynamics to an equilibrium at which all the production is sold (N 1 = P 1 ). Including the variables of the agro-ecological model, and also the special coffee (type 2) with no sales (N 2 = 0), we denote this equilibrium with whereN shortly denotes the "standard coffee equilibrium." Note that E 0 is also an equilibrium for the standard-special coffee model (1, 2, 4).
Invasion of a small amount of special coffee (type 2), arising from an innovation when the market is at (or close to) E 0 is possible only if the quality q 2 of the special coffee is such that E 0 is an unstable equilibrium for the standard-special coffee model. On the contrary, i.e., if E 0 is a locally asymptotically stable (LAS) equilibrium of the standard-special coffee model, then the initially small sales N 2 of special coffee will drop and the special coffee will exit the market soon after its introduction. The stability of E 0 is determined by the sing of the so-called "invasion fitness" of the innovation Metz et al. 1992) that is technically the eigenvalue of the system's Jacobian at the equilibrium E 0 associated with the eigenvector with nonzero N 2 -component. More economically, the invasion fitness is the per-unit exponential rate of penetration, in terms of initial sales (N 2 nearly zero), of the special coffee quality q 2 , facing the established quality q 1 at its equilibriumN(q 1 ). Indeed, λ(q 1 , q 2 ) can be derived from Eq. (4b) asṄ 2 /N 2 , by setting N 1 =N(q 1 ) and N 2 = 0 in the right-hand side and by replacing C and C b with their equilibrium values. Note that λ(q 1 , q 1 ) = 0. This is economically obvious, because standard coffee is at the market equilibrium.

The AD canonical equation and branching in the quality attribute
The dynamics described by the standard-special coffee model (1, 2, 4) occur in the agro-ecological, industrial, and market timescales, simply "market timescale" in the following, where time t is measured in days. The main assumption of Adaptive Dynamics (AD) is that this timescale is faster than the one on which innovations in the production process are put forward in the market. In terms of the quality attribute here considered, if new types of coffee are put on sale on average every τ days, we assume τ is relatively large. The timescale t/τ , on which the unit represents the average time between two consecutive innovations, is called the "innovation timescale." This is the timescale on which AD describes the dynamics of the coffee quality attributes, that is indeed innovation-driven and henceforth called "innovation dynamics." In the scenario in which only one type of coffee is established in the market, with quality q 1 , and in the technical limit of rare (large τ ) and small innovations, the expected innovation dynamics of the intrinsically stochastic path of q 1 is described by the following differential equatioṅ where the dot-notation here stands for the time-derivative on the innovation timescale. Equation (10) is the AD canonical equation for the quality attribute q 1 Dieckmann and Law 1996). It describes the expected dynamics of q 1 resulting from a sequence of substitutions of the currently established coffee by an innovative one.
When an innovative type of coffee q 2 is put on sale, the established quality q 1 is at (or close to) its equilibriumN(q 1 ) (see Eq. (8)), because of the large time τ elapsed since the previous innovation. The sign of the invasion fitness λ(q 1 , q 2 ) therefore determines whether the innovation invades or quickly disappears. Moreover, one of theoretical pillar of AD, the "invasion implies substitution" theorem (Dercole and Geritz 2016;, says that if q 2 is sufficiently close to q 1 , invasion under a nonzero "selection gradient" implies the substitution of the former quality by the new one. Mathematically speaking, this means that the point of substitution is also an equilibrium of the standard-special coffee model (1, 2, 4) and that the trajectories originating close to E 0 with low initial sales N 2 of the new quality coffee q 2 converge to E 1 . After the substitution transient, the coffee quality q 1 is kicked out of the market and replaced by quality q 2 , that can therefore be renamed q 1 , i.e., the new established quality. Note that the selection gradient determines the direction of the innovation process. Geometrically, it is the slope of the fitness landscape at (q 1 , q 1 ) in the direction of the special coffee quality q 2 . Considering the fitness first-order expansion w.r.t. q 2 at q 2 = q 1 , i.e., one sees that under a positive selection gradient, the quality q 1 is replaced by innovative products with higher quality; vice-versa, under a negative selection gradient, lower quality coffees win the competition (in both cases, it results s(q 1 )(q 2 −q 1 ) > 0 for q 2 sufficiently close to q 1 ). Because of the timescale separation obtained for large τ , innovations can be considered one at a time and each substitution transient takes a small time on the innovation timescale. Assuming that innovations are randomly introduced into the market (at frequency 1/τ ) with mean quality equal to the currently established q 1 and small standard deviation σ (q 1 )/τ , the expected quality dynamics become smooth on the innovation timescale and ruled by the AD canonical Eq. (10) (the timescale of Eq. (10) is actually t/τ 2 , because of the double scaling of frequency and size of innovations by τ ). The name canonical follows from the fact that, in evolutionary biology, the selection gradient appears in other evolutionary models based on fitness landscapes, such as quantitative genetics (Dieckmann and Law 1996).
The AD canonical Eq. (10) can be used as long as the quality attribute q 1 is far from a stationary solutionq that nullifies the selection gradient Eq. (11), a so-called "singular strategy" in the AD jargon. Indeed, close to a singular strategy, invasion does not necessarily imply substitution. Let us restrict the attention to a stable singular strategyq, i.e., an attracting equilibrium of Eq. (10), toward which the innovation process directs the quality attribute q 1 . In particular, expanding the invasion fitness λ(q 1 , q 2 ) up to second-order w.r.t. both (q 1 , q 2 ) at (q,q), one can see that λ(q 1 , q 2 ) and λ(q 2 , q 1 ) can both be positive close to (q,q), so that both quality attributes q 1 and q 2 can invade a market established by the other. Without going into the details of the expansion (originally developed in Geritz et al. 1997Geritz et al. , 1998Metz et al. 1996 and also included in , this occurs under the condition in a region of the plane (q 1 , q 2 ) that, locally to (q,q), is a cone with vertex in (q,q) and symmetric opening w.r.t. the anti-diagonal (q −q,q +q) (see Fig. 4 in the Results section, panels A and B locally to point (q 1 ,q 1 ), where the pairs of signs indicate the signs of λ(q 1 , q 2 ) and λ(q 2 , q 1 ), respectively). This is the region of "coexistence" of coffee types 1 and 2 (the (+, +) region in Fig. 4a and b), because for (q 1 , q 2 ) in this region, the trajectories of the standard-special coffee model (1, 2, 4) originating close to equilibria E 0 and E 1 converge to an internal equilibrium of coexistence, characterized by positive salesN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ) of both coffee types (Dercole and Geritz 2016). The coexistence of two different, though very similar, types of coffee is the first step to go from a single-coffee market to a diversified one. However, to really generate two different products, the innovation process must be such that, after the coexistence is established, successive innovations move q 1 and q 2 in opposite directions. First of all, the invasion fitness of an innovative type q facing two established coffee types with qualities q 1 and q 2 is a function of the three arguments (q 1 , q 2 , q ), that we denote by (q 1 , q 2 , q ). Its expression is not important here and will be derived in the next section. Let us here consider (q 1 , q 2 , q ) as a function of the innovative quality q , for given q 1 and q 2 (let us also assume q 2 > q 1 , though this choice is irrelevant). Taking into account that (q 1 , q 2 , q ) vanishes at both q = q 1 and q = q 2 (because of the market equilibrium), the quadratic expansion of w.r.t. q is shaped, locally toq, as in Fig. 3. Working out the details (see again Geritz et al. 1997Geritz et al. , 1998Metz et al. 1996 or Dercole and, it turns out that the discriminant between the two cases is linked to the invasion fitness in the single-coffee market (see Eq. (9)). Specifically, if the quadratic approximation is an upward parabola, so that innovations in the quality q 1 invade and replace the established coffee type 1 if q < q 1 , while the same occurs for the coffee type 2 if q > q 2 (in both cases the invasion fitness (q 1 , q 2 , q ) is a b Fig. 3 Quadratic approximation of the invasion fitness (q 1 , q 2 , q ) w.r.t. the innovative quality attribute q for given established attributes (q 1 , q 2 ) positive, see Fig. 3a). As a result, the quality attributes q 1 and q 2 get further diversified and the market selection is said to be "disruptive" at the singular strategy. On the contrary, if the quadratic approximation is a downward parabola and only innovations that make q 1 and q 2 more similar do win the competition. As a result, even if the model formally allows for the coexistence of two similar coffee types, in practice, the market remains single-product. Singular strategies characterized by condition Eq. (16) are said to be locally "evolutionarily stable" (ESS), that means protected from the invasion of similar strategies. Note that evolutionarily stability is a different concept from the dynamical stability of the equilibria of the canonical Eq. (10). To underline the difference, the latter concept is often called "convergence stability" in the AD jargon. Convergence stable singular strategies characterized by conditions (14) and (15) are called "branching points" (BP) of the innovation process (Geritz et al. 1997(Geritz et al. , 1998Metz et al. 1996). Ifq is a BP, the dynamics of the quality attribute q 1 is first attracted byq, in a phase in which the market is single-product (there is only one type of established coffee that is at the market equilibrium for each value of q 1 ), but with q 1 evolving on the innovation timescale. Once close toq, a second coffee type with quality q 2 gets established in the market (because of the coexistence condition (14)) and a second phase with two coexisting and evolving products begins. The disruptive condition (15) implies that the two quality attributes q 1 and q 2 initially diverge one from the other at the beginning of this second phase. To study the further innovation dynamics of q 1 and q 2 , we need to derive a two-dimensional AD canonical equation, in which substitution sequences are considered for both the established coffee types. This is done in the following section.
Convergence stable singular strategies at which one or both of the conditions (14) and (15) hold with reversed inequality sign are called "terminal points" (TP) of the innovation process . Indeed the innovation dynamics driven by rare and small innovations halt there. Cases with vanishing second fitness derivatives in Eqs. (14) and (15) are bordering cases between BP and TP and are technically bifurcation points (Della Rossa et al. 2015;).

Innovation dynamics after branching
After a branching atq, the market sets at the equilibrium of the standard-special coffee model (1, 2, 4). The explicit expressions for the equilibrium salesN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ) can be given in terms of the standard coffee equilibriumN(q 1 ) (see Eq. (8)) and the competition function f (q i , q j ), i.e., H.D. Toro-Zapata et al.
Similarly to the single-coffee market, the invasion fitness (q 1 , q 2 , q ) of an innovative coffee type with quality attribute q facing the two established types 1 and 2 is its per-unit (exponential) penetration rate, in terms of initial sales N (N nearly zero), when types 1 and 2 are at the market equilibrium E c . To derive the per-unit (exponential) rateṄ /N , we need to extend the standard-special coffee model to a three-type model, including the standard, special, and innovative types. We here only write the differential equation for the innovative type: from which it immediately follows the expression of the invasion fitness: Again assuming that innovations are rare events on the daily market time-scale that introduce small variations in coffee quality (i.e., quality q is close to either q 1 or q 2 ), the expected innovation dynamics followed by the two established qualities q 1 or q 2 are ruled by the following two-dimensional AD canonical equation: 3 Results

The agro-ecological equilibrium
The agro-ecological model (1, 2) has only one equilibrium at which healthy and bored coffee coexist with the CBB immature and adult insects. The equilibrium densities (nullifying the right-hand sides of Eqs. (1), (2)) arē is the so-called basic-reproduction-number of the CBB population-the average number of secondary CBB females produced by a CBB female in a generation (Ripa and Larral 2008;Romero and Cortina Guerrero 2007;Ruiz Cárdenas and Baker 2010). Only if B 0 > 1 the CBB population is able to persist. Indeed, the coexistence equilibrium Eq. (22) is stable for B 0 > 1 and characterized by positive densities (stability can be easily checked by means of linearization). Otherwise, the CBB population cannot develop (or goes extinct if initially present) and system (1, 2) converges to the CBB-free equilibrium with C = (1 − h/r)k and C b = I = M = 0. Note that the densities in Eq. (22) make no sense for B 0 < 1 (C b ,Ī , andM are negative for B 0 < 1) and they coincide with the CBB-free equilibrium for B 0 = 1 (system (1, 2) undergoes a transcritical bifurcation when B 0 varies across 1, through which the coexistence equilibrium and the CBB-free one collide and exchange stability (Dercole and Rinaldi 2011)). Also note that r > h is an obvious necessary condition to have B 0 > 1, i.e., the harvesting rate h cannot exceed the coffee growth rate. Because we are interested in the CBB-related aspects of the plantation management and control, we focus in the following on the case B 0 > 1 and on the equilibrium densities in Eq. (22).
Solving the condition B 0 > 1 for the CBB boring and adult-mortality rates β and μ and for the harvesting rate h, gives the following thresholds: (24) These three parameters will be considered in the following analyses, because they allow to discuss the joint effects of coffee production and CBB control practices. For instance, the threshold h 0 sets the harvesting rate that is enough, according to the model, to achieve CBB eradication.

Innovation dynamics in the single-coffee market
Substituting the agro-ecological equilibrium densities Eq. (22) in the expressions for the standard coffee equilibrium Eq. (8) and for the invasion fitness Eq. (9), the invasion fitness λ(q 1 , q 2 ) can be explicitly determined. Figure 4 shows the contour plot of the invasion fitness for the reference values in Table 1 of the model parameters, distinguishing the cases of consumers' preference for low/high coffee quality (low/high budget, f 1 ≶ 1, left/right column) and for different values of the CBB adult-mortality rate μ.
At points (q 1 , q 2 ) where the fitness is positive (blue-shaded regions), a small amount of special coffee with quality q 2 can invade a single-coffee market dominated by the standard coffee with quality q 1 . On the contrary, the special coffee fails to invade at points (q 1 , q 2 ) where the fitness is negative (red-shaded regions). The fitness is trivially zero on the diagonal q 1 = q 2 (because of the market equilibrium (8)), but vanishes also along non-trivial combinations (q 1 , q 2 ) at the borders between blue and red regions (green solid curves). The intersections of a non-trivial zero-contour line with the diagonal identify the singular strategies of the AD canonical Eq. (10), i.e., the equilibria of the innovation dynamics of the quality attribute q 1 . Indeed, at a transversal intersection (see Fig. 4a and b), the directional derivative of λ(q 1 , q 2 ) is zero in any direction, including the vertical one of the selection gradient (11).
Because the AD canonical Eq. (10) is one-dimensional, the stability of the singular strategies can also be graphically determined in Fig. 4a and b. Indeed, the fitness is positive (blue) above the diagonal on the left of the singular strategyq 1 and below the diagonal on the right, so that small innovations with q 2 > q 1 win the competition for q 1 <q 1 , whereas the winner has q 2 < q 1 for q 1 >q 1 . This means thatq 1 is a stable singular strategy. On the contrary, the fitness is positive below the diagonal on the left ofq (u) 1 and above the diagonal on the right, so thatq  Table 1). The fitness is positive in blue-shaded regions, negative in red-shaded ones, and vanishes on the diagonal (black) and on the borders between blue and red regions (green curves). In panels A and B, the intersections of the green zero-contour line with the diagonal identify the singular strategiesq 1 andq (u) 1 , respectively stable and unstable, of the AD canonical Eq. (10). The red curve is specular w.r.t. the diagonal of the green one and is used to define the positive/negative regions of the specular fitness λ(q 2 , q 1 ) (the fitness of the innovative quality q 1 in the market set by q 2 ). The pair of signs in each region respectively indicates the signs of λ(q 1 , q 2 ) and λ(q 2 , q 1 ). In the (+, +) region, the coffee qualities (q 1 , q 2 ) coexist in the market generate an innovation dynamics leading to the stable equilibriumq 1 , from those begetting the runaway toward the worst or the best quality, under consumers' preference for low/high coffee quality, respectively. Indeed, for q 1 <q (u) 1 in Fig. 4a, the fitness is positive below the diagonal (not well visible at the scale of the figure), so that innovations with q 2 < q 1 always win the competition and make q 1 converge to zero. Recall that zero quality corresponds to 100% use of bored grains, see the mixing factor Q(q 1 ) in Eq. (3), and is therefore the worst coffee quality described by the model. Vice-versa, for q 1 >q (u) 1 in Fig. 4b, the fitness is positive above the diagonal and the runaway of q 1 is toward +∞, making Q(q 1 ) converge to one, i.e., 100% use of healthy grains (best quality).
The two singular strategiesq 1 andq (u) 1 are not present in Fig. 4c and d. Under consumers' preference for low/high coffee quality, they collide and disappear through a fold bifurcation (Dercole and Rinaldi 2011) for sufficiently low/high CBB mortality rate μ. With no singular strategy, the runaway toward worst or best quality is unavoidable. The first scenario (low budget), requires the harvest to be mainly composed of bored coffee grains, so that decreasing the quality does not reduce production (see again the role of the mixing factor Q(q 1 ) in Eq. (3)). This condition requires a welldeveloped pest and is therefore realized for low CBB mortality. On the contrary, the second scenario (high budget), requires a healthy coffee harvest and, hence, a weak (or extinct) CBB population. In both scenarios, the consumers' preference is the dominating force driving the innovation process. Interestingly, for intermediate CBB mortality, the interaction of agro-ecological, production, and consumers' sides, determines the singular strategiesq 1 andq (u) Fig. 4 is accompanied by analytical results (obtained by means of symbolic computation) reported in Appendix. Not only the explicit expression of the invasion fitness λ(q 1 , q 2 ) and of the AD canonical Eq. (10) are reported, but we can also solve explicitly for the singular strategiesq 1 andq (u) 1 and for the parameter combinations of the fold bifurcation at which they collide. Together with the expression for the CBB-basic-reproduction-number B 0 (see Eq. (23)), these explicit solutions are used to plot Fig. 5, which shows how the (stable) equilibrium qualityq 1 varies w.r.t. the three model parameters on which we mainly focus our discussion. The red curve is the transcritical bifurcation at which B 0 = 1 and the black curve is the fold bifurcation involving the two singular strategies (in Eq. (A.6c), explicit expressions for the bifurcation curves are shown, defining thresholds for β, μ and h). The equilibrium qualityq 1 is defined in the region B 0 > 1 and delimited by the fold bifurcation. The two bifurcation curves establish thresholds for the persistence of the CBB and for the existence of the equilibrium qualityq 1 .

From single-product to standard-special coffee markets
Once we have a stable singular strategyq 1 , we can check the coexistence and disruptive conditions (14) and (15) atq 1 , to see whether there are parameter settings for which the singular strategy is a BP. Because we have an explicit expression forq 1 in terms of the model parameters (see Appendix), we derived, as well, explicit expressions for the fitness second derivatives in Eqs. (14) and (15) atq 1 (handled by means of symbolic computation, but not reported in Appendix because excessively long). The contour plots of the obtained expressions are illustrated in Figs. 6 and 7.
The major result here is that the coexistence and disruptive conditions (14) and (15) Table 1). The CBB-basic-reproduction-number B 0 is larger than one on the left of the red curve. The black curve is the fold bifurcation between the singular strategiesq 1 andq (u) 1 numerically checked for other parameter pairs). The shaded regions in Figs. 5-7 therefore correspond to parameter settings for which the singular strategyq 1 is a BP. Results equivalent to those obtained in the (h, β)-plane were obtained (not reported) for the (h, )and (h, ω)-planes, which indicates a close relationship between the CBB boring rate β, reproductive efficiency , and maturation rate ω; it means that the control strategies affecting these parameters are to a certain extent substitutable. Similarly, results equivalent to those obtained in the (h, μ)-plane were obtained (not reported) in the (h, δ)-plane, which indicates as equally effective the control strategies targeting adult or immature CBB individuals. a b c d Fig. 6 Contour plot of the fitness second derivative in the coexistence condition (14) atq 1 (left/right column: consumers' preference for low/high coffee quality, f 1 ≶ 1; other model parameters set as in the reference Table 1). As in Fig. 5, the CBB-basic-reproduction-number B 0 is larger than one on the left of the red curve and the black curve is the fold bifurcation between the singular strategiesq 1 andq (u) 1 . The coexistence condition holds true (red-shaded region) in the whole region of definition and stability of the singular strategyq 1 (compare with Fig. 5) Once branching develops at the BPq 1 , the market gets diversified, with two established coffee types-standard and special-with qualities q 1 and q 2 and sold amountsN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ), respectively, representing the market equilibrium at (q 1 , q 2 ) (see Eq. (18)). The quality attributes q 1 and q 2 are similar just after the establishment of the market share, but further innovations in the two types make them diverge in quality. The joint innovation dynamics of q 1 and q 2 is ruled by the two-dimensional canonical Eq. (21). In the next two subsections, we analyze the innovation dynamics before and after branching in the two considered scenarios of a b c d Fig. 7 Contour plot of the fitness second derivative in the divergence condition (15) atq 1 (left/right column: consumers' preference for low/high coffee quality, f 1 ≶ 1; other model parameters set as in the reference Table 1). As in Fig. 5, the CBB-basic-reproduction-number B 0 is larger than one on the left of the red curve and the black curve is the fold bifurcation between the singular strategiesq 1 andq (u) 1 . The divergence condition holds true (blue-shaded region) in the whole region of definition and stability of the singular strategyq 1 (compare with Fig. 5) consumers' preference for low/high coffee quality (low/high budget). Though mathematically irrelevant, we consider q 2 < q 1 in the first scenario and q 2 > q 1 in the second, i.e., q 2 is the special coffee preferred by consumers.

Innovation dynamics under consumers' preference for low quality
We now consider the low budget scenario in which consumers have preference for a low quality coffee (parameter f 1 = 1/1.1 slightly lower than one, so that the asymmetry of the competition function Eq. (5) is in favor of the lower quality). Figure 8 shows in solid-black the numerical solution of standard coffee model (1, 2, 6) for two Fig. 8 Agro-ecological and market dynamics under consumers' preference for low quality (parameter f 1 = 1/1.1). Two parameter setting are considered: a reference one indicated in Table 2 for which the singular strategyq 1 is a BP and a perturbed one in which the CBB adult-mortality rate μ is decreased (from 0.6 to 0.3) to cross the fold bifurcation between the singular strategiesq 1 andq (u) 1 (the black curve in Figs. 5-7, panel C; other parameters set as in the reference Table 1). Lines 1 and 2: agro-ecological dynamics. Line 3, left-to-right: market penetration of a single coffee type (simulation of the standard coffee model (1, 2, 6) with q 1 = 30 and N 1 (0) = 0.1); standard-special product substitution (green; simulation of the standard-special coffee model (1, 2, 4) with q 1 = 30, q 2 = 0.97q 1 = 29.1 (3% innovation toward lower quality) and N 1 (0) =N(q 1 ), N 2 (0) = 0.1); standard-special product coexistence for the reference parameter setting (red; simulation of the standard-special coffee model (1, 2, 4) with q 1 =q 1 = 24.81, q 2 = 0.97q 1 = 24.07 and N 1 (0) =N(q 1 ) and N 2 (0) = 0.1); standard-special product coexistence for the perturbed parameter setting (blue; simulation of the standard-special coffee model (1, 2, 4) with q 1 =q  Table 2 for which the singular strategȳ q 1 is a BP and a perturbed one in which the CBB adult-mortality rate μ is decreased (from 0.6 to 0.3) to cross the fold bifurcation between the singular strategiesq 1 and q (u) 1 (other parameters set as in the reference Table 1). The reduction of the CBB mortality illustrates the effect of a weaker pest control policy and is here considered to analyze the effect of the singular strategies disappearance on the dynamics after branching.
The first 8 panels (first and second lines) show the daily-dynamics of the agroecological variables (for both the considered parameter settings), converging to the equilibrium Eq. (22) (for the numerical values, see Table 2). Panel 9 (first from left in third line) show the market penetration to the equilibriumN(q 1 ) of a single (standard) high-quality coffee (q 1 = 30; initial low sales N 1 (0) = 0.1) in the reference case (μ = 0.6).
As long as the standard coffee dominates the market, the innovation dynamics of its quality attribute q 1 is shown in solid-blak in Fig. 9a (panel b shows the evolution Conditions under which the singular strategy is a branching point (BP): Reference case: f 1 = 1/1.1, β = 0.05, μ = 0.6, h = 0. of the corresponding market equilibriumN(q 1 )). It is the numerical solution of the one-dimensional AD canonical Eq. (10), decreasing from q 1 (0) = 30 because of the consumers' preference for low quality and converging to the stable equilibriumq 1 in a few units of innovation time (recall the discussion of the timescales separation in Section 2.3, see Table 2 for the numerical values). Each little step of the quality a b Fig. 9 Innovation dynamics under consumers' preference for low quality (parameter settings as in Fig. 8).
a Simulation of the one-dimensional canonical Eq. (10) for the reference parameter setting, starting from q 1 = 30 (solid-blak); simulation of the two-dimensional canonical Eq. (21) for the reference parameter setting, starting from q 1 =q 1 = 24.81 and q 2 = 0.97q 1 = 24.07 (solid and dashed red, respectively); simulation of the two-dimensional canonical Eq. (21) for the perturbed parameter setting, starting from q 1 =q (2) 1 = 286.84 and q 2 =q (2) 2 = 20.42 (solid and dashed blue, respectively). b Market equilibrium salesN(q 1 ) (solid-black) andN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ) (red and blue, solid and dashed, respectively) tracked along the innovation dynamics in (a) attribute q 1 is the result of a small innovation that replaces the previously established coffee type on the market timescale. Here winning innovations have lower quality (i.e., a higher proportion of bored coffee grains in production). Figure 8's panel 10 shows the first product substitution that occurs at the initial value q 1 = 30, obtained by simulating the standard-special coffee model (1, 2, 4) for q 2 slightly lower than q 1 (3% innovation, q 2 = 0.97q 1 ), equilibrium initial sales for q 1 (N 1 (0) =N(q 1 )), and low initial sales for q 2 (N 2 (0) = 0.1).
Becauseq 1 is a BP (in the reference case), a small innovation q 2 at q 1 close toq 1 invades but does not replace the coffee type q 1 . This is shown in Fig. 8's panel 11, again by simulating the standard-special coffee model (1, 2, 4), where the sales of the two coexisting coffee types converge to the valuesN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ) of the coexistence equilibrium (18). Once the two-product market is established, with quality attributes q 1 and q 2 as in Fig. 8's panel 11 and salesN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ), the innovation dynamics of the two-product market can be simulated with the twodimensional AD canonical Eq. (21). The result is plotted in red in Fig. 9a (innovation time from 20 to 200; panel b shows the evolution of the corresponding market equilibrium salesN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 )) and shows that the joint innovation dynamics of q 1 and q 2 converge to a stable two-dimensional singular strategy (i.e., a stable equilibrium of the canonical Eq. (21); see Table 2 for the numerical values), that we name (q (2) 1 ,q (2) 2 ). We tested whether the singular strategy (q 2 ) is a BP with respect to either q 1 or q 2 . This is done by checking the second derivatives of the invasion fitness (q 1 , q 2 , q ) of the innovative quality q in the market set by (q 1 , q 2 ) (see Eq. (20)) at (q (2) 1 ,q (2) 2 ). Similarly to what done for the one-dimensional case, branching occurs in type i = 1 or 2, at the two-dimensional singular strategy (q (2) 1 ,q (2) 2 ), if the mixed second-derivative (w.r.t. q i and q at q i = q =q (2) i ) is negative (coexistence condition) and the pure second-derivative (twice w.r.t. q at q =q (2) i ) is positive (divergence condition). It turned out that the singular strategy is BP with respect to both q 1 and q 2 , with fitness second derivatives that are however by-two-orders-ofmagnitude stronger for the special type 2, i.e., the lower quality type preferred by consumers. Though technically branching can develop in both coffee types, it is much more likely to occur in the special type, since the establishment of the market coexistence and the further, innovation-driven, quality divergence is much faster than in the standard type (recall that the fitness is an exponential rate of market penetration).
Instead of analyzing the further diversification of the coffee market, as anticipated, we imagine that once the market is close to the two-dimensional singular strategy (q (2) 1 ,q (2) 2 ), the CBB control policy is changed for a weaker one (CBB adult-mortality rate μ from 0.6 to 0.3). For the new parameter setting, (q 2 ) is not anymore a singular strategy and the salesN 1 (q 2 ) = 174.2238 obtained before the parameter perturbation (see Table 2), are not anymore of equilibrium for the standard-special coffee model (1, 2, 4). Hence, the parameter perturbation first begets a market transient (shown in Fig. 8's panel 12), during which the sales N 1 and N 2 converge to the new equilibriumN 1 (q 2 ) (given by Eq. (18) for the new parameter setting), then a new phase of innovation dynamics (blue in Fig. 9; innovation time from 200 to 350). Note that the whole transient appears as instantaneous on the innovation time axis in Fig. 9b (from the final values ofN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ) in the red phase to their initial values in the blue phase).
Note that, after the parameter perturbation, the model has no one-dimensional singular strategies. Indeed, the point (h, μ) = (0.2, 0.3) lies below the shaded region in panel C of Figs. 5-7. As we discussed in Section 3.2, in this situation the consumers' preference dominate the innovation process in the single-product market and leads to a runaway to zero quality. Interestingly, this occurs also in the twoproduct market. While the two coffee types apparently share the market with similar sales (see the blue phase in Fig. 9b), both quality attributes q 1 and q 2 drop to zero. Hence, in the long-term, only one type of coffee with zero quality (100% made from bored grains) remains in the market. Mathematically speaking, there is likely to be a fold scenario in the two-dimensional canonical Eq. (21) as well, similar to the one found in the one-dimensional equation (10), i.e., the singular strategy (q (2) 1 ,q (2) 2 ) present for μ = 0.6 seems not to be present for μ = 0.3. The detailed bifurcation analysis of the two-dimensional canonical equation is however outside the scope of the present paper. The conclusion is that a weak CBB control policy operates against market diversification, even if branching first develops under a stronger policy.

Innovation dynamics under consumers' preference for high-quality
We now consider the high budget scenario, in which consumers have preference for a high quality coffee (parameter f 1 = 1.1 slightly higher than one, so that the asymmetry of the competition function Eq. (5) is in favor of the higher quality). Analogously to what done in the previous section for the low-budget case, we analyze the agroecological, market, and innovation dynamics for two parameter setting: the reference one indicated in Table 3 for which the singular strategyq 1 is a BP and the perturbed one in which the CBB adult-mortality rate μ is increased (from 0.2 to 0.5) to cross the fold bifurcation between the singular strategiesq 1 andq (u) 1 (other parameters set as in the reference Table 1). The increase of the CBB mortality illustrates the effect of a stronger pest control policy and is here considered to analyze the effect of the singular strategies disappearance on the dynamics after branching. Figures 10 and 11 present the agro-ecological and market dynamics and the innovation dynamics, respectively, similarly to what done in Figs. 8 and 9 for the low-budget case. Starting with a single low-quality coffee type (q 1 = 1), the innovation dynamics (numerical solution of the one-dimensional AD canonical Eq. (10)) pushes up the quality attribute q 1 , driven by the consumers' preference for high quality, up to convergence to the stable equilibriumq 1 (solid-blak in Fig. 11a; panel b shows the evolution of the corresponding market equilibriumN(q 1 )). Here, winning innovations have higher quality (i.e., a higher proportion of healthy coffee grains in production). Figure 10's panel 10 shows the first product substitution that occurs at the initial value q 1 = 1, obtained by simulating the standard-special coffee model (1, 2, 4) for q 2 slightly higher than q 1 (3% innovation, q 2 = 1.03q 1 ), equilibrium initial sales for q 1 (N 1 (0) =N(q 1 )), and low initial sales for q 2 (N 2 (0) = 0.1).    Table 3 for which the singular strategyq 1 is a BP and a perturbed one in which the CBB adult-mortality rate μ is increased (from 0.2 to 0.5) to cross the fold bifurcation between the singular strategiesq 1 andq (u) 1 (the black curve in Figs. 5-7, panel d; other parameters set as in the reference Table 1). Lines 1 and 2: agro-ecological dynamics. Line 3, left-to-right: market penetration of a single coffee type (simulation of the standard coffee model (1, 2, 6) with q 1 = 1 and N 1 (0) = 0.1); standard-special product substitution (green; simulation of the standard-special coffee model (1, 2, 4) with q 1 = 1, q 2 = 1.03q 1 = 1.03 (3% innovation toward higher quality) and N 1 (0) =N(q 1 ), N 2 (0) = 0.1); standard-special product coexistence for the reference parameter setting (red; simulation of the standard-special coffee model (1, 2, 4) with q 1 =q 1 = 4.88, q 2 = 1.03q 1 = 5.04 and N 1 (0) =N(q 1 ) and N 2 (0) = 0.1); standard-special product coexistence for the perturbed parameter setting (blue; simulation of the standard-special coffee model (1, 2, 4) with q 1 = q (2) 1 = 0.44, q 2 =q (2) 2 = 6.13 and N 1 (0) =N 1 (q 2 ) = 90.4880 and N 2 (0) = 85.9428) a b Fig. 11 Innovation dynamics under consumers' preference for high quality (parameter settings as in Fig. (10)). a Simulation of the one-dimensional canonical Eq. (10) for the reference parameter setting, starting from q 1 = 1 (solid-blak); simulation of the two-dimensional canonical Eq. (21) for the reference parameter setting, starting from q 1 =q 1 = 4.88 and q 2 = 1.03q 1 = 5.04 (solid and dashed red, respectively); simulation of the two-dimensional canonical Eq. (21) for the perturbed parameter setting, starting from q 1 =q (2) 1 = 0.44 and q 2 =q (2) 2 = 6.13 (solid and dashed blue, respectively). b Market equilibrium salesN(q 1 ) (solid-black) andN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 ) (red and blue, solid and dashed, respectively) tracked along the innovation dynamics in (a) Becauseq 1 is a BP (in the reference case), a two-product market is established by a small innovation q 2 when q 1 is close toq 1 (Fig. 10's panel 11), and the further innovation dynamics is simulated with the two-dimensional AD canonical Eq. (21) (in red in Fig. 11a; panel b shows the evolution of the corresponding market equilibrium salesN 1 (q 1 , q 2 ) andN 2 (q 1 , q 2 )). The joint innovation dynamics of q 1 and q 2 converge to a stable two-dimensional singular strategy (q (2) 1 ,q (2) 2 ) (see Table 3 for the numerical values), which turned out to be a BP with respect to both q 1 and q 2 . As in the case of low-quality consumers' preference, the second derivatives of the invasion fitness (q 1 , q 2 , q ) at (q (2) 1 ,q (2) 2 ) are by-two-orders-of-magnitude stronger for the lower quality type, though this time it is the standard type 1 (the one disfavored by consumers). This is perhaps due to a saturating effect of the mixing factor Q(q 1 ) (the fraction of the harvest of healthy coffee to be used in production, see Eq. 3), for large q 1 , that flattens the fitness derivatives.
Imagining now to change to a stronger CBB control policy (CBB adult-mortality rate μ from 0.2 to 0.5) when the market is close to the singular strategy (q (2) 1 ,q (2) 2 ), the induced transients in the market and innovation dynamics are shown in blue in Figs. 10's panel 12 and Fig. 11, respectively. Similarly to what we found for the low-budget case, after the parameter perturbation the model has no one-dimensional singular strategies (point (h, μ) = (0.2, 0.5) lies above the shaded region in panel D of Figs. 5-7), and the runaway to top quality occurs also in the two-product market. While the two coffee types apparently share the market with rather similar sales (see the blue phase in Fig. 11b), both quality attributes q 1 and q 2 diverge to infinity (checked numerically but not shown in the time-range of Fig. 11a). Hence, in the long-term, only one type of coffee with top quality (100% made from healthy grains) remains in the market.

Discussion and conclusions
A mathematical model (deterministic and finite-dimensional) has been presented and analyzed to describe the effect of a pest and its control policies on the agroecological, industrial, and economic dynamics of coffee. Specific reference is made to the Coffee Berry Borer (CBB), the main pest that affects coffee crops worldwide, causing major economic losses and diminishing beverage quality. Adult and immature stages of the pest populations are considered, to be able to selectively evaluate control policies targeting one or both stages. Harvested coffee is categorized by means of a quantitative quality attribute, related to the mix of healthy and bored coffee used in production of parchment coffee. Quality is considered to be a differentiating attribute between competing coffee types. Specifically, a parameter shaping the (Lotka-Volterra) competition function in the market compartment of the model, tunes the consumers' preference toward low or high quality. This is also an indirect way to consider budget limitations and the role of coffee price.
The evolution of the quality attributes of the coffee types present in the market is modeled with the so-called canonical equation of Adaptive Dynamics (AD) Dieckmann and Law 1996;Geritz et al. 1997Geritz et al. , 1998Metz et al. 1996), a differential equation that (deterministically) describes the expected path resulting from small random innovations, introducing new coffee types similar to established ones, and market competition selecting the new set of established products. The AD framework has been developed in evolutionary biology, but then applied to economics and to innovation-competition processes in general Landi and Dercole 2016;Toro-Zapata et al. 2018), due to the strong analogies with mutation-selection evolutionary processes. Interestingly, AD allows to derive conditions for the loss of outcompeted products, as well as for the emergence new of ones, i.e., innovations that coexist with the established types and that are subject to opposite market selection forces with respect to the similar type that sprouted the innovation. The special points in the space of quality attributes at which such disruptive selection forces act are the branching points (BP) of AD.
The analysis highlighted a complex interaction between pest control policies and the innovation-driven evolution of the coffee market structure. We found some rather trivial (and standard) results, which essentially validate our model. For example, the harvesting rate of the plantation must be lower than the natural growth rate of an unexploited plantation, in order to make the coffee industry sustainable; the pest basic-reproduction-number (Ripa and Larral 2008;Romero and Cortina Guerrero 2007;Ruiz Cárdenas and Baker 2010), of which we have an explicit expression in terms of the model parameters, must be larger than one to allow the pest persistence; increasing the harvesting and/or the pest mortality, as well as reducing the pest boring rate and/or reproductive efficiency, we can eventually eliminate the pest, though the threshold values of such parameters granting pest-extinction are likely to be unrealizable by any realistic control policy. Still, these thresholds set theoretical limits that can be extremely useful to farmers and policy-makers to set-up feasible control policies. Especially because each threshold depends on the value of the other parameters and, thanks to the simplifying assumptions behind our model, we have derived explicit mathematical expressions and we have used them to plot control charts (see Figs. 5-7, where the red curve represents the threshold combinations of the two parameters on the axes). For each given parameter setting, the control charts can be used to see which dynamics scenario is predicted by the model. On the other hand, by selecting a desired scenario, the charts can be used to set the parameter values to be targeted by the control policy.
Definitely non-trivial is the relation between the pest-control policy and the evolution of the market structure. For a given parameter setting, the sign of the invasion fitness of an innovation, for which, again, we have an explicit expression in terms of the model parameters, predicts, a priori, whether a certain coffee quality is able to invade the current market conditions or not. Close to a so-called singular strategy, where the fitness linearization cannot tell whether a higher or a lower quality does invade, is where branching can develop and make the market diversified. We have specifically analyzed the branching from a single-coffee market into a two-product market, in which a standard quality q 1 coexists and co-evolve with a special quality q 2 (lower/higher than q 1 under consumers' preference for low/high coffee quality, respectively). We have derived explicit conditions, based on the fitness second derivatives, for coexistence and disruptive selection to occur (illustrated in the control charts of Figs. 6 and 7), and it turned out that the parameter settings for which the stable singular strategyq 1 exists are the same for which it is a BP.
At the stable singular strategy, two opposite selection forces balance: the one exerted in production by the availabilities of healthy and bored coffee grains and the one exerted by consumers. When such an equilibrium quality does not exists, the innovation process is dominated by the consumers' preference and the quality consistently runaways toward zero (worst quality: 100% use of bored grains) or infinity (top quality: 100% use of healthy grains). But even when the stable singular strategyq 1 is present, the runaway is possible if the initial quality of the single-coffee in the market is lower/higher than a threshold set by an unstable singular strategyq (u) 1 . The transition between the two scenarios, with and without singular strategies in the single-coffee market, is a so-called fold bifurcation in the space of the model parameters, a typical phenomenon of nonlinear systems that we could fully characterize (the black curve in Figs. 5-7).
When branching develops at the singular strategyq 1 , the quality attributes q 1 and q 2 of the emerging standard and special coffee types initially diverge fromq 1 in opposite direction (disruptive selection), the special quality q 2 in the direction dictated by the consumers' preference, but later the joint innovation process stabilizes at a two dimensional singular strategy. Interestingly, the fold phenomenon making the quality runaway unavoidable in the single-coffee market, seem to work as well in the two-product market (though the phenomenon has been only observed in numerical simulations of the two-product market).
The main insight emerging from our study is that a strong pest control, blindly aimed at pest eradication, might be a counterproductive and costly practice. Under consumers' preference for low quality, a strong pest control (low CBB boring rate β and high adult-mortality rate μ) brings the CBB toward extinction (toward the red curve in Figs. 5-7, panels a,c), making bored coffee unavailable in production, contrary to the consumers' preference. Under consumers' preference for high quality, a strong pest control would cause the market runaway to top quality (triggered when crossing the black curve in Figs. 5-7, panels b,d) even before reaching the levels necessary to pest extinction. In both cases, the market would lose its diversity, hence preventing the sustainable development of small producers, who typically depend on the product and that sell it in small coffee shops and specialized chains. Especially in the case of the Colombian market, this reflects the importance of adequately defining the requirements demanded by the certifying agencies in terms of agricultural production standards. The fact that producers can achieve different degrees of quality depends on the coffee growers and the person responsible for quality control. Besides the economic value, promoting market diversification has hence a social value as well, as it provides benefits in the development and productivity of small farms, thus ultimately improving the wealth of thousands of local families. Note that market diversity can be lost also in the case of a weak pest control (high CBB boring rate β and low adult-mortality rate μ) under consumers' preference for low quality, because of the runaway to zero quality (triggered when crossing the black curve in Figs. 5-7, panels a,c).
In conclusion, intermediate (mildly strong) control policies are suggested by our study, as those that keep the pest population at levels that allow coffees of different qualities to be produced, so to meet the consumers' preference. These policies are well realizable through biological control by parasitoids and predators. In the case of the CBB, the most effective parasitoids are wasps, Cephalonomia stephanoderis and Prorops nasuta, but also Phymastichus coffea and Cephalonomia hyalinipennis (Jaramillo et al. 2009;Rodríguez et al. 2017). Predators are coleoptera, Leptophloeus and Cathartus quadricollis (Follett et al. 2016), lizards of the Anolis genus (Monagan et al. 2017), and ants that, depending on the species, can consume CBB in either adult or immature stages (Morris and Perfecto 2016). An additional type of biological control is the use of entomopathogens, in particular Beauveria bassiana, a fungus capable to attain high mortality rates but with a slow infection process, allowing the adult CBB to live long enough to bore into coffee beans (Infante 2018). Stronger policies can be implemented with chemical control, using a variety of insecticides used to kill adult insects (affecting both the boring rate or mortality), which however demonstrated ineffective on immature stages (Pardey 2006). Another interesting way to implement chemical-free mild control is through selective harvesting. As mentioned in the Introduction, CBB control through harvesting is a form of cultural control, defined by the National Federation of Coffee Growers of Colombia (FNC) as Re-Re (Recoger and Repasar, in Spanish), that refers to collecting ripe and overripe grains from the coffee plantation and a few days later checking and collecting again to prevent adult CBB insects from finding refuge (Alarcón et al. 2017;Pardey 2006). Institutions supporting coffee production in Colombia, such as the FNC, recommend a combination of the three strategies-biological, chemical, and cultural-known as the Integrated CBB Control (Constantino et al. 2017;Pardey 2006). In the light of the present study, mildly strong control policies could avoid chemical methods.
Our model is intentionally oversimplified. The pricing of coffee is not modeled and only indirectly taken into account; and we consider the proportion of healthy and bored coffee used in production to be the only differentiating factor in coffee quality. Nonetheless, the model is first validated by the fact that it produces a series of intuitive results that are confirmed in the field; second, the analysis highlights a complex interdependence between factors and process that pertains to the agro-ecological, industrial, and demand sides, and that operate on different timescales. Further studies could be performed to consider alternate forms of quality differentiation, such as the introduction of innovative agro-industrial processes that affect coffee washing, drying, roasting, or other crucial processes in coffee production, transformation, or commercialization. As well, specific pest control policies that integrate biological and cultural practices could be modeled more in detail.
These more quantitative studies would however require detailed data on the agroindustrial processes behind each coffee type and on standard quality indicators. Although the FNC periodically publishes statistical information on coffee production and marketing, this is limited to green coffee and some with industrial treatment such as decaffeinated green, roasted in beans, roasted and ground, and extract and soluble. These statistics do not include specialty coffees in any of their main denominations (origin, preparation, sustainability, etc.), so that, in the current situation, it is not possible to compare quantitative models with real data from the Colombian coffee market. And the situation is similar, to the best of our knowledge, for other coffee markets worldwide. Our final recommendation is to set up a system to systematically collect and disseminate accurate information on the production, processing, and sale of specialty coffees. This is extremely important in Colombia, considering that specialty coffees are the main source of income for most of small producers, who could reach a better income and welfare by seeing their high-quality products valued by consumers.
Funding H.D. Toro-Zapata and C.A. Trujillo-Salazar acknowledge the partial funding from the Universidad del Quindío Grant Project 801.

Compliance with Ethical Standards
To ensure objectivity and transparency in research the authors declare all principles of ethical and professional conduct have been followed.

Conflict of interest
The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommonshorg/licenses/by/4.0/.

Appendix: Explicit expressions for the AD canonical equation and singular strategies
All expressions in this Appendix have been obtained and handled by means of symbolic computation. We assume the CBB basic-reproduction-number B 0 (see Eq. (23)) to be larger than one, so that the agro-ecological equilibrium Eq. (22) is characterized by positive densities.
Substituting the expressions of the agro-ecological equilibrium densities into those for the standard coffee market equilibrium Eq. (8) and for the invasion fitness Eq. (9), and after rearranging terms, the explicit expression of the invasion fitness is the following: λ(q 1 , q 2 ) = hμ(δ + ω)q α 2 βω(q α 0 + q α 2 ) × exp 1 2f 2 2 ln 2 f 1 exp − 1 2f 2 2 ln 2 f 1 q 2 q 1 , (A.1) The selection gradient Eq. (11) can then be easily obtained and the AD canonical Eq. (10) can be rearranged as follows: where the coefficients F i are The one-dimensional singular strategies solveq 1 = 0 in Eq. (A.2a). Given that we only consider non-negative values for the quality attribute q and that B 0 > 1, only two singular strategies are possible and they solve the quadratic expression of the αpower of q in the square bracket at numerator in the right-hand side of Eq. (A.2a). The solutions arē 3) The singular strategies are equilibria of the AD canonical Eq. (A.2a). Their stability is determined by the slope of the right-hand side of Eq. (A.2a) at the singular strategy (negative slope: stable; positive slope: unstable; the slope is the eigenvalue of the linearized dynamics of q locally to the singular strategy). Under B 0 > 1, the sign of the slope at the singular strategy is determined by the q-derivative of the square bracket in Eq. (A.2a), i.e., ultimately by the sign of 2F 2 q α + F 1 at q =q 1 and at q =q (u) 1 , respectively. Substituting the expressions of the singular strategies in Eq. (A.3), the result is that 2F 2 (q 1 ) α + F 1 = − F 2 1 − 4F 2 F 0 < 0,q 1 is stable, (A.4a) The singular strategiesq 1 andq (u) 1 undergo a fold bifurcation (Dercole and Rinaldi 2011) when F 2 1 −4F 2 F 0 = 0 (they collide and disappear when F 2 1 −4F 2 F 0 goes from positive to negative, while varying a model parameter). Solving F 2 1 − 4F 2 F 0 = 0 for parameters β, μ and h gives two solutions The colliding singular strategies are however negative when the model parameters meet the conditions in Eq. (A.5), so that only the second set of solutions gives the fold bifurcation thresholds β f , μ f , and h f of Tables 2 and 3.