Gadget
|
This is the base class used to calculate the migration of a stock within the model. More...
#include <migration.h>
Public Member Functions | |
Migration (const IntVector &areas, const char *givenname) | |
This is the default Migration constructor. More... | |
virtual | ~Migration () |
This is the default Migration destructor. More... | |
virtual void | Reset ()=0 |
This function will reset the migration data. More... | |
virtual void | Print (ofstream &outfile)=0 |
This function will print the migration data. More... | |
virtual const DoubleMatrix & | getMigrationMatrix (const TimeClass *const TimeInfo)=0 |
This will return the migration matrix that has been calculated. More... | |
const DoubleVector & | getPenalty () const |
This will return the penalty that has been calculated due to invalid migration. More... | |
virtual int | isMigrationStep (const TimeClass *const TimeInfo)=0 |
This will check if the migration process will take place on the current timestep. More... | |
![]() | |
HasName () | |
This is the default HasName constructor. More... | |
virtual | ~HasName () |
This is the default HasName destructor. More... | |
HasName (const char *givenname) | |
This is the HasName constructor for a specified name. More... | |
const char * | getName () const |
This will return a null terminated text string containing the name of the object. More... | |
Protected Attributes | |
DoubleVector | penalty |
This is the DoubleVector used to store the migration penalty information. More... | |
![]() | |
IntVector | areas |
This is the IntVector of internal areas that the object is defined on. More... | |
Additional Inherited Members | |
![]() | |
void | storeAreas (const IntVector &Areas) |
This function will store the internal areas to be used. More... | |
LivesOnAreas () | |
This is the default LivesOnAreas constructor. More... | |
virtual | ~LivesOnAreas () |
This is the default LivesOnAreas destructor. More... | |
LivesOnAreas (const IntVector &Areas) | |
This is the LivesOnAreas constructor for a specified vector of areas. More... | |
int | isInArea (int area) const |
This function will check whether the object is defined on a specified area. More... | |
IntVector & | getAreas () |
This function will return the internal areas that the object is defined on. More... | |
int | areaNum (int area) const |
This function will return the area associated with an internal area. More... | |
This is the base class used to calculate the migration of a stock within the model.
This class moves fish from one area to another within the model. The proportion of the fish that move is calculated according to a migration matrix. The migration matrix is either specified in the input files (either directly or by specifying the ratio that move), or is calculated from a migration function, based on drift and diffusion parameters. Care is taken to ensure that the columns of the migration matrix will sum to 1, so that no fish are created or lost during the migration process. Once the migration matrix has been calculated, the fish are moved between the areas using a simple matrix multiplication function.
Migration::Migration | ( | const IntVector & | areas, |
const char * | givenname | ||
) |
|
inlinevirtual |
This is the default Migration destructor.
|
pure virtual |
This will return the migration matrix that has been calculated.
TimeInfo | is the TimeClass for the current model |
Implemented in MigrationFunction, and MigrationNumbers.
|
inline |
This will return the penalty that has been calculated due to invalid migration.
|
pure virtual |
This will check if the migration process will take place on the current timestep.
TimeInfo | is the TimeClass for the current model |
Implemented in MigrationFunction, and MigrationNumbers.
|
pure virtual |
This function will print the migration data.
outfile | is the ofstream that all the model information gets sent to |
Implemented in MigrationFunction, and MigrationNumbers.
|
pure virtual |
This function will reset the migration data.
Implemented in MigrationFunction, and MigrationNumbers.
|
protected |
This is the DoubleVector used to store the migration penalty information.