Closed mastrof closed 5 months ago
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: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.Motility{N}
type represents a motile pattern as a series ofN
MotileState
s with prescribed transition probabilities.Run
,Tumble
,Reverse
,Flick
,Stop
) or custom ones (viaRunState
orTurnState
)turn_rate
has been removed from microbe types; instead, eachMotileState
has aduration
field. With this approach, also rotations can have finite durations (#77)AbstractMicrobe
now has two type parameters:D
for dimensionality andN
for the number of steps in the motile pattern.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 withduration=0
) by branching insidemicrobe_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