**1. Introduction**

We consider a model that describes the evolution of a size-structured consumer in an environment inhabited by a single unstructured resource. We assume that the resource responds to the environment with a constant time delay. The model is composed of two nonlinear coupled problems. On the one hand, a size-structured population model governed by a first-order hyperbolic equation with a nonlocal and nonlinear boundary condition, which represents the evolution over time of the consumer:

$$\begin{cases} \begin{aligned} \boldsymbol{u}\_{t} + \left( \boldsymbol{g} \left( \mathbf{x}, \mathbf{s}(t), t \right) \boldsymbol{u} \right)\_{\mathcal{X}} &= -\mu \left( \mathbf{x}, \mathbf{s}(t), t \right) \boldsymbol{u}\_{\star} & \mathbf{x}\_{0} < \mathbf{x} < \mathbf{x}\_{M}(t), \quad t > 0, \\\ \boldsymbol{g} \left( \mathbf{x}\_{0}, \mathbf{s}(t), t \right) \boldsymbol{u} \left( \mathbf{x}\_{0}, t \right) &= \int\_{\boldsymbol{x}\_{0}}^{\mathbf{x}\_{M}(t)} \boldsymbol{a} \left( \mathbf{x}, \mathbf{s}(t), t \right) \boldsymbol{u} \left( \mathbf{x}, t \right) \, d \mathbf{x}, \quad t > 0, \\\ \boldsymbol{u} \left( \mathbf{x}, 0 \right) = \boldsymbol{u}\_{0} \left( \mathbf{x} \right), \quad \mathbf{x}\_{0} \le \mathbf{x} \le \mathbf{x}\_{M}^{0}. \end{aligned} \end{cases} \tag{1}$$

Variables *x* and *t* represent the size and the time, respectively. Size is the variable which structures the individuals in the consumer population, *x*<sup>0</sup> denotes the newborn individual's size (the size at birth) that is assumed to be constant and positive and *xM*(*t*) represents the maximum size of individuals at time *t*. Then, *xM*(0) = *x*<sup>0</sup> *<sup>M</sup>* is the initial maximum size. The dependent variables *u* and *s* are the density of individuals of size *x* and the amount of the resource available at time *t*, respectively. The so-called *vital rates*, the mortality, the fertility and the growth rates, are given by *μ*, *α* and *g*, respectively. The mortality and the fertility are nonnegative functions and the growth rate has no-sign restriction, although we assume that *g*(*x*0, ·, ·) > 0, which means that each individual increases in size at birth. Vital rates depend on the structuring variable, the time and the amount of the resource available, to take into account the influences of these factors on the dynamics of the population. The size of the individuals changes according to the differential equation

$$\mathbf{x}'(t) = \mathbf{g}(\mathbf{x}(t), \mathbf{s}(t), t), \quad t > 0.$$

As we allow a negative growth rate *g*, we are considering the case in which an individual in the population could shrink in size under a food shortage environmental condition. In particular, the maximum size, *xM*(*t*), is not fixed in the model and evolves following the corresponding characteristic curve of (1)

$$\begin{cases} \mathbf{x}\_M'(t) = \mathbf{g}(\mathbf{x}\_M(t), \mathbf{s}(t), t), \quad t > 0, \\ \mathbf{x}\_M(0) = \mathbf{x}\_M^0. \end{cases} \tag{2}$$

On the other hand, the unstructured resource *s*(*t*), *t* ≥ 0, which provides feeding for the individuals of the population, evolves with time according to the following initial value problem for a delay ordinary differential equation:

$$\begin{cases} s'(t) = f(s(t), s(t-\tau), I(t), t), \quad t > 0, \\ s(t) = s\_0(t), \quad t \in [-\tau, 0]. \end{cases} \tag{3}$$

The rate of change in the evolution of the resource is given by a function *f* that includes dependence on time and on the consumer population through the nonlocal term

$$I(t) = \int\_{x\_0}^{x\_M(t)} \gamma(\mathbf{x}, s(t), t) \, \mu(\mathbf{x}, t) \, d\mathbf{x}, \quad t \ge 0,\tag{4}$$

where *γ* is a function that represents the individual rate of consumption for individuals of a determined size. It also depends on the amount of the resource available at times *t* and *t* − *τ*, *s*(*t*) and *s*(*t* − *τ*) respectively. The memory effect, *s*(*t* − *τ*), can be seen as a deferred influence on the environment of the resource affordability. A common biological situation for this phenomenon occurs when the resource population is close to the carrying capacity of the environment or near extinction, which can make the population react with a certain delay [1]. Another situation in which this deferred influence occurs is when the resource is formed only by the adult individuals of the population, and the delay is due to the maturation time [2]. The solution of the model (1), (3) is determined once we know the initial conditions *<sup>u</sup>*(*x*, 0) = *<sup>u</sup>*0(*x*), *<sup>x</sup>*<sup>0</sup> <sup>≤</sup> *<sup>x</sup>* <sup>≤</sup> *<sup>x</sup>*<sup>0</sup> *<sup>M</sup>*, and *s*(*t*) = *s*0(*t*), *t* ∈ [−*τ*, 0].

Although a large number of papers on consumer models have been considered in past years, not so many address the case in which one of the populations is structured. Consumer-resource models have been studied from the very initial work of Kooijman and Metz [2]. These authors presented a mathematical model for the development of an ectothermic population (*Daphnia magna*, water flea) in which the amount of food they are supplied with represents a regulatory mechanism for the population density. The model was length-structured and also included a stage of maturity: a differentiation among juveniles and adults. This work is considered as the origin of the modern dynamic energy budget theory. The well-posedness of the model equations and the continuously dependence on model data was studied by Thieme [3]. The dynamical properties of the model were explored numerically in [4], and later, analytically in [5–7]. However the description of the evolution of the resource as a delay differential equation within a physiological structured consumer-resource model has not been developed theoretically yet.

The theoretical treatment of this model is not easy; therefore, its numerical analysis is a valid tool and sometimes the only one affordable. The integration of the model without delay has been developed by means of the Excalator Boxcar Train (EBT) [8] and a characteristics method [9]. This last work included the convergence proof of the method while the convergence of the popular EBT method was recently considered [10,11]. However, the numerical treatment of the coupled model with a resource evolving according to a delay differential equation remained unexplored until our study, so our goal was to provide a numerical method to perform the integration of such a model and its convergence analysis.

The remainder of the paper is organized as follows. Section 2 is devoted to the introduction of the numerical method to integrate problem (1), (3). We employ the technique of integration along the characteristic curves in order to obtain the new numerical scheme. In Section 3, we carry out the convergence analysis of the scheme. It is based on a theoretical framework that involves the properties of consistency and stability of the numerical method. We also pay attention to the properties required by the numerical quadrature rule used in the integration. Finally, in Section 4, we present a test done in order to numerically confirm the theoretical order of convergence.
