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

Annotation of /trunk/gadget/migrationpenalty.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef migrationpenalty_h
2 :     #define migrationpenalty_h
3 :    
4 :     #include "migration.h"
5 :     #include "stock.h"
6 :    
7 :     /**
8 :     * \class MigrationPenalty
9 :     * \brief This is the class used to calculate the likelihood scores based on population errors arising from incorrect migration
10 :     *
11 :     * This class calculates a penalty that is applied if there are insufficient fish of a particular stock on a particular area, due to changes in the migration of the stock. This can lead to values for the migration matrices that are meaningless. This can quickly lead to a model that is \b very wrong, and so this gets a high penalty. A 'reasonable' model will have a zero likelihood score from this component.
12 :     */
13 :     class MigrationPenalty : public Likelihood {
14 :     public:
15 :     /**
16 :     * \brief This is the default MigrationPenalty constructor
17 :     * \param infile is the CommentStream to read the likelihood parameters from
18 :     * \param weight is the weight for the likelihood component
19 :     * \param name is the name for the likelihood component
20 :     */
21 :     MigrationPenalty(CommentStream& infile, double weight, const char* name);
22 :     /**
23 :     * \brief This is the default MigrationPenalty destructor
24 :     */
25 :     virtual ~MigrationPenalty();
26 :     /**
27 :     * \brief This function will calculate the likelihood score for the current model
28 :     * \param TimeInfo is the TimeClass for the current model
29 :     */
30 :     virtual void addLikelihood(const TimeClass* const TimeInfo);
31 :     /**
32 :     * \brief This will select the fleets and stocks required to calculate the MigrationPenalty likelihood score
33 :     * \param Fleets is the FleetPtrVector of all the available fleets
34 :     * \param Stocks is the StockPtrVector of all the available stocks
35 :     */
36 :     void setFleetsAndStocks(FleetPtrVector& Fleets, StockPtrVector& Stocks);
37 :     /**
38 :     * \brief This function will reset the MigrationPenalty likelihood information
39 :     * \param keeper is the Keeper for the current model
40 :     */
41 :     virtual void Reset(const Keeper* const keeper);
42 :     /**
43 :     * \brief This function will print summary information from the MigrationPenalty likelihood calculation
44 :     * \param outfile is the ofstream that all the model likelihood information gets sent to
45 :     */
46 :     virtual void printSummary(ofstream& outfile);
47 :     /**
48 :     * \brief This function will print the summary MigrationPenalty likelihood information
49 :     * \param outfile is the ofstream that all the model information gets sent to
50 :     * \note This function is not used for this likelihood component
51 :     */
52 :     virtual void Print(ofstream& outfile) const;
53 :     private:
54 :     /**
55 :     * \brief This is the name of the stock that will be checked for incorrect migration
56 :     */
57 :     char* stockname;
58 :     /**
59 :     * \brief This is the Stock that will be checked for incorrect migration
60 :     */
61 :     Stock* stock;
62 :     /**
63 :     * \brief This is the DoubleVector of the coefficients to be applied when there is incorrect migration
64 :     */
65 :     DoubleVector powercoeffs;
66 :     };
67 :    
68 :     #endif

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

Powered By FusionForge