A modelling framework for understanding social insect foraging