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

This is the class used to calculate the renewal to a stock. More...

#include <renewal.h>

Inheritance diagram for RenewalData:
Inheritance graph
Collaboration diagram for RenewalData:
Collaboration graph

Public Member Functions

 RenewalData (CommentStream &infile, const IntVector &areas, const AreaClass *const Area, const TimeClass *const TimeInfo, Keeper *const keeper, const char *refWeightFile, const char *givenname, int minage, int maxage, double DL)
 This is the RenewalData constructor. More...
 
 ~RenewalData ()
 This is the default RenewalData destructor. More...
 
void addRenewal (AgeBandMatrix &Alkeys, int area, const TimeClass *const TimeInfo)
 This is the function used to add the renewal to the model. More...
 
void setCI (const LengthGroupDivision *const GivenLDiv)
 This will set the ConversionIndex required for to calculate the renewal. More...
 
void Print (ofstream &outfile) const
 This function will print the renewal data. More...
 
void Reset ()
 This function will reset the renewal data. More...
 
int isRenewalStepArea (int area, const TimeClass *const TimeInfo)
 This will check if the renewal process will take place on the current timestep and area. 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 Member Functions

void readNormalConditionData (CommentStream &infile, Keeper *const keeper, const TimeClass *const TimeInfo, const AreaClass *const Area, int minage, int maxage)
 This is the function used to read the normal distribution and condition factor for the renewal data. More...
 
void readNormalParameterData (CommentStream &infile, Keeper *const keeper, const TimeClass *const TimeInfo, const AreaClass *const Area, int minage, int maxage)
 This is the function used to read the normal distribution for the renewal data. More...
 
void readNumberData (CommentStream &infile, Keeper *const keeper, const TimeClass *const TimeInfo, const AreaClass *const Area, int minage, int maxage)
 This is the function used to read the numbers of the renewal data. More...
 
- 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...
 

Protected Attributes

int readoption
 This is the identifier of the function to be used to read the renewal data from file. More...
 
int index
 This is used as the index for the vectors of renewal data. More...
 
IntVector renewalTime
 This is the IntVector of timesteps that the renewal will take place on. More...
 
IntVector renewalArea
 This is the IntVector of areas that the renewal will take place on. More...
 
IntVector renewalAge
 This is the IntVector of ages that the renewal will take place on. More...
 
AgeBandMatrixPtrVector renewalDistribution
 This is the AgeBandMatrixPtrVector that contains the number and weight of the renewal population. More...
 
FormulaMatrixPtrVector renewalNumber
 This is the FormulaMatrixPtrVector that contains the number (from the input file) of the renewal population. More...
 
FormulaVector renewalMult
 This is the FormulaVector of the multiplier used to calculate the renewal population. More...
 
FormulaVector meanLength
 This is the FormulaVector of mean lengths of the stock used to calculate the renewal population. More...
 
FormulaVector sdevLength
 This is the FormulaVector of the standard deviation of the lengths of the stock used to calculate the renewal population. More...
 
FormulaVector relCond
 This is the FormulaVector of the condition factor used to calculate the weight of the renewal population. More...
 
FormulaVector alpha
 This is the FormulaVector of the multipliers used to calculate the length-weight relationship for the renewal. More...
 
FormulaVector beta
 This is the FormulaVector of the powers used to calculate the length-weight relationship for the renewal. More...
 
DoubleVector refWeight
 This is the DoubleVector of the reference weight values. More...
 
ConversionIndexCI
 This is the ConversionIndex used to convert from the renewal LengthGroupDivision to the stock LengthGroupDivision. More...
 
LengthGroupDivisionLgrpDiv
 This is the LengthGroupDivision of the renewal 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...
 

Detailed Description

This is the class used to calculate the renewal to a stock.

This class adds new fish into a stock, usually into the youngest age group. The total number of the recruits (in units of 10,000 fish) for each specified timestep is given in the input file. The lengths of the recruits are calculated from a Normal distribution, from a given mean and standard deviation. The mean weights of these length groups are then calculated from a specified length-weight relationship.

Constructor & Destructor Documentation

◆ RenewalData()

RenewalData::RenewalData ( CommentStream infile,
const IntVector areas,
const AreaClass *const  Area,
const TimeClass *const  TimeInfo,
Keeper *const  keeper,
const char *  refWeightFile,
const char *  givenname,
int  minage,
int  maxage,
double  DL 
)

This is the RenewalData constructor.

Parameters
infileis the CommentStream to read the renewal data from
areasis the IntVector of areas that the renewal data will be calculated on
Areais the AreaClass for the current model
TimeInfois the TimeClass for the current model
keeperis the Keeper for the current model
refWeightFileis the name of the reference weight file
givennameis the name of the stock for this RenewalData class
minageis the minimum age of the stock the renewals will be added to
maxageis the maximum age of the stock the renewals will be added to
DLis the step length of the length groups of the stock that the renewals will be added to

◆ ~RenewalData()

RenewalData::~RenewalData ( )

This is the default RenewalData destructor.

Member Function Documentation

◆ addRenewal()

