project-gen3sis / R-package

Repository of the R-packageGen3sis
https://project-gen3sis.github.io/R-package/
GNU General Public License v3.0
29 stars 9 forks source link

misplaced loop_ecology() call #47

Closed cakloecker closed 3 years ago

cakloecker commented 3 years ago

loop_ecology() is currently called in line 270 in gen3sis_main.R script. As the observer is invoked before, observer output does not reflect ecology processes of this time step. https://github.com/project-gen3sis/R-package/blob/d7a65d8d4d010a5ccb48f1dd7930a35bb01ec584/R/gen3sis_main.R#L270

Documentation and comments in the code suggest that it should be called after the evolution step and prior to the end of loop updates in line 232. https://github.com/project-gen3sis/R-package/blob/d7a65d8d4d010a5ccb48f1dd7930a35bb01ec584/R/gen3sis_main.R#L226-L232

benj919 commented 3 years ago

Thanks for this bug report, that did indeed slip in there. It does also affect the stored values for the summaries.