## 1. Introduction

The most formal and systematic tool to simplify a real-world phenomenon dealing with the interrelationships between organisms and their environment, including the interaction between each other is an ecological model. Of course, it is usually created for one or more purposes, for example, to gain system understanding, to forecast the future state of the system, and to develop new hypotheses. Not only that, a good model should also reach a balance between the complexities of the real-world system, which is too difficult to solve, and the need of simple formulation and valid analytic model, which can be explicitly solved. Ecological modeling has a long and rich history. So far many sophisticated ecological models have been developed in all fields of ecology such as the ecology of individuals including physiological ecology, the ecology of populations, and the study of ecosystems (classified by Hofbauer & Sigmund, 1988; Roughgarden, 1996). Ecological phenomenon can often be simplified by making some assumptions and studying it with suitable time scales and spatial interactions. It should be noted that a simple deterministic system could behave dramatically unlike when its time scale and its spatial interaction are changed. Therefore, the next coming sections aim to convince the significance of time scales and spatial interactions.

## 2. The classical concept of ecological modelling

The books on mathematical modeling in biology written by L. Edelstein-Keshet (1988), S. P. Ellner & J. Guckenheimer (2006), M. R. S. Kulenovic & O. Merino (2002), J. D. Murray (1993), and S. P. Otto & T. Day (2007) are the valuable teaching resources suitable for modelers who require theoretical concepts as well as desire mathematical and computational techniques to build and analyze models. In the early ecological models, their time scales were limited to either discrete or continuous. Usually, if populations of individuals have synchronized changes (i.e., reproduction, infection, recovery, migration, removal or mortality) at a regular time interval and no overlap between successive generations then the discrete time model is recommended. Otherwise, a continuous time model is preferred. Traditionally, a discrete time model is represented by using difference equation(s) whereas a continuous time model is constructed by using differential equation(s). Recently, the practical use of mathematical modeling is richly contributed. For example, L. J. S. Allen (1994), L. J. S. Allen & A. B. Burgin (2000), W. M. Getz & J. O. Lloyd-Smith (2006), and S. R.-J. Jang (2008) were interested in discrete epidemic models while K. Bunwong et al. (2009) studied nutrient removal process on a continuous time model.

According to spatial interactions, the early ecological models were based on the mass-action law, first coined in chemical reaction. Hence the system is homogenous and the spatial interaction neither exists nor plays an important role. Before the 1970s, mathematical modelers typically used ordinary differential equations, seeking equilibria and analyzing their stability (Neuhauser, 2001). Subsequently, exploring bifurcation diagrams and chaotic patterns has continuously received lots of attention, related articles were written by J. Awrejcewicz (1991), J. Awrejcewicz & C.-H. Lamarque (2003), and E. Ott (1993). In 1969, the implicit spatial model, known as metapopulation, was first introduced by R. Levins. He constructed a model to describe a population that consists of several sub-populations joined together with immigration and emigration. Levins's simple model was motivated by and applied to a pest control situation over a large region, within which local populations would fluctuate in asynchrony (Hanski & Gilpin, 1991). This new concept was closely linked with the processes of local extinctions and re-colonization. I. Hanski & M. Gilpin (1991) also provided a conceptual distinction between local, metapopulation, and geographical scales. Later on, I. Hanski (1999) applied this approach to conservation biology. However, the role of space at the individual level is still not directly mentioned.

Throughout this chapter, an SIS epidemic model, well known disease transmission model, is considered. Of course, there are lots of diseases in this world. Here we focus on the disease that does not produce immunity, for example, some STD’s, the eye disease, and the common cold. Therefore, the main situation is that the population is divided into a susceptible (S) group and an infectious (I) group. The S group is infected by the I group while the I group recovers from the disease and returns to the S group. Consequently, we set

In this case, a solution of Equation (1) always behaves non-oscillatory. For discrete time scale, the SIS epidemic model becomes

In this case, the behavior of the endemic solution can be very complicated as it can tend to an equilibrium point, to limit cycles, or show chaos. Obviously, time scale makes system behavior amazing. In the next section, an SIS model is extended with more different time scales. Finally, the qualitative structures are investigated.

## 3. The important of time scales

