mastrof / Bactos.jl

Agent-based modeling framework for bacterial behavior, based on Agents.jl
MIT License
3 stars 0 forks source link

Mixed species models #22

Closed mastrof closed 1 year ago

mastrof commented 1 year ago

Currently, mixed species models require the type of the population to be specified explicitly.

microbes = [MicrobeBrumley{1}(id=1), MicrobeBrownBerg{1}(id=2)] returns a Vector{AbstractMicrobe{1}} but initialise_model expects eltype(microbes) to be concrete, i.e. we must specify microbes = Union{MicrobeBrumley{1},MicrobeBrownBerg{1}}[MicrobeBrumley{1}(id=1), MicrobeBrownBerg{1}(id=2)] to avoid errors.

This is cumbersome and should be managed either directly by initialise_models or by a new dedicated function that expands the microbe types.