The SeapodymTaskManager knows how to distribute task cohorts across workers, how many times a cohort task needs to be executed and what the next cohort task should be given to a worker.
More...
#include <SeapodymCohortManager.h>
The SeapodymTaskManager knows how to distribute task cohorts across workers, how many times a cohort task needs to be executed and what the next cohort task should be given to a worker.
Class SeapodymCohortManager
◆ SeapodymCohortManager()
SeapodymCohortManager::SeapodymCohortManager |
( |
int | numAgeGroups, |
|
|
int | numWorkers, |
|
|
int | numTimeSteps ) |
Constructor
- Parameters
-
numAgeGroups | number of age groups that are run concurrently |
numWorkers | number of workers |
numTimeSteps | total number of time steps of the simulation |
- Returns
- list of cohort tasks
◆ getDependencies()
std::set< int > SeapodymCohortManager::getDependencies |
( |
int | cohortId | ) |
const |
Get the dependencies of a new cohort task on other preceding cohorts
- Parameters
-
- Returns
- all the other cohort tasks that feed into this cohort task
◆ getInitCohortIds()
std::vector< int > SeapodymCohortManager::getInitCohortIds |
( |
int | workerId | ) |
const |
Get the initial list of cohort tasks
- Parameters
-
- Returns
- list
◆ getNewCohortWorker()
int SeapodymCohortManager::getNewCohortWorker |
( |
int | timeStep | ) |
const |
Get the worker ID for the new cohort
- Parameters
-
timeStep | current time step |
- Returns
- number
◆ getNextCohort()
int SeapodymCohortManager::getNextCohort |
( |
int | cohortId | ) |
const |
Get the cohort task that follows a terminated cohort task
- Parameters
-
- Returns
- the next cohort task
◆ getNumSteps()
int SeapodymCohortManager::getNumSteps |
( |
int | cohortId | ) |
const |
Get the number of current steps a cohort task will run
- Parameters
-
- Returns
- number of steps
The documentation for this class was generated from the following files: