![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <Osmia_Population_Manager.h>
Public Member Functions | |
OsmiaParasitoidSubPopulation (double a_dispersalfraction, double a_startno, int a_x, int a_y, int a_wide, int a_high, OsmiaParasitoid_Population_Manager *a_popman) | |
~OsmiaParasitoidSubPopulation () | |
void | Add (double a_change) |
void | Remove (double a_change) |
double | GetSubPopnSize () |
void | DailyMortality () |
Removes parasitoids killed by daily mortality. More... | |
void | Dispersal () |
Moves parasitoids that move by dispersal. More... | |
void | Reproduce () |
Carries out any reproduction possible. More... | |
virtual void | DoFirst () |
void | SetThisMonth (int a_month) |
void | SetMortalities (array< double, 12 > a_morts) |
Protected Attributes | |
double | m_NoParasitoids |
The total number of parasitoids in this population. More... | |
double | m_DiffusionRate |
The time-step related total dispersal loss. More... | |
double | m_DiffusionConstant |
The distance related dispersal loss constants. More... | |
int | m_CellIndexArray [8] |
The index of the surrounding cells, a speed optimisation. More... | |
int | m_x |
cell_index x More... | |
int | m_y |
cell_index y More... | |
OsmiaParasitoid_Population_Manager * | m_OurPopulationManager |
A pointer to the owning population manager. More... | |
Static Protected Attributes | |
static array< double, 12 > | m_MortalityPerMonth = { 0,0,0,0,0,0,0,0,0,0,0,0 } |
Daily mortality rates each month. More... | |
static int | m_ThisMonth = -1 |
records the month (optimsation) More... | |
OsmiaParasitoidSubPopulation::OsmiaParasitoidSubPopulation | ( | double | a_dispersalfraction, |
double | a_startno, | ||
int | a_x, | ||
int | a_y, | ||
int | a_wide, | ||
int | a_high, | ||
OsmiaParasitoid_Population_Manager * | a_popman | ||
) |
Calculate neighbour cells for dispersal. There will be 8 cells for dispersal We need also to consider the bounds for wrap around m_CellIndexArray is an array containing numbers which represent the cell position in a spatial array (1 dimension representing the matrix). The actual cells are stored in the population manager for the parasitoids.
Calculate the diffusion rates. This is done per row by dividing the total diffusion rate by the number of rows, then dividing out result by the number of squares in the row. Currently we assume dispersal only to the next square (8 round this current population)
References count, m_CellIndexArray, m_DiffusionConstant, m_DiffusionRate, m_NoParasitoids, m_OurPopulationManager, m_x, and m_y.
|
inline |
References m_NoParasitoids.
void OsmiaParasitoidSubPopulation::DailyMortality | ( | ) |
Removes parasitoids killed by daily mortality.
Applies a daily probability of mortality for adults. This is provided as a monthly figure, which allows some seaonality to be included. It is a static member so only one copy exists per subpopulation type.
References m_MortalityPerMonth, m_NoParasitoids, and m_ThisMonth.
Referenced by DoFirst().
void OsmiaParasitoidSubPopulation::Dispersal | ( | ) |
Moves parasitoids that move by dispersal.
Calculates the number of dispersers per cell to the 8 surrounding cells and removes them from the present cell
References OsmiaParasitoid_Population_Manager::AddDispersers(), count, m_CellIndexArray, m_DiffusionConstant, m_NoParasitoids, and m_OurPopulationManager.
Referenced by DoFirst().
|
inlinevirtual |
Removes parasitoids killed by daily mortality
Moves parasitoids that move by dispersal
Carries out any reproduction possible
References DailyMortality(), Dispersal(), and Reproduce().
|
inline |
References m_NoParasitoids.
|
inline |
References m_NoParasitoids.
void OsmiaParasitoidSubPopulation::Reproduce | ( | ) |
Carries out any reproduction possible.
This links the chance of a cell being parasitised to the local population size. The probability of attack depends on factors under control of the bee therefore currently there is nothing needed here. When an egg is produced the local conditions will determine its fate wrt parasitoids. Therefore parasitoid attack density related probability curves are a property of the bee.
Referenced by DoFirst().
|
inline |
References m_MortalityPerMonth.
|
inline |
References m_ThisMonth.
|
protected |
The index of the surrounding cells, a speed optimisation.
Referenced by Dispersal(), and OsmiaParasitoidSubPopulation().
|
protected |
The distance related dispersal loss constants.
Referenced by Dispersal(), and OsmiaParasitoidSubPopulation().
|
protected |
The time-step related total dispersal loss.
Referenced by OsmiaParasitoidSubPopulation().
|
staticprotected |
Daily mortality rates each month.
Referenced by DailyMortality(), and SetMortalities().
|
protected |
The total number of parasitoids in this population.
Referenced by Add(), DailyMortality(), Dispersal(), GetSubPopnSize(), OsmiaParasitoidSubPopulation(), and Remove().
|
protected |
A pointer to the owning population manager.
Referenced by Dispersal(), and OsmiaParasitoidSubPopulation().
|
staticprotected |
records the month (optimsation)
Referenced by DailyMortality(), and SetThisMonth().
|
protected |
cell_index x
Referenced by OsmiaParasitoidSubPopulation().
|
protected |
cell_index y
Referenced by OsmiaParasitoidSubPopulation().