void RenewalData::addRenewal ( AgeBandMatrix Alkeys,
int  area,
const TimeClass *const  TimeInfo 
)

This is the function used to add the renewal to the model.

Parameters
Alkeysis the AgeBandMatrix for the stock to which the renewal will be added
areais the internal area identifier for the renewal is taking place on
TimeInfois the TimeClass for the current model

◆ isRenewalStepArea()

int RenewalData::isRenewalStepArea ( int  area,
const TimeClass *const  TimeInfo 
)

This will check if the renewal process will take place on the current timestep and area.

Parameters
areais the internal area identifier for the renewal is taking place on
TimeInfois the TimeClass for the current model
Returns
1 if renewal data will be added to the model, 0 otherwise

◆ Print()

void RenewalData::Print ( ofstream &  outfile) const

This function will print the renewal data.

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

◆ readNormalConditionData()

void RenewalData::readNormalConditionData ( CommentStream infile,
Keeper *const  keeper,
const TimeClass *const  TimeInfo,
const AreaClass *const  Area,
int  minage,
int  maxage 
)
protected

This is the function used to read the normal distribution and condition factor for the renewal data.

Parameters
infileis the CommentStream to read the initial conditions data from
keeperis the Keeper for the current model
TimeInfois the TimeClass for the current model
Areais the AreaClass for the current model
minageis the minimum age of the renewals
maxageis the maximum age of the renewals

◆ readNormalParameterData()

void RenewalData::readNormalParameterData ( CommentStream infile,
Keeper *const  keeper,
const TimeClass *const  TimeInfo,
const AreaClass *const  Area,
int  minage,
int  maxage 
)
protected

This is the function used to read the normal distribution for the renewal data.

Parameters
infileis the CommentStream to read the initial conditions data from
keeperis the Keeper for the current model
TimeInfois the TimeClass for the current model
Areais the AreaClass for the current model
minageis the minimum age of the renewals
maxageis the maximum age of the renewals

◆ readNumberData()

void RenewalData::readNumberData ( CommentStream infile,
Keeper *const  keeper,
const TimeClass *const  TimeInfo,
const AreaClass *const  Area,
int  minage,
int  maxage 
)
protected

This is the function used to read the numbers of the renewal data.

Parameters
infileis the CommentStream to read the initial conditions data from
keeperis the Keeper for the current model
TimeInfois the TimeClass for the current model
Areais the AreaClass for the current model
minageis the minimum age of the renewals
maxageis the maximum age of the renewals

◆ Reset()

void RenewalData::Reset ( )

This function will reset the renewal data.

◆ setCI()

void RenewalData::setCI ( const LengthGroupDivision *const  GivenLDiv)

This will set the ConversionIndex required for to calculate the renewal.

Parameters
GivenLDivis the LengthGroupDivision for the stock

Member Data Documentation

◆ alpha

FormulaVector RenewalData::alpha
protected

This is the FormulaVector of the multipliers used to calculate the length-weight relationship for the renewal.

◆ beta

FormulaVector RenewalData::beta
protected

This is the FormulaVector of the powers used to calculate the length-weight relationship for the renewal.

◆ CI

ConversionIndex* RenewalData::CI
protected

This is the ConversionIndex used to convert from the renewal LengthGroupDivision to the stock LengthGroupDivision.

◆ index

int RenewalData::index
protected

This is used as the index for the vectors of renewal data.

◆ LgrpDiv

LengthGroupDivision* RenewalData::LgrpDiv
protected

This is the LengthGroupDivision of the renewal of the stock.

◆ meanLength

FormulaVector RenewalData::meanLength
protected

This is the FormulaVector of mean lengths of the stock used to calculate the renewal population.

◆ readoption

int RenewalData::readoption
protected

This is the identifier of the function to be used to read the renewal data from file.

◆ refWeight

DoubleVector RenewalData::refWeight
protected

This is the DoubleVector of the reference weight values.

◆ relCond

FormulaVector RenewalData::relCond
protected

This is the FormulaVector of the condition factor used to calculate the weight of the renewal population.

◆ renewalAge

IntVector RenewalData::renewalAge
protected

This is the IntVector of ages that the renewal will take place on.

◆ renewalArea

IntVector RenewalData::renewalArea
protected

This is the IntVector of areas that the renewal will take place on.

◆ renewalDistribution

AgeBandMatrixPtrVector RenewalData::renewalDistribution
protected

This is the AgeBandMatrixPtrVector that contains the number and weight of the renewal population.

◆ renewalMult

FormulaVector RenewalData::renewalMult
protected

This is the FormulaVector of the multiplier used to calculate the renewal population.

◆ renewalNumber

FormulaMatrixPtrVector RenewalData::renewalNumber
protected

This is the FormulaMatrixPtrVector that contains the number (from the input file) of the renewal population.

◆ renewalTime

IntVector RenewalData::renewalTime
protected

This is the IntVector of timesteps that the renewal will take place on.

◆ sdevLength

FormulaVector RenewalData::sdevLength
protected

This is the FormulaVector of the standard deviation of the lengths of the stock used to calculate the renewal population.


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