Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an abstract Chemotaxis type to be used as field in Microbe #55

Open
mastrof opened this issue Sep 30, 2023 · 1 comment
Open
Labels
breaking Breaking change

Comments

@mastrof
Copy link
Owner

mastrof commented Sep 30, 2023

Instead of defining a different AbstractMicrobe type for each model of chemotaxis, there could be a single Microbe type with a parameter C<:Chemotaxis and a field chemotaxis::C field which would wrap the entire chemotactic system of the microbe.

Rather than enforcing a structure to follow for new microbe types, it would then only be required for the Chemotaxis struct to follow some prescribed rules.

Such a refactoring might also make it easier to implement further behavioral traits down the road (e.g. chemokinesis, interactions...) and separate the integration of "internal states" from the motion itself.

Types, however, are an issue.
Fast execution requires the struct types to be concretely typed (which is also a problem for AbstractMotility right now), which means that each behavioral trait would need its own parameter if a generic interface is to be provided.
This will eventually lead to breaking changes whenever new traits with their own type have to be added, and will require Microbe to store a load of type parameters most of which are not going to be used simultaneously in typical scenarios.

@mastrof mastrof added the breaking Breaking change label Sep 30, 2023
@mastrof
Copy link
Owner Author

mastrof commented Mar 22, 2024

This is probably not a good idea. The rewrite of motility types (#78) should provide a relatively robust interface and allow for efficient models without modifying the current implementation of chemotaxis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change
Projects
None yet
Development

No branches or pull requests

1 participant