Gadget
Public Member Functions | Protected Attributes | List of all members
Transition Class Reference

This is the class used to calculate the movement from a young stock to older stocks. More...

#include <transition.h>

Inheritance diagram for Transition:
Inheritance graph
Collaboration diagram for Transition:
Collaboration graph

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 StockPtrVectorgetTransitionStocks ()
 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...
 
- Public Member Functions inherited from HasName
 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...
 
LengthGroupDivisionLgrpDiv
 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...
 
- Protected Attributes inherited from LivesOnAreas
IntVector areas
 This is the IntVector of internal areas that the object is defined on. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LivesOnAreas
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...
 
IntVectorgetAreas ()
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Transition()

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.

Parameters
infileis the CommentStream to read the transition data from
areasis the IntVector of areas that the movements will be calculated on
ageis the maximum age for the (young) stock
lgrpdivis the LengthGroupDivision for the stock
givennameis the name of the stock for this Transition class
TimeInfois the TimeClass for the current model
keeperis the Keeper for the current model

◆ ~Transition()

Transition::~Transition ( )

This is the default Transition destructor.

Member Function Documentation

◆ addTransitionTag()

void Transition::addTransitionTag ( const char *  tagname)

This will add a tagging experiment to the transition calculations.

Parameters
tagnameis the name of the tagging experiment

◆ deleteTransitionTag()

void Transition::deleteTransitionTag ( const char *  tagname)

This will remove a tagging experiment from the transition calculations.

Parameters
tagnameis the name of the tagging experiment

◆ getTransitionStocks()

const StockPtrVector & Transition::getTransitionStocks ( )

This will calculate the stocks the young stock can move into.

Returns
transition stocks

◆ isTransitionStep()

int Transition::isTransitionStep ( const TimeClass *const  TimeInfo)
virtual

This will check if the transition process will take place on the current timestep.

Parameters
TimeInfois the TimeClass for the current model
Returns
1 if the transition process will take place, 0 otherwise

◆ Move()

void Transition::Move ( int  area,
const TimeClass *const  TimeInfo 
)

This will move the younger stock into the older stock age-length cells.

Parameters
areais the area that the movement is being calculated on
TimeInfois the TimeClass for the current model

◆ Print()

void Transition::Print ( ofstream &  outfile) const

This function will print the transition information.

Parameters
outfileis the ofstream that all the model information gets sent to

◆ Reset()

void Transition::Reset ( )

This function will reset the transition data.

◆ setStock()

void Transition::setStock ( StockPtrVector stockvec)

This will select the stocks required for the movement between stocks.

Parameters
stockvecis the StockPtrVector of all the available stocks

◆ setTagged()

void Transition::setTagged ( )

This function will initialise the tagging experiments for the transition calculations.

◆ storeTransitionStock() [1/2]

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.

Parameters
areais the area that the transition is being calculated on
Alkeysis the AgeBandMatrix of the stock that fish will move from
TagAlkeysis the AgeBandMatrixRatio of the tagged stock that fish will move from
TimeInfois the TimeClass for the current model

◆ storeTransitionStock() [2/2]

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.

Parameters
areais the area that the transition is being calculated on
Alkeysis the AgeBandMatrix of the stock that fish will move from
TimeInfois the TimeClass for the current model

Member Data Documentation

◆ age

int Transition::age
protected

This is the age that the younger stock will move into the older stocks.

◆ CI

ConversionIndexPtrVector Transition::CI
protected

This is the ConversionIndexPtrVector used to convert from the young stock lengths to the old stock lengths.

◆ istagged

int Transition::istagged
protected

This is the flag used to denote whether the stock has been included in a tagging experiment or not.

◆ LgrpDiv

LengthGroupDivision* Transition::LgrpDiv
protected

This is the LengthGroupDivision of the stock.

◆ minTransitionLength

int Transition::minTransitionLength
protected

This is the minimum length group of the younger stock that exists in the older stock.

◆ ratioindex

IntVector Transition::ratioindex
protected

This is the IntVector used as an index for the ratio vector.

◆ ratioscale

double Transition::ratioscale
protected

This is used to scale the ratios to ensure that they will always sum to 1.

◆ Storage

AgeBandMatrixPtrVector Transition::Storage
protected

This is the AgeBandMatrixPtrVector used to store the calculated old stocks.

◆ tagStorage

AgeBandMatrixRatioPtrVector Transition::tagStorage
protected

This is the AgeBandMatrixRatioPtrVector used to store the calculated tagged stocks.

◆ transitionRatio

FormulaVector Transition::transitionRatio
protected

This is the FormulaVector of the ratio of the young stock to move into each older stock.

◆ transitionStep

int Transition::transitionStep
protected

This is the timestep that the movement between stocks will occur on.

◆ transitionStockNames

CharPtrVector Transition::transitionStockNames
protected

This is the CharPtrVector of the names of the transition stocks.

◆ transitionStocks

StockPtrVector Transition::transitionStocks
protected

This is the StockPtrVector of the stocks that the young stock will move to.


The documentation for this class was generated from the following files: