Gadget
|
This is the class used to calculate the renewal to a stock. More...
#include <renewal.h>
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... | |
![]() | |
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... | |
![]() | |
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... | |
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... | |
ConversionIndex * | CI |
This is the ConversionIndex used to convert from the renewal LengthGroupDivision to the stock LengthGroupDivision. More... | |
LengthGroupDivision * | LgrpDiv |
This is the LengthGroupDivision of the renewal of the stock. More... | |
![]() | |
IntVector | areas |
This is the IntVector of internal areas that the object is defined on. More... | |
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.
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.
infile | is the CommentStream to read the renewal data from |
areas | is the IntVector of areas that the renewal data will be calculated on |
Area | is the AreaClass for the current model |
TimeInfo | is the TimeClass for the current model |
keeper | is the Keeper for the current model |
refWeightFile | is the name of the reference weight file |
givenname | is the name of the stock for this RenewalData class |
minage | is the minimum age of the stock the renewals will be added to |
maxage | is the maximum age of the stock the renewals will be added to |
DL | is the step length of the length groups of the stock that the renewals will be added to |
RenewalData::~RenewalData | ( | ) |
This is the default RenewalData destructor.
void RenewalData::addRenewal | ( | AgeBandMatrix & | Alkeys, |
int | area, | ||
const TimeClass *const | TimeInfo | ||
) |
This is the function used to add the renewal to the model.
Alkeys | is the AgeBandMatrix for the stock to which the renewal will be added |
area | is the internal area identifier for the renewal is taking place on |
TimeInfo | is the TimeClass for the current model |
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.
area | is the internal area identifier for the renewal is taking place on |
TimeInfo | is the TimeClass for the current model |
void RenewalData::Print | ( | ofstream & | outfile | ) | const |
This function will print the renewal data.
outfile | is the ofstream that all the model information gets sent to |
|
protected |
This is the function used to read the normal distribution and condition factor for the renewal data.
infile | is the CommentStream to read the initial conditions data from |
keeper | is the Keeper for the current model |
TimeInfo | is the TimeClass for the current model |
Area | is the AreaClass for the current model |
minage | is the minimum age of the renewals |
maxage | is the maximum age of the renewals |
|
protected |
This is the function used to read the normal distribution for the renewal data.
infile | is the CommentStream to read the initial conditions data from |
keeper | is the Keeper for the current model |
TimeInfo | is the TimeClass for the current model |
Area | is the AreaClass for the current model |
minage | is the minimum age of the renewals |
maxage | is the maximum age of the renewals |
|
protected |
This is the function used to read the numbers of the renewal data.
infile | is the CommentStream to read the initial conditions data from |
keeper | is the Keeper for the current model |
TimeInfo | is the TimeClass for the current model |
Area | is the AreaClass for the current model |
minage | is the minimum age of the renewals |
maxage | is the maximum age of the renewals |
void RenewalData::Reset | ( | ) |
This function will reset the renewal data.
void RenewalData::setCI | ( | const LengthGroupDivision *const | GivenLDiv | ) |
This will set the ConversionIndex required for to calculate the renewal.
GivenLDiv | is the LengthGroupDivision for the stock |
|
protected |
This is the FormulaVector of the multipliers used to calculate the length-weight relationship for the renewal.
|
protected |
This is the FormulaVector of the powers used to calculate the length-weight relationship for the renewal.
|
protected |
This is the ConversionIndex used to convert from the renewal LengthGroupDivision to the stock LengthGroupDivision.
|
protected |
This is used as the index for the vectors of renewal data.
|
protected |
This is the LengthGroupDivision of the renewal of the stock.
|
protected |
This is the FormulaVector of mean lengths of the stock used to calculate the renewal population.
|
protected |
This is the identifier of the function to be used to read the renewal data from file.
|
protected |
This is the DoubleVector of the reference weight values.
|
protected |
This is the FormulaVector of the condition factor used to calculate the weight of the renewal population.
|
protected |
This is the IntVector of ages that the renewal will take place on.
|
protected |
This is the IntVector of areas that the renewal will take place on.
|
protected |
This is the AgeBandMatrixPtrVector that contains the number and weight of the renewal population.
|
protected |
This is the FormulaVector of the multiplier used to calculate the renewal population.
|
protected |
This is the FormulaMatrixPtrVector that contains the number (from the input file) of the renewal population.
|
protected |
This is the IntVector of timesteps that the renewal will take place on.
|
protected |
This is the FormulaVector of the standard deviation of the lengths of the stock used to calculate the renewal population.