Class PopulationDynamics
java.lang.Object
org.episteme.natural.biology.ecology.PopulationDynamics
Population dynamics models for ecology.
Provides:
- Exponential growth
- Logistic growth (Verhulst equation)
- Lotka-Volterra predator-prey model
- Competition models
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionstatic RealalleeEffectGrowthRate(Real n, Real r, Real a, Real k) Allee effect - reduced growth at low density. dN/dt = rN(N/A - 1)(1 - N/K)static RealcalculateGrowthRate(Real n0, Real nt, Real time) Exponential growth rate calculation. r = ln(Nt/N0) / tstatic RealCompetitive exclusion - Lotka-Volterra competition. dN1/dt = r1*N1 * (K1 - N1 - alpha12*N2) / K1static RealdoublingTime(Real growthRate) Doubling time for exponential growth. td = ln(2) / rstatic RealexponentialGrowth(Real p0, Real r, Real t) Exponential growth model (Malthusian).static Quantity<Dimensionless> exponentialGrowth(Quantity<Dimensionless> p0, Quantity<Frequency> r, Quantity<Time> t) Exponential growth model using Quantities.static RealInflection point of logistic curve (maximum growth rate).static ReallogisticGrowth(Real p0, Real r, Real K, Real t) Logistic growth model.static Quantity<Dimensionless> logisticGrowth(Quantity<Dimensionless> p0, Quantity<Frequency> r, Quantity<Dimensionless> K, Quantity<Time> t) Logistic growth model using Quantities.static ReallogisticGrowthRate(Real n, Real k, Real r) Logistic growth rate at population N. dN/dt = rN(1 - N/K)static Real[][]lotkaVolterra(Real prey, Real predator, Real alpha, Real beta, Real delta, Real gamma, Real timeStep, int steps) Solving Lotka-Volterra predator-prey equations using Euler method. dx/dt = alpha*x - beta*x*y (Prey) dy/dt = delta*x*y - gamma*y (Predator)static RealpredatorEquilibrium(Real alpha, Real beta) Lotka-Volterra equilibrium - predator population.static RealpreyEquilibrium(Real gamma, Real delta) Lotka-Volterra equilibrium - prey population.static Real[][]SEIRD Model (Susceptible, Exposed, Infectious, Recovered, Deceased).static Real[][]
-
Method Details
-
exponentialGrowth
public static Quantity<Dimensionless> exponentialGrowth(Quantity<Dimensionless> p0, Quantity<Frequency> r, Quantity<Time> t) Exponential growth model using Quantities. P(t) = P0 * e^(rt) -
exponentialGrowth
-
calculateGrowthRate
-
doublingTime
-
logisticGrowth
public static Quantity<Dimensionless> logisticGrowth(Quantity<Dimensionless> p0, Quantity<Frequency> r, Quantity<Dimensionless> K, Quantity<Time> t) Logistic growth model using Quantities. P(t) = K / (1 + ((K - P0)/P0) * e^(-rt)) -
logisticGrowth
-
logisticGrowthRate
-
inflectionPoint
-
lotkaVolterra
public static Real[][] lotkaVolterra(Real prey, Real predator, Real alpha, Real beta, Real delta, Real gamma, Real timeStep, int steps) Solving Lotka-Volterra predator-prey equations using Euler method. dx/dt = alpha*x - beta*x*y (Prey) dy/dt = delta*x*y - gamma*y (Predator)- Parameters:
prey- Initial prey populationpredator- Initial predator populationalpha- Prey growth ratebeta- Predation ratedelta- Predator reproduction rategamma- Predator death ratetimeStep- dtsteps- Number of steps to simulate- Returns:
- Real[][] where column 0 is prey, column 1 is predator (rows = steps)
-
preyEquilibrium
-
predatorEquilibrium
-
competitionGrowthRate
-
alleeEffectGrowthRate
-
seirdModel
public static Real[][] seirdModel(Real[] initialPop, Real beta, Real sigma, Real gamma, Real mu, Real dt, int steps) SEIRD Model (Susceptible, Exposed, Infectious, Recovered, Deceased). dS/dt = -beta * S * I / N dE/dt = beta * S * I / N - sigma * E dI/dt = sigma * E - (gamma + mu) * I dR/dt = gamma * I dD/dt = mu * I- Parameters:
initialPop- [S, E, I, R, D]beta- rate of spreadsigma- rate of progression (1/incubation)gamma- rate of recovery (1/infectious_to_recovery)mu- rate of mortality (1/infectious_to_death)dt- time stepsteps- number of steps- Returns:
- Real[steps][5] containing S, E, I, R, D
-
seirModel
-