Optimal bacterial resource allocation: metabolite production in continuous bioreactors

: We show novel results addressing the problem of synthesizing a metabolite of interest in continuous bioreactors through resource allocation control. Our approach is based on a coarse-grained self-replicator dynamical model that accounts for microbial culture growth inside the bioreactor, and incorporates a synthetic growth switch that allows to externally modify the RNA polymerase concentration of the bacterial population, thus disrupting the natural process of allocation of available resources in bacteria. Further on, we study its asymptotic behavior using dynamical systems theory, and we provide conditions for the persistence of the bacterial population. We aim to maximize the synthesis of the metabolite of interest during a ﬁxed interval of time in terms of the resource allocation decision. The latter is formulated as an Optimal Control Problem which is then explored using Pontryagin’s Maximum Principle. We analyze the solution of the problem and propose a sub-optimal control strategy given by a constant allocation decision, which eventually takes the system to the optimal steady-state production regime. On this basis, we study and compare the two most signiﬁcant steady-state production objectives in continuous bioreactors: biomass production and metabolite production. For this last purpose, and in addition to the allocation parameter, we control the dilution rate of the bioreactor, and we analyze the results through a numerical approach. The resulting two-dimensional optimization problem is deﬁned in terms of Michaelis-Menten kinetics, and takes into account the constraints for the existence of the equilibrium of interest.


