Class PopulationDynamics

java.lang.Object
org.episteme.natural.biology.ecology.PopulationDynamics

public class PopulationDynamics extends Object
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 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

      public static Real exponentialGrowth(Real p0, Real r, Real t)
      Exponential growth model (Malthusian). P(t) = P0 * e^(rt)
    • calculateGrowthRate

      public static Real calculateGrowthRate(Real n0, Real nt, Real time)
      Exponential growth rate calculation. r = ln(Nt/N0) / t
    • doublingTime

      public static Real doublingTime(Real growthRate)
      Doubling time for exponential growth. td = ln(2) / r
    • 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

      public static Real logisticGrowth(Real p0, Real r, Real K, Real t)
      Logistic growth model. P(t) = K / (1 + ((K - P0)/P0) * e^(-rt))
    • logisticGrowthRate

      public static Real logisticGrowthRate(Real n, Real k, Real r)
      Logistic growth rate at population N. dN/dt = rN(1 - N/K)
    • inflectionPoint

      public static Real inflectionPoint(Real k)
      Inflection point of logistic curve (maximum growth rate). Occurs at N = K/2
    • 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 population
      predator - Initial predator population
      alpha - Prey growth rate
      beta - Predation rate
      delta - Predator reproduction rate
      gamma - Predator death rate
      timeStep - dt
      steps - Number of steps to simulate
      Returns:
      Real[][] where column 0 is prey, column 1 is predator (rows = steps)
    • preyEquilibrium

      public static Real preyEquilibrium(Real gamma, Real delta)
      Lotka-Volterra equilibrium - prey population. N* = gamma/delta
    • predatorEquilibrium

      public static Real predatorEquilibrium(Real alpha, Real beta)
      Lotka-Volterra equilibrium - predator population. P* = alpha/beta
    • competitionGrowthRate

      public static Real competitionGrowthRate(Real n1, Real n2, Real r1, Real k1, Real alpha12)
      Competitive exclusion - Lotka-Volterra competition. dN1/dt = r1*N1 * (K1 - N1 - alpha12*N2) / K1
    • alleeEffectGrowthRate

      public static Real alleeEffectGrowthRate(Real n, Real r, Real a, Real k)
      Allee effect - reduced growth at low density. dN/dt = rN(N/A - 1)(1 - N/K)
    • 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 spread
      sigma - rate of progression (1/incubation)
      gamma - rate of recovery (1/infectious_to_recovery)
      mu - rate of mortality (1/infectious_to_death)
      dt - time step
      steps - number of steps
      Returns:
      Real[steps][5] containing S, E, I, R, D
    • seirModel

      public static Real[][] seirModel(Real[] initialPop, Real beta, Real sigma, Real gamma, Real dt, int steps)