1 Introduction

Nonlocal problems concerning the conditions of the behavior of different classes of solutions play an important role in the qualitative theory of ordinary differential equations [116]. For more precision, we refer the readers to some specific problems such as boundedness, periodicity, almost periodicity, stability in the sense of Poisson and Ulam and to the problem of the existence of limit regimes of different types, convergence, dissipativity, and so on [1730]. On the one hand, as pointed out in [31] in the real world, the delays in differential equations of populations, ecology, and dynamic problems are usually infinite time delays; for example, Zhou et al. [32] studied positive almost periodic solutions for a class of Lasota–Wazewska model with infinite time delays. On the other hand, assuming that a harvesting function is a function of the delayed estimate of the true ecological and dynamic models, Zhou et al. [33] presented an overview of the results on the classical Nicholson’s blowflies model with a linear harvesting term.

During the last few decades the question of the existence of oscillatory solutions for differential equations has been considered by many researchers. These systems arise while modeling several physical and natural phenomena in engineering, biology, chemistry, and ecology. Here we focus on the last application, which is ecology. The study of almost periodic models is relevant because they consider general seasonal oscillations of the weather that extend periodical variations of weather or habitat. The concept of almost periodicity was introduced by Danish mathematician Bohr around 1924–1926 [3436] and later generalized by many other authors [24, 33, 3740].

The almost periodic functions may capture the phenomena which may not be possible with periodic rates. For instance, the function \(x \mapsto \cos x + \cos5x \) is periodic, and this remains true when when 5 is replaced with any other rational number. However, the sum of the periodic functions \(x \mapsto\exp(ix)\) and \(x \mapsto\exp(i\sqrt{2} x)\) is not periodic. Hence, when such functions, obtained by using a combination of periodic functions, are not periodic, they are not without properties: they are almost periodic functions. More generally, we know that when all the solutions of an autonomous linear finite dimensional system are bounded, then all these solutions are almost periodic.

The notion of almost periodicity for certain functions was introduced by Fréchet [25]. In view of the literature, one can claim that the analysis of boundedness and stability is one of the central foci in the qualitative analysis. Classical ecological research of rocky intertidal communities has already been reported by some ecologists [27, 28]. Recently the authors studied a model of species interactions by a simple patch occupancy with global dispersal of propagules [18, 20]. In [20], Benicá et al. showed that natural ecosystems can sustain continued fluctuations, the model exposes the rocky habitat as small patches, there are three species which habit rocky intertidal community occupy by their individual organism.

This paper is concerned with an occupancy model consisting of two species in a rocky intertidal community, which describes a patch occupancy with global dispersal of propagules, and occupy each other by individual organisms. The model can be formulated by the following system:

