Gadget
|
This is the base class used to calculate the maturity of a stock within the model. More...
#include <maturity.h>
Public Member Functions | |
Maturity () | |
This is the default Maturity constructor. More... | |
Maturity (const IntVector &areas, int minage, int numage, const LengthGroupDivision *const LgrpDiv, const char *givenname) | |
This is the Maturity constructor. More... | |
virtual | ~Maturity () |
This is the default Maturity destructor. More... | |
virtual void | setStock (StockPtrVector &stockvec) |
This will select the stocks required for the maturation process. More... | |
virtual void | Print (ofstream &outfile) const |
This function will print the maturation information. More... | |
virtual void | Reset (const TimeClass *const TimeInfo) |
This will reset the maturation information for the current model run. More... | |
virtual int | isMaturationStep (const TimeClass *const TimeInfo)=0 |
This will check if the maturation process will take place on the current timestep. More... | |
virtual double | calcMaturation (int age, int length, int growth, double weight)=0 |
This will calculate the probability of maturation for a given age and length of the immature stock. More... | |
void | storeMatureStock (int area, int age, int length, double number, double weight) |
This will store the calculated mature stock. More... | |
void | storeMatureTagStock (int area, int age, int length, double number, int id) |
This will store the calculated mature tagged stock. More... | |
void | Move (int area, const TimeClass *const TimeInfo) |
This will move the calculated mature stock into the mature stock age-length cells. More... | |
const StockPtrVector & | getMatureStocks () |
This will calculate the mature stocks the immature stock can mature into. More... | |
void | setTagged () |
This function will initialise the tagging experiments for the maturation calculations. More... | |
void | addMaturityTag (const char *tagname) |
This will add a tagging experiment to the maturation calculations. More... | |
void | deleteMaturityTag (const char *tagname) |
This will remove a tagging experiment from the maturation calculations. 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 | |
double | tmpratio |
This is used to temporarily store the maturation ratio. More... | |
StockPtrVector | matureStocks |
This is the StockPtrVector of the mature stocks. More... | |
CharPtrVector | matureStockNames |
This is the CharPtrVector of the names of the mature stocks. More... | |
FormulaVector | matureRatio |
This is the FormulaVector of the ratio of the immature stock to mature into each mature stock. More... | |
double | ratioscale |
This is used to scale the ratios to ensure that they will always sum to 1. More... | |
IntVector | ratioindex |
This is the IntVector used as an index for the ratio vector. More... | |
ConversionIndexPtrVector | CI |
This is the ConversionIndexPtrVector used to convert from the immature stock lengths to the mature stock lengths. More... | |
LengthGroupDivision * | LgrpDiv |
This is the LengthGroupDivision of the stock. 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 maturity of a stock within the model.
This class moves fish from an immature stock to matures stocks within the model. The proportion of those fish in the immature stock that mature is calulated according to the different maturity functions of the derived classes, and then that propotion is moved into the mature stocks. The length and age groups of the mature stocks are checked, and any fish that haven't yet reached the minimum length or age of the mature stock remain in the immature stock.
Maturity::Maturity | ( | ) |
This is the default Maturity constructor.
Maturity::Maturity | ( | const IntVector & | areas, |
int | minage, | ||
int | numage, | ||
const LengthGroupDivision *const | LgrpDiv, | ||
const char * | givenname | ||
) |
This is the Maturity constructor.
areas | is the IntVector of areas that the maturity calculation can take place on |
minage | is the minimum age of the stock that can mature |
numage | is the number of age groups for the stock that can mature |
LgrpDiv | is the LengthGroupDivision for the stock |
givenname | is the name of the stock for this Maturity class |
|
virtual |
This is the default Maturity destructor.
void Maturity::addMaturityTag | ( | const char * | tagname | ) |
This will add a tagging experiment to the maturation calculations.
tagname | is the name of the tagging experiment |
|
pure virtual |
This will calculate the probability of maturation for a given age and length of the immature stock.
age | is the age of the age-length cell that the maturation is being calculated on |
length | is the length of the age-length cell that the maturation is being calculated on |
growth | is the length of the age-length cell that the mature stock will grow into |
weight | is the weight of the fish of the age-length cell that are maturing |
Implemented in MaturityD, MaturityC, MaturityB, and MaturityA.
void Maturity::deleteMaturityTag | ( | const char * | tagname | ) |
This will remove a tagging experiment from the maturation calculations.
tagname | is the name of the tagging experiment |
const StockPtrVector & Maturity::getMatureStocks | ( | ) |
This will calculate the mature stocks the immature stock can mature into.
|
pure virtual |
void Maturity::Move | ( | int | area, |
const TimeClass *const | TimeInfo | ||
) |
This will move the calculated mature stock into the mature stock age-length cells.
area | is the area that the maturation is being calculated on |
TimeInfo | is the TimeClass for the current model |
|
virtual |
|
virtual |
|
virtual |
This will select the stocks required for the maturation process.
stockvec | is the StockPtrVector of all the available stocks |
Reimplemented in MaturityD, MaturityC, MaturityB, and MaturityA.
void Maturity::setTagged | ( | ) |
This function will initialise the tagging experiments for the maturation calculations.
void Maturity::storeMatureStock | ( | int | area, |
int | age, | ||
int | length, | ||
double | number, | ||
double | weight | ||
) |
This will store the calculated mature stock.
area | is the area that the maturation is being calculated on |
age | is the age of the calculated mature stock |
length | is the length of the calculated mature stock |
number | is the number of the calculated mature stock |
weight | is the weight of the calculated mature stock |
void Maturity::storeMatureTagStock | ( | int | area, |
int | age, | ||
int | length, | ||
double | number, | ||
int | id | ||
) |
This will store the calculated mature tagged stock.
area | is the area that the maturation is being calculated on |
age | is the age of the calculated mature stock |
length | is the length of the calculated mature stock |
number | is the number of the calculated mature stock |
id | is the tagging identifier of the mature stock |
|
protected |
This is the ConversionIndexPtrVector used to convert from the immature stock lengths to the mature stock lengths.
|
protected |
This is the LengthGroupDivision of the stock.
|
protected |
This is the FormulaVector of the ratio of the immature stock to mature into each mature stock.
|
protected |
This is the CharPtrVector of the names of the mature stocks.
|
protected |
This is the StockPtrVector of the mature stocks.
|
protected |
This is the IntVector used as an index for the ratio vector.
|
protected |
This is used to scale the ratios to ensure that they will always sum to 1.
|
protected |
This is used to temporarily store the maturation ratio.