Introduction
Microorganisms continuously have to contend with environmental changes in nature, and so they have evolved to accordingly adapt their physiology to cope with this unsteadiness. This is done by reorganizing the gene expression machinery, which is accomplished by dynamically allocating resources to different cellular functions. Microorganisms like bacteria exhibit great genetic variability, which is the main driver of natural selection, a phenomenon that depends on the continuous mutations in living populations. For this reason, they have achieved highly optimized resource management strategies. Such is the case of E. Coli: For specific environmental conditions, they seek to maximize their growth rate, which is a naturally evolved characteristic of this bacterium, and well known in the scientific community [1]. In this regard, optimality of bacterial organisms has been a central hypothesis in several research allocation studies [2].
Nevertheless, most of previous works in the literature consider the resource allocation problem in steady-state, without taking into account the changing conditions of natural environments [3]. This motivated a series of works with a dynamical-oriented approach to the problem [4,5], that aimed to shed light on how bacteria tune their allocation mechanisms when facing changes on the nutrient concentration of the medium. Using Optimal Control theory, they investigate how their internal pathways can be dynamically readjusted so as to maximize their growth rate, obtaining different strategies that can be related to well known natural regulation mechanisms (such as the ppGpp-mediated sensing of the pool of aminoacids). The approach is based on a widely used modeling technique in systems biology: The so-called coarse-grained self-replicator models, used in bacterial growth representations for their simplicity and their capacity to reproduce observed experimental behaviors [6]. Although this kind of single-cell models are somewhat limited when predicting complex phenomena, they can accurately account for bacterial culture growth laws under the right assumptions (e.g., homogeneity of the culture) [7].
From an industry point of view, a natural question triggered by these studies is: How can we divert the natural allocation strategies of bacteria to improve current biotechnological production schemes? Such is the case of the artificial synthesis of metabolites or proteins of interest. The synthesis of such compounds is highly relevant for its wide range of applications: Production of antitumor agents, insulin, antibiotics, immunosuppressive agents and insecticides, among others [8,9]. Motivated by the increasing understanding of the biosynthetic properties of certain microorganisms, research on this area can potentially lead to more efficient and sustainable production schemes. This is the matter addressed in recent work using a strain of Escherichia coli that includes an artificially engineered heterologous pathway for the production of a certain metabolite of interest [10][11][12]. In this approach, a control loop is developed through a bacterial growth switch that allows to externally modify the natural resource allocation decision [13]. The mechanism is implemented by re-engineering the transcriptional control of the expression of RNA polymerase, a key component of the gene expression machinery. This way, it is possible to optimize the productivity of the bioprocess by channeling resources into this new heterologous pathway.
At the same time, the synthesis of these metabolites draws resources from the native pathways used for producing biomass in bacteria, thus leading to an inherent compromise between these two objectives. One possible approach to this trade-off is to model it through different cost functions, thus obtaining multi-objective optimization problems. This is the case of [14], where the authors aim to maximize the production of a metabolite while minimizing the genetic burden caused by pathway expression. In contrast to this method, the work of [10] models the main trade-offs behind the process through a single decision parameter, which considerably reduces the complexity of the optimization problem.
In a similar vein, we address a classic production scheme: The Continuous Stirred-Tank Reactor (CSTR). While resource allocation in bacteria has been vastly studied in constant environments (e.g., under the assumption that there is always enough substrate in the medium), how this goes in continuous bioreactors is not trivial, since a feedback occurs from the physiology of the cell to the environmental conditions given by the interaction bacteria-medium [15]. Examples of self-replicator models in continuous bioreactors can be found in some recent works: In [16], authors use a coarse-grained self-replicator kinetic model of Saccharomyces cerevisiae's in a continuous bioreactor to investigate the trade-off between respiratory and fermentative metabolism, showing that optimal strategies are 'pure' metabolic strategies (e.g., either respiration of fermentation, but not respiro-fermentation). Likewise, it is rather classical in the continuous bioreactor scheme to maximize a certain performance measure (i.e., biomass production) in terms of the operational parameters related to the setup, such as dilution rate and/or concentration of the substrate inflow [17][18][19][20][21]. However, incorporating the aforementioned external control-that can disrupt the natural allocation process of the whole culture-provides an extra degree of freedom, which can, in turn, contribute to further improve the classical production scheme.
Based on the presented works, we show novel results addressing the problem of bacterial resource allocation in the CSTR framework. Our approach is based on a coarse-grained self-replicator dynamical model that accounts for the microbial culture growth inside the continuous bioreactor, and incorporates the external allocation control previously described. The novelty of the approach lies in the combination of the resource allocation control scheme, and the capacity to regulate the bacterial growth rate through the dilution rate of the continuous bioreactor. Further on, we study its asymptotic behavior using dynamical systems theory, and we provide conditions for the persistence of the bacterial population. The analysis is carried out by studying the local and global behavior of its limiting system, and relating its convergence to the original model through the theory of asymptotically autonomous systems [22]. Then, we pose the problem of maximizing the synthesis of the metabolite of interest during a fixed interval of time in terms of the resource allocation decision. The latter is expressed as an OCP (Optimal Control Problem) which is then explored using PMP (Pontryagin's Maximum Principle) [23]. We analyze the solution of the problem and propose a sub-optimal control strategy given by a constant allocation decision, which eventually takes the system to the optimal steady-state production regime. On this basis, we study and compare the two most significant steady-state production objectives in CSTRs: Biomass production and metabolite production. For this last purpose, and in addition to the allocation parameter, we control the constant volumetric flow of the bioreactor (or dilution rate), and we analyze the results through a numerical approach.
The resulting two-dimensional optimization problem is defined in terms of Michaelis-Menten kinetics with the parameter values of [4], and taking into account the constraints for the existence of the equilibrium of interest.

Self-replicator model
In this section, we define the coarse-grained self-replicator model including the continuous bioreactor scheme and the allocation parameter. We consider a growing bacterial population in a CSTR bioreactor of constant volume V ext [L]. The self-replicating system that models the culture is composed of the metabolic machinery M (transporters, enzymes...) and the gene expression machinery R (RNA polymerase, ribosomes...), both responsible of the cell growth. The validity of this single-cell model as a representation of a growing bacterial culture depends on a number of simplifying assumptions, one of them being that individual cells share the same macromolecular composition. For the production of the metabolite of interest X, we consider the artificially engineered pathway introduced in [10] (Figure 1).
Extended coarse-grained self replicator model introduced in [10]. The substrate in the bioreactor S is consumed by the bacterial culture and transformed into precursors P through the action of the metabolic machinery M. Then, precursors are used to make macromolecules of the gene expression machinery R and the metabolic machinery M, with proportions α and 1 − α respectively; and to synthesize the metabolite X, which is excreted from the cell to the bioreactor. The external control I affects how the precursors P are distributed between both cellular functions M and R.
The model represents three chemical macroreactions, The first reaction is catalyzed by M and describes the transformation of external substrate S into precursor metabolites P at a rate V M . The second one represents the conversion of precursors into macromolecules R and M and is catalyzed by R, at a rate V R . Finally, the third reaction describes the transformation of precursors P into product X at a rate V X , and catalyzed by M. The natural resource allocation parameter is modeled through the dimensionless parameter α ∈ [0, 1], that represents the proportion of precursors allocated to the gene expression machinery R, while 1 − α indicates that of the metabolic machinery M. The model describes all mass quantities S , P, M, R and X in grams, and the rates in grams per hour. A constant volumetric flow rate F [L h −1 ] produces an inflow of fresh medium rich in substrate, and an outflow of bacterial culture and metabolites [24]. As already stated, we include in our scheme the growth switch described in [13] to externally affect the allocation decision α by varying the inducer concentration in the medium. The mechanism is modeled as being I the external signal, which acts independently from the allocation parameter α. The aggregated form of Eq (2.1) accounts for the fact that the synthetic switch is capable of adjusting bacterial growth between zero (by setting I = 0, which yields u = 0) and the maximal growth rate supported by the medium (given by I = 1, which yields u = α). In this work, we limit the analysis to calculating the control input u, without decoupling both individual controls I and α (refer to Section 5 in [10] for more details on the implementation of this external controller). Then, we write the system of differential equations describing the evolution of the mass of each component, The inflow/outflow rates are defined as being s in [g L −1 ] the nutrient concentration of the inflow of fresh medium, and D [h −1 ] the dilution rate defined as We define the volume of the cell population V [L] as being β [L g −1 ] the inverse of the cytoplasmic density. The above definition is based on the assumption that the cytoplasmic density of the cells is constant for the whole culture, and it also takes into account the experimental results showing that macromolecules are responsible for most of the biomass in microbial cells [25]. Thus, the mass of precursors P is excluded from the volume V as a simplifying assumption. Then, we express the quantities of the system as concentrations with respect to the volumes, where p, r and m [g L −1 ] are intracellular concentrations of precursor metabolites, components of the gene expression machinery and metabolic enzymes respectively; and s and x [g L −1 ] the extracellular concentrations of substrate and metabolite. It is worth stressing that intracellular concentrations are defined with respect to the bacterial volume V, while extracellular concentrations with respect to the volume of the bioreactor V ext . Then, using definition (2.2), we obtain that m + r = 1/β. We define the growth rate of the bacterial population µ [h −1 ] as the relative variation of cell volumeV/V without considering the effect of the outflowing biomass. Replacing with concentrations leads to the system S : where v M (s, m), v R (p, r) and v X (p, m) [g L −1 h −1 ] are the mass fluxes per unit volume obtained from dividing the rates V M , V R and V X by V, function of the concentrations of system S . In this new system, the growth rate becomes showing that the bacterial growth rate is proportional to the macromolecule synthesis rate. We propose a change of variables that simplifies the expressions of the system which yields the relationr and we define the non-dimensional synthesis rateŝ and the non-dimensional substrate concentrationŝ in = βs in . Then, dropping all hats yields the following system where the dynamical expression of m has been omitted since it can be computed from r, as shown in Eq (2.5). It can also be seen that both concentrations m and r are limited to the interval [0, 1] due to physical constraints from the relation in Eq (2.5). For this latter, and due to the nature of the reactions involved in the studied problem, we will make some assumptions on the synthesis rates v M (s, m), v R (p, r) and v X (p, m): Assumption 1 encompasses all general monotone increasing kinetics models used in biological models, such as Michaelis-Menten or Hill equation-based kinetics [26]. In this first work, we will focus on a particular kind of systems where the synthesis rate related to the metabolite production depends on the growth rate: Assumption 2. For r ∈ (0, 1), the metabolite synthesis rate v X (p, 1 − r) can be expressed in terms of the macromolecule synthesis rate v R (p, r) (i.e., the growth rate) where c(r) : (0, 1) → R + is a positive continuously differentiable function.
As previously described, the reaction v X (p, m) is catalyzed by m, and the reaction v R (p, r) is catalyzed by r, meaning that the ratio between M and R in the microbial culture determines whether the resources are being allocated to the production of biomass or metabolite. This represents the trade-off described in the introduction of this paper, which is here modeled through the function c(r). The fact that c does not depend on the concentration of precursors implies that the host cell has the same affinity to synthesize both biomass and metabolite from the precursors, even when the reactions are not expected to consume the precursors in the same proportion. For the particular case of Michaelis-Menten kinetics, this phenomenon is captured by the half-saturation constant [27]. Notably, for fixed values of r, both synthesis rates are simply proportional. This assumption reduces S 1 to We note that both Assumptions 1 and 2 are formulated for the non-dimensional synthesis rates given in definition (2.6), but they also hold for the original functions v M , v R and v X (taking into account that, for these functions, the domain is defined as R + × [0, 1 β ] → R + ).

Asymptotic behavior
The asymptotic behavior of system S 1 describes the "open-loop" operation mode of the continuous bioreactor, where the resource allocation control u(t) is fixed toū ∈ (0, 1). In the present section we propose a series of mass conservation laws that allow to reduce S 1 to a 3-dimensional limiting system. Then, we study the local stability of their equilibria, and we show, using the theory of asymptotically autonomous systems, that the full system S 1 converges to the equilibria of its limiting system. Let us start the analysis of system S 1 by defining its invariant region in the following lemma.
is positively invariant for the initial value problem.
Proof. Let us analyze the boundaries of Γ, We will study the initial value problem of system S 1 with initial conditions where two cases have been excluded for being trivial to the analysis: V(0) = 0, since it is necessary to have an initial amount of biomass to have bacterial growth; and r(0) = 0, since an empty gene expression machinery pool implies null growth rate µ(p, 0) = 0, and therefore it is not possible to self-replicate from that point.

Mass conservation
System S 1 can be rewritten as

being
• ϕ [s, p, r, m, x] T the state vector of concentrations in the bioreactor.
• N the stoichiometry matrix of the macroreactions.
• v i the vector of internal synthesis rates.
• v in and v out the vectors of inflows and outflows respectively, associated to the continuous bioreactor setup.
• v µ the vector modeling the dilution effect due to variation of the bacterial volume. which are defined as By analyzing the left null space of N, it can be seen that there are two mass conservation laws related to the total mass inside the bioreactor. Definition 1. We define the quantities The first quantity tends asymptotically to w 1 = s in as t → ∞ for every input u(t), as it obeys the dynamical equationẇ (2.10) Moreover, when fixing u(t) toū ∈ (0, 1), the quantity w 2 also obeys the same Eq (2.10), meaning that this second quantity also converges to s in , which greatly simplifies the analysis of the asymptotic behavior of the system.

Lemma 2.
The ω-limit set of any solution of system S 1 given by Eq (2.8) lies in the hyperplane Moreover, under constant input u(t) =ū, this is also true for the hyperplane Further on, we will use Lemma 2 to analyze system S 1 through its limiting system.

Limiting systems
Lemma 2 presents two mass conservation laws that can be used to reduce subsystem S 1 by two dimensions. We will first analyze the asymptotic behavior of concentration r: when t → ∞, quantities w 1 = w 2 = s in , so meaning that, as t → ∞, r will converge to the valueū. We can also express x = s in − s − (p + 1)V, so that the limiting system of S 1 becomes Details on the convergence of the limiting system S 1 to the original one S 1 will be addressed later in the article. In next section, we will fully describe the asymptotic behavior of S 1 .

Local stability
In the interest of simplifying the notation, we define the following function.

Definition 2.
We define the function The main result of local stability study is summarized in Theorem 1.
Theorem 1. The local stability of equilibria is given by the following criterion.
• Ifμ(p w ) ≥ D: -The interior equilibrium E i exists, is unique and locally stable.
-The washout equilibrium E w exists, is unique and locally unstable.
• Ifμ(p w ) < D: -The interior equilibrium E i does not exist.
-The washout equilibrium E w exists, is unique and locally stable.
In the above criterion, the equilibria are defined as follows: (2.13) • The washout equilibrium E w (s in , p w , 0), with p w : p ∈ R + :f (p) =v M (s in ) . (2.14) Proof. First, we will prove the boundedness of p. Using definition (2.14), it is possible to define a constant upper-bound on p by analyzing the time-varying upper bound p up (t) with dynamical equatioṅ In Eq (2.15), p up converges to the value p w satisfying Eq (2.14). Additionally, the vector field at p = p w is always negative (or null when s = s in ) meaning that p = p w is either repulsive or invariant, so a new invariant set Γ ⊂ Γ can be defined,  18) is met, s i should be unique. As is standard in continuous bioreactors, inequality (2.17) implies that the maximal growth rate of the bacterial population should be bigger than the dilution rate D. At the same time, the inequality (2.18) requires the maximal uptake flow to be bigger than the flows responsible for bacterial growth and metabolite production. In Γ , these conditions becomē , and the characteristic polynomial is Using Definition 2, it can be seen that −D is an eigenvalue by replacing in expression (2.20) Then, dividing P i (λ) by λ + D yields which, by Routh-Hurwitz criteria, implies that all eigenvalues have negative real part. Then, if it exists, the equilibrium is always stable.
Equilibrium E w The washout equilibrium E w exists for all values of Γ , since the only condition for existence is given by which is always true in Γ sincev M (s in ) =f (p w ) and so the inequality becomesf (p w ) ≥f (p w ). Again, asf (p) is strictly monotonically increasing, there is a unique solution p w . Its stability is given by Eigenvalues λ = −D and λ = −f (p) are always real and negative, and so the stability criterion becomes E w stable if and only ifμ(p w ) < D.

