Gadget
|
This is the class used to calculate the initial population of a stock. More...
#include <initialcond.h>
Public Member Functions | |
InitialCond (CommentStream &infile, const IntVector &areas, Keeper *const keeper, const char *refWeightFile, const char *givenname, const AreaClass *const Area, double DL) | |
This is the InitialCond constructor. More... | |
~InitialCond () | |
This is the default InitialCond destructor. More... | |
void | Initialise (AgeBandMatrixPtrVector &Alkeys) |
This function will set the initial population of the stock to that specified in the initial conditions file. More... | |
void | setCI (const LengthGroupDivision *const GivenLDiv) |
This will set the ConversionIndex required for to calculate the initial conditions. More... | |
void | Print (ofstream &outfile) const |
This function will print the initial population. 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, int numage, int minage, const AreaClass *const Area) |
This is the function used to read the normal distribution and condition factor for the initial condtion data. More... | |
void | readNormalParameterData (CommentStream &infile, Keeper *const keeper, int numage, int minage, const AreaClass *const Area) |
This is the function used to read the normal distribution for the initial condtion data. More... | |
void | readNumberData (CommentStream &infile, Keeper *const keeper, int numage, int minage, const AreaClass *const Area) |
This is the function used to read the numbers of the initial population. 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 | |
LengthGroupDivision * | LgrpDiv |
This is the LengthGroupDivision of the initial population of the stock. More... | |
ConversionIndex * | CI |
This is the ConversionIndex used to convert from the initial population LengthGroupDivision to the stock LengthGroupDivision. More... | |
AgeBandMatrixPtrVector | initialPop |
This is the AgeBandMatrixPtrVector used to store the initial population. More... | |
FormulaMatrixPtrVector | initialNumber |
This is the FormulaMatrixPtrVector that contains the number (from the input file) of the initial population. More... | |
FormulaMatrix | areaFactor |
This is the FormulaMatrix of the area factor used to calculate the initial population. More... | |
FormulaMatrix | ageFactor |
This is the FormulaMatrix of the age factor used to calculate the initial population. More... | |
FormulaMatrix | relCond |
This is the FormulaMatrix of the condition factor used to calculate the weight of the initial population. More... | |
FormulaMatrix | meanLength |
This is the FormulaMatrix of the mean length at age used to calculate the initial population. More... | |
FormulaMatrix | sdevLength |
This is the FormulaMatrix of the standard deviation of the length at age used to calculate the initial population. More... | |
FormulaMatrix | alpha |
This is the FormulaMatrix of the alpha parameter used when calculating the length weight relationship. More... | |
FormulaMatrix | beta |
This is the FormulaMatrix of the beta parameter used when calculating the length weight relationship. More... | |
Formula | sdevMult |
This is the optional factor used when calculating the standard deviation of the length. More... | |
DoubleVector | refWeight |
This is the DoubleVector of the reference weight values. More... | |
int | readoption |
This is the identifier of the function to be used to read the initial population data from file. 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 initial population of a stock.
This class calculates the initial population for a model run. There are 2 ways to do this - either by specifying a normal distribution or by specifying the actual population to be used.
For the normal distribution, Gadget will calculate a length distribution for a population of 10,000 fish for each age group, which will then be multiplied by age and area factors to give the initial population.
For the numbers, Gadget will read a list of the population in each age-length cell for each area.
The initial weight for each age-length cell will be set to the reference weight, multiplied by a conditioning factor.
InitialCond::InitialCond | ( | CommentStream & | infile, |
const IntVector & | areas, | ||
Keeper *const | keeper, | ||
const char * | refWeightFile, | ||
const char * | givenname, | ||
const AreaClass *const | Area, | ||
double | DL | ||
) |
This is the InitialCond constructor.
infile | is the CommentStream to read the initial conditions data from |
areas | is the IntVector of areas that the initial population will be calculated on |
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 InitialCond class |
Area | is the AreaClass for the current model |
DL | is the step length of the length groups of the stock |
InitialCond::~InitialCond | ( | ) |
This is the default InitialCond destructor.
void InitialCond::Initialise | ( | AgeBandMatrixPtrVector & | Alkeys | ) |
This function will set the initial population of the stock to that specified in the initial conditions file.
Alkeys | is the AgeBandMatrixPtrVector that will contain the initial population of the stock |
void InitialCond::Print | ( | ofstream & | outfile | ) | const |
This function will print the initial population.
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 initial condtion data.
infile | is the CommentStream to read the initial conditions data from |
keeper | is the Keeper for the current model |
numage | is the number of age groups for the initial population |
minage | is the minimum age for the initial population |
Area | is the AreaClass for the current model |
|
protected |
This is the function used to read the normal distribution for the initial condtion data.
infile | is the CommentStream to read the initial conditions data from |
keeper | is the Keeper for the current model |
numage | is the number of age groups for the initial population |
minage | is the minimum age for the initial population |
Area | is the AreaClass for the current model |
|
protected |
This is the function used to read the numbers of the initial population.
infile | is the CommentStream to read the initial conditions data from |
keeper | is the Keeper for the current model |
numage | is the number of age groups for the initial population |
minage | is the minimum age for the initial population |
Area | is the AreaClass for the current model |
void InitialCond::setCI | ( | const LengthGroupDivision *const | GivenLDiv | ) |
This will set the ConversionIndex required for to calculate the initial conditions.
GivenLDiv | is the LengthGroupDivision for the stock |
|
protected |
This is the FormulaMatrix of the age factor used to calculate the initial population.
|
protected |
This is the FormulaMatrix of the alpha parameter used when calculating the length weight relationship.
|
protected |
This is the FormulaMatrix of the area factor used to calculate the initial population.
|
protected |
This is the FormulaMatrix of the beta parameter used when calculating the length weight relationship.
|
protected |
This is the ConversionIndex used to convert from the initial population LengthGroupDivision to the stock LengthGroupDivision.
|
protected |
This is the FormulaMatrixPtrVector that contains the number (from the input file) of the initial population.
|
protected |
This is the AgeBandMatrixPtrVector used to store the initial population.
|
protected |
This is the LengthGroupDivision of the initial population of the stock.
|
protected |
This is the FormulaMatrix of the mean length at age used to calculate the initial population.
|
protected |
This is the identifier of the function to be used to read the initial population data from file.
|
protected |
This is the DoubleVector of the reference weight values.
|
protected |
This is the FormulaMatrix of the condition factor used to calculate the weight of the initial population.
|
protected |
This is the FormulaMatrix of the standard deviation of the length at age used to calculate the initial population.
|
protected |
This is the optional factor used when calculating the standard deviation of the length.