離散指数増殖・ロジスティック成長モデル
世代が区切られた生物の個体数変動を差分方程式 (difference equation)で記述する.
離散指数増殖モデル (discrete exponential growth model)と離散ロジスティック成長モデル (discrete logistic growth model)を実装し,平衡点 (equilibrium point)と局所安定性 (local stability)を調べる.
離散指数増殖モデル¶
世代 における個体数を ,1世代あたりの増殖率を ,マルサス係数 (Malthusian coefficient) とすると,
なら個体数は増加, なら一定, なら減少する.
実装¶
a,x,t をそれぞれ増殖率,個体数,世代とし,初期値から100世代分の時間発展を計算する.
# 離散指数増殖モデル(1)
import matplotlib.pyplot as plta = 0.1
x = 1
t = 0
t_list = [t]
x_list = [x]
for i in range(100):
t = t + 1
x = x + a * x
t_list.append(t)
x_list.append(x)plt.plot(t_list, x_list)
プロットの整え方¶
plt.plot に書式指定文字列(色+マーカー・線種)を渡すことで表示を変えられる.
# フォーマットの変更1
plt.plot(t_list, x_list, "ro")
# フォーマットの変更2
plt.plot(t_list, x_list, "k--")
複数のパラメータで結果を重ねてプロットするには,plt.plot に複数の (x, y) の組を渡す.
# 複数のデータのプロット2
x_lists = []
for a in [0.1, 0.11, 0.12]:
x = 1
t = 0
t_list = [t]
x_list = [x]
for i in range(100):
t = t + 1
x = x + a * x
t_list.append(t)
x_list.append(x)
x_lists.append(x_list)plt.plot(t_list, x_lists[0], t_list, x_lists[1], t_list, x_lists[2])
タイトルと軸ラベルを付けて図の意味を明示する.
# タイトル・軸ラベル1
plt.plot(t_list, x_list)
plt.title("Exponential growth")
plt.xlabel("Time (t)")
plt.ylabel("Pop. size (x)")
# タイトル・軸ラベル2
plt.plot(t_list, x_list)
plt.title("Exponential growth", fontsize="xx-large")
plt.xlabel("Time (t)", fontsize="x-large")
plt.ylabel("Pop. size (x)", fontsize="x-large")
解像度・図サイズの調整¶
plt.figure(dpi=...) で解像度を,figsize=[幅, 高さ] で図のサイズ(インチ単位)を指定できる.
# 解像度の変更
plt.figure(dpi=200)
plt.plot(t_list, x_list)
# プロットサイズの変更
plt.figure(figsize=[5, 7])
plt.plot(t_list, x_list)
線とマーカーを重ねた表示の例を示す.
# 離散指数増殖モデル(2)
a = 0.1
x = 1
t = 0
t_list = [t]
x_list = [x]
for i in range(100):
t = t + 1
x = x + a * x
t_list.append(t)
x_list.append(x)plt.figure(dpi=200)
plt.plot(t_list, x_list, "-", t_list, x_list, "r.")
plt.title("Exponential growth", fontsize="xx-large")
plt.xlabel("Time (t)", fontsize="x-large")
plt.ylabel("Pop. size (x)", fontsize="x-large")
離散ロジスティック成長モデル¶
離散ロジスティック成長モデル (discrete logistic growth model) は密度依存性 (density dependence)(個体数増加に伴い増殖率が低下する効果)を取り入れたモデルで,以下で定義される:
ここで,
:内的自然増加率 (intrinsic rate of increase) — 個体数が十分小さいときの1世代あたりの増殖率
:環境収容力 (carrying capacity) — 環境が支えることのできる個体数の上限
Solution to Exercise 1
r = 0.5
K = 100
N = 1
t = 0
t_list = [t]
N_list = [N]
for i in range(50):
t = t + 1
N = N + r * N * (1 - N / K)
t_list.append(t)
N_list.append(N)
plt.figure(dpi=200)
plt.plot(t_list, N_list, "-", t_list, N_list, "r.")
plt.title("Logistic growth", fontsize="xx-large")
plt.xlabel("Time (t)", fontsize="x-large")
plt.ylabel("Pop. size (N)", fontsize="x-large")
平衡点と局所安定性¶
平衡点 (equilibrium point) とは を満たす個体数で, とおくと の解として求まる.
離散ロジスティック成長モデルの平衡点は:
(自明平衡点 — 個体群が絶滅した状態)
(非自明平衡点 — 環境収容力に達した状態)
局所安定性 (local stability) は の絶対値で判定する.
より, では . のとき なので は局所安定となる.
パラメータと動態の多様性¶
の値に応じて離散ロジスティックモデルは単安定・周期振動・カオスなど多様な動態を示す.
演習¶
Solution to Exercise 2
plt.figure(dpi=150)
for a in [-0.1, 0.0, 0.05, 0.1, 0.2]:
x = 1
t = 0
t_list = [t]
x_list = [x]
for i in range(50):
t = t + 1
x = x + a * x
t_list.append(t)
x_list.append(x)
plt.plot(t_list, x_list, label=f"a = {a}")
plt.title("Discrete exponential growth")
plt.xlabel("Time (t)")
plt.ylabel("Pop. size (x)")
plt.legend()
Solution to Exercise 3
def discrete_logistic(r, K, N0, n_steps):
N = N0
t_list = [0]
N_list = [N]
for i in range(n_steps):
N = N + r * N * (1 - N / K)
t_list.append(i + 1)
N_list.append(N)
return t_list, N_list
for r in [0.5, 1.5, 2.0, 2.5, 2.9]:
t_list, N_list = discrete_logistic(r, K=100, N0=1, n_steps=200)
plt.figure(dpi=120)
plt.plot(t_list, N_list, "-")
plt.title(f"Discrete logistic, r = {r}")
plt.xlabel("Time (t)")
plt.ylabel("Pop. size (N)")
plt.show()




が小さいうちは への収束だが, が大きくなるにつれて振動が現れ,さらに不規則な動態(カオス)が現れる.