seapodym-parallel
Fish dynamics models with parameter estimations
|
A class to compute the task dependencies of multiple fish cohort tasks. More...
#include <SeapodymCohortDependencyAnalyzer.h>
Public Member Functions | |
SeapodymCohortDependencyAnalyzer (int numAgeGroups, int numTimeSteps) | |
int | getNumberOfCohorts () const |
int | getNumberOfCohortSteps () const |
std::map< int, int > | getNumStepsMap () const |
std::map< int, std::set< std::array< int, 2 > > > | getDependencyMap () const |
A class to compute the task dependencies of multiple fish cohort tasks.
A fish cohort is a population of fish that were born in the same interval of time. A task evolves a fish cohort over multiple time steps. After some time steps, the cohort is removed from the population and a new cohort is being born by combining the biomass of the cohorts from the previous time step. For instance, let there be 3 starting age groups (0, 1 and 2) whose populations are modelled over 5 time steps. This can be represented as:
2 1 0 2 1 3 2 4 3 5 4 3 5 4 6
where the numbers are the cohort Ids. The horizontal axis represents the different age groups and the vertical axis time. A each time step a new cohort is born.
SeapodymCohortDependencyAnalyzer::SeapodymCohortDependencyAnalyzer | ( | int | numAgeGroups, |
int | numTimeSteps ) |
Constructor
numAgeGroups | number of age groups (e.g. 3 in the above example) |
numTimeSteps | number of tiem steps (e.g. 5 in the above example) |
std::map< int, std::set< std::array< int, 2 > > > SeapodymCohortDependencyAnalyzer::getDependencyMap | ( | ) | const |
Get the dependency map
In the above example, cohorts 0, 1 and 2 have no dependencies. Cohort 3 depends on cohorts 0, 1, 2 all at step 0; cohort 4 depends on cohort 0 at step 1, cohort 1 at step 1 and cohort 3 at step 0; etc.
int SeapodymCohortDependencyAnalyzer::getNumberOfCohorts | ( | ) | const |
Get the number of cohorts
In the above example, there are 7 cohorts with Ids 0..6
int SeapodymCohortDependencyAnalyzer::getNumberOfCohortSteps | ( | ) | const |
Get the number of cohort steps
In the above example, there are 15 cohort-steps
std::map< int, int > SeapodymCohortDependencyAnalyzer::getNumStepsMap | ( | ) | const |
Get the cohort Id to number of steps map
In the above example, cohort 0 has 3 steps, cohort 1 has 2 steps, cohort 2 has 1 step, etc.