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/understocking.h
[mareframe] / trunk / gadget / understocking.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/understocking.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef understocking_h
2 :     #define understocking_h
3 :    
4 :     #include "likelihood.h"
5 :     #include "areatime.h"
6 :     #include "commentstream.h"
7 :     #include "intmatrix.h"
8 :     #include "doublematrix.h"
9 :     #include "predatorptrvector.h"
10 :     #include "preyptrvector.h"
11 :    
12 :     /**
13 :     * \class UnderStocking
14 :     * \brief This is the class used to calculate a likelihood score based on the overconsumption of a stock by predators
15 :     *
16 :     * This class calculates a penalty that is applied if there are insufficient fish of a particular stock to meet the requirements for the predators - usually the fleet landings data. This indicates that there are less fish in the model than have been landed (as recorded by the landings data), which is \b very wrong, and so this gets a high penalty. A 'reasonable' model will have a zero likelihood score from this component.
17 :     */
18 :     class UnderStocking : public Likelihood {
19 :     public:
20 :     /**
21 :     * \brief This is the UnderStocking constructor
22 :     * \param infile is the CommentStream to read the understocking data from
23 :     * \param Area is the AreaClass for the current model
24 :     * \param TimeInfo is the TimeClass for the current model
25 :     * \param weight is the weight for the likelihood component
26 :     * \param name is the name for the likelihood component
27 :     */
28 :     UnderStocking(CommentStream& infile, const AreaClass* const Area,
29 :     const TimeClass* const TimeInfo, double weight, const char* name);
30 :     /**
31 :     * \brief This is the default UnderStocking destructor
32 :     */
33 :     virtual ~UnderStocking();
34 :     /**
35 :     * \brief This function will calculate the likelihood score for the UnderStocking component
36 :     * \param TimeInfo is the TimeClass for the current model
37 :     */
38 :     virtual void addLikelihood(const TimeClass* const TimeInfo);
39 :     /**
40 :     * \brief This function will reset the UnderStocking likelihood information
41 :     * \param keeper is the Keeper for the current model
42 :     */
43 :     virtual void Reset(const Keeper* const keeper);
44 :     /**
45 :     * \brief This function will print summary information from each non-zero UnderStocking likelihood calculation
46 :     * \param outfile is the ofstream that all the model likelihood information gets sent to
47 :     */
48 :     virtual void printSummary(ofstream& outfile);
49 :     /**
50 :     * \brief This function will print the non-zero UnderStocking 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 will select the predators and preys required to calculate the UnderStocking likelihood score
56 :     * \param predvec is the PredatorPtrVector of all the available predators
57 :     * \param preyvec is the PreyPtrVector of all the available preys
58 :     * \param Area is the AreaClass for the current model
59 :     */
60 :     void setPredatorsAndPreys(PredatorPtrVector& predvec, PreyPtrVector& preyvec, const AreaClass* const Area);
61 :     private:
62 :     /**
63 :     * \brief This is the PredatorPtrVector of the predators that will be checked for understocking
64 :     */
65 :     PredatorPtrVector predators;
66 :     /**
67 :     * \brief This is the PreyPtrVector of the preys that will be checked for understocking
68 :     */
69 :     PreyPtrVector preys;
70 :     /**
71 :     * \brief This is the IntVector used to store area information
72 :     */
73 :     IntVector areas;
74 :     /**
75 :     * \brief This is the power coefficient used when calculating the likelihood score (default 2)
76 :     */
77 :     double powercoeff;
78 :     /**
79 :     * \brief This is the flag used to denote whether the likelihood score is to be based on the predation by all the predators or not
80 :     */
81 :     int allpredators;
82 :     /**
83 :     * \brief This is the IntVector used to store information about the years when the likelihood score was calculated to be non-zero
84 :     */
85 :     IntVector Years;
86 :     /**
87 :     * \brief This is the IntVector used to store information about the steps when the likelihood score was calculated to be non-zero
88 :     */
89 :     IntVector Steps;
90 :     /**
91 :     * \brief This is the DoubleVector used to store the calculated non-zero likelihood score
92 :     */
93 :     DoubleVector likelihoodValues;
94 :     /**
95 :     * \brief This is the CharPtrVector used to store the names of the predators that will be checked for understocking
96 :     */
97 :     CharPtrVector prednames;
98 :     };
99 :    
100 :     #endif

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

Powered By FusionForge