Conversation
…n the foraging system.
…call in the update cycle.
…d of animal exporter.
…t -1, removed erroneous cell_id in config toml, forced int in bfs_territory.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1270 +/- ##
===========================================
- Coverage 95.02% 94.97% -0.05%
===========================================
Files 71 71
Lines 7274 7344 +70
===========================================
+ Hits 6912 6975 +63
- Misses 362 369 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
davidorme
left a comment
There was a problem hiding this comment.
LGTM - just one question.
| # Internal state (match your refactor) | ||
| exporter._cohort_output_mode = "w" | ||
| exporter._trophic_output_mode = "w" | ||
| exporter._write_cohort_header = True | ||
| exporter._write_trophic_header = True |
There was a problem hiding this comment.
Are these separated because it is possible that you might start outputting only to cohorts and not get interactions until later. For example, if you only had adult varanids in the simulation, and they just get hungrier and hungrier until some baby varanids turn up to eat?
There was a problem hiding this comment.
My thinking at the time was simply that keeping them distinct helps with debugging and updating down the road. I suppose it could be used for that as well.
…s://github.com/ImperialCollegeLondon/virtual_rainforest into 1247-animal-model---trophic-interaction-output
Description
This PR builds on the existing cohort exporter to export a second csv file detailing every trophic interaction that occurs over the course of the model run. The purpose of this data export is so that the data team can build food web time-series.
The way it works is that each cohort has a new dict attribute called trophic_record. Every trophic interaction the cohort has is stored in this dict. At the end of each time step, this information is dumped into the csv and then the attribute is reset.
New additions:
Fixes # (issue)
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks