Gadget
|
This is the class used to calculate the movement from one stock to other stocks. More...
#include <stray.h>
Public Member Functions | |
StrayData (CommentStream &infile, const LengthGroupDivision *const LgrpDiv, const IntVector &areas, const AreaClass *const Area, const char *givenname, const TimeClass *const TimeInfo, Keeper *const keeper) | |
This is the StrayData constructor. More... | |
~StrayData () | |
This is the default StrayData destructor. More... | |
void | Print (ofstream &outfile) const |
This function will print the straying information. More... | |
void | setStock (StockPtrVector &stockvec) |
This will select the stocks required for the straying process. More... | |
void | addStrayStock (int area, const TimeClass *const TimeInfo) |
This will move the calculated straying stock from the current stock into the new stock age-length cells. More... | |
void | storeStrayingStock (int area, AgeBandMatrix &Alkeys, const TimeClass *const TimeInfo) |
This will store the part of the current stock that will stray into other stocks. More... | |
void | storeStrayingStock (int area, AgeBandMatrix &Alkeys, AgeBandMatrixRatio &TagAlkeys, const TimeClass *const TimeInfo) |
This will store the part of the current stock that will stray into other stocks. More... | |
int | isStrayStepArea (int area, const TimeClass *const TimeInfo) |
This will check if the straying process will take place on the current timestep. More... | |
void | Reset (const TimeClass *const TimeInfo) |
This will reset the straying information for the current model run. More... | |
const StockPtrVector & | getStrayStocks () |
This will calculate the stocks the current stock can stray into. More... | |
void | setTagged () |
This function will initialise the tagging experiments for the straying calculations. More... | |
void | addStrayTag (const char *tagname) |
This will add a tagging experiment to the straying calculations. More... | |
void | deleteStrayTag (const char *tagname) |
This will remove a tagging experiment from the straying 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 | |
StockPtrVector | strayStocks |
This is the StockPtrVector of the stocks that the straying fish will move to. More... | |
CharPtrVector | strayStockNames |
This is the CharPtrVector of the names of the straying stocks. More... | |
FormulaVector | strayRatio |
This is the FormulaVector of the ratio of the stock that will stray. 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... | |
IntVector | strayStep |
This is the IntVector of timesteps that the straying will take place on. More... | |
IntVector | strayArea |
This is the IntVector of areas that the straying will take place on. More... | |
LengthGroupDivision * | LgrpDiv |
This is the LengthGroupDivision of the stock. More... | |
DoubleVector | strayProportion |
This is the DoubleVector of the proportion of each length group of the stock that will stray. More... | |
SelectFunc * | fnProportion |
This is the SelectFunc used to calculate of the proportion of each length group of the stock that will stray. More... | |
AgeBandMatrixPtrVector | Storage |
This is the AgeBandMatrixPtrVector used to store the calculated straying stocks. More... | |
AgeBandMatrixRatioPtrVector | tagStorage |
This is the AgeBandMatrixRatioPtrVector used to store the calculated straying tagged stocks. More... | |
ConversionIndexPtrVector | CI |
This is the ConversionIndexPtrVector used to convert from the current stock lengths to the straying stock lengths. More... | |
int | minStrayLength |
This is the minimum length group division of the straying 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 one stock to other stocks.
This class moves a proportion of fish from one stock to the corresponding age-length cell in other stocks. This is an extension to the Transition class, since it can move fish from more than one age group. The length groups of the new stocks are checked, and any fish that haven't yet reached the minimum length of the new stock remain in the original stock.
StrayData::StrayData | ( | CommentStream & | infile, |
const LengthGroupDivision *const | LgrpDiv, | ||
const IntVector & | areas, | ||
const AreaClass *const | Area, | ||
const char * | givenname, | ||
const TimeClass *const | TimeInfo, | ||
Keeper *const | keeper | ||
) |
This is the StrayData constructor.
infile | is the CommentStream to read the straying data from |
LgrpDiv | is the LengthGroupDivision that the straying stock will be calculated on |
areas | is the IntVector of areas that the straying stock will be calculated on |
Area | is the AreaClass for the current model |
givenname | is the name of the stock for this StrayData class |
TimeInfo | is the TimeClass for the current model |
keeper | is the Keeper for the current model |
StrayData::~StrayData | ( | ) |
This is the default StrayData destructor.
void StrayData::addStrayStock | ( | int | area, |
const TimeClass *const | TimeInfo | ||
) |
This will move the calculated straying stock from the current stock into the new stock age-length cells.
area | is the area that the straying process is being calculated on |
TimeInfo | is the TimeClass for the current model |
void StrayData::addStrayTag | ( | const char * | tagname | ) |
This will add a tagging experiment to the straying calculations.
tagname | is the name of the tagging experiment |
void StrayData::deleteStrayTag | ( | const char * | tagname | ) |
This will remove a tagging experiment from the straying calculations.
tagname | is the name of the tagging experiment |
const StockPtrVector & StrayData::getStrayStocks | ( | ) |
This will calculate the stocks the current stock can stray into.
int StrayData::isStrayStepArea | ( | int | area, |
const TimeClass *const | TimeInfo | ||
) |
This will check if the straying process will take place on the current timestep.
area | is the area that the straying is being calculated on |
TimeInfo | is the TimeClass for the current model |
void StrayData::Print | ( | ofstream & | outfile | ) | const |
This function will print the straying information.
outfile | is the ofstream that all the model information gets sent to |
void StrayData::Reset | ( | const TimeClass *const | TimeInfo | ) |
This will reset the straying information for the current model run.
TimeInfo | is the TimeClass for the current model |
void StrayData::setStock | ( | StockPtrVector & | stockvec | ) |
This will select the stocks required for the straying process.
stockvec | is the StockPtrVector of all the available stocks |
void StrayData::setTagged | ( | ) |
This function will initialise the tagging experiments for the straying calculations.
void StrayData::storeStrayingStock | ( | int | area, |
AgeBandMatrix & | Alkeys, | ||
AgeBandMatrixRatio & | TagAlkeys, | ||
const TimeClass *const | TimeInfo | ||
) |
This will store the part of the current stock that will stray into other stocks.
area | is the area that the straying 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 StrayData::storeStrayingStock | ( | int | area, |
AgeBandMatrix & | Alkeys, | ||
const TimeClass *const | TimeInfo | ||
) |
This will store the part of the current stock that will stray into other stocks.
area | is the area that the straying 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 ConversionIndexPtrVector used to convert from the current stock lengths to the straying stock lengths.
|
protected |
This is the SelectFunc used to calculate of the proportion of each length group of the stock that will stray.
|
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 division of the straying 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 straying stocks.
|
protected |
This is the IntVector of areas that the straying will take place on.
|
protected |
This is the DoubleVector of the proportion of each length group of the stock that will stray.
|
protected |
This is the FormulaVector of the ratio of the stock that will stray.
|
protected |
This is the IntVector of timesteps that the straying will take place on.
|
protected |
This is the CharPtrVector of the names of the straying stocks.
|
protected |
This is the StockPtrVector of the stocks that the straying fish will move to.
|
protected |
This is the AgeBandMatrixRatioPtrVector used to store the calculated straying tagged stocks.