Global analysis
In the current section, we show how the limiting system S 1 can be further reduced using another mass conservation law given by the fact thatc is constant. This is formalized in the following lemma.
Lemma 3. The ω-limit set of any solution of the limiting system S 1 lies in the hyperplane obeys the dynamical equationsẇ 3 = D(s in −w 3 ), which means that the system converges asymptotically to the limit set Ω 3 .
Using Lemma 2, we can further reduce system S 1 by expressing s = s in − V(p +c + 1), (2.22) for the values (p, V) that meet s in − V(p +c + 1) > 0, and so the new limiting system becomes Since S 1 is a 2-dimensional continuous system, its global behavior (illustrated in Figure 2) can be studied through the Poincaré-Bendixson trichotomy.
Lemma 4. Every solution of the limiting system S 1 with initial conditions (2.9) converges to Proof. The Poincaré-Bendixson trichotomy ensures that every non-empty compact ω-limit set of S 1 is either a fixed point, a periodic orbit or a cycle of equilibria. Then, by applying Poincaré-Bendixson theorem through the Dulac criterion, we can discard periodic orbits and cycles of equilibria: as ∂s(·)/∂p = −V from Eq (2.22). This ensures that the new limiting system should converge to one of the stable equilibria as t → ∞ which, according to Theorem 1, is known to be unique. Figure 2. Phase plane of the limiting system S 1 showing: The case whereμ(p w ) ≥ D (left), so that the equilibrium E * i exists and attracts all solutions; and the case whereμ(p w ) < D (right) and E * w attracts all solutions.
Through the theory of asymptotically autonomous systems [22], we can relate the asymptotic behavior of the 2-dimensional limiting system S 1 to that of the full 5-dimensional system S 1 . The main result is established in Theorem 2.
Theorem 2. Every solution of system S 1 with initial conditions (2.9) converges to, • The extended interior equilibriumÊ i (s i , p i ,ū, x i , V i ) if it exists, being x i cV i .
where the condition for the existence of the extended interior equilibrium isμ(p w ) ≥ D.
Proof. We resort to a more particular case of the general theory of asymptotically autonomous systems (introduced in Appendix F of [24]), that requires a certain number of hypotheses to be met related to the limiting system S 1 , its equilibria and the mass conservation equations defined in Lemma 2: (A1) The dynamical Eqs (2.10) and (2.21) of quantities w 1 , w 2 and w 3 are stable.
Then, almost all trajectories of the original system S 1 converge to one of the asymptotically stable equilibria of the limiting system, which is always unique.

