Gadget
|
This is the class used to calculate the movement from a young stock to older stocks. More...
#include <transition.h>
Public Member Functions | |
Transition (CommentStream &infile, const IntVector &areas, int age, const LengthGroupDivision *const lgrpdiv, const char *givenname, const TimeClass *const TimeInfo, Keeper *const keeper) | |
This is the Transition constructor. More... | |
~Transition () | |
This is the default Transition destructor. More... | |
void | setStock (StockPtrVector &stockvec) |
This will select the stocks required for the movement between stocks. More... | |
void | storeTransitionStock (int area, AgeBandMatrix &Alkeys, const TimeClass *const TimeInfo) |
This will store the part of the younger stock that will move into the older stocks. More... | |
void | storeTransitionStock (int area, AgeBandMatrix &Alkeys, AgeBandMatrixRatio &TagAlkeys, const TimeClass *const TimeInfo) |
This will store the part of the younger stock that will move into the older stocks. More... | |
void | Move (int area, const TimeClass *const TimeInfo) |
This will move the younger stock into the older stock age-length cells. More... | |
void | Print (ofstream &outfile) const |
This function will print the transition information. More... | |
const StockPtrVector & | getTransitionStocks () |
This will calculate the stocks the young stock can move into. More... | |
void | setTagged () |
This function will initialise the tagging experiments for the transition calculations. More... | |
void | addTransitionTag (const char *tagname) |
This will add a tagging experiment to the transition calculations. More... | |
void | deleteTransitionTag (const char *tagname) |
This will remove a tagging experiment from the transition calculations. More... | |
void | Reset () |
This function will reset the transition data. More... | |
virtual int | isTransitionStep (const TimeClass *const TimeInfo) |
This will check if the transition 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 | |
StockPtrVector | transitionStocks |
This is the StockPtrVector of the stocks that the young stock will move to. More... | |
CharPtrVector | transitionStockNames |
This is the CharPtrVector of the names of the transition stocks. More... | |
FormulaVector | transitionRatio |
This is the FormulaVector of the ratio of the young stock to move into each older 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 young stock lengths to the old stock lengths. More... | |
LengthGroupDivision * | LgrpDiv |
This is the LengthGroupDivision of the stock. More... | |
int | transitionStep |
This is the timestep that the movement between stocks will occur on. More... | |
AgeBandMatrixPtrVector | Storage |
This is the AgeBandMatrixPtrVector used to store the calculated old stocks. More... | |
AgeBandMatrixRatioPtrVector | tagStorage |
This is the AgeBandMatrixRatioPtrVector used to store the calculated tagged stocks. More... | |
int | age |
This is the age that the younger stock will move into the older stocks. More... | |
int | minTransitionLength |
This is the minimum length group of the younger stock that exists in the older stock. More... | |
int | istagged |
This is the flag used to denote whether the stock has been included in a tagging experiment or not. 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 class used to calculate the movement from a young stock to older stocks.
This class moves the oldest age group of a young stock up to older stocks. This is a simpler method than the Maturity classes of moving fish between stocks, and is used to move the fish that haven't matured according to the maturation functions. The length groups of the older stocks are checked, and any fish that haven't yet reached the minimum length of the older stock remain in the younger stock, effectively as an age-plus group.
Transition::Transition | ( | CommentStream & | infile, |
const IntVector & | areas, | ||
int | age, | ||
const LengthGroupDivision *const | lgrpdiv, | ||
const char * | givenname, | ||
const TimeClass *const | TimeInfo, | ||
Keeper *const | keeper | ||
) |
This is the Transition constructor.
infile | is the CommentStream to read the transition data from |
areas | is the IntVector of areas that the movements will be calculated on |
age | is the maximum age for the (young) stock |
lgrpdiv | is the LengthGroupDivision for the stock |
givenname | is the name of the stock for this Transition class |
TimeInfo | is the TimeClass for the current model |
keeper | is the Keeper for the current model |
Transition::~Transition | ( | ) |
This is the default Transition destructor.
void Transition::addTransitionTag | ( | const char * | tagname | ) |
This will add a tagging experiment to the transition calculations.
tagname | is the name of the tagging experiment |
void Transition::deleteTransitionTag | ( | const char * | tagname | ) |
This will remove a tagging experiment from the transition calculations.
tagname | is the name of the tagging experiment |
const StockPtrVector & Transition::getTransitionStocks | ( | ) |
This will calculate the stocks the young stock can move into.
|
virtual |
This will check if the transition process will take place on the current timestep.
TimeInfo | is the TimeClass for the current model |
void Transition::Move | ( | int | area, |
const TimeClass *const | TimeInfo | ||
) |
This will move the younger stock into the older stock age-length cells.
area | is the area that the movement is being calculated on |
TimeInfo | is the TimeClass for the current model |
void Transition::Print | ( | ofstream & | outfile | ) | const |
This function will print the transition information.
outfile | is the ofstream that all the model information gets sent to |
void Transition::Reset | ( | ) |
This function will reset the transition data.
void Transition::setStock | ( | StockPtrVector & | stockvec | ) |
This will select the stocks required for the movement between stocks.
stockvec | is the StockPtrVector of all the available stocks |
void Transition::setTagged | ( | ) |
This function will initialise the tagging experiments for the transition calculations.
void Transition::storeTransitionStock | ( | int | area, |
AgeBandMatrix & | Alkeys, | ||
AgeBandMatrixRatio & | TagAlkeys, | ||
const TimeClass *const | TimeInfo | ||
) |
This will store the part of the younger stock that will move into the older stocks.
area | is the area that the transition is being calculated on |
Alkeys | is the AgeBandMatrix of the stock that fish will move from |
TagAlkeys | is the AgeBandMatrixRatio of the tagged stock that fish will move from |
TimeInfo | is the TimeClass for the current model |
void Transition::storeTransitionStock | ( | int | area, |
AgeBandMatrix & | Alkeys, | ||
const TimeClass *const | TimeInfo | ||
) |
This will store the part of the younger stock that will move into the older stocks.
area | is the area that the transition is being calculated on |
Alkeys | is the AgeBandMatrix of the stock that fish will move from |
TimeInfo | is the TimeClass for the current model |
|
protected |
This is the age that the younger stock will move into the older stocks.
|
protected |
This is the ConversionIndexPtrVector used to convert from the young stock lengths to the old stock lengths.
|
protected |
This is the flag used to denote whether the stock has been included in a tagging experiment or not.
|
protected |
This is the LengthGroupDivision of the stock.
|
protected |
This is the minimum length group of the younger stock that exists in the older stock.
|
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 the AgeBandMatrixPtrVector used to store the calculated old stocks.
|
protected |
This is the AgeBandMatrixRatioPtrVector used to store the calculated tagged stocks.
|
protected |
This is the FormulaVector of the ratio of the young stock to move into each older stock.
|
protected |
This is the timestep that the movement between stocks will occur on.
|
protected |
This is the CharPtrVector of the names of the transition stocks.
|
protected |
This is the StockPtrVector of the stocks that the young stock will move to.