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

This is the class used to calculate the maturity based on the 'fixedlength' maturity function. More...

#include <maturity.h>

Inheritance diagram for MaturityB:
Inheritance graph
Collaboration diagram for MaturityB:
Collaboration graph

Public Member Functions

 MaturityB (CommentStream &infile, const TimeClass *const TimeInfo, Keeper *const keeper, int minage, int numage, const IntVector &areas, const char *givenname, const LengthGroupDivision *const LgrpDiv)
 This is the MaturityB constructor. More...
 
virtual ~MaturityB ()
 This is the default MaturityB destructor. More...
 
virtual void setStock (StockPtrVector &stockvec)
 This will select the stocks required for the maturation process. 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)
 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)
 This will calculate the probability of maturation for a given age and length of the immature stock. More...
 
virtual void Print (ofstream &outfile) const
 This function will print the maturation information. More...
 
- Public Member Functions inherited from Maturity
 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...
 
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 StockPtrVectorgetMatureStocks ()
 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...
 
- 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

int currentmaturitystep
 This is the current time step for the maturation process within the model simulation. More...
 
IntVector maturitystep
 This is the IntVector of timesteps when maturation will take place. More...
 
ModelVariableVector maturitylength
 This is the ModelVariableVector of lengths when maturation will take place. More...
 
- Protected Attributes inherited from Maturity
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...
 
LengthGroupDivisionLgrpDiv
 This is the LengthGroupDivision of the stock. 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 maturity based on the 'fixedlength' maturity function.

Constructor & Destructor Documentation

◆ MaturityB()

MaturityB::MaturityB ( CommentStream infile,
const TimeClass *const  TimeInfo,
Keeper *const  keeper,
int  minage,
int  numage,
const IntVector areas,
const char *  givenname,
const LengthGroupDivision *const  LgrpDiv 
)

This is the MaturityB constructor.

Parameters
infileis the CommentStream to read the maturation parameters from
TimeInfois the TimeClass for the current model
keeperis the Keeper for the current model
minageis the minimum age of the stock that can mature
numageis the number of age groups for the stock that can mature
areasis the IntVector of areas that the maturity calculation can take place on
givennameis the name of the stock for this MaturityB class
LgrpDivis the LengthGroupDivision for the stock

◆ ~MaturityB()

virtual MaturityB::~MaturityB ( )
inlinevirtual

This is the default MaturityB destructor.

Member Function Documentation

◆ calcMaturation()

double MaturityB::calcMaturation ( int  age,
int  length,
int  growth,
double  weight 
)
virtual

This will calculate the probability of maturation for a given age and length of the immature stock.

Parameters
ageis the age of the age-length cell that the maturation is being calculated on
lengthis the length of the age-length cell that the maturation is being calculated on
growthis the length of the age-length cell that the mature stock will grow into
weightis the weight of the fish of the age-length cell that are maturing
Returns
maturation probability

Implements Maturity.

◆ isMaturationStep()

int MaturityB::isMaturationStep ( const TimeClass *const  TimeInfo)
virtual

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

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

Implements Maturity.

◆ Print()

void MaturityB::Print ( ofstream &  outfile) const
virtual

This function will print the maturation information.

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

Reimplemented from Maturity.

◆ Reset()

void MaturityB::Reset ( const TimeClass *const  TimeInfo)
virtual

This will reset the maturation information for the current model run.

Parameters
TimeInfois the TimeClass for the current model

Reimplemented from Maturity.

◆ setStock()

void MaturityB::setStock ( StockPtrVector stockvec)
virtual

This will select the stocks required for the maturation process.

Parameters
stockvecis the StockPtrVector of all the available stocks

Reimplemented from Maturity.

Member Data Documentation

◆ currentmaturitystep

int MaturityB::currentmaturitystep
protected

This is the current time step for the maturation process within the model simulation.

◆ maturitylength

ModelVariableVector MaturityB::maturitylength
protected

This is the ModelVariableVector of lengths when maturation will take place.

◆ maturitystep

IntVector MaturityB::maturitystep
protected

This is the IntVector of timesteps when maturation will take place.


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