Metabolite production
In this section, we aim to maximize the production of the metabolite of interest X. We start by modeling the synthesis rates as explicit functions of the concentrations of the system. While this latter is not required for most of the results, it enables the numerical simulations both for the dynamical and for the static optimization problems. In particular, we resort to the Michaelis-Menten kinetics defined in previous works [4] and the same biological constants. Then, we pose the problem of maximizing the production of X over a fixed period of time, and we approximate the optimal solution with a constant allocation strategy. This finally motivates the static optimization approach, that is solved in terms of the tuple (D,ū).

Michaelis-Menten kinetics are defined as
where the biological constants and their values [4,10] are described in Table 1. Half-saturation constant of the metabolite synthesis reaction g L −1 1 Assumption 2 is implemented by setting the half-saturation constant K X = K R , such that the function c(r) becomes The substrate concentration of the inflow s in is set to 0.4 g/L.

Dynamic optimization problem
The problem of maximizing the production of the metabolite X during a fixed interval of time T is explored in this section. As it is classical in the continuous bioreactor framework, the instantaneous production of metabolite is described by the quantity which, using definitions (2.3), can be expressed as DV ext x. Then, the total metabolite production over an interval T amounts to We will be first interested in dynamically adjusting the aggregated control u(t) so as to maximize the quantity (3.2) for a fixed dilution rate D. The problem is tackled through an optimal control approach, formulated as (OCP) : with U the set of admissible controllers, which are Lebesgue measurable real-valued functions defined on the interval [0, T ] and satisfying the constraint u(t) ∈ [0, 1]. We first note that, since D and V ext are constants, the problem reduces to maximizing the integral of the concentration x. Thus, the nature of the OCP allows us to obtain a first result on the existence of the solutions. with µ(p, r) bounded, the volume has at worst an exponential rate and is also bounded. As the dynamics is affine in the control, the set of velocities is convex and existence holds by Filippov's theorem [28].
In order to further explore the solution of (OCP), we define the adjoint state vector λ (λ s , λ p , λ r , λ x , λ V ) associated to the state vector ϕ (s, p, r, x, V), and we write the Hamiltonian where F represents the right-hand side of system S 1 given by Eq (2.8). Developing the expression we obtain which shows that the Hamiltonian is linear in the control u, so it can be rewritten in the affine form In the absence of terminal constraints, there are no abnormal extremals and λ 0 can be set to −1. Since the constrained optimal control u should maximize the Hamiltonian, one has These alternatives account for the possibility of bang and singular arcs, an extremal being in general an arbitrary concatenation of these. Bang controls correspond to pure allocation strategies u = 0 and u = 1 (i.e., purely geared towards either the metabolic machinery M or the gene expression machinery R respectively), while singular control u s (t) occurs when the function H 1 identically vanishes over some subinterval. Such singular arcs can be further described by successively differentiating the switching function H 1 until the singular control u can be explicitly computed. For the present case, this occurs when differentiating four times ("order two" singular arc), showing that the singular regime should be entered and leaved through Fuller phenomenon or "chattering" [29] (an infinite number of switchings between the control bounds 0 and 1 over a finite time interval). The theorem hereunder formalizes this statement.
Theorem 4. Any singular arc u s (t) of a normal extremal process solution of (OCP) is at least of order two.
Along the singular arc H 1 is identically zero, so expression (3.3) also vanishes. In order to compute the successive derivatives of H 1 , we will resort to the Poisson bracket operator [30], Applying the latter definition to the derivative of H 1 we obtaiṅ In this context, we will use the notation H 01 to refer to {H 0 , H 1 }, and so forth. The second derivative of H 1 is Showing that H 101 = 0 along the switching surface Σ ensures that the singular arc is at least of order 2 (otherwise, a singular arc of order 1 could be computed as u = −H 001 /H 101 ). Since H 1 depends only on λ r , p and r, the computation of the Poisson bracket reduces to

