Gadget
stray.h
Go to the documentation of this file.
1 #ifndef stray_h
2 #define stray_h
3 
4 #include "areatime.h"
5 #include "formulavector.h"
6 #include "commentstream.h"
7 #include "agebandmatrix.h"
8 #include "intmatrix.h"
9 #include "livesonareas.h"
10 #include "selectfunc.h"
11 #include "stock.h"
12 
19 class StrayData : public HasName, protected LivesOnAreas {
20 public:
31  StrayData(CommentStream& infile, const LengthGroupDivision* const LgrpDiv,
32  const IntVector& areas, const AreaClass* const Area, const char* givenname,
33  const TimeClass* const TimeInfo, Keeper* const keeper);
37  ~StrayData();
42  void Print(ofstream& outfile) const;
47  void setStock(StockPtrVector& stockvec);
53  void addStrayStock(int area, const TimeClass* const TimeInfo);
60  void storeStrayingStock(int area, AgeBandMatrix& Alkeys, const TimeClass* const TimeInfo);
68  void storeStrayingStock(int area, AgeBandMatrix& Alkeys,
69  AgeBandMatrixRatio& TagAlkeys, const TimeClass* const TimeInfo);
76  int isStrayStepArea(int area, const TimeClass* const TimeInfo);
81  void Reset(const TimeClass* const TimeInfo);
90  void setTagged();
95  void addStrayTag(const char* tagname);
100  void deleteStrayTag(const char* tagname);
101 protected:
117  double ratioscale;
161  int istagged;
162 };
163 
164 #endif
This class implements a dynamic vector of AgeBandMatrix values.
Definition: agebandmatrixptrvector.h:12
Definition: agebandmatrixratioptrvector.h:16
Definition: agebandmatrixratio.h:15
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 class implements a dynamic vector of char values.
Definition: charptrvector.h:8
This is the class used to strip comments (and whitespace) from any input stream.
Definition: commentstream.h:40
This class implements a dynamic vector of ConversionIndex values.
Definition: conversionindexptrvector.h:10
This class implements a dynamic vector of double values.
Definition: doublevector.h:11
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 base class used to calculate the selection level as a function of length.
Definition: selectfunc.h:14
This class implements a dynamic vector of Stock values.
Definition: stockptrvector.h:10
This is the class used to calculate the movement from one stock to other stocks.
Definition: stray.h:19
void addStrayStock(int area, const TimeClass *const TimeInfo)
This will move the calculated straying stock from the current stock into the new stock age-length cel...
Definition: stray.cc:219
DoubleVector strayProportion
This is the DoubleVector of the proportion of each length group of the stock that will stray.
Definition: stray.h:137
const StockPtrVector & getStrayStocks()
This will calculate the stocks the current stock can stray into.
Definition: stray.cc:306
AgeBandMatrixRatioPtrVector tagStorage
This is the AgeBandMatrixRatioPtrVector used to store the calculated straying tagged stocks.
Definition: stray.h:149
void addStrayTag(const char *tagname)
This will add a tagging experiment to the straying calculations.
Definition: stray.cc:323
void deleteStrayTag(const char *tagname)
This will remove a tagging experiment from the straying calculations.
Definition: stray.cc:329
double ratioscale
This is used to scale the ratios to ensure that they will always sum to 1.
Definition: stray.h:117
~StrayData()
This is the default StrayData destructor.
Definition: stray.cc:100
StrayData(CommentStream &infile, const LengthGroupDivision *const LgrpDiv, const IntVector &areas, const AreaClass *const Area, const char *givenname, const TimeClass *const TimeInfo, Keeper *const keeper)
This is the StrayData constructor.
Definition: stray.cc:12
IntVector strayArea
This is the IntVector of areas that the straying will take place on.
Definition: stray.h:129
void storeStrayingStock(int area, AgeBandMatrix &Alkeys, const TimeClass *const TimeInfo)
This will store the part of the current stock that will stray into other stocks.
Definition: stray.cc:168
int isStrayStepArea(int area, const TimeClass *const TimeInfo)
This will check if the straying process will take place on the current timestep.
Definition: stray.cc:243
void setStock(StockPtrVector &stockvec)
This will select the stocks required for the straying process.
Definition: stray.cc:110
IntVector ratioindex
This is the IntVector used as an index for the ratio vector.
Definition: stray.h:121
ConversionIndexPtrVector CI
This is the ConversionIndexPtrVector used to convert from the current stock lengths to the straying s...
Definition: stray.h:153
StockPtrVector strayStocks
This is the StockPtrVector of the stocks that the straying fish will move to.
Definition: stray.h:105
void Print(ofstream &outfile) const
This function will print the straying information.
Definition: stray.cc:292
int minStrayLength
This is the minimum length group division of the straying stock.
Definition: stray.h:157
IntVector strayStep
This is the IntVector of timesteps that the straying will take place on.
Definition: stray.h:125
CharPtrVector strayStockNames
This is the CharPtrVector of the names of the straying stocks.
Definition: stray.h:109
int istagged
This is the flag used to denote whether the stock has been included in a tagging experiment or not.
Definition: stray.h:161
SelectFunc * fnProportion
This is the SelectFunc used to calculate of the proportion of each length group of the stock that wil...
Definition: stray.h:141
void setTagged()
This function will initialise the tagging experiments for the straying calculations.
Definition: stray.cc:310
FormulaVector strayRatio
This is the FormulaVector of the ratio of the stock that will stray.
Definition: stray.h:113
void Reset(const TimeClass *const TimeInfo)
This will reset the straying information for the current model run.
Definition: stray.cc:253
LengthGroupDivision * LgrpDiv
This is the LengthGroupDivision of the stock.
Definition: stray.h:133
AgeBandMatrixPtrVector Storage
This is the AgeBandMatrixPtrVector used to store the calculated straying stocks.
Definition: stray.h:145
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87