Animal Foragin Debug - Cumulative prey densities and handling time#1401
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1401 +/- ##
===========================================
- Coverage 94.85% 94.84% -0.01%
===========================================
Files 71 71
Lines 7387 7455 +68
===========================================
+ Hits 7007 7071 +64
- Misses 380 384 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dalonsoa
left a comment
There was a problem hiding this comment.
The code looks correct - obviously, no idea about the science.
Having said that, having variables that include subindices (i, j) is very confusing. It feels they should be 2D arrays and not variable of function names. They are not informative of what they represent. what is i? and j? I know that was not implemented in this PR, but I have just seen it, so thought mentioning it.
Totally agree. A round of naming updates is on my to-do list for exactly that reason. The names they have currently are there to make it easy to compare to the paper they are drawn from. In the fairly near future I'll be changing them all. |
Description
This PR fixes some bugs in the animal foraging system.
H_i_j(handling time calculator) was keying off predator mass instead of prey massH_i_j, now correctly uses prey mass in the calculation.The cohort method
calculate_total_handling_time_for_predation, now correctly sums over available prey for determining density.Fixes #1317
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks