Simple Logarithmic Growth with Limit Function I need to simulate population growth that slows as it reaches the population maximum.
Each time the simulation ticks I want to figure out how much I grow my population by, towards a max limit.
So, starting at zero I would have big growth that would get smaller and smaller per tick as I reach MaxPopulation.
I would assume it'll use Log, but I don't know how to integrate the variables below to make it work.
Variables:


*

*CurrentPopulation.

*MaxPopulation.

*Growth.

 A: What you are probably interested in is logistic growth The link has all the formulas you need.
Briefly, the population $P(t)$ at time $t$ is given by an equation of the type
$$P(t)=\frac{KP_0e^{rt}}{K+P_0(e^{rt}-1)}.$$
Here $P_0$ is the population at time $t=0$ (you can select $t=0$ as you wish). 
The number $r$ is the growth rate when population is small and resources are plentiful. The number $K$ is the "limit" population size.
Added: If you are interested in the growth rate, the formula is quite a bit simpler. If $P=P(t)$ is the population at time $t$, then the growth rate at time $t$ is usually denoted by $\dfrac{dP}{dt}$. The formula for growth rate is
$$\frac{dP}{dt}=rP\left(1-\frac{P}{K}\right).$$
Just like before, $K$ is the limiting population size, $r$ is a constant that gives the rate of growth if resources were not limited, and $P$ is the current population.
The formula even works if current population happens to be greater than $K$. It then predicts a negative growth rate.
