Stochastic optimal switching model for migrating population dynamics

An optimal switching control formalism combined with the stochastic dynamic programming is, for the first time, applied to modelling life cycle of migrating population dynamics with non-overlapping generations. The migration behaviour between habitats is efficiently described as impulsive switching based on stochastic differential equations, which is a new standpoint for modelling the biological phenomenon. The population dynamics is assumed to occur so that the reproductive success is maximized under an expectation. Finding the optimal migration strategy ultimately reduces to solving an optimality equation of the quasi-variational type. We show an effective linkage between our optimality equation and the basic reproduction number. Our model is applied to numerical computation of optimal migration strategy and basic reproduction number of an amphidromous fish Plecoglossus altivelis altivelis in Japan as a target species.


Introduction
Migration of biological organisms is a main driving factor of ecosystems [1,2] as well as a core of many human activities like fisheries [3,4] and agriculture [5,6]. Understanding of interactions between migrating biological organisms and environmental development by human, such as existence of dams and weirs in rivers as migration routes of fish species [7,8], has long been an important topic. Population dynamics of biological organisms can be described with individual-based models based on agents [9,10], spatially heterogeneous models based on partial differential equations (PDEs) [11,12], or simpler spatially-lumped models based on differential or difference equations [13,14].
Optimization models are one of the most standard mathematical models for analysing not only specific parts of life histories such as swimming between habitats [15,16] and foraging in territories [17,18] but also entire life histories and life cycles [19,20]. Stochastic dynamic programming (SDP), also called stochastic optimal control or stochastic optimization, has been an effective tool for modelling population dynamics in natural environment [21,22]. In general, an SDP problem is a maximization, minimization, or a saddle-point problem of an objective function subject to system dynamics to be optimized. In an engineering SDP problem, the decision-maker is human as an inspector of a system as widely seen in problems of manufacturing [23,24], economics [25,26], insurance [27,28], resource management [29,30], ecological management [31,32], and environmental management [33,34]. On the other hand, the decision-maker in a problem of population dynamics is the population themselves [21,22]. This is a significant theoretical difference between problems of engineering and those of population dynamics. Nevertheless, we can apply mathematical tools and techniques established in the engineering research areas to analysis of population dynamics.
Application examples of the SDP to population dynamics are diverse [35]. McHuron et al. [36] applied an SDP model to life cycles of mammals and discussed impacts of stochastic disturbance on the fecundity. Brodin et al. [37] analysed temperature-adaptive behaviour of small birds during winter using an SDP model. An SDP model was employed in analysis of adaptive life-history evolution of butterfly in seasonal environment [38]. Frame and Mills [39] discussed condition-dependent mate choice with an SDP model under the assumption that a female choose mates so that a fitness is maximized. Griffen [40] explained the reason of a reproductive skipping behaviour of an elephant seal using an SDP model and demonstrated importance of foraging behaviour in assessing the phenomenon. Route choice problems of avian migrants have been described with SDP models [41]. Evolution of optimal gut size of birds has been analysed in Ez-zizi et al. [42] based on a time-periodic SDP model. A unified SDP-based numerical tool for modelling animal life histories under temporally cyclic environment has been developed in Schaefer et al. [43]. Satterthwaite et al. [44] developed an SDP model for understanding linkages between migration timing of anadromous salmonids and multiple environmental factors.
From a modern mathematical viewpoint, especially models for continuous-time biological and ecological dynamics, solving an SDP problem ultimately reduces to finding a solution to the corresponding optimality equation often called a Hamilton-Jacobi-Bellman (HJB) equation. HJB equations are often formulated as degenerate elliptic or parabolic partial differential equations [45,46]. In the simplest case where the dynamics is linearized and/or the objective function has a specific form, the corresponding HJB equation is solved analytically [31,47,48]. If the HJB equation to be considered is not analytically solvable, then a numerical approximation method can be applied to dealing with the equation. Versatile numerical methods, such as finite difference methods [49,50], finite element methods [51,52], and Fourier discretization methods [53,54] have been applied to HJB and related equations.
Conventional models of the SDP type sometimes have many variables in return for versatility and are not always easy to analyse in detail. On the other hand, models based on HJB and related equations are more efficient and have been effectively applied to migrating population dynamics especially those occurring in water bodies, like diel fish migration [55], diel migration driven by predator-prey interactions [56], and seasonal fish migration [57,58]. Models based on HJB equations can potentially serve as efficient mathematical tools for analysing life cycle of species to which conventional optimization models have been applied [59,60]. In addition, considering the population dynamics from the viewpoint of HJB formalism would provide a new theoretical linkage between them; an example is presented in this paper. However, such an approach has not been addressed so far to the best of the authors' knowledge, motivating an application of an HJB formalism to migrating population dynamics.
The objectives and contributions of this paper are to formulate and analyse an SDP model for describing an annual life cycle of migrating single fish species with no overlapping generations, with a particular emphasis on migrating fish having one-year life cycles. From the conventional population dynamics modelling viewpoint, migration dynamics of population among habitats is described with state switching where the migration occurs following certain a probabilistic rule in an open-loop manner [61][62][63]. On the other hand, in this paper, the dynamics is efficiently described in the framework of a stochastic optimal switching where the decision-maker is the population who decides the timing of migration. The optimal switching (Chapter 5 of Pham [46]) is a concept of stochastic control where the decision-maker controls discrete state variables in a closed-loop and thus state-dependent manner. Szabó et al. [64] utilized a stochastic optimal switching model for describing trading problems in finance. Some models are exactly-solvable and their solution structures have been analysed in detail [65,66]. El Asri and Mazid [67] analysed well-posedness of stochastic differential games between two players both having switching controls. The optimal switching is a potential candidate of migration dynamics between habitats in a feed-back, state-dependent manner that is usual in animal behaviour [35]. However, application of the optimal switching formalism to life cycle modelling of migrating population dynamics has not been addressed so far despite its potential applicability.
In our model, the population dynamics are described with stochastic differential equations (SDEs) [45]. We show that a life cycle of single species, which involves growth, reproduction, and migration of population, can be reasonably described with the stochastic optimal switching, unifying the previous models for a migration event as only a part of life history [57,58]. We demonstrate that finding the optimal migration strategy with the present model reduces to solving an HJB equation, the optimality equation, of the quasi-variational form. The equation can be simplified based on certain assumptions of the coefficients. We show a linkage between the optimality equation and the basic reproduction number [68], which is a central concept to quantify reproduction success.
The model is finally applied to numerical computation of the optimal migration strategy and the basic reproduction number of an amphidromous fish Plecoglossus altivelis altivelis (hereafter referred to as P. altivelis) in Japan. This fish is one of the most commercially and ecologically important fishery resources in the freshwater environment in the country [69,70]. In general, the fish has a unique one-year life history seasonally migrating between the sea and a river. Adult fishes grow up in mid-stream of a river during spring to coming summer by feeding rock-attached algae like diatoms, and migrating together toward the downstream river reach in the coming autumn to spawn. After that the adult fishes die, hatched larvae drift toward the sea. The larvae grow up by feeding mainly on plankton in the sea until coming spring, at which mass migrations of the fish population from the sea to rivers occur. There exist several experimental and field findings on the ecology of the fish [69,[71][72][73]; however, much less attention has been made on modelling the entire life history of the fish. We hope that our methodology in the flavour of operations research, which is hence slightly different from the conventional ones, may open the door toward new mathematical modelling of animal population dynamics.
The rest of this paper is organized as follows. Section 2 presents our mathematical model. Mathematical analysis results on the model are also presented in Section 2. Section 3 applies the model to P. altivelis with a numerical method. Section 4 presents summary and future perspectives of our research. Technical proofs of propositions in the main text are placed in Appendix A.

Mathematical modelling
The population dynamics model and objective function to be optimized are formulated, and the optimality equation that governs the optimal migration strategy is derived. The basic reproduction number associated with the present model is then formulated based on the value function.

Basic problem setting
The present model describes a life cycle (growth, migration, and reproduction) of a population with non-overlapping generations. Amphidromous fishes like P. altivelis in Japan having a one-year life history [69,70] are examples to which the model potentially applies. Our model puts an emphasis on theoretical simplicity, so that it is a candidate of minimal models for describing the population dynamics. We assume that the population seasonally migrates between the two habitats H 0 and H 1 . Figure 1 is a conceptual diagram of the population dynamics considered in this paper. Each migration event is assumed to occur within a much shorter time-scale than that of the whole life history [57,58] and is therefore considered to be impulsive. Partial migration that only a part of population migrates [74] is not considered in this paper. We assume that the population reproduces the next generation during the migration from the habitat H 1 toward H 0 . This kind of spawning behaviour is seen in migratory fish species having one-year life histories like P. altivelis [69], Salangichthys microdon [75], and Hypomesus nipponensis [76]. In the present mathematical framework, the spawning field, which is assumed to be placed between the habitats H 1 and H 0 , is not explicitly considered but is effectively lumped into the corresponding migration event description. The generation change is described as an impulsive total population change. This formulation harmonizes with the present SDP modelling based on the optimal switching.
The time is denoted as t. The initial time is set as t = 0. The length of the nominal life cycle is denoted as T > 0. The kth period, which would be some year in application, is denoted as L (k) : [(k − 1)T, kT) (k ∈ N). Assume that the population migrates between the two habitats H 0 and H 1 in each L (k) with a manner such that the migration event from H 0 to H 1 and that from H 1 to H 0 occur one by one times in this order. Without loss of generality, we set that the population is in H 0 at t = 0. The migration period from H 0 to H 1 and that from H 1 to H 0 during L (k) are expressed with the super-script (k) as  10 . We assume that the population does not migrate between the habitats in the other periods, as assumed in life cycle models of migratory population dynamics [77,78]. This assumption means that the environmental cues for migration are not available or are very weak expect during M (k) 01 and M (k) 10 . In general, the migration periods are species-dependent as well as environment-dependent. This part can be more reasonably described if we incorporate dynamic equations describing seasonal environmental variability, which is not explicitly addressed here for the sake of model simplicity.
The times of migration during M (k) 01 and M 10 , respectively, and are hereafter referred to as the migration times. They are the decision variables to be optimized by the population so that an objective function is maximized. Based on the assumption, the population lives in the habitat in H 0 during (τ 10 = 0 for the sake of brevity of description.

Population dynamics
The population dynamics is described with the total population N t ≥ 0 and the representative body weight 0 ≤ X t ≤ K following the previous research [57,58], where K > 0 is the maximum body weight. This description of the population change is biologically justified if N t >> 1, which is the hereafter assumed. Density-dependence of the population is not considered in this paper so that the model is formulated simple as possible, but can be considered through introducing nonlinear mortality and growth coefficients [79]. This assumption is justified when the population is not shaped by internal competitions but by external factors such as predation and harvesting.
Except for at the migration times τ (k) 01 and τ (k) 10 , the population dynamics in the habitat H l (l = 0, 1) is assumed to be governed by the system of Itô's SDEs and Here, B t is the 1-D standard Brownian motion on the complete probability space [45], R l > 0 is the mortality in the habitat H l , r l > 0 and σ l ≥ 0 are deterministic and stochastic growth rates of the body growth in H l . The Equation (1) of the total population change means that the population decreases as the time elapses, which is in accordance with the assumption that the generation change, namely reproduction occurs only at τ (k) 10 . Considering the constant mortality except at the migrations is for modelling simplicity, and one can use weight-dependent coefficients if necessary. The Equation (2) of the body growth is the simplest one to simulate bounded growing dynamics subject to stochastic fluctuations [80]. The SDE of the logistic type was used in modelling the biological growth of P. altivelis in a river environment by the authors, and it has been demonstrated that the model can reasonably reproduce the observed growth of the fish from a probabilistic standpoint [73]. Unless otherwise specified, we set 2r l > σ 2 l (l = 0, 1) so that the SDE (2) effectively represents a growth curve such that X t approaches toward K as the time elapses (Theorem 2.2 of Lungu and Øksendal [80]). The SDEs (1) and (2) are uniquely solvable in the path-wise sense given an initial condition. The unique solvability of the former is trivial because of its linearity. The statement for the latter is les trivial, but can be proven with the help of a contradiction argument [80], which leads to a byproduct that the solution to the SDE (2) subject to an initial condition in [0, K] almost surely stays in [0, K].
An integer-valued auxiliary variable that represents the state of the population, namely the habitat at which the population is living, is introduced. The variable I t defined for t ≥ 0 is referred to as the state whose value equals 0 when the population is in H 0 and equals 1 otherwise. The population dynamics at the migration times τ (k) 01 and τ (k) 10 are complemented with the SDEs (1)-(2) to complete the model description. We assume that a part of the population dies during the migrations. The survival rate of the population during the migration from H 0 to H 1 is specified as S 01 exp(α(1 − (K/X τ (k) 01 ) β )) with 0 < S 01 < 1 and α, β > 0; the exponential factor becomes S 01 for X τ (k) 01 = K. The exponential factor means that larger individuals have higher survival ability during the migration. The exponential functional form represents the increasing nature of the survival ability with respect to the body weight that can be related to higher swimming performance of larger fish [81][82][83]. The following theoretical consideration leads to β = 1/3. The distance of migration between the habitats H 0 and H 1 is denoted as d 01 , and the mortality per unit time of the individuals during the migration is denoted as λ 01 . The mean ground speed of the individuals is denoted as U 01 . Then, the mortality per one migration event is estimated to be scaled as O(exp(−λ 01 d 01 /U 01 )). For fish in particular, the cruising speed, which can be identified with U 01 , is scaled with the body size X as O(X 1/3 ) [84,85].
The survival rate during the migration from H 1 to H 0 is denoted as 0 < S 10 < 1. We assume that there is no change of body weight at τ (k) 10 . Recall that the generation change occurs at τ (k) 10 . The body weight of the hatched individuals is denoted as x > 0. The total number of eggs per individual (fecundity) is related to the body weight and is here formulated based on the allometric scaling aX b τ (k) 10 number of individuals born at τ (k) 10 is evaluated as aS 10 per individual. Based on the report that the fecundity is a power function of the body weight with b > 1 [86,88] and b = 1 [72], we assume b ≥ 1.
In summary, the population dynamics at the migration times are as follows: the migration without reproduction and the migration with reproduction Here, X t+0 = lim s→+0 X t+s for t ≥ 0.

Remark 2.1:
The present model can be seen as a stochastic counterpart of the deterministic models [77,78]. Our model has an advantage that the switching points of the life history, like migration and reproduction, are decided dynamically and naturally in a state-dependent manner.

Objective function
The objective function is a fitness maximized by the population through their life cycle subject to the population dynamics formulated in the previous sub-section. The admissible set of the control variables τ (k) 01 and τ (k) 10 (k ∈ N) has to be defined for formulating the objective function. A natural filtration generated by the Brownian motion (B t ) t≥0 is denoted as F = (F t ) t≥0 . As in the standard setting (Chapter 5 of Pham [46]), we assume that τ (k) 01 and τ (k) 10 are adapted to F, meaning that the decision-making at the current time is based on latest available information. The admissible set of τ (k) 01 and τ (k) 10 is denoted as T , and is defined as We call τ ∈ T an admissible strategy. Now, the objective function to be optimized by the population is presented.
The conditional expectation with respect to (N t , X t , I t ) = (n, x, l) is denoted as E n,x,l . The terminal time of the population dynamics, which is an auxiliary variable for mathematical formulation, is denoted as T 0 > 0 and is chosen to be sufficiently large. Mathematically, specifying some terminal time is necessary for derivation of the optimality equation in time-dependent problems. The main interest of the present model focusing on the life cycle is long-term dynamics, which corresponds to the case with T 0 → +∞. We approach this limit numerically.
The objective function is the total reproduction success from the current time: with a weighting constant w > 0 to non-dimensionalize φ, and k min = k min (t) and k max = k max (T 0 ) are the largest and smallest k ∈ N such that t ∈ M (k) 10 and T 0 ∈ M (k) 10 , respectively. A similar objective function has been used for population dynamics of fish migration in Omori et al. [89]. The objective function (6) is mathematically simpler than those of the previous models [57,58] in the sense that the cumulated profits gained in the population are not involved. There are at least three reasons of omitting these terms. The first is for mathematical simplicity such that the degenerate parabolic part of the resulting optimality equation has a simpler and more tractable form. The second is that it is reasonable to evaluate prosperity of the population through reproduction success. The third, which is related to the second one, is that the present mathematical framework with this objective function allows us to give a new formulation of the basic reproduction number as an effective measure of the prosperity as demonstrated later.
The objective function (6) is a sum of the reproduction successes in a long period. It therefore inherits the concept of evolutionary biology that the population dynamics is optimized in a long period and potentially settles down in an evolutionary stable one. In addition, fecundity can be a metric of fitness as employed in Johansson et al. [60] and Mangel [22], indicating a linkage between the presented and existing models. The linearity of the objective function with respect to the population harmonizes with the linearity of the population dynamics (1) and is considered to be valid when there is no densitydependence. This formulation is justified especially if the population is homogeneous and differences among individuals are sufficiently small. Notice that a theoretical difference between the fitness models and our model is that our model may have only one optimal strategy as the computational results in Section 3 suggest, while there may be more than one optimal strategies in the fitness models [90].
The maximized objective function φ with respect to the migration strategy τ ∈ T is called value function = (t, n, x): By (6), we naturally get the terminal condition The admissible strategy to achieve the maximum of (7) is called the optimal strategy and is denoted as τ * = (τ for any stopping time ν ∈ [t, T] adapted to F.

Remark 2.2:
The objective function (6) does not have the discount factor commonly used in SDP models [46]. Through derivation of the optimality and reduced optimality equations, we show that the decreasing nature of the Equation (1) implicitly specifies the mortality rate R l as a discount rate.

Optimality equation
The optimality equation is the governing equation of , from which the optimal strategy τ * is constructed. For generic sufficiently regular g : , 1} → R, set the operators L l , M 01 , and M 10 as Assume l = 0 and k min ≤ k ≤ k max . From the dynamic programming principle (9), we derive the optimality equation for t < T 0 as follows [46]: if t = T (k),+ 01 , Otherwise, Similarly, for l = 1 and t < T 0 , we have the following result: if t = T (k),+ 10 , , Otherwise, The Equations (14) and (17) (15) and (18) means that the population cannot migrate except during the migration periods.
The above-derived optimality equation can be more compactly described through introducing auxiliary piecewise continuous variables A t,l (l = 0, 1): The variables A t,0 and A t,1 are chosen so that they are Lipschitz continuous inside of each M (k) 01 and M (k) 10 , respectively. Then, we can rewrite the optimality equation as where we set M l,1−l = M 01 if l = 0 and M l,1−l = M 10 otherwise. (20), the optimality equation has non-local operators (11)-(12) that do not appear in the standard problem [46]. In addition, the Hamiltonian associated with the equation is discontinuous with respect to t as shown from (19) to (20), posing an advanced mathematical problem. These issues are not directly analysed but handled numerically in Section 3.

Reduced optimality equation
The optimality Equation (20) for t < T, 0 ≤ x ≤ K, l = 0, 1 with the operators defined for generic sufficiently regular g : The reduced optimality Equation (21) has the same discontinuity with the optimality equation. It inherits the non-local operations as well. Notice that the reduced optimality Equation (21) has the same mathematical information with the original one (20) because what we have used to derive the former is the linearity inherent in the performance possesses.

Optimal migration strategy
As inferred from Pham [46], solving the reduced optimality Equation (21) can lead to the optimal migration strategy τ * . Set D (k) 01 and D (k) 10 , which are referred to as the migration sub-domains, as and Then, the optimal migration strategy τ * can be constructed as follows.
• If (t, X t ) ∈ D (k) 01 and I t = 0, then migrate from H 0 to H 1 . 10 and I t = 1, then migrate from H 1 to H 0 . • Otherwise, do not migrate.
Finding the optimal migration strategy is thus achieved by solving the reduced optimality Equation (21). The theoretical result on the optimal migration strategy τ * shows that the migration times explicitly depend on the body weight X. For fish migration, this is consistent with the field observation results that the size is a critical factor affecting migration timing [44,91,92]. Therefore, the size-dependence of migration strategies is naturally built-in the SDP-based present model demonstrating its advantageous point.

Basic reproduction number
The present mathematical formulation allows us to give a new formulation of the basic reproduction number R through the value function . Our formulation is based on an asymptotic counterpart of the value function with a large terminal time T 0 . Dependence of on k max is denoted as k max . The same notation applies to . For sufficiently large T 0 , we suggest the ansatz for not large k: based on the basic reproduction number R for time-discrete systems [68], because of the linearity of (1), (3), and (4) with respect to the variable N. With the help of the ansatz and the linear dependence of the value function on n, we infer Therefore, the population is judged to be increasing if R > 1. If R ≤ 1, then the population is judged to be non-increasing. Notice that the asymptotic result (28) is derived under an assumption of the density-independence of the population that can be justified if the population is not dense in the habitats. Numerically, the basic reproduction number R can be effectively computed if the reduced optimality equation is approximated for sufficiently large k max ∈ N.
To see that the formula (28) is reasonable, consider the following simplified deterministic system (σ = 0) where the migration times are a priori set as τ (k) 01 = (k − 1)T + τ 01 and τ (k) 10 = (k − 1)T + τ 10 for k ∈ N and constants 0 < τ 01 < τ 10 < T. We get On the other hand, we have and thus Consequently, we derive supporting (28). The result (34) implies that (28) may not work effectively if we want to distinguish the cases 0 < R < 1 and R = 1, but has no problem if we focus on whether R > 1 or not, which is the case often encountered in biological modelling. The formula also implies k max +1 − k max = 0 for 0 < R ≤ 1 as k max → +∞, provided k max is positive under this limit. For a model with density-dependent population dynamics and/or an objective function depending nonlinearly on the total population N, the formula (28) would not apply in general. In such a case, R can be computed as follows: solve the corresponding HJB equation and find the optimal migration strategy. Then, simulate the population dynamics with numerical method like a Monte-Carlo method based on the optimal migration strategy. This is a straightforward numerical algorithm, but may be time-consuming.

Remark 2.4:
In our problem, we conjecture that 0 < R < 1 does not occur due to existence of the source, which is the last term wS 10 ax b n of (12) (equivalently, the term wS 10 ax b of (24)), with which the population never go extinct (N = 0) unless n = 0. This conjecture is verified in our numerical computation.

Remark 2.5:
The linearity assumption (SDE (1)) is a key to derive the basic reproduction number R as its derivation procedure suggests. The discussion on R is valid only if density-dependence is absent, such that the population dynamics except at the migrations follows the exponential decay. Under density-dependence, the derivation procedure of R will not be applicable and the analysis carried out in Section 3.3.2 will become meaningless. Evaluating R under density-dependence will require a more sophisticated mathematical approach so that the nonlinear population decrease can be handled in the current mathematical framework.

Several mathematical results
We briefly summarize mathematical analysis results on the optimality equation. Firstly, we can theoretically bound the value function both from above and below, implying existence of the optimal migration strategy τ * .

Proposition 2.1: There is exists a constant
The proposition below implies a possible discontinuity of the value function . The value function (t, n, x, 0) (resp., (t, n, x, 1)) is in general not continuous at each t = T (k),± 01 and (resp., at each t = T (k),± 10 ). As an example, set t = T (k),+ 01 . If the population is still living in H 0 at the time just before this t, then the population has to immediately migrate toward the habitat H 1 . We have (t, N t , X t , 0) = (t + 0, N t+0 , X t+0 , 1) because X t = X t+0 . The Equation (35) does not necessarily lead to continuity of . The same applies to . Our numerical computation example supports the above-mentioned discontinuity of . From the modelling viewpoint, it is reasonable to suppose discontinuity along t = T (k),± 01 and t = T In practical analysis, the potential discontinuity of can be handled as follows. At t = T (k),+ 01 , we can formally find (t, n, x, 0) through (t, n, x, 0) = (t, S 01 exp(α(1 − (K/x) β ))n, x, 1) (36) Coupling (36) with (14) leads to (t, n, x, 1), with which the right-hand side of (36) is determined. Then, we obtain (t, n, x, 0) from (36). A similar procedure applies to (t, n, x, 1) at t = T (k),+ 10 . Essentially the same applies to (t, x, l) as well.

Remark 2.7:
Solutions to HJB equations, like our optimality and reduced optimality equations, are usually handled with the concept of viscosity solutions [93], which are appropriate weak solutions to these equations. By Proposition 2.2, it is straightforward to see that the value function satisfies the optimality equation in a viscosity sense except at t = T (k),± 01 , T (k),± 10 , by following an argument of Theorem 3.5 of Lv et al. [94] without jumps. However, the possible discontinuity at t = T (k),± 01 , T (k),± 10 is a difficulty to show the viscosity property globally. We expect that this difficulty may be overcome via the concept of discontinuous viscosity solutions [95], which is beyond the scope of this paper and will be addressed in our future research.

Application
The present mathematical model is applied to computing the value function, optimal migration strategy, and basic reproduction number with the help of a numerical technique. The objective of this section is not predicting fish migration in a practical problem, but rather comprehending behaviour of the solution to the optimality equation. An emphasis is put on the juvenile period in the life history, which possibly critically affects the reproduction success.

Target species
The target species is the fish P. altivelis in Japan. Along with the present mathematical setting, the general life history of the fish in natural environment is briefly explained as follows (for more detail, see Iguchi [71] and Yoshioka and Yaegashi [70]). In autumn 10 ), the larvae hatch out in downstream of a river immediately drift to coastal areas (H 0 ) where they spend the winter months. In spring (t = τ (k) 01 ∈ M (k) 01 ), juveniles start an upstream migration, then feed and grow within the river (H 1 ) during summer. Subsequently, the mature adults spawn and die in late autumn.
The model parameters are identified as follows with the above-presented empirical life history as a reference. The period T is 365 (day) and set the one-year period [(k − 1)T, kT) (k ∈ N) as a year from the beginning of January 1 to the end of the coming December 31. For each k ∈ N, set M (k) 01 as the two-month period starting from the beginning of April (T 01 = 120 (day), ω 01 = 30 (day)). Similarly, for each k ∈ N, set M (k) 10 as the two-month period starting from the middle of October (T 10 = 325 (day), ω 10 = 30 (day)).
The model parameters for the population dynamics are identified based on the literature on the empirical observation results of the population dynamics of the fish as follows: S 01 = 0.5 based on an assumption that S 01 = O(10 −1 ); S 10 = 1.0 assuming that almost all of the adults can successfully reproduce; K = 120 (g), μ 1 = 0.08 (1/day), and σ 1 = 0.15 (1/day 1/2 ) based on Yoshioka et al. [57]; R 1 = 0.01 (1/day) based on Yoshioka and Yaegashi [70]; μ 0 = 0.06 (1/day), σ 0 = 0.30 (1/day 1/2 ), and R 0 = 0.02 (1/day) assuming that in the Habitat H 0 the juveniles are subject to a more harsh environment than the Habitat H 1 ; a = 70, 000 and b = 1 based on the empirical observation that the reproduction per unit weight (g) of the fish is O(10 2 ) [72]; x = K/100 and α = 2 (1/day) for the sake of simplicity due to the lack of data for their specification, but we have found that changing their magnitudes several times do not seem to critically affect quality of numerical solutions presented below. Finally, we set w = 1 without loss of generality. The above-presented parameter values are used unless otherwise specified.

Numerical method
The reduced optimality equation is discretized based on an established finite difference scheme [34]. The scheme applies an exponentially-fitted spatial discretization and the fully-implicit temporal discretization to the degenerate partial differential operatorsL l and the linear search technique [96] to the non-local operatorsM l,1−l , so that the discretized equation satisfies the positive coefficient condition [97]. Being different from Yoshioka et al. [34], the operators M l,1−l are handled in a fully-implicit manner in time for guaranteeing computational stability while maintaining mathematical consistency. The positive coefficient condition guarantees monotonicity and stability of a numerical scheme for HJB equations, with which numerical solutions of the scheme are uniformly bounded and satisfy a discrete counterpart of maximum principles. Consistency of the present scheme, at least except at t = T (k),± 01 , T (k),± 10 , is straightforward issue of using the exponential discretization and the linear search technique. Consequently, the present scheme is stable, monotone, and consistent for most of the computational domain. Therefore, under the strong comparison assumption commonly employed in HJB and related equations [97], by a straightforward application of Theorem 2.1 of Barles and Souganidis [98], the scheme can generate converging numerical solutions toward the (possible discontinuous) viscosity solution locally uniformly. Performance of similar numerical schemes have already been verified against a variety of HJB equations arising in environmental and ecological problems [34,57,73], demonstrating their satisfactory ability to handle degenerate parabolic problems.
We set the computational time as T 0 = 30T, which has been found to be a sufficiently long period for analysing the well-established annual optimal migration strategy, which is identified with the numerical solutions in (0, T) × (0, K). The computational domain (0, T 0 ) × (0, K) is uniformly divided into 30 × 365 × 100 and 1000 intervals in the t and x directions, respectively. This computational resolution has been found to be sufficiently fine to carry out the numerical analysis below. Figures 2 and 3 show the computed (reduced) value function l = (t, x, l) that is denoted as with an abuse of notations for l = 0, 1, respectively. Figure 4 shows the migration subdomains D 01 and D 10 , where their subscript (k) has been omitted for the sake of simplicity   and M 10 , respectively, validating our consideration on the optimal migration strategy in Section 2.6. Figure 5 through Figure 7 show the dependence of the sub-domain D 01 on the mortality rate R 0 , deterministic growth rate r 0 , and the stochastic growth rate σ 0 . These are key parameters shaping the juvenile life history of the fish in the habitat H 0 .   Figure 6 show that the dependence of the optimal migration strategy from H 0 to H 1 is monotone on the parameters R 0 and r 0 . The computational results on R 0 show that the migration occurs at an earlier growth stage if the mortality rate is higher in the habitat H 0 , implying that a higher predation pressure may trigger an earlier migration. On the other hand, the computational results on r 0 indicate that a higher deterministic growth rate implies the migration at a later growth stage. Figure 7 shows that the dependence of the optimal migration strategy from H 0 to H 1 would not be critically affected by the stochastic growth rate σ 0 . However, the computational results on the basic reproduction number carried out in the next sub-section demonstrate that this parameter critically affects the reproduction success of the population eventually.

Basic reproduction number
The basic reproduction number R emerges when computing the value function and optimal migration strategy is computed for different parameter values. The computation here focus on the dependence of R on the life history during the juvenile period of the fish, which can be identified as the period that the population is living in the habitat H 0 . Figure 8 through Figure 11 plot the basic reproduction number R against different values of the model parameters: the deterministic growth rate r 0 (1/day), the stochastic growth rateσ 0 (1/day 1/2 ), the mortality rate R 0 (1/day), and the coefficient a of fecundity, respectively. In these figures, the grey circles represent R > 1, while white circles represent R = 1. Numerically, we found that R ≥ 1, suggesting that the case 0 < R < 1 can be excluded in practice, as implied in Remark 2.4.
The computational results in Figure 8 through Figure 11 imply continuous and monotone dependence of R on the examined model parameters, and suggest that more reproduction success can be with higher deterministic growth, smaller growth fluctuations, smaller mortality, or higher fecundity. In addition, for each parameter, there seems to exist a threshold value above or below which the basic reproduction number R numerically equals 1. Therefore, from the standpoint of the present mathematical model, sustainability of the population dynamics would be suddenly abandoned if some parameter value crosses the threshold from the R > 1 side to the other side where R = 1. The computational result in Figure 9    if σ 0 ≥ 0.346. Since 2μ 0 > σ 2 0 is the condition that the body weight of the individuals increases as the time elapses (Theorem 2.2 of Lungu and Øksendal [80]), Figure 9 implies that the condition 2μ 0 > σ 2 0 is required for sustainable population growth where R > 1. At the same time, the figure also implies that the sustainable population growth can be possibly achieved when under the stochastic environment if 2μ 0 > σ 2 0 . Overall, the computational results indicate critical importance of the environmental conditions during the juvenile period in the life history of the fish P. altivelis from the viewpoint of an SDP model: a new theoretical viewpoint. As demonstrated in this section, the present model can simulate the value function, the associated optimal migration strategy, and further sustainability of the population dynamics through the basic reproduction number R in a consistent way ( Figure 10).

Conclusions
An SDP formulation of migrating population dynamics between two habitats was proposed and was numerically computed based on the concept of stochastic optimal switching.  The impulsive migration assumption combined with the population dynamics model effectively reduced finding the optimal migration strategy to solving the (reduced) optimality equation as a system of quasi-variational inequalities. The model is theoretically advantageous because solving the optimality equation directly gives the optimized objective function, the associated optimal migration strategy, and the basic reproduction number at once. A finite difference scheme was implemented in numerical computation of the model focusing on an application to P. altivelis. The computational results implied dependence of the reproduction success on the model parameters. We demonstrated that the optimal switching formalism serves as a new mathematical tool that enables us to describe the state-dependent, and thus adaptive migration dynamics of population based on biological and environmental conditions. We used a logistic model for describing the biological growth, but the other models like the classical von Bertalanffy model [99] can be used alternatively within our mathematical framework. The resulting optimality equation will be different from ours in such a case, but the numerical technique will be applicable because the equation will still be a system of degenerate parabolic variational inequalities.
There are diverse extensions of the current mathematical model. The densitydependence ignored in this paper can be considered at the cost of increase of the complexity. Approaching the optimization part from a fitness viewpoint may open the door toward a new mathematical modelling to consider evolutionary stable migration strategies. The current model can be extended so that population dynamics having an age structure [100,101] is handled if the variables depending on the age-class are specified. Problems where the population migrates among more than two habitats [62] can also be handled through an increase of the total number of states using a Markov chain technique [61]. Considering the other biological scaling relationships for reproduction and mortality would enable the current model to handle migrating population dynamics of different species. Application of the current the model to predator-prey population dynamics will be feasible through considering a seasonal prey availability [77]. The current model can also be applied to population dynamics facing with environmental uncertainty [57], which can be theoretically achieved through considering the zero-sum differential game formulation [102] between the population and nature. Another advanced problem will be how to formulate migrating population dynamics where qualitatively different (for example, impulsive or gradual) migration strategies may arise depending on the environmental conditions [90]. Mathematical analysis of the model from the viewpoint of viscosity solutions to degenerate parabolic equations having a discontinuous Hamiltonian [103] is an important research topic from a mathematical viewpoint. Resolving this issue will deepen understanding of the model. From a management side, it is important to establish a harvesting policy and a habitat management policy considering sustainability of the fish population, so that the basic reproduction number is always greater than one. Currently, we are considering an application of the present model to modelling a life cycle of land-locked P. altivelis in Japan migrating between a reservoir and its upstream river.

Proof of Proposition 2.2:
Firstly, the Lipschitz continuity with respect to n ≥ 0 is trivial because of the relationship (t, n, x, l) = n (t, x, l) and (t, x, l) is bounded by Proposition 2.1. Secondly, the Lipschitz continuity with respect to 0 ≤ x ≤ K is proven as follows. The process X s (s ≥ t) subject to X t−0 = x ∈ [0, K] is denoted as X (t,x) s . Then, for 0 ≤ x, y ≤ K and τ ∈ T , there exists a constant C > 0 such that |φ(t, n, x, l; τ ) − φ(t, n, y, l; τ )| ≤ CE by b ≥ 1. Then, by the strong solution property of X (t,x) s , following, for some constant C > 0, we have |φ(t, n, x, l; τ ) − φ(t, n, y, l; τ )| ≤ bCK b−1 exp(C T)|x − y| (39) The Lipschitz continuity of immediately follows from (39) because 0 ≤ x, y ≤ K and τ ∈ T are chosen arbitrary.
Finally, the continuity with respect to t is proven as follows. Set l = 1. The proof for l = 0 is proven in a similar way. Firstly, assume that t is inside of M (k) 10 . Then, the continuity of (t, n, x, 1) is proven following Theorem 3.1 of Tang and Yong [104]. Theproof for (t, n, x, 0) is a straightforward consequence of the fact that the state switching from I t = 0 to I t = 1 not allowed if t is inside of M