The main idea is to "classify population as they age". Let me further explain it with an example:
There are 50k population (we are not going to care about if male or female for now). Inside these number there are kids [0 - 16], fertile[16 - 40], non-fertile [40 - 100].
Which would be a nice implementation to represent an evolving population data that is better or at least not too resource intensive as my example below?
Population // Array Age [0 -> 5] //Array a pop obj that stores data Age [5 -> 10] pop obj . . . Age[95 - 100] pop obj
This would be the structure and each tick happens this calculation:
FertilePop.count * fertility rate * (some other stuff) = numberOfBirths
numberOfBirths are added to the
and the rest of
Age[rang] are subtracted a number and added onto the next
Age[95 - 100] where they "die of old age".
This is purely background data and i am asking for a better solution/implementation that could be less complex, more dynamic and learn from it.
I expect to be able to do a graph plot so the user sees the pop evolution.
I took my interest in the matter from this link here to a population simulator.
Thanks for your interest in this question.