Gadget
catchinkilos.h
Go to the documentation of this file.
1 #ifndef catchinkilos_h
2 #define catchinkilos_h
3 
4 #include "likelihood.h"
5 #include "actionattimes.h"
6 #include "commentstream.h"
7 #include "charptrvector.h"
8 #include "predatorptrvector.h"
9 #include "doublematrix.h"
10 #include "intmatrix.h"
11 
18 class CatchInKilos : public Likelihood {
19 public:
28  CatchInKilos(CommentStream& infile, const AreaClass* const Area,
29  const TimeClass* const TimeInfo, double weight, const char* name);
33  ~CatchInKilos();
38  virtual void Reset(const Keeper* const keeper);
43  virtual void Print(ofstream& outfile) const;
48  virtual void printSummary(ofstream& outfile);
54  virtual void printLikelihood(ofstream& outfile, const TimeClass* const TimeInfo);
59  virtual void addLikelihood(const TimeClass* const TimeInfo);
65  void setFleetsAndStocks(FleetPtrVector& Fleets, StockPtrVector& Stocks);
66 private:
73  void readCatchInKilosData(CommentStream& infile, const TimeClass* TimeInfo, int numarea);
79  double calcLikSumSquares(const TimeClass* const TimeInfo);
83  CharPtrVector fleetnames;
87  CharPtrVector stocknames;
91  CharPtrVector areaindex;
95  IntMatrix preyindex;
99  PredatorPtrVector predators;
103  IntMatrix areas;
108  DoubleMatrix obsDistribution;
113  DoubleMatrix modelDistribution;
118  DoubleMatrix likelihoodValues;
123  int yearly;
127  double epsilon;
131  ActionAtTimes AAT;
135  IntVector Years;
139  IntVector Steps;
143  int timeindex;
147  int functionnumber;
151  char* functionname;
152 };
153 
154 #endif
This is the class used to associate actions with specific timesteps within the model.
Definition: actionattimes.h:14
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 calculate a likelihood score based on the biomass of stocks caught by fleet...
Definition: catchinkilos.h:18
CatchInKilos(CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, double weight, const char *name)
This is the CatchInKilos constructor.
Definition: catchinkilos.cc:12
virtual void addLikelihood(const TimeClass *const TimeInfo)
This function will calculate the likelihood score for the CatchInKilos component.
Definition: catchinkilos.cc:173
virtual void printLikelihood(ofstream &outfile, const TimeClass *const TimeInfo)
This function will print information from each CatchInKilos calculation.
Definition: catchinkilos.cc:393
virtual void printSummary(ofstream &outfile)
This function will print summary information from each CatchInKilos likelihood calculation.
Definition: catchinkilos.cc:437
virtual void Print(ofstream &outfile) const
This function will print the summary CatchInKilos likelihood information.
Definition: catchinkilos.cc:137
~CatchInKilos()
This is the default CatchInKilos destructor.
Definition: catchinkilos.cc:209
void setFleetsAndStocks(FleetPtrVector &Fleets, StockPtrVector &Stocks)
This will select the fleets and stocks required to calculate the CatchInKilos likelihood score.
Definition: catchinkilos.cc:220
virtual void Reset(const Keeper *const keeper)
This function will reset the CatchInKilos likelihood information.
Definition: catchinkilos.cc:128
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 DoubleVector values.
Definition: doublematrix.h:11
This class implements a dynamic vector of Fleet values.
Definition: fleetptrvector.h:10
This class implements a dynamic vector of IntVector values.
Definition: intmatrix.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 base class used to calculate the likelihood scores used to compare the modelled data in t...
Definition: likelihood.h:24
double weight
This stores the weight to be applied to the likelihood component.
Definition: likelihood.h:112
This class implements a dynamic vector of Predator values.
Definition: predatorptrvector.h:10
This class implements a dynamic vector of Stock values.
Definition: stockptrvector.h:10
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87