agent-based model of population dynamics