Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Annotation of /trunk/gadget/surveyindices.h
[mareframe] / trunk / gadget / surveyindices.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/surveyindices.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef surveyindices_h
2 :     #define surveyindices_h
3 :    
4 :     #include "likelihood.h"
5 :     #include "fleet.h"
6 :     #include "commentstream.h"
7 :     #include "sionstep.h"
8 :    
9 :     /**
10 :     * \class SurveyIndices
11 :     * \brief This is the class used to calculate a likelihood score by fitting a linear regression line to calculated and modelled survey indices
12 :     *
13 :     * This class calculates a likelihood score by fitting a linear regression line to the difference between survey indices calculated within the model and survey indices calculated directly from standardized survey data. This is used to compare the relative abundance levels of the stock. The model will calculate an index for the population, and then fit a linear regression line between these calculated indices and those input from data files. The precise format of the linear regression line depends on a number of options specified by the user.
14 :     *
15 :     * \note This likelihood component is based on the \b current population, where as most likelihood components are based on the population at the beginning of the timestep. It would be better if this likelihood component was changed to be based on the population at the beginning of the timestep.
16 :     */
17 :     class SurveyIndices : public Likelihood {
18 :     public:
19 :     /**
20 :     * \brief This is the SurveyIndices constructor
21 :     * \param infile is the CommentStream to read the SurveyIndices data from
22 :     * \param Area is the AreaClass for the current model
23 :     * \param TimeInfo is the TimeClass for the current model
24 :     * \param weight is the weight for the likelihood component
25 :     * \param name is the name for the likelihood component
26 :     */
27 :     SurveyIndices(CommentStream& infile, const AreaClass* const Area,
28 :     const TimeClass* const TimeInfo, double weight, const char* name);
29 :     /**
30 :     * \brief This is the default SurveyIndices destructor
31 :     */
32 :     virtual ~SurveyIndices();
33 :     /**
34 :     * \brief This function will calculate the likelihood score for the SurveyIndices component
35 :     * \param TimeInfo is the TimeClass for the current model
36 :     */
37 :     virtual void addLikelihood(const TimeClass* const TimeInfo);
38 :     /**
39 :     * \brief This will select the fleets and stocks required to calculate the SurveyIndices likelihood score
40 :     * \param Fleets is the FleetPtrVector of all the available fleets
41 :     * \param Stocks is the StockPtrVector of all the available stocks
42 :     */
43 :     void setFleetsAndStocks(FleetPtrVector& Fleets, StockPtrVector& Stocks);
44 :     /**
45 :     * \brief This function will reset the SurveyIndices likelihood information
46 :     * \param keeper is the Keeper for the current model
47 :     */
48 :     virtual void Reset(const Keeper* const keeper);
49 :     /**
50 :     * \brief This function will print the summary SurveyIndices likelihood information
51 :     * \param outfile is the ofstream that all the model information gets sent to
52 :     */
53 :     virtual void Print(ofstream& outfile) const;
54 :     /**
55 :     * \brief This function will print information from each SurveyIndices calculation
56 :     * \param outfile is the ofstream that all the model likelihood information gets sent to
57 :     * \param TimeInfo is the TimeClass for the current model
58 :     */
59 :     virtual void printLikelihood(ofstream& outfile, const TimeClass* const TimeInfo) {
60 :     SI->printLikelihood(outfile, TimeInfo); };
61 :     /**
62 :     * \brief This function will print summary information from each SurveyIndices likelihood calculation
63 :     * \param outfile is the ofstream that all the model likelihood information gets sent to
64 :     */
65 :     virtual void printSummary(ofstream& outfile) { SI->printSummary(outfile, weight); };
66 :     protected:
67 :     /**
68 :     * \brief This is the SIOnStep used to calculate the likelihood score by fitting a linear regression line to the difference between the calculated indices and the input indices
69 :     */
70 :     SIOnStep* SI;
71 :     /**
72 :     * \brief This is the IntMatrix used to store area information
73 :     */
74 :     IntMatrix areas;
75 :     /**
76 :     * \brief This is the CharPtrVector of the names of the stocks that will be used to calculate the likelihood score
77 :     */
78 :     CharPtrVector stocknames;
79 :     /**
80 :     * \brief This is the CharPtrVector of the names of any fleets that will be used to calculate the likelihood score
81 :     */
82 :     CharPtrVector fleetnames;
83 :     };
84 :    
85 :     #endif

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge