Gadget
|
This is the class used to calculate the affect of natural mortality on the stock. More...
#include <naturalm.h>
Public Member Functions | |
NaturalMortality (CommentStream &infile, int minage, int numage, const char *givenname, const IntVector &Areas, const TimeClass *const TimeInfo, Keeper *const keeper) | |
This is the NaturalMortality constructor. More... | |
~NaturalMortality () | |
This is the default NaturalMortality destructor. More... | |
const DoubleVector & | getProportion (int area) const |
This function will return the DoubleVector of the proportion of each age group that will survive on the current timestep. More... | |
void | Reset (const TimeClass *const TimeInfo) |
This function will reset the NaturalMortality information. More... | |
void | Print (ofstream &outfile) |
This function will print the summary NaturalMortality information. 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... | |
![]() | |
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... | |
Protected Attributes | |
ModelVariableVector | mortality |
This is the ModelVariableVector used to store the mortality of each age group. More... | |
SelectFunc * | fnMortality |
This is the SelectFunc used to calculate of the proportion of each age group of the stock that will die due to natural mortality. More... | |
DoubleMatrix | proportion |
This is the DoubleMatrix used to store the proportion of each age group that will survive (ie. will not die out due to natural mortality) More... | |
int | minStockAge |
This is the minimum age of the stock, used as an index when calculating proportion. More... | |
int | readoption |
This is the identifier of the function to be used to read the natural mortality data from file. 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... | |
This is the class used to calculate the affect of natural mortality on the stock.
This class calculates the proportion of the stock that should be removed from the model due to natural mortality (ie. any mortality that is not due to predation, either by another stock or by a fleet). The number that is stored after this calculation contains the proportion of each area/age group that will survive (ie. is not removed due to the natural mortality).
NaturalMortality::NaturalMortality | ( | CommentStream & | infile, |
int | minage, | ||
int | numage, | ||
const char * | givenname, | ||
const IntVector & | Areas, | ||
const TimeClass *const | TimeInfo, | ||
Keeper *const | keeper | ||
) |
This is the NaturalMortality constructor.
infile | is the CommentStream to read the NaturalMortality information from |
minage | is the minimum age of the stock |
numage | is the number of age groups for the stock |
givenname | is the name of the stock for this NaturalMortality class |
Areas | is the IntVector of the areas that the stock lives on |
TimeInfo | is the TimeClass for the current model |
keeper | is the Keeper for the current model |
NaturalMortality::~NaturalMortality | ( | ) |
This is the default NaturalMortality destructor.
|
inline |
This function will return the DoubleVector of the proportion of each age group that will survive on the current timestep.
area | is the area that the natural mortality is being calculated on |
void NaturalMortality::Print | ( | ofstream & | outfile | ) |
This function will print the summary NaturalMortality information.
outfile | is the ofstream that all the model information gets sent to |
void NaturalMortality::Reset | ( | const TimeClass *const | TimeInfo | ) |
This function will reset the NaturalMortality information.
TimeInfo | is the TimeClass for the current model |
|
protected |
This is the SelectFunc used to calculate of the proportion of each age group of the stock that will die due to natural mortality.
|
protected |
This is the minimum age of the stock, used as an index when calculating proportion.
|
protected |
This is the ModelVariableVector used to store the mortality of each age group.
|
protected |
This is the DoubleMatrix used to store the proportion of each age group that will survive (ie. will not die out due to natural mortality)
|
protected |
This is the identifier of the function to be used to read the natural mortality data from file.