A modelling framework to explore bioenergetic effects of environmental stress and interspecific interactions