264
Appendices
Searching for Basin Boundaries and Bifurcation Points. The domains of
attraction for the central foci in Figs. 5.6 and 5.7 were constructed by classifying trajectories starting from points on directed rays in the equilibrium
plane, given by Eq. (5.7), originating from the central focus. The boundary
between initial conditions attracted to and repelled from the central focus
was bracketed by a binary search algorithm. If p, Pot and PI denote points on
a directed ray in (P, C, Z) space, the algorithm can be illustrated by the following piece of pseudocode:
Locate a pair of initial conditions Po and PI' such that
- the trajectory starting from Po is attracted to the focus
- the trajectory starting from PI is repelled from the focus
repeat m times
locate the initial condition p at the midpoint between Po and PI
if the trajectory starting from p is attracted to the focus then Po = P
if the trajectory starting from p is repelled from the focus then PI =p.
The boundary will be bracketed between Po and PI at every iteration.
Since the distance between Po and PI is bisected at each iteration, the initial
interval will be reduced by a factor of 2 0m by this process. Each trajectory
was run for lOOO simulation days to ensure convergence to the attractor.
The binary search algorithm for locating the critical input P concentration pOL' where the limit cycle emerges, was quite similar:
Find PI such that a random trajectory is attracted to the focus when
PL=PI
find P z such that a random trajectory is attracted to the limit cycle when
PL=Pz
repeat m times
set P L = ~ (PI + P z )
set the initial condition to the end point of the last limit cycle
trajectory
if the trajectory is attracted to the focus then PI = ~ (PI + P z )
if the trajectory attracted to the limit cycle then P z = ~ (PI + P z )
Set pOL = ~ (PI + P z )
By random trajectory is here understood a trajectory starting from a
random initial condition. Random initial conditions were generated by
drawing independent, uniformly distributed pseudorandom variates P, C,
Z from the ranges 0 < P S P L , 0 < C S PiQ', and 0 < Z S Pi(}. Any set of
initial conditions that gave algal P content less than the subsistence quota
(PIC < Q1 or total P greater than the input concentration (P + qZ> P L ),
was rejected.
Appendices
Searching for Basin Boundaries and Bifurcation Points. The domains of
attraction for the central foci in Figs. 5.6 and 5.7 were constructed by classifying trajectories starting from points on directed rays in the equilibrium
plane, given by Eq. (5.7), originating from the central focus. The boundary
between initial conditions attracted to and repelled from the central focus
was bracketed by a binary search algorithm. If p, Pot and PI denote points on
a directed ray in (P, C, Z) space, the algorithm can be illustrated by the following piece of pseudocode:
Locate a pair of initial conditions Po and PI' such that
- the trajectory starting from Po is attracted to the focus
- the trajectory starting from PI is repelled from the focus
repeat m times
locate the initial condition p at the midpoint between Po and PI
if the trajectory starting from p is attracted to the focus then Po = P
if the trajectory starting from p is repelled from the focus then PI =p.
The boundary will be bracketed between Po and PI at every iteration.
Since the distance between Po and PI is bisected at each iteration, the initial
interval will be reduced by a factor of 2 0m by this process. Each trajectory
was run for lOOO simulation days to ensure convergence to the attractor.
The binary search algorithm for locating the critical input P concentration pOL' where the limit cycle emerges, was quite similar:
Find PI such that a random trajectory is attracted to the focus when
PL=PI
find P z such that a random trajectory is attracted to the limit cycle when
PL=Pz
repeat m times
set P L = ~ (PI + P z )
set the initial condition to the end point of the last limit cycle
trajectory
if the trajectory is attracted to the focus then PI = ~ (PI + P z )
if the trajectory attracted to the limit cycle then P z = ~ (PI + P z )
Set pOL = ~ (PI + P z )
By random trajectory is here understood a trajectory starting from a
random initial condition. Random initial conditions were generated by
drawing independent, uniformly distributed pseudorandom variates P, C,
Z from the ranges 0 < P S P L , 0 < C S PiQ', and 0 < Z S Pi(}. Any set of
initial conditions that gave algal P content less than the subsistence quota
(PIC < Q1 or total P greater than the input concentration (P + qZ> P L ),
was rejected.
