マルサスモデル
Contents
呼称
- マルサスモデル (Malthusian model)
概要
マルサスモデルとは、ある生物の個体群サイズの指数関数的な増加あるいは現象を記述する数理モデル。
モデル
マルサスモデルでは、ある生物の個体数 $P$ の増加速度が個体数自体に比例するとして、次のように個体数増加速度 $dP/dt$ を表す。
\[ \frac{dP}{dt} = mP \]
- $t$ :時点
- $P$ : $t$ 時点での個体数
- $m$ :マルサス係数
ある時点における個体数
\[ P = P_0 e^{mt} \]
導出:
\[ \begin{aligned} \frac{dP}{dt} &= mP \cr \frac{dP}{P} &= mdt \end{aligned} \]
\[ \begin{aligned} \int{\frac{dP}{P}} &= \int{mdt} \cr \int{\frac{1}{P}dP} &= m\int{dt} \end{aligned} \]
\[ \ln{P} = mt + C \]
\[ \begin{aligned} P &= e^{mt+C} \cr &= e^C e^{mt} \end{aligned} \]
$t=0$ から $e^C$ を求める。
\[ \begin{aligned} P_0 &= e^C c^0 \cr e^C &= P_0 \end{aligned} \]
$e^C$ が $P$ の初期値 $P_0$ であるため、
\[ \begin{aligned} P &= e^C e^{mt} \\\ &= P_0 e^{mt} \end{aligned} \]
サンプルコード
モデル (Python 3)
import numpy as np
class MalthusianModel:
"""
マルサスモデル
"""
@staticmethod
def population(init: np.float, rate: np.float, time: np.float) -> np.float:
"""
Parameters
----------
init : np.float
初期個体数
rate : np.float
マルサス係数
time : np.float
時間
Returns
-------
population : np.float
個体数
"""
return init * np.exp(rate*time)
グラフ (Python 3)
import matplotlib.pyplot as plt
X = np.linspace(0, 10, 100)
plt.figure()
plt.title("Malthusian model")
plt.xlim(0, 8)
plt.ylim(0, 1000)
plt.xlabel("Time")
plt.ylabel("Population")
plt.plot(X, MalthusianModel.population(1., 1., X), label="init=1, rate=1.")
plt.plot(X, MalthusianModel.population(1., 2., X), label="init=1, rate=2.")
plt.plot(X, MalthusianModel.population(1., 4., X), label="init=1, rate=4.")
plt.legend()
plt.show()