In more complex situation, flu virus can spread continuously while in season, mostly disappear for some period of time, and spread again in a new season. According to Fig. 1, the data shows periodic outbreaks of disease (the Influenza Division of Centers for Disease Control and Prevention, 2010). Obviously, the reasonable time scale for this model should be a combination of discrete and continuous scales. Thus the model either using difference equation(s) or differential equation(s) should be improper. Consequently, the calculus on time scales has been developed. S. Hilger first introduced this theory in order to unify continuous (

### 3.1. Notations and definitions

A time scale,

### 3.2. Calculus on time scales

Traditionally, limits and continuity are key concepts for calculus development including calculus on time scales. A function

The (delta) derivative of

For all

Apart from discrete and continuous time scales, there are two more interesting time domain (as visualized in Fig. 2) to introduce. The first one is the combination of continuous and discrete time scales, denoted by the symbol * l*is the fixed length of the continuous interval while

*is the fixed length of the discrete jump. The second one is composed of points that are equally spaced in time. Suppose that the distant between two successive points is*h

*. Therefore, the symbol of this time scale is*h

In the case

In the case

In the case

For more details on time scales, we refer the reader to Bohner & Peterson (2001,2003)

### 3.3. SIS epidemic model on time scales

After replacing

It should be pointed out that * h*tends to zero. Secondly, we change our focus to SIS epidemic model on

for

Then we explore the numerical results of previous dynamic equations individually. For * h*or

*approaches zero.*l

### 3.4. Numerical solution

Since the numerical method for ordinary differential equation and difference equation are already well-known, this section contains only some additional algorithm for computing the numerical solution of dynamic system on four time scales (Sae-jie, & Bunwong, 2009). Before running the following program, the user must define the function F and G.

INPUT: A: starting time

X, Y: initial values

M: number of step size (Case 2: M = l/H)

H: step size for continuous interval

Case 1:

FOR j = 0, 1, 2,..., M DO

T = A + H*j

SAVE T, X, Y in the OUTPUT LIST

RUNGE-KUTTA-FEHLBERG METHOD

END FOR

Case 2:

P: numbers of period

l: length of continuous interval

h: length of jump

DUM3 = A

FOR j = 0, 1, 2,..., M DO

T = DUM3 + H*j

SAVE T, X, Y in the OUTPUT LIST

DUM1 = X

DUM2 = Y

RUNGE-KUTTA-FEHLBERG METHOD

END FOR

X = DUM1 + h*F(T, DUM1, DUM2)

Y = DUM2 + h*G(T, DUM1, DUM2)

FOR k = 1, 2, 3,..., P DO

DUM3 = A + k*(l+h)

FOR j = 0, 1, 2,..., M DO

T = DUM3 + H*j

SAVE T, X, Y in the OUTPUT LIST

DUM1 = X

DUM2 = Y

RUNGE-KUTTA-FEHLBERG METHOD

END FOR

X = DUM1 + h*F(T, DUM1, DUM2)

Y = DUM2 + h*G(T, DUM1, DUM2)

END FOR

Case 3:

DUM3 = A

FOR j = 0, 1, 2,..., M DO

T = DUM3 + H*j

SAVE T, X, Y in the OUTPUT LIST

DUM1 = X

DUM2 = Y

X = DUM1 + H*F(T, DUM1, DUM2)

Y = DUM2 + H*G(T, DUM1, DUM2)

END FOR

F :=

G :=

In the case

M. R. S. Kulenovic & O. Merino (2002) and L. Tien-yien & J. A. Yorke (1975) discovered that if there exists a period three cycle, then there exists chaotic behavior. For

In the case * l*. For sufficiently high value of

*, the result (as shown in Fig. 6) appears as a non-oscillatory solution which is similar to the result in Fig. 3. for a continuous time scale. It disappears in some intervals because of the discrete time jump. When the length of the continuous interval decreases, a period two cycle with some continuous intervals appears as visualized in Fig. 7. If the length of the continuous interval is gradually reduced and closely zero,*l

## 4. The important of spatial interaction

In contrast to a metapopulation model, space in an explicit model should be taken into account as another variable. As for non spatial models, the time scale, space, and population state for an explicit model can be either discrete or continuous. If all of them are continuous variables, a partial differential equation has been used (for example, Fisher, 1937). However, solving partial differential equations analytically is difficult. Consequently, analysis is based on computer simulation. Then we face another limitation because solving them numerically

involves discretizing space and time. In principle, this reduces them to coupled map lattice model. On the other hand, if space is treated as discrete, a lattice model is proposed. With respect to state variables, lattice models can be divided into three subgroups, these are coupled map lattice (Morris, 1997), cellular automaton (Wolfram, 1986), and network model (Sole & Manrubia, 1996, 1997; Verdasca et al., 2005). A major problem with the lattice model is that analysis is often restricted to direct computer simulation which consumes expensive time when it is a stochastic model on a reasonably large lattice.

Fortunately, in microscopic point of view, there is an alternative way, so-called pair approximation, that can help us not only to produce the numerical solutions of spatially explicit lattice models by using ordinarily numerical method but also to analyze them. The Japanese researchers were pioneers to apply this idea to ecological systems and have continuously produced theoretical result and applications (Harada et al., 1995; Iwasa et al., 1998; Kubo et al., 1996; Matsuda et al., 1992; Sato et al., 1994). They referred to the pair approximation as the doublet decoupling approximation and represent their system as coupled system of ordinary differential equation for the density of singletons and pairs. However, Rand’s colleagues (Bauch, 2000; Bunwong 2006; Keeling, 1995; Morris, 1997; van Baanlen & Rand, 1998) used pair approximation as a moment closure approximation where the number of pairs and the number of singletons are the only state variables. Higher order correlations are neglected. A more advantage of this method is that it keeps spatial correlations. There are varieties of applications in ecological interactions (Dieckmann et al., 2000; Ellner, 2001; Ellner et al., 1998), epidemiology (Benoit et al., 2006; de Aguiar et al., 2004 ; Dieckmann et al., 2002 ; Elliott et al., 2000 ; Joo & Lebowitz, 2004), and forest dynamics (Schlicht & Iwasa, 2007). However, the mathematical formulas are still limited. Thus, we attempt to broaden the pair approximation idea by calculating configuration averages. We call our method as a new approach and previous method as an original approach. In order to contribute our techniques understandably, some useful notations and definition are introduced as follows.

### 4.1. Notations and definitions

Under a given configuration

In this framework, space is represented by a network of sites. Each site can either be occupied by an individual or remains as an empty site that is still available for an individual to occupy. Two sites are neighbors when they regularly interact with each other. Joining these two neighboring sites performs an edge or pair. A line is used for this interaction. Fig. 8 provides an example when the state of site

### 4.2. SIS Master and correlation equations

Our correlations are microcorrelations which can be measured on the scale of the interactions of individuals. After approximating higher order terms in master equations, we obtain a system of ordinary differential equation which composed of density of lower order terms, known as correlation equations. Moreover, the approximation technique is called the moment closure approximation. The differential equation for the single numbers involves pair numbers, triple numbers, etc. The differential equation for the pair numbers involves triple numbers, etc. So we get an infinite hierarchy of equations. However, we need to truncate the hierarchy at some point. For instant, pair approximation, the first order of moment closure approximation, truncates triples and higher order terms as functions of singletons and pairs only (Rand, 1998).

Let * f*be a real-valued function of the state of the network at time

*, which can be approximated as continuous. The equation*t

*is derived by summing over all events in the population which affect*f

*and the total change produced by those events is*f

where * f*by event

For our case study, the state of each site and edge will change over time as a consequence of two major types of events – infection and recovery. Infection changes the state

If

we, then, can use average forms instead of summation terms in the master equation as follows,

### 4.3. Calculating configuration averages

It should be pointed out that there are two types of average values in this new approach. Previously, all mentioned average values are called space or population average value because they are averages of the quantity over subsets of population. Now we introduce another way to calculate an average value. That is the expected value with respect to probability distribution. This seems reasonable to assume that if population size is large enough, then the configuration averages approximate probability expectations. Under some necessary and sufficient conditions, the space average and probability average are identical. K. Bunwong (2006, 2010a, 2010b) developed more formulas under multinomial distribution with parameters

### 4.4. Numerical solution

The numerical method for spatial model (14) is as same as for ordinary differential equation. Here, the number of pairs and the number of singletons are state variables. K. Bunwong (2010a) mainly investigated the density of infected individuals, defined by

## 5. Conclusion

Obviously, the assumption on timescale affects the system behavior. In order to simplify real-world correctly, choosing a suitable time scale is important for model formulation. Our example, SIS epidemic model, proves that if continuous time scale is used then two solutions of the system are asymptotically stable or unstable depending on parameter values and stable oscillating solutions have never existed. In contrast, if discrete time scale is applied then there are various types of solution behaviors such as equilibrium point solutions, period two cycles, period four cycles, period three cycles, and also chaotic solutions depending on parameter values as well. Consequently, the predicted behaviors from a model can be qualitatively very different for different time scales. The hard to answer question is “What is the proper model to understand observed data in a variety of time measurements?”. Of course, the observed data is usually discrete. Can we use differential equation(s)? With theory of time scales, the models are more varieties. Bifurcation diagram shows that the discrete jump and the continuous interval are essential. The differential equation(s) can be described observed data if the jump distant of data is sufficiently small. The distant also depends on other parameters. Moreover, numerical verification can visualize other interesting behavior pattern and guide other mathematician to consider theoretically.

In recent years, the effect of spatial structure is often taken into account in ecological interactions. Pair approximation is one of the powerful tools to understand human to human interactions. We have developed the way to approximate higher order quantities and applied to ecological problems. Particularly, our new approach is suitable for a model evolving according to the transition rates affecting additionally by neighbors. For example, people infect flu virus easily from their nearby neighbors. The health organization usually suggests infectious people to have some rest and be away from public places. It implies that if we surrounding with more infectious people, then we have higher chance to infected and/or lower chance to recover as shown in the numerical results.

Further studies on time scales should involve more numerical techniques and applications while future works on spatial interaction should concern development of formulation.

## Acknowledgments

I would like to thank Prof. David Rand for introducing me to spatial world, Prof. Yoh Iwasa for sharing his experience, Prof. Ravi Agarwal for introducing me to time scale world, Dr. Elvin Moore for intuitive ideas, and Dr. Wichuta Sae-jie for collaboration. I am grateful to the Development and Promotion of Science and Technology Talent Project (DPST) and Thailand Research Fund (TRF) for financial supports under contact number MRG5180246.