Replacing the expression (3.5) in Eq (3.4) yields
H 101 = µ(p, r) λ r µ r (p, r) + λ r ∂ ∂r µ r (p, r)ṙ + µ p (p, r)ṗ − λ r µ r (p, r) ∂H 01 ∂λ r − λ r µ p (p, r) ∂H 01 ∂λ p which is also equal to 0 along the switching surface since every term is multiplied either by λ r orλ r , both identically zero along a singular arc (see H 1 expression), showing that the singular arc is at least of order 2.
It is noteworthy that the above proof holds for all general flows v M (s, 1 − r), v X (p, 1 − r) and v R (p, r) considered in Assumption 1, with no need to use the defined Michaelis-Menten kinetics. Numerical results shown in Figure 3 confirm that, when the conditions for the existence of the interior equilibrium E i are met, the optimal control strategy consists on a series of bang-bang arcs, and a singular arc that is entered and left through the chattering phenomenon. While, as already mentioned, it is compulsory to enter and leave order two singular arcs through chattering, a more precise description of the structure of the extremal would require a deeper analysis (for instance to prove that there is only one singular arc). Moreover, when the simulation time is long enough, we observe that the singular control u s (t) converges to a constant value, eventually taking the system to steady-state. This is related to the socalled turnpike phenomenon [31] that relates the singular arc of the dynamic optimization problem with the solution of the static one. See, e.g., [32] for a preliminary analysis on a similar case. Additionally, we observe that the steady-state approached by the system during the singular regime maximizes the integrand of the cost function, which is in fact the instantaneous production of metabolite described in expression (3.1) (otherwise, it would not be the optimal strategy). Therefore, the static optimal control to which the dynamic one converges along the singular arc is the solution of the optimization problem (SP) : The dynamical optimal solution acts as the gold-standard in terms of what can be achieved through control techniques. However, implementing such strategy is, in practice, unfeasible. Consequently, it is possible to design a static suboptimal strategy consisting of a constant allocation u sp that takes the system to the same steady-state which maximizes the integrand of the cost function. Numerical simulations of such strategy are shown in Figure 4, where it can be seen that the area below curves x sp and x in OCP only differ slightly (< 1% for this particular simulation). The constant control u sp basically disregards the initial and final bang arcs, as well as the chattering phenomena, which constitutes a small fraction of the complete time horizon T . Moreover, this fraction gets smaller as T becomes large, which is a typical feature of the turnpike effect for a specific class of optimal control problems [31]. This way, the difference between strategies becomes marginal in long-term production schemes.  Figure 4. Results of the numerical simulations using BOCOP, comparing the control u solution of the OCP to the solution of the static optimization problem u sp (both with same initial conditions). The parameters for the numerical simulation match the ones used in Figure 3. The last plot emphasizes the area below the curves x sp and x in OCP, as they are proportional to the total mass of metabolite produced, which is the quantity to be maximized.
Additionally, we provide a numerical computation of the successive derivatives of the switching function H 1 in Figure 5. It can be seen that the fourth derivative H 10001 0 over the interval where H 1 = 0, which shows that the singular arc is of order 2. Furthermore, we verify that the Kelley (or generalized Legendre-Clebsch [34]) condition is met along the singular arc, which in this case is equivalent to H 10001 < 0, ∀t ∈ I. A check of this condition, necessary for optimality, is also shown in Figure 5. Although there is no available sufficient condition to test local optimality of extremals with Fuller arcs, verifying the Legendre-Clebsch condition along the singular arc only ensures that we do not compute a too crude local minimizer. Besides, numerically only a small finite number of bang arcs are retrieved by the optimizer for the chattering parts before and after the singular arc. This is usually sufficient to give a very good approximation of the solution.

