greenapplestoo
New member
- Joined
- Jan 12, 2018
- Messages
- 5
I am writing a computer program, a population simulator, where I start with a population of about 30 people, then let them pair off and have children. After watching a few generations, its clear they reproduce at an exponential rate. I haven't computed tan approximate function which describes this growth, but I suspect it can be described as an N^X function.
My problem is my population grows without limit. In real life, there are other factors which keep a population from growing forever: limited resources, wars, social mechanisms, etc. I to build that into my program somehow.
Let's say my unlimited exponential growth is described by some function f(x):
What I'd like is some secondary function, g(x), which I can multiply (or add or whatever) against f(x) that allows for initial exponential growth, but eventually introduces an upper bound which the combined function cannot overcome. Put graphically:
I didn't think this would be a hard problem, but when I cast about and to come up with my own g(x), the second function either does not really limit population growth, or it flattens it completely. Any suggestions for a g(x) which might accomplish what I seek?
Many thanks
My problem is my population grows without limit. In real life, there are other factors which keep a population from growing forever: limited resources, wars, social mechanisms, etc. I to build that into my program somehow.
Let's say my unlimited exponential growth is described by some function f(x):
Code:
f(x) = N^x
What I'd like is some secondary function, g(x), which I can multiply (or add or whatever) against f(x) that allows for initial exponential growth, but eventually introduces an upper bound which the combined function cannot overcome. Put graphically:
I didn't think this would be a hard problem, but when I cast about and to come up with my own g(x), the second function either does not really limit population growth, or it flattens it completely. Any suggestions for a g(x) which might accomplish what I seek?
Many thanks