$$ \left \{ \textstyle\begin{array}{l} \dot{x} (t) = x(t) [ - m_{1} (t) + a(t) z(t) - b(t) y(t) ],\\\dot{y} (t) = y(t) [- m_{2} (t) + c(t) z(t) + b(t) x(t) ], \end{array}\displaystyle \right . $$
(1)

and

$$ z(t)=1-x(t)-y(t), $$
(2)

where x and y are the coverage (i.e., the fraction of patches occupied) by barnacles and crustose algae, respectively, and z is the coverage by bare rock. Barnacles only can cover bare rock, and crustose algae can inhabit bare rock and barnacle. The variables a, b, c, \(m_{1}\), and \(m_{2}\) are all positive, where a is the colonization rate of barnacles on bare rock, b and c are colonization rates of crustose algae on barnacles and bare rock, and \(m_{1}\) and \(m_{2}\) are the mortality rates of barnacles and crustose algae, respectively.

Taking into account the practical significance of the species, it is always assumed that the initial conditions associated with system (1) are

$$ x(0)>0, \qquad y(0)>0. $$
(3)

In view of system (1) and initial conditions (3), it is easy to conclude that any solution of system (1) is positive.

Our paper is organized in four sections. In Sect. 2, we study Lyapunov function and general almost periodic functions. In Sect. 3, we provide the results on the uniform persistence and the global asymptotic stability of system (4). Furthermore, we give an example for the system. Finally, we compare main results in this work and the results in the literature in Sect. 4.

2 Essential preliminaries

For further consideration, we rewrite system (1) in the following form:

$$ \left \{ \textstyle\begin{array}{l} \dot{x} (t) = x(t) [ - m_{1} (t) + a(t) - a(t) x(t) - (a(t)+b(t)) y(t) ],\\\dot{y}(t) = y(t) [ - m_{2} (t) + c(t) - (c(t)-b(t)) x(t) - c(t) y(t) ]. \end{array}\displaystyle \right . $$
(4)

Let \(\mathscr{C}_{bd} \) be the collection of continuous and bounded functions from \(\mathbb{R} \times\mathbb{R}^{n}\) to \(\mathbb{R}^{n}\). Let \(\mathbb{R}_{+}=(0, +\infty)\), and define

$$f^{+}=\sup_{t\in\mathbb{R}} f(t), \qquad f^{-}=\inf _{t\in\mathbb {R} } f(t), $$

where f is a continuous and bounded function.

For the relation between colonization and mortality rates, the following assumptions are assumed to hold true throughout the remaining part of the paper:

\((A_{1})\):

\(m_{1}^{-} < a^{+}\),

\((A_{2})\):

\(m_{2}^{-} < c^{+}\).

Definition 1

([24])

A Lyapunov function is a scalar function \(V(x)\) defined on a region D that is continuous, positive definite, i.e., \(V(x)>0\) for all \(x \neq 0\), and has continuous first-order partial derivatives at every point of D. The derivative of V with respect to the system \(x'= f(x)\), written as \(V^{*} (x)\), is defined as a dot product \(V^{*} (x)= \nabla V(x) . f(x)\).

The existence of a Lyapunov function, for which \(V^{*}(y) \leq0\) on some region D containing the origin, guarantees the stability of the zero solution of \(y' = f(y)\), while the existence of a Lyapunov function, for which \(V^{*}(y)\) is negative definite on some region D containing the origin, guarantees the asymptotic stability of the zero solution of \(y' = f(y)\). For example, given the system

$$\left \{ \textstyle\begin{array}{l} y'=z,\\ z'=-y - 2z, \end{array}\displaystyle \right . $$

and the Lyapunov function \(V(y, z) = \frac{y^{2} + z^{2} }{2}\), we obtain

$$V^{*} (y, z) = yz + z (-y -2z) = -2 z^{2}, $$

which is nonincreasing on every region containing the origin, and thus the zero solution is stable.

Definition 2

([24])

Let \(f: \mathbb{R}\to\mathbb{R}^{n}\) be a continuous function. Given \(\varepsilon>0\), we call \(\tau>0\) and ε-translation for f if and only if, for all \(t \in\mathbb{R}\), \(|f(t + \tau) - f(t)| < \varepsilon\). The set consisting of all ε-translations for f is denoted by

$$E(f, \varepsilon)= \bigl\{ \tau\in\mathbb{R} | \bigl\vert f(t + \tau) - f(t) \bigr\vert < \varepsilon \bigr\} . $$

The function f is an almost periodic function if and only if, for each \(\varepsilon>0\), the set \(E(f, \varepsilon)\) is relatively dense in \(\mathbb{R}\), which means that there exists a constant \(l>0\) such that any subinterval of \(\mathbb{R}\) of length l meets \(E(f, \varepsilon)\).

Definition 3

Let

$$u(t)=\left ( \textstyle\begin{array}{c} x^{*}(t)\\ y^{*}(t) \end{array}\displaystyle \right ) $$

be one bounded positive solution of (4). Then u is said to be globally asymptotically stable if, for any positive bounded solution

$$v(t)=\left ( \textstyle\begin{array}{c} x(t)\\ y(t) \end{array}\displaystyle \right ) $$

of (4), the following is satisfied:

$$ \lim_{t\to+ \infty}\bigl[ \bigl\vert x(t)-x^{*}(t) \bigr\vert + \bigl\vert y(t)-y^{*}(t) \bigr\vert \bigr]=0. $$
(5)

We state the following essential lemma.

Lemma 4

([23])

The following hold:

  1. (i)

    If\(a>0\), \(b>0\), and\(\dot{x}(t) \leq x (t)( b - ax(t))\), whenever\(t\geq0\)and\(x(0)>0\), then\(\limsup_{t \to +\infty} x(t)\leq\frac{b}{a}\).

  2. (ii)

    If\(a>0\), \(b>0\), and\(\dot{x} (t)\geq x(t)(b-ax(t))\), whenever\(t\geq0\)and\(x(0)>0\), then\(\liminf_{t\to+\infty} x(t) \geq\frac{b}{a}\).

Lemma 5

For any solution\((x(t), y(t))\)of system (4) with initial conditions (3), there exists\(T_{1} >0\)such that

$$ x(t) \leq M_{1},\qquad y(t)\leq M_{2} $$
(6)

for all\(t \geq T_{1}\), where\(M_{1} = \frac{a^{+} - m_{1}^{-}}{ a^{-} }\)and\(M_{2} = \frac{c^{+} + b^{+}M_{1} - m_{2}^{-}}{c^{-}}\).

Proof

It is clear that \(x(t)>0\) and \(y(t)>0\) for all \(t\in\mathbb{R}\). Since

$$\begin{aligned} \dot{x}(t) &= x(t) \bigl[ - m_{1}(t) + a(t) - a(t)x(t) - \bigl(a(t)+b(t)\bigr) y(t) \bigr] \\ &\leq x(t) \bigl( - m_{1}(t) + a(t) - a(t) x(t) \bigr) \\ &\leq x(t) \bigl(-m_{1}^{-} + a^{+} - a^{-}x(t) \bigr), \end{aligned}$$

and from (i) of Lemma 4, one has

$$ \lim_{t\to+ \infty}\sup x(t) \leq\frac{a^{+} - m_{1}^{-}}{ a^{-}} = M_{1}. $$
(7)

By (7), for any \(\varepsilon>0\) small enough, there exists \(T_{1}> 0\) such that \(x(t) < M_{1} + \varepsilon\) for all \(t\geq T_{1}\). For \(t\geq T_{1}\), we have

$$\begin{aligned} \dot{y}(t) & = y(t) \bigl[ -m_{2}(t) + c(t)- \bigl(c(t)-b(t) \bigr)x(t) - c(t)y(t) \bigr] \\ &\leq y(t) \bigl[ -m_{2}(t) + c(t) \bigl(1-y(t)\bigr) + b(t)x(t) \bigr] \\ &\leq y(t) \bigl[ -m_{2}^{-} + c^{+} + b^{+} ( M_{1} + \varepsilon) - c^{-}y(t) \bigr]. \end{aligned}$$

From (i) of Lemma 4, one has

$$ \limsup_{t\to+\infty} y(t)\leq\frac{c^{+}+b^{+}(M_{1} + \varepsilon ) - m_{2}^{-}}{c^{-}}. $$
(8)

Setting \(\varepsilon\to0\) with the right-hand side of (8), then

$$ \limsup_{t\to+\infty} y(t)\leq\frac{c^{+} + b^{+}M_{1}-m_{2}^{-}}{c^{-}} =M_{2}. $$
(9)

 □

Remark 1

From Theorem 8.10 in [29] and Lemma 5 above, it is clear that the boundedness of solution of system (4) is independent of the initial conditions, which implies that any solution of (4) is ultimately bounded.

3 Main results

This section is devoted to the main results of this paper. We provide results on the uniform persistence and the global asymptotic stability of system (4).

In what follows, we set

$$\gamma_{1}^{+} = a^{+} + b^{+},\qquad \gamma_{2}^{+} = \max_{t\in\mathbb {R}} \bigl\vert b(t) - c(t) \bigr\vert , \quad\mbox{and}\quad \varLambda= \frac{a^{-}c^{-}}{ \gamma _{1}^{+} \gamma_{2}^{+}}. $$

Theorem 6

Assume that

\((A_{3})\):

\(\frac{a^{-} - m_{1}^{+}}{ \gamma_{1}^{+}} > M_{2}\),

\((A_{4})\):

\(\frac{ c^{-}-m_{2}^{+}}{ \gamma_{2}^{+}} > M_{1}\).

Then there exist\(T_{*} > T_{1}\)and positive constants\(n_{i} \) (\(i=1, 2\)) such that

$$ \liminf_{t\to+\infty} x(t)\geq n_{1}>0,\qquad \liminf_{t\to+ \infty} y(t)\geq n_{2}>0, $$
(10)

which implies that system (4) is uniformly persistent, where

$$n_{1} = \frac{a^{-} - m_{1}^{+} - \gamma_{1}^{+} M_{2}}{ a^{+}} $$

and

$$n_{2} = \frac{c^{-} - m_{2}^{+} - \gamma_{2}^{+} M_{1}}{c^{+}}. $$

Proof

From Eq. (6) and \((A_{3})\), for any \(\epsilon> 0\) small enough, there exist \(T_{2} > T_{1}\) such that \(y(t) < M_{2} + \epsilon\) and

$$a^{-}> m_{1}^{+} + \gamma_{1}^{+} ( M_{2} + \epsilon) $$

for all \(t\geq T_{2}\). Also, for \(t\geq T_{2}\), we get

$$\begin{aligned} \dot{x}(t) &= x(t) \bigl[ - m_{1}(t) + a(t) - a(t)x(t) - \bigl(a(t)+b(t)\bigr) y(t) \bigr] \\ &\geq x(t) \bigl[ - m_{1}(t)+a(t) - a(t)x(t) - \bigl(a(t) + b(t) \bigr) (M_{2}+\epsilon) \bigr] \\ &\geq x(t) \bigl[ a^{-}-m_{1}^{+} - \gamma_{1}^{+} (M_{2} + \epsilon) - a^{+}x(t) \bigr]. \end{aligned}$$

From (ii) of Lemma 4, it follows that

$$ \liminf_{t\to + \infty} x(t) \geq\frac{a^{-} - m_{1}^{+} - \gamma _{1}^{+}(M_{2} + \epsilon)}{a^{+}}. $$
(11)

Setting \(\varepsilon\to0\) with the right-hand side of (11), then

$$ \liminf_{t\to +\infty} x(t) \geq\frac{a^{-}-m_{1}^{+} - \gamma _{1}^{+} M_{2}}{a^{+}} = n_{1}. $$
(12)

From equations (7), (12) and \((A_{4})\), for any \(\varepsilon_{*} > 0\) small enough, there exist \(T_{3} > T_{2}\) such that \(x(t) < M_{1} + \varepsilon_{*}\) and

$$m_{2}^{+} - c^{-} > c^{+}(M_{1} + \varepsilon_{*} ) + b^{-}(m_{1} - \varepsilon_{*}) $$

for all \(t\geq T_{3}\). By the same arguments,

$$\begin{aligned} \dot{y}(t) & = y(t) \bigl[ -m_{2}(t) + c(t)-\bigl(c(t)-b(t) \bigr)x(t)-c(t)y(t) \bigr] \\ &\geq y(t) \bigl[ - m_{2}(t)+c(t) - \bigl\vert c(t)-b(t) \bigr\vert (M_{1}+\varepsilon _{*})-c(t)y(t) \bigr] \\ &\geq y(t) \bigl[ -m_{2}^{+}+c^{-} - \gamma_{2}^{+}(M_{1} + \varepsilon _{*})-c^{+}y(t) \bigr]. \end{aligned}$$

From (ii) of Lemma 4, one has

$$ \liminf_{t\to +\infty} y(t)\geq\frac{ c^{-}-m_{2}^{+} - \gamma _{2}^{+} ( M_{1}+\varepsilon_{*}) }{ c^{+}}. $$
(13)

Setting \(\varepsilon\to0\) with the right-hand side of (13), then

$$ \liminf_{t\to + \infty} y(t)\geq\frac{c^{-} - m_{2}^{+} - \gamma _{2}^{+} M_{1}}{c^{+}}=n_{2}. $$
(14)

Let \(T_{*}=T_{3}\), from equations (13) and (14), system (4) is uniformly persistent. The proof is completed. □

Lemma 7

([19])

Letrbe a real number andfbe a nonnegative function defined on\([r, + \infty)\)such thatfis integrable and is uniformly continuous on\([r, + \infty)\). Then\(\lim_{t\to+ \infty} f(t)=0\).

The following theorem shows that relation (5) holds. That is, system (4) with initial condition (3) is globally asymptotically stable. First, we shall propose the following assumption:

$$\varLambda= \frac{a^{-}c^{-}}{ \gamma_{1}^{+} \gamma_{2}^{+}}>1. $$

Theorem 8

Assume that\((A_{1})\)\((A_{4})\)hold and\(\varLambda> 1\), then system (4) with initial condition (3) is globally asymptotically stable.

Proof

Suppose that

$$u(t) = \left ( \textstyle\begin{array}{c} x^{*}(t)\\ y^{*}(t) \end{array}\displaystyle \right ), \qquad v(t)=\left ( \textstyle\begin{array}{c} x(t)\\ y(t) \end{array}\displaystyle \right ) $$

are two positive solutions of system (4). Since \(\varLambda >1\), one has \(\frac{c^{-}}{\gamma_{1}^{+}} > \frac{\gamma _{2}^{+}}{a^{-}}\), then there exist positive constants α and β such that

$$ \frac{c^{-}}{ \gamma_{1}^{+}} > \frac{\alpha}{ \beta} > \frac{ \gamma _{2}^{+}}{ a^{-}}. $$
(15)

Define a Lyapunov function by

$$ V(t)=\alpha \bigl\vert \ln x(t)- \ln x^{*}(t) \bigr\vert + \beta \bigl\vert \ln y(t) - \ln y^{*}(t) \bigr\vert $$
(16)

for \(t > T\). Calculating directly the upper right derivative of V along the solutions of model (4), we obtain that

$$\begin{aligned} D^{+}V(t)&=\underset{h\to0^{+}}{\overline{\lim}} \frac{V(t+h)-V(t)}{h} \\ &\leq \alpha \bigl[-a(t) \bigl\vert x(t) - x^{*}(t) \bigr\vert + \bigl(a(t)+b(t)\bigr) \bigl\vert y(t)-y^{*}(t) \bigr\vert \bigr] \\ &\quad+ \beta \bigl[ -c(t) \bigl\vert y(t) - y^{*}(t) \bigr\vert + \bigl\vert c(t)-b(t) \bigr\vert \bigl\vert x(t)- x^{*}(t) \bigr\vert \bigr] \\ &\leq\alpha \bigl[-a^{-} \bigl\vert x(t)-x^{*}(t) \bigr\vert + \gamma_{1}^{+} \bigl\vert y(t)-y^{*}(t) \bigr\vert \bigr] \\ &\quad+ \beta \bigl[-c^{-} \bigl\vert y(t) - y^{*}(t) \bigr\vert + \gamma_{2}^{+} \bigl\vert x(t) - x^{*}(t) \bigr\vert \bigr] \\ &= \bigl(- \alpha a^{-} + \beta\gamma_{2}^{+} \bigr) \bigl\vert x(t) - x^{*}(t) \bigr\vert + \bigl(-\beta c^{-} + \alpha\gamma_{1}^{+} \bigr) \bigl\vert y(t)-y^{*}(t) \bigr\vert . \end{aligned}$$

From (15), it follows that there exist constant \(\rho>0\) and large enough \(T>0\) such that

$$ D^{+}V(t) \leq-\rho\bigl( \bigl\vert x(t) - x^{*}(t) \bigr\vert + \bigl\vert y(t) - y^{*}(t) \bigr\vert \bigr) $$
(17)

for \(t > T\). Integrating both sides of (17) from T to t, and by the integral comparison theorem, one has

$$V(t) + \rho \int_{T}^{t} \bigl( \bigl\vert x(t)-x^{*}(t) \bigr\vert + \bigl\vert y(t)-y^{*}(t) \bigr\vert \bigr) \, ds \leq V(T) < +\infty $$

for each \(t>T\), which yields

$$\int_{T}^{t} \bigl( \bigl\vert x(t)-x^{*}(t) \bigr\vert + \bigl\vert y(t)-y^{*}(t) \bigr\vert \bigr)\, ds\leq\rho ^{-1}\bigl[V(T)-V(t)\bigr] < +\infty $$

for \(t > T\). Then \(|x(t) - x^{*}(t)| + |y(t)-y^{*}(t)| \) is integrable on \([T, + \infty)\). On the other hand, from Remark 1, x, \(x^{*}\), y, and \(y^{*}\) are ultimately bounded. It is clear that they have bounded derivatives. It follows that \(|x(t)-x^{*}( t)| + |y(t) - y^{*}(t)|\) is uniformly continuous on \([T, +\infty)\). The conditions of Lemma 7 are satisfied, thus

$$\lim_{t\to+\infty} \bigl[ \bigl\vert x(t)-x^{*} \bigr\vert + \bigl\vert y(t)-y^{*} \bigr\vert \bigr]=0. $$

The proof is complete. □

Before discussing the almost periodic system, we need to recall the following Lemma 9, which can be referred to in the monographs [24, 26]. Consider the following system:

$$ \dot{x}= f(t, x), $$
(18)

where \(f(t, x) \in\mathscr{C}_{bd}\).

Lemma 9

(Theorem 6.6 in [26])

Assume that\(f(t, x)\in\mathscr{C}_{bd}\)is almost periodic intuniformly for\(x\in\mathbb{R}^{n} \)and the solution of (18) is ultimately bounded. And suppose that there exists a Lyapunov function\(V(t, x, y)\)defined on\(\mathbb{R}_{+} \times\mathbb{R}^{n} \times\mathbb{R}^{n}\)which has the following conditions:

  1. (1)

    For continuous nondecreasing functionsuandv,

    $$u\bigl( \vert x-y \vert \bigr)\leq V(t, x, y)\leq v\bigl( \vert x-y \vert \bigr). $$
  2. (2)

    There exists a positive constantLsuch that

    $$\bigl\vert V(t, x_{1}, y_{1})- V(t, x_{2}, y_{2}) \bigr\vert \leq L \bigl[ \vert x_{1} - x_{2} \vert + \vert y_{1}-y_{2} \vert \bigr]. $$
  3. (3)

    Ifλis a continuous and positive definite function, then\(\dot{V}\leq- \lambda(|x-y|)\).

Then system (4) has a unique almost periodic solution, which is globally uniformly asymptotically stable.

Assume \((A_{1})\)\((A_{4})\) hold and \(\varLambda>1\), from Lemma 5 and Theorem 6, for any bounded solution \((x(t), y(t))\) of system (4) with initial conditions (3). Then there exist positive constants \(n_{1}^{*}\), \(n_{2}^{*}\), \(M_{1}^{*}\), and \(M_{2}^{*}\) such that \(0< n_{1}^{*} \leq x(t) \leq M_{1}^{*}\) and \(0< n_{2}^{*} \leq y(t)\leq M_{2}^{*}\). For almost periodic system (4), we consider the associated product system of (4) as follows:

$$ \left \{ \textstyle\begin{array}{l} \dot{x}(t) = x(t) [ -m_{1}(t) + a(t) -a(t)x(t) - (a(t)+b(t))y(t)],\\ \dot{y}(t) = y(t)[-m_{2}(t) + c(t)-(c(t) - b(t))x(t) - c(t)y(t)],\\ \dot{u}(t) = u(t)[-m_{1}(t) + a(t)- a(t)u(t) -( a(t)+b(t))v(t)],\\ \dot{v}(t) = v(t)[-m_{2}(t) + c(t)-(c(t) - b(t))u(t)-c(t)v(t)]. \end{array}\displaystyle \right . $$
(19)

Define a Lyapunov function

$$ V(t)=\alpha \bigl\vert \ln x(t) - \ln u(t) \bigr\vert + \beta \bigl\vert \ln y(t)-\ln v(t) \bigr\vert $$
(20)

for \(t \geq0\), where α and β satisfy (15). We still assume that almost periodic system (4) satisfies \((A_{1})\)\((A_{4})\) and \(\varLambda>1\). From Remark 1, almost periodic solution \((x(t), y(t))\) and \((u(t), v(t))\) of system (19) is ultimately bounded. It is not difficult to verify that conditions (1) and (2) of Lemma 9 are satisfied. Moreover, \(|y(t)-u(t)|\leq K\) and \(|x(t)-v(t)|\leq K\), where

$$K=\max\bigl\{ \bigl\vert M_{2}^{*} - n_{1}^{*} \bigr\vert , \bigl\vert M_{1}^{*} - n_{2}^{*} \bigr\vert \bigr\} >0. $$

By the same arguments followed in the proof of Theorem 8, one can have that

$$\begin{aligned} D^{+}V(t) & \leq- \rho\bigl( \bigl\vert x(t)-u(t) \bigr\vert + \bigl\vert y(t)-v(t) \bigr\vert \bigr) \\ &= - \rho\bigl[ \bigl\vert x(t)-y(t) + y(t)-u(t) \bigr\vert + \bigl\vert y(t)-x(t) + x(t)-v(t) \bigr\vert \bigr] \\ &\leq- \rho\bigl[ \bigl\vert x(t)-y(t) \bigr\vert + \bigl\vert y(t)-u(t) \bigr\vert + \bigl\vert y(t)-x(t) \bigr\vert + \bigl\vert x(t)-v(t) \bigr\vert \bigr] \\ &\leq -\rho\bigl[2 \bigl\vert x(t)-y(t) \bigr\vert +2K\bigr] \\ & = -2 \rho\bigl[ \bigl\vert x(t)-y(t) \bigr\vert +K\bigr], \end{aligned}$$

where ρ is defined as in (17). Taking \(\lambda(r)=2\rho r+K\), \(r\geq0\), condition (3) of Lemma 9 is satisfied.

By virtue of Lemma 9, the following theorem is an immediate consequence.

Theorem 10

Let\((A_{1})\)\((A_{4})\)and\(\varLambda>1 \)be satisfied and system (4) is an almost periodic. Then there exists a unique almost periodic solution of system (4). Moreover, the unique solution is globally asymptotically stable.

Remark 2

Theorem 10 demonstrates that \(\varLambda> 1\) is the sharp threshold of existence and global asymptotic stability of almost periodic solution of system (4). Based on the ultimate boundedness of almost periodic solution of system (4), the Lyapunov function in Theorem 8 can be applied to prove Theorem 10. Condition (3) of Lemma 9 is easier to be checked than the usual condition \(\dot{V}(t, x,y)\leq-\rho V(t,x, y)\). If system (4) is a periodic system, then the following corollary can be concluded.

Corollary 1

If\((A_{1})\)\((A_{4})\)and\(\varLambda>1 \)hold, then periodic system (4) has a unique positive periodic solution, which is globally asymptotically stable.

Here, we provide an example to illustrate our main results.

Example 1

Consider system (4) with specific values for its parameters of the form

$$ \left \{ \textstyle\begin{array}{l} \dot{x}(t) = \frac{ \vert \sin t \vert }{ \vert \sin t \vert +1 } \left [ - \frac{1}{\sqrt{t}} + \frac{1}{t^{2}} - \frac{1}{t^{2}}. \frac{ \vert \sin t \vert }{ \vert \sin t \vert +1 } - ( \frac{1}{t^{2}} + \frac{1}{3t^{2}} ) \frac{\sqrt{t}}{\sqrt{t}+1} \right ], \\ \dot{y}(t) = \frac{\sqrt{t}}{\sqrt{t}+1} \left [ - \frac{3}{\sqrt{t}+3} + \frac{1}{\sqrt{t}} - ( \frac{1}{\sqrt{t}} - \frac{1}{3t^{2}} ) \frac{ \vert \sin t \vert }{ \vert \sin t \vert +1 } - \frac{1}{\sqrt{t}}. \frac{\sqrt {t}}{\sqrt{t}+1} \right ], \end{array}\displaystyle \right . $$
(21)

with initial conditions (3). Clearly,

$$\begin{aligned}& x(t) =\frac{ \vert \sin t \vert }{ \vert \sin t \vert +1 }, \qquad m_{1}(t)=\frac{1}{\sqrt {t}}, \qquad a(t) = \frac{1}{t^{2}}, \\& y(t) = \frac{\sqrt{t}}{\sqrt{t}+1}, \qquad m_{2}(t)= \frac{3}{\sqrt {t}+3}, \qquad c(t)= \frac{1}{\sqrt{t}}, \end{aligned}$$

and \(b(t)=\frac{1}{3t^{2}}\). By direct computations, one can conclude that all the assumptions of Theorem 8 hold and \(\varLambda> 1\). Therefore, system (21) with initial conditions (3) is globally asymptotically stable.

4 Conclusion

Dynamic properties of nonlinear nonautonomous models are rarely considered in the literature. In this paper, we try to fill in this gap by studying a nonautonomous model in a rocky intertidal community. The uniform persistence of the model is examined prior to proceeding to the main results. We establish the threshold condition \(\varLambda>1\) to guarantee the global asymptotic stability and the existence of a unique positive almost periodic solution of the addressed system. Furthermore, an appropriate Lyapunov function is constructed to prove the main results. A particular example with specific parameters that are consistent with the theoretical assumptions is constructed for the sake of demonstrating the validity of outcomes. The authors claim that the results of this paper are new and present different approach, the main theorem of the paper improved the known results of some models [6, 13, 27]. Indeed, it is a challenging problem to search for a suitable Lyapunov function to discuss a three-dimensional model in a rocky intertidal community. Precisely saying, we described the essence of the species interactions by a simple patch occupancy model with global dispersal of propagules. The model can be used in the rocky habitat as a large set of very small patches, each of which can be empty (bare rock) or occupied by an individual organism.