Static optimization problem
We have shown that a constant allocation decisionū represents a simplified alternative to the optimal control solution, a strategy composed of bang arcs, a time-varying singular arc and the chattering artifact. In this section, we will further explore the static optimization problem by adding a second degree of freedom to the problem: the dilution rate D. In addition to that, we investigate two objectives: the production of biomass V and of metabolite X. The static biomass maximization problem (SP V ) can be written as Analogously, the product maximization problem can be defined as (SP X ) : Since we look for the steady-states that maximize each objective, the washout equilibrium E w can be excluded from the analysis since, as shown in Theorem 2, the equilibrium corresponds to the steadystate values V = 0 and x = 0. Therefore, the static problems are reduced to finding the equilibria E i in terms of the pair (D,ū) that maximize each objective function. Moreover, it can be shown that the optimal solution cannot belong to the boundary of the equilibrium E i Θ (ū, D) ∈ R 2 :μ(p w ) = D .
Indeed, using the definitions (2.11), (2.12) and (2.13), it can be seen that on Θ there is no bacterial population, as s i = s in , which means that V i = x i = 0. We formalize the latter reasoning in the following proposition. When considering the same self-replicator scheme under constant environmental conditions (which could describe fed-batch cultivation) the solution for both static problems corresponds to the steady-state with maximal growth rate [10]. Proposition 5 shows that this is not the case in continuous bioreactors, where maximal growth rate is attained at the boundary set of existence of the equilibrium E i . Two interesting particular cases within Θ are the pure static allocation strategiesū = 0 andū = 1: A pure metabolic strategyū = 0 will lead to a bacterial population with no RNA polymerase (i.e., r = 0), which will eventually stop the production of biomass (as v R (p, 0) = 0), leading to washout in the bioreactor. Analogously, allocating all resources to the gene expression machinery will finally empty the metabolic machinery m, halting the absorption of substrate from the environment (as v M (p, 0) = 0) and depleting the bacteria from precursors, which will also lead to washout. From this analysis, we can conclude that any optimal steady-state allocationū should belong to (0, 1). We recall that, in continuous bioreactors, the growth rateμ(p i ) is fixed by the dilution rate D, as shown in Eq (2.11). Figure 6 illustrates a numerical analysis of the static problems. It is interesting to notice in both subfigures 6a and 6b that the model accounts for the classical quasi-linear relation between the maximal growth rate (that lies on the boundary Θ), and the controlū which regulates the RNA/protein mass ratio of the bacterial population [35]. The latter is a phenomenon which has been first observed experimentally, and later used to develop dynamical self-replicator models for natural and biotechnological purposes [4,10,11]. However, in the present case, the growth rate is fixed through D, so it is not a result of the nutrient quality in the environment, which enables the multivariate approach.
Biomass maximization objective Results for this problem are shown in Figure 6a. For this case, the curveū opt remains over 0.6 for all values of the growth rate, tending toū opt = 1 as the growth rate goes to 0. This shows that, in order to maximize V, the allocation strategy should prioritize the synthesis of macromolecules of the gene expression machinery R over the metabolic machinery M, which catalyzes the production of biomass and not the synthesis of metabolites. Moreover, the maximum DV i is attained through a fairly high growth rate (≈ 85% of the maximal growth rate).
Product maximization objective Results for this case are shown in Figure 6b. We can see that, in opposition to the first case, the optimal solution requires allocating as much precursors as possible into the metabolic machinery M, no matter the value of the dilution rate. In other words, the allocation controlū should be as low as possible within the region of existence of the equilibrium E i (but not in Θ). This result is consistent with the fact that the metabolic machinery M catalyzes the  show the optimal allocationū in terms of the dilution rate D.
synthesis of metabolite X. It is noteworthy that the optimal point DX i is accomplished through a rather lower dilution rate D in comparison to the biomass production case, resulting in a continuous production at a rate of about 35% of the maximal growth rate. The latter might appear counter-intuitive, as it is well established in the literature that high dilution rates in continuous bioreactors imply high production rates. This characteristic can be attributed to the compromise between allocating resources to the metabolic machinery M and increasing the dilution rate, linked to the maximum value of the function c(r). In other words, the lower the dilution rate of operation, the wider the interval of existence of the equilibrium (u min , u max ), which enables the possibility of further promoting the synthesis of compounds of the metabolic machinery (by artificially lowering the allocation parameterū) without going to washout. Figure 7a illustrates the resulting synthesis rates for each solution. In (SP X ), the synthesis rate of the metabolite v X is increased at the expense of reducing both precursor and biomass synthesis rates v M and v R , which is in large part due to the reduction of the dilution rate D. This difference in the flux distribution impacts directly on the mass quantities inside the bioreactor at steady-state-depicted in Figure 7b-for each problem: for the (SP X ) case, there is a reduction in the biomass V of only 20% w.r.t. the (SP V ) case. However, we can see an increase on the amount of metabolite X of about 5 times that of the (SP V ) case. As already said, the allocation parameterū becomes quite lower in the metabolite synthesis objective. In turn, this inhibits the synthesis of macromolecules, which translates into a decrease of the bacterial population's growth rate. To compensate this effect, the steady-state pool of precursors P required for producing the metabolite X becomes considerably bigger than that of the biomass production objective (about 10 times), therefore increasing the rate of fabrication of biomass v R (p, r).

