Theoretical reservoir ecology and its applications