mastrof / MicrobeAgents.jl

Agent-based modeling of microbial motile behavior via Agents.jl
MIT License
2 stars 1 forks source link

New Motility interface #82

Closed mastrof closed 5 months ago

mastrof commented 5 months ago

Closes #78 and closes #77

Full rewrite of the motility interface. Current version is extremely more flexible although the complexity of microbe_step! has increased a bit.

The potential problems raised in #78 are not crucial and the usage of the Motility{N} even if not fully concrete brings, per se, even some minor performance improvements and significant improvements in memory usage. However, a performance bottleneck comes from the need to allow instantaneous turns (i.e. TurnState instances with duration=0) by branching inside microbe_step!; this is inefficient but it's the easiest way I have found to recover the past behavior (which I want to keep because it's the limit where simulations can be compared with theoretical results).

All in all, the performance is on par with v0.3, but memory usage is improved and the library is much more flexible. Will may be work on performance optimizations further down the road

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 66.91729% with 44 lines in your changes are missing coverage. Please review.

Project coverage is 41.58%. Comparing base (29daeb2) to head (ef97f68). Report is 2 commits behind head on main.

:exclamation: Current head ef97f68 differs from pull request most recent head 9425d40

Please upload reports for the commit 9425d40 to get more accurate results.

Files Patch % Lines
src/chemotaxis/xie.jl 0.00% 18 Missing :warning:
src/microbe_step.jl 58.97% 16 Missing :warning:
src/chemotaxis/brown-berg.jl 0.00% 2 Missing :warning:
src/chemotaxis/brumley.jl 0.00% 2 Missing :warning:
src/chemotaxis/celani.jl 71.42% 2 Missing :warning:
src/microbes.jl 33.33% 2 Missing :warning:
src/motility.jl 96.15% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #82 +/- ## ========================================== + Coverage 38.71% 41.58% +2.86% ========================================== Files 22 22 Lines 452 505 +53 ========================================== + Hits 175 210 +35 - Misses 277 295 +18 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.