Disclaimer: the automatically generated English translation is provided only for convenience and it may contain wording flaws. The original French document must be taken as reference!
Goals:
Refine the behavior of single-flagellated bacteria. Introduce new types of bacteria that compete for access to nutrients: hook-bearing bacteria and bacteria capable of moving in groups.
The provided archive
therefore contains a new version of CMakeLists.txt that allows you to compile the materials in this section. It also contains :
Various new test files located in the subdirectory src/Tests.
A new simulation core Application.[hpp][cpp] from which all your graphical simulation tests in this section will be derived.
New resources in the res/ directory.
For this step you will work in the directory partie4/.
General description of the classes to be produced
We are currently able to simulate, over time, the evolution of a colony of single-flagellated bacteria capable of basic movement, consuming food, and dying.
Their mode of movement remains somewhat unnatural and not very conducive to finding nutrient sources, and they are not yet capable of mutating or dividing.
This phase of the project will address these issues.
The next step will be to pit our single-flagellated bacteria against bacteria with different capabilities, particularly in terms of mobility :
pilus-mediated bacteria (see the project description), modeled using the PilusMediatedBacterium class; moving using a pilus;
and bacteria capable of moving in groups, modeled using the GroupMotilityBacterium class.
For the second type of bacteria, the concept of a group will also need to be modeled (using a BacteriaGroup class).
To summarize, here is the basic architecture you should have achieved by the end of this step :
Let's get started with the coding now. In your program, be sure to encapsulate your classes properly, specifically by not giving public or protected access to your attributes.
You should also always take care to include destructors.
To complete this step, a data structure you haven’t used yet will come in handy.
This is the concept of an «associative map», which comes in two variants in C++ (map or unordered_map) and generalizes the concept of an array.
Here is a brief introduction with an example.
Modules to Program
This section requires programming the following three modules :
By the end of this step, you will have completed the model of single-flagellated bacteria. You will also be able to add two new types of bacteria to your culture dish, including this example of pilus bacteria :
The provided tests will only allow you to create one new type of bacteria at a time.
It is indeed much easier to observe the co-evolution of different types of bacteria by plotting graphs.
This is the goal of the next step. Once these tools are in place, you will be able to have different types of bacteria coexist in a culture dish.