Gadget
renewal.h
Go to the documentation of this file.
1 #ifndef renewal_h
2 #define renewal_h
3 
5 #include "conversionindex.h"
6 #include "commentstream.h"
7 #include "stock.h"
8 #include "livesonareas.h"
9 
16 class RenewalData : public HasName, protected LivesOnAreas {
17 public:
31  RenewalData(CommentStream& infile, const IntVector& areas, const AreaClass* const Area,
32  const TimeClass* const TimeInfo, Keeper* const keeper, const char* refWeightFile,
33  const char* givenname, int minage, int maxage, double DL);
37  ~RenewalData();
44  void addRenewal(AgeBandMatrix& Alkeys, int area, const TimeClass* const TimeInfo);
49  void setCI(const LengthGroupDivision* const GivenLDiv);
54  void Print(ofstream& outfile) const;
58  void Reset();
65  int isRenewalStepArea(int area, const TimeClass* const TimeInfo);
66 protected:
76  void readNormalConditionData(CommentStream& infile, Keeper* const keeper,
77  const TimeClass* const TimeInfo, const AreaClass* const Area, int minage, int maxage);
87  void readNormalParameterData(CommentStream& infile, Keeper* const keeper,
88  const TimeClass* const TimeInfo, const AreaClass* const Area, int minage, int maxage);
98  void readNumberData(CommentStream& infile, Keeper* const keeper,
99  const TimeClass* const TimeInfo, const AreaClass* const Area, int minage, int maxage);
107  int index;
164 };
165 
166 #endif
This class implements a dynamic vector of AgeBandMatrix values.
Definition: agebandmatrixptrvector.h:12
This class implements a vector of PopInfoIndexVector values, indexed from minage not 0.
Definition: agebandmatrix.h:15
This is the class used to store information about the areas used for the current model.
Definition: areatime.h:18
This is the class used to strip comments (and whitespace) from any input stream.
Definition: commentstream.h:40
This is the class used to convert information from one LengthGroupDivision length structure to a seco...
Definition: conversionindex.h:12
This class implements a dynamic vector of double values.
Definition: doublevector.h:11
This class implements a dynamic vector of FormulaMatrix values.
Definition: formulamatrixptrvector.h:10
This class implements a dynamic vector of Formula values.
Definition: formulavector.h:10
This is the base class for any object that has a name.
Definition: hasname.h:10
This class implements a dynamic vector of int values.
Definition: intvector.h:11
This is the class used to store information about the variables that are used in model simulation.
Definition: keeper.h:17
This is the class used to store information about the length groups of the modelled stock population.
Definition: lengthgroup.h:10
This is the class used to store information about the areas an object is defined on for the current m...
Definition: livesonareas.h:10
IntVector areas
This is the IntVector of internal areas that the object is defined on.
Definition: livesonareas.h:51
This is the class used to calculate the renewal to a stock.
Definition: renewal.h:16
FormulaVector meanLength
This is the FormulaVector of mean lengths of the stock used to calculate the renewal population.
Definition: renewal.h:135
FormulaVector sdevLength
This is the FormulaVector of the standard deviation of the lengths of the stock used to calculate the...
Definition: renewal.h:139
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.
Definition: renewal.cc:9
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.
Definition: renewal.cc:259
AgeBandMatrixPtrVector renewalDistribution
This is the AgeBandMatrixPtrVector that contains the number and weight of the renewal population.
Definition: renewal.h:123
FormulaVector beta
This is the FormulaVector of the powers used to calculate the length-weight relationship for the rene...
Definition: renewal.h:151
void addRenewal(AgeBandMatrix &Alkeys, int area, const TimeClass *const TimeInfo)
This is the function used to add the renewal to the model.
Definition: renewal.cc:524
IntVector renewalAge
This is the IntVector of ages that the renewal will take place on.
Definition: renewal.h:119
void Print(ofstream &outfile) const
This function will print the renewal data.
Definition: renewal.cc:377
int readoption
This is the identifier of the function to be used to read the renewal data from file.
Definition: renewal.h:103
LengthGroupDivision * LgrpDiv
This is the LengthGroupDivision of the renewal of the stock.
Definition: renewal.h:163
ConversionIndex * CI
This is the ConversionIndex used to convert from the renewal LengthGroupDivision to the stock LengthG...
Definition: renewal.h:159
void Reset()
This function will reset the renewal data.
Definition: renewal.cc:399
FormulaVector relCond
This is the FormulaVector of the condition factor used to calculate the weight of the renewal populat...
Definition: renewal.h:143
DoubleVector refWeight
This is the DoubleVector of the reference weight values.
Definition: renewal.h:155
~RenewalData()
This is the default RenewalData destructor.
Definition: renewal.cc:356
FormulaVector alpha
This is the FormulaVector of the multipliers used to calculate the length-weight relationship for the...
Definition: renewal.h:147
FormulaVector renewalMult
This is the FormulaVector of the multiplier used to calculate the renewal population.
Definition: renewal.h:131
int isRenewalStepArea(int area, const TimeClass *const TimeInfo)
This will check if the renewal process will take place on the current timestep and area.
Definition: renewal.cc:516
void setCI(const LengthGroupDivision *const GivenLDiv)
This will set the ConversionIndex required for to calculate the renewal.
Definition: renewal.cc:364
IntVector renewalTime
This is the IntVector of timesteps that the renewal will take place on.
Definition: renewal.h:111
FormulaMatrixPtrVector renewalNumber
This is the FormulaMatrixPtrVector that contains the number (from the input file) of the renewal popu...
Definition: renewal.h:127
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.
Definition: renewal.cc:189
IntVector renewalArea
This is the IntVector of areas that the renewal will take place on.
Definition: renewal.h:115
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.
Definition: renewal.cc:116
int index
This is used as the index for the vectors of renewal data.
Definition: renewal.h:107
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87