Bottom-up ecology: an agent-based model on the interactions between competition and predation