The interplay between phenotypic and ontogenetic plasticities can be assessed using reaction-diffusion models