Discussions
The objective in this paper was to synthesize a certain metabolite of interest by re-adjusting the natural allocation of resources in bacteria. This is done by drawing resources from the native pathways of the cell originally used for producing biomass, and allocating them into the production of the compound X. We addressed the problem in the continuous bioreactor framework, which allows a steady-state production regime. Based on previous dynamical systems approaches [4,10,12], we proposed a coarse-grained self-replicator model capable of accounting for well-studied bacterial growth laws in a simplified way, and we studied its asymptotic behavior. We tackled two different production objectives: Biomass maximization V and metabolite maximization X, and we compared results in order to better understand the potential control strategies required to that effect. We rely on novel bio-engineering techniques capable of delivering groundbreaking control schemes: A synthetic growth switch that allows to control the transcription of RNA polymerase through an inducible promoter. In addition to this regulation mechanism, we include the dilution rate as a control input, which yields a multi-variable optimization problem. We concluded by showing very contrasting results, but in accordance with our previous understanding of microbial resource allocation. The biomass-oriented strategy involves an almost maximal dilution rate, and prioritizes investing resources into the gene expression machinery. Conversely, producing the compound of interest requires a rather low value of the dilution rate, which allows an allocation strategy more geared towards the synthesis of components of the metabolic machinery (i.e., a lower value ofū). The latter shows there exist a compromise between augmenting the dilution rate and artificially boosting the production of enzymes and transporters.
The capacity to interfere with the natural bacterial behaviors at molecular level represents a promising tool to improve biotechnological processes. We are interested in further exploring the details of the implementation of such control schemes, by considering different models of the external growth switch. A next step in this regard would involve taking into account the nature of the external signal I and its physical constraints, in order to adapt our current results towards a more implementable control loop. Additionally, our approach is based on very simplified representations of bacterial growth. Such biological processes usually involve numerous reactions and variables. In our case, we clustered all macromolecules into only 2 different classes, and we purposely omitted a number of known phenomena in bacteria, such as cell division, protein degradation and the influence of temperature. However, some of these effects have been proven to affect only marginally the results regarding the allocation problem [36]. Thus, in our case, a simplified representation becomes useful to emphasize the effects of optimally dealing with the internal resource distribution of bacteria in industrial frameworks. Eventually, such optimal strategies could provide guidance for developing online feedback solutions based on real-time measuring of the process.