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

Annotation of /trunk/gadget/growthcalc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12 - (view) (download)

1 : agomez 1 #ifndef growthcalc_h
2 :     #define growthcalc_h
3 :    
4 :     #include "areatime.h"
5 :     #include "conversionindex.h"
6 :     #include "formulamatrixptrvector.h"
7 :     #include "commentstream.h"
8 :     #include "popinfovector.h"
9 :     #include "livesonareas.h"
10 :     #include "modelvariablevector.h"
11 :     #include "keeper.h"
12 : ulcessvp 2 #include "matrix.h"
13 : agomez 1
14 :     /**
15 :     * \class GrowthCalcBase
16 :     * \brief This is the base class used to calculate the growth of a stock within the model
17 :     * \note This will always be overridden by the derived classes that actually calculate the growth
18 :     */
19 :     class GrowthCalcBase : protected LivesOnAreas {
20 :     public:
21 :     /**
22 :     * \brief This is the default GrowthCalcBase constructor
23 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
24 :     */
25 :     GrowthCalcBase(const IntVector& Areas);
26 :     /**
27 :     * \brief This is the default GrowthCalcBase destructor
28 :     */
29 :     ~GrowthCalcBase() {};
30 :     /**
31 :     * \brief This is the function that calculates the growth
32 :     * \param area is the area that the growth is being calculated on
33 : ulcessvp 12 * \param Lgrowth is the Matrix of doubles of the mean length increase for each length group of the stock
34 :     * \param Wgrowth is the Matrix of doubles of the mean weight increase for each length group of the stock
35 : agomez 1 * \param numGrow is the PopInfoVector of the current population of the stock
36 :     * \param Area is the AreaClass for the current model
37 :     * \param TimeInfo is the TimeClass for the current model
38 :     * \param Fphi is the DoubleVector of the feeding level of the stock
39 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
40 :     * \param LgrpDiv is the LengthGroupDivision of the stock
41 : ulcessvp 12 * \param size is the number of columns of the Matrix
42 : agomez 1 * \note This will be overridden by the derived classes that actually calculate the growth
43 :     */
44 : ulcessvp 2 virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
45 :     const PopInfoVector& numGrow, const AreaClass* const Area,
46 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
47 :     const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size) = 0;
48 : agomez 1 /**
49 :     * \brief This will return the power term of the length - weight relationship
50 :     * \return 0 (will be overridden in derived classes)
51 :     */
52 :     virtual double getPower() { return 0.0; };
53 :     /**
54 :     * \brief This will return the multiplier of the length - weight relationship
55 :     * \return 0 (will be overridden in derived classes)
56 :     */
57 :     virtual double getMult() { return 0.0; };
58 :     };
59 :    
60 :     /**
61 :     * \class GrowthCalcA
62 :     * \brief This is the class used to calculate the growth of a stock using the MULTSPEC growth function
63 :     */
64 :     class GrowthCalcA : public GrowthCalcBase {
65 :     public:
66 :     /**
67 :     * \brief This is the default GrowthCalcA constructor
68 :     * \param infile is the CommentStream to read the growth parameters from
69 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
70 :     * \param TimeInfo is the TimeClass for the current model
71 :     * \param keeper is the Keeper for the current model
72 :     */
73 :     GrowthCalcA(CommentStream& infile, const IntVector& Areas,
74 :     const TimeClass* const TimeInfo, Keeper* const keeper);
75 :     /**
76 :     * \brief This is the default GrowthCalcA destructor
77 :     */
78 :     ~GrowthCalcA() {};
79 :     /**
80 :     * \brief This is the function that calculates the growth using the MULTSPEC function
81 :     * \param area is the area that the growth is being calculated on
82 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
83 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
84 :     * \param numGrow is the PopInfoVector of the current population of the stock
85 :     * \param Area is the AreaClass for the current model
86 :     * \param TimeInfo is the TimeClass for the current model
87 :     * \param Fphi is the DoubleVector of the feeding level of the stock
88 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
89 :     * \param LgrpDiv is the LengthGroupDivision of the stock
90 :     */
91 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
92 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
93 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
94 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
95 : ulcessvp 2
96 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
97 :     const PopInfoVector& numGrow, const AreaClass* const Area,
98 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
99 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
100 : agomez 1 protected:
101 :     /**
102 :     * \brief This is the number of growth parameters (set to 9)
103 :     */
104 :     int numGrowthConstants;
105 :     /**
106 :     * \brief This is the ModelVariableVector of growth parameters
107 :     */
108 :     ModelVariableVector growthPar;
109 :     };
110 :    
111 :     /**
112 :     * \class GrowthCalcB
113 :     * \brief This is the class used to calculate the growth when reading the growth directly from a file
114 :     */
115 :     class GrowthCalcB : public GrowthCalcBase {
116 :     public:
117 :     /**
118 :     * \brief This is the default GrowthCalcB constructor
119 :     * \param infile is the CommentStream to read the growth parameters from
120 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
121 :     * \param TimeInfo is the TimeClass for the current model
122 :     * \param keeper is the Keeper for the current model
123 :     * \param Area is the AreaClass for the current model
124 :     * \param lenindex is the CharPtrVector of the lengths used for the growth of the stock
125 :     */
126 :     GrowthCalcB(CommentStream& infile, const IntVector& Areas, const TimeClass* const TimeInfo,
127 :     Keeper* const keeper, const AreaClass* const Area, const CharPtrVector& lenindex);
128 :     /**
129 :     * \brief This is the default GrowthCalcB destructor
130 :     */
131 :     ~GrowthCalcB();
132 :     /**
133 :     * \brief This is the function that calculates the growth read from file
134 :     * \param area is the area that the growth is being calculated on
135 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
136 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
137 :     * \param numGrow is the PopInfoVector of the current population of the stock
138 :     * \param Area is the AreaClass for the current model
139 :     * \param TimeInfo is the TimeClass for the current model
140 :     * \param Fphi is the DoubleVector of the feeding level of the stock
141 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
142 :     * \param LgrpDiv is the LengthGroupDivision of the stock
143 :     */
144 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
145 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
146 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
147 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
148 : ulcessvp 2
149 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
150 :     const PopInfoVector& numGrow, const AreaClass* const Area,
151 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
152 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
153 : agomez 1 protected:
154 :     /**
155 :     * \brief This is the FormulaMatrixPtrVector of increase in length for each length group
156 :     */
157 :     FormulaMatrixPtrVector lgrowth;
158 :     /**
159 :     * \brief This is the FormulaMatrixPtrVector of increase in weight for each length group
160 :     */
161 :     FormulaMatrixPtrVector wgrowth;
162 :     };
163 :    
164 :     /**
165 :     * \class GrowthCalcC
166 :     * \brief This is the class used to calculate the growth of a stock using a weight-based Von Bertalanffy growth function
167 :     */
168 :     class GrowthCalcC : public GrowthCalcBase {
169 :     public:
170 :     /**
171 :     * \brief This is the default GrowthCalcC constructor
172 :     * \param infile is the CommentStream to read the growth parameters from
173 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
174 :     * \param TimeInfo is the TimeClass for the current model
175 :     * \param LgrpDiv is the LengthGroupDivision of the stock
176 :     * \param keeper is the Keeper for the current model
177 :     * \param refWeightFile is the name of the file containing the reference weight information for the stock
178 :     */
179 :     GrowthCalcC(CommentStream& infile, const IntVector& Areas, const TimeClass* const TimeInfo,
180 :     const LengthGroupDivision* const LgrpDiv, Keeper* const keeper, const char* refWeightFile);
181 :     /**
182 :     * \brief This is the default GrowthCalcC destructor
183 :     */
184 :     ~GrowthCalcC() {};
185 :     /**
186 :     * \brief This is the function that calculates the growth using a weight-based Von Bertalanffy function
187 :     * \param area is the area that the growth is being calculated on
188 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
189 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
190 :     * \param numGrow is the PopInfoVector of the current population of the stock
191 :     * \param Area is the AreaClass for the current model
192 :     * \param TimeInfo is the TimeClass for the current model
193 :     * \param Fphi is the DoubleVector of the feeding level of the stock
194 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
195 :     * \param LgrpDiv is the LengthGroupDivision of the stock
196 :     */
197 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
198 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
199 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
200 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
201 : ulcessvp 2
202 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
203 :     const PopInfoVector& numGrow, const AreaClass* const Area,
204 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
205 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
206 : agomez 1 /**
207 :     * \brief This will return the power term of the length - weight relationship
208 :     * \return lgrowthPar[7]
209 :     */
210 :     virtual double getPower() { return lgrowthPar[7]; };
211 :     /**
212 :     * \brief This will return the multiplier of the length - weight relationship
213 :     * \return lgrowthPar[6]
214 :     */
215 :     virtual double getMult() { return lgrowthPar[6]; };
216 :     protected:
217 :     /**
218 :     * \brief This is the number of weight growth parameters (set to 6)
219 :     */
220 :     int numWeightGrowthConstants;
221 :     /**
222 :     * \brief This is the number of length growth parameters (set to 9)
223 :     */
224 :     int numLengthGrowthConstants;
225 :     /**
226 :     * \brief This is the ModelVariableVector of weight growth parameters
227 :     */
228 :     ModelVariableVector wgrowthPar;
229 :     /**
230 :     * \brief This is the ModelVariableVector of length growth parameters
231 :     */
232 :     ModelVariableVector lgrowthPar;
233 :     /**
234 :     * \brief This is the DoubleVector of the reference weight values
235 :     */
236 :     DoubleVector refWeight;
237 :     };
238 :    
239 :     /**
240 :     * \class GrowthCalcD
241 :     * \brief This is the class used to calculate the growth of a stock using the Jones growth function
242 :     */
243 :     class GrowthCalcD : public GrowthCalcBase {
244 :     public:
245 :     /**
246 :     * \brief This is the default GrowthCalcD constructor
247 :     * \param infile is the CommentStream to read the growth parameters from
248 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
249 :     * \param TimeInfo is the TimeClass for the current model
250 :     * \param LgrpDiv is the LengthGroupDivision of the stock
251 :     * \param keeper is the Keeper for the current model
252 :     * \param refWeightFile is the name of the file containing the reference weight information for the stock
253 :     */
254 :     GrowthCalcD(CommentStream& infile, const IntVector& Areas, const TimeClass* const TimeInfo,
255 :     const LengthGroupDivision* const LgrpDiv, Keeper* const keeper, const char* refWeightFile);
256 :     /**
257 :     * \brief This is the default GrowthCalcD destructor
258 :     */
259 :     ~GrowthCalcD() {};
260 :     /**
261 :     * \brief This is the function that calculates the growth using the Jones growth function
262 :     * \param area is the area that the growth is being calculated on
263 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
264 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
265 :     * \param numGrow is PopInfoVector of the the current population of the stock
266 :     * \param Area is the AreaClass for the current model
267 :     * \param TimeInfo is the TimeClass for the current model
268 :     * \param Fphi is the DoubleVector of the feeding level of the stock
269 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
270 :     * \param LgrpDiv is the LengthGroupDivision of the stock
271 :     */
272 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
273 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
274 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
275 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
276 : ulcessvp 2
277 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
278 :     const PopInfoVector& numGrow, const AreaClass* const Area,
279 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
280 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
281 : agomez 1 /**
282 :     * \brief This will return the power term of the length - weight relationship
283 :     * \return lgrowthPar[7]
284 :     */
285 :     virtual double getPower() { return lgrowthPar[7]; };
286 :     /**
287 :     * \brief This will return the multiplier of the length - weight relationship
288 :     * \return lgrowthPar[6]
289 :     */
290 :     virtual double getMult() { return lgrowthPar[6]; };
291 :     protected:
292 :     /**
293 :     * \brief This is the number of weight growth parameters (set to 6)
294 :     */
295 :     int numWeightGrowthConstants;
296 :     /**
297 :     * \brief This is the number of length growth parameters (set to 9)
298 :     */
299 :     int numLengthGrowthConstants;
300 :     /**
301 :     * \brief This is the ModelVariableVector of weight growth parameters
302 :     */
303 :     ModelVariableVector wgrowthPar;
304 :     /**
305 :     * \brief This is the ModelVariableVector of length growth parameters
306 :     */
307 :     ModelVariableVector lgrowthPar;
308 :     /**
309 :     * \brief This is the DoubleVector of the reference weight values
310 :     */
311 :     DoubleVector refWeight;
312 :     };
313 :    
314 :     /**
315 :     * \class GrowthCalcE
316 :     * \brief This is the class used to calculate the growth of a stock using an extended form of the Von Bertalanffy function
317 :     */
318 :     class GrowthCalcE : public GrowthCalcBase {
319 :     public:
320 :     /**
321 :     * \brief This is the default GrowthCalcE constructor
322 :     * \param infile is the CommentStream to read the growth parameters from
323 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
324 :     * \param TimeInfo is the TimeClass for the current model
325 :     * \param LgrpDiv is the LengthGroupDivision of the stock
326 :     * \param keeper is the Keeper for the current model
327 :     * \param refWeightFile is the name of the file containing the reference weight information for the stock
328 :     */
329 :     GrowthCalcE(CommentStream& infile, const IntVector& Areas, const TimeClass* const TimeInfo,
330 :     const LengthGroupDivision* const LgrpDiv, Keeper* const keeper, const char* refWeightFile);
331 :     /**
332 :     * \brief This is the default GrowthCalcE destructor
333 :     */
334 :     ~GrowthCalcE() {};
335 :     /**
336 :     * \brief This is the function that calculates the growth using an extended Von Bertalanffy growth function
337 :     * \param area is the area that the growth is being calculated on
338 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
339 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
340 :     * \param numGrow is the PopInfoVector of the current population of the stock
341 :     * \param Area is the AreaClass for the current model
342 :     * \param TimeInfo is the TimeClass for the current model
343 :     * \param Fphi is the DoubleVector of the feeding level of the stock
344 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
345 :     * \param LgrpDiv is the LengthGroupDivision of the stock
346 :     */
347 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
348 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
349 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
350 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
351 : ulcessvp 2
352 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
353 :     const PopInfoVector& numGrow, const AreaClass* const Area,
354 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
355 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
356 : agomez 1 /**
357 :     * \brief This will return the power term of the length - weight relationship
358 :     * \return lgrowthPar[7]
359 :     */
360 :     virtual double getPower() { return lgrowthPar[7]; };
361 :     /**
362 :     * \brief This will return the multiplier of the length - weight relationship
363 :     * \return lgrowthPar[6]
364 :     */
365 :     virtual double getMult() { return lgrowthPar[6]; };
366 :     protected:
367 :     /**
368 :     * \brief This is the number of weight growth parameters (set to 6)
369 :     */
370 :     int numWeightGrowthConstants;
371 :     /**
372 :     * \brief This is the number of length growth parameters (set to 9)
373 :     */
374 :     int numLengthGrowthConstants;
375 :     /**
376 :     * \brief This is the ModelVariableVector of weight growth parameters
377 :     */
378 :     ModelVariableVector wgrowthPar;
379 :     /**
380 :     * \brief This is the ModelVariableVector of length growth parameters
381 :     */
382 :     ModelVariableVector lgrowthPar;
383 :     /**
384 :     * \brief This is the DoubleVector of the reference weight values
385 :     */
386 :     DoubleVector refWeight;
387 :     /**
388 :     * \brief This is the FormulaVector of parameters for the year effect
389 :     */
390 :     FormulaVector yearEffect;
391 :     /**
392 :     * \brief This is the FormulaVector of parameters for the step effect
393 :     */
394 :     FormulaVector stepEffect;
395 :     /**
396 :     * \brief This is the FormulaVector of parameters for the area effect
397 :     */
398 :     FormulaVector areaEffect;
399 :     };
400 :    
401 :     /**
402 :     * \class GrowthCalcF
403 :     * \brief This is the class used to calculate the growth of a stock using a length based Von Bertalanffy growth function
404 :     */
405 :     class GrowthCalcF : public GrowthCalcBase {
406 :     public:
407 :     /**
408 :     * \brief This is the default GrowthCalcF constructor
409 :     * \param infile is the CommentStream to read the growth parameters from
410 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
411 :     * \param TimeInfo is the TimeClass for the current model
412 :     * \param keeper is the Keeper for the current model
413 :     * \param Area is the AreaClass for the current model
414 :     * \param lenindex is the CharPtrVector of the lengths used for the growth of the stock
415 :     */
416 :     GrowthCalcF(CommentStream& infile, const IntVector& Areas, const TimeClass* const TimeInfo,
417 :     Keeper* const keeper, const AreaClass* const Area, const CharPtrVector& lenindex);
418 :     /**
419 :     * \brief This is the default GrowthCalcF destructor
420 :     */
421 :     ~GrowthCalcF();
422 :     /**
423 :     * \brief This is the function that calculates the growth using a length based Von Bertalanffy growth function
424 :     * \param area is the area that the growth is being calculated on
425 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
426 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
427 :     * \param numGrow is the PopInfoVector of the current population of the stock
428 :     * \param Area is the AreaClass for the current model
429 :     * \param TimeInfo is the TimeClass for the current model
430 :     * \param Fphi is the DoubleVector of the feeding level of the stock
431 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
432 :     * \param LgrpDiv is the LengthGroupDivision of the stock
433 :     */
434 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
435 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
436 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
437 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
438 : ulcessvp 2
439 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
440 :     const PopInfoVector& numGrow, const AreaClass* const Area,
441 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
442 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
443 : agomez 1 protected:
444 :     /**
445 :     * \brief This is the number of growth parameters (set to 2)
446 :     */
447 :     int numGrowthConstants;
448 :     /**
449 :     * \brief This is the ModelVariableVector of growth parameters
450 :     */
451 :     ModelVariableVector growthPar;
452 :     /**
453 :     * \brief This is the FormulaMatrixPtrVector of increase in weight for each length group
454 :     */
455 :     FormulaMatrixPtrVector wgrowth;
456 :     };
457 :    
458 :     /**
459 :     * \class GrowthCalcG
460 :     * \brief This is the class used to calculate the growth of a stock using a power growth function
461 :     */
462 :     class GrowthCalcG : public GrowthCalcBase {
463 :     public:
464 :     /**
465 :     * \brief This is the default GrowthCalcG constructor
466 :     * \param infile is the CommentStream to read the growth parameters from
467 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
468 :     * \param TimeInfo is the TimeClass for the current model
469 :     * \param keeper is the Keeper for the current model
470 :     * \param Area is the AreaClass for the current model
471 :     * \param lenindex is the CharPtrVector of the lengths used for the growth of the stock
472 :     */
473 :     GrowthCalcG(CommentStream& infile, const IntVector& Areas, const TimeClass* const TimeInfo,
474 :     Keeper* const keeper, const AreaClass* const Area, const CharPtrVector& lenindex);
475 :     /**
476 :     * \brief This is the default GrowthCalcG destructor
477 :     */
478 :     ~GrowthCalcG();
479 :     /**
480 :     * \brief This is the function that calculates the growth using a power growth function
481 :     * \param area is the area that the growth is being calculated on
482 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
483 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
484 :     * \param numGrow is PopInfoVector of the the current population of the stock
485 :     * \param Area is the AreaClass for the current model
486 :     * \param TimeInfo is the TimeClass for the current model
487 :     * \param Fphi is the DoubleVector of the feeding level of the stock
488 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
489 :     * \param LgrpDiv is the LengthGroupDivision of the stock
490 :     */
491 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
492 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
493 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
494 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
495 : ulcessvp 2
496 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
497 :     const PopInfoVector& numGrow, const AreaClass* const Area,
498 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
499 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
500 : agomez 1 protected:
501 :     /**
502 :     * \brief This is the number of growth parameters (set to 2)
503 :     */
504 :     int numGrowthConstants;
505 :     /**
506 :     * \brief This is the ModelVariableVector of growth parameters
507 :     */
508 :     ModelVariableVector growthPar;
509 :     /**
510 :     * \brief This is the FormulaMatrixPtrVector of increase in weight for each length group
511 :     */
512 :     FormulaMatrixPtrVector wgrowth;
513 :     };
514 :    
515 :     /**
516 :     * \class GrowthCalcH
517 :     * \brief This is the class used to calculate the growth of a stock using a simple length based Von Bertalanffy growth function
518 :     */
519 :     class GrowthCalcH : public GrowthCalcBase {
520 :     public:
521 :     /**
522 :     * \brief This is the default GrowthCalcH constructor
523 :     * \param infile is the CommentStream to read the growth parameters from
524 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
525 :     * \param TimeInfo is the TimeClass for the current model
526 :     * \param keeper is the Keeper for the current model
527 :     */
528 :     GrowthCalcH(CommentStream& infile, const IntVector& Areas,
529 :     const TimeClass* const TimeInfo, Keeper* const keeper);
530 :     /**
531 :     * \brief This is the default GrowthCalcH destructor
532 :     */
533 :     ~GrowthCalcH() {};
534 :     /**
535 :     * \brief This is the function that calculates the growth using a simple length based Von Bertalanffy growth function
536 :     * \param area is the area that the growth is being calculated on
537 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
538 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
539 :     * \param numGrow is the PopInfoVector of the current population of the stock
540 :     * \param Area is the AreaClass for the current model
541 :     * \param TimeInfo is the TimeClass for the current model
542 :     * \param Fphi is the DoubleVector of the feeding level of the stock
543 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
544 :     * \param LgrpDiv is the LengthGroupDivision of the stock
545 :     */
546 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
547 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
548 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
549 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
550 : ulcessvp 2
551 :    
552 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
553 :     const PopInfoVector& numGrow, const AreaClass* const Area,
554 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
555 :     const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
556 :    
557 : agomez 1 /**
558 :     * \brief This will return the power term of the length - weight relationship
559 :     * \return growthPar[3]
560 :     */
561 :     virtual double getPower() { return growthPar[3]; };
562 :     /**
563 :     * \brief This will return the multiplier of the length - weight relationship
564 :     * \return growthPar[2]
565 :     */
566 :     virtual double getMult() { return growthPar[2]; };
567 :     protected:
568 :     /**
569 :     * \brief This is the number of growth parameters (set to 4)
570 :     */
571 :     int numGrowthConstants;
572 :     /**
573 :     * \brief This is the ModelVariableVector of growth parameters
574 :     */
575 :     ModelVariableVector growthPar;
576 :     };
577 :    
578 :     /**
579 :     * \class GrowthCalcI
580 :     * \brief This is the class used to calculate the growth of a stock using a simple Jones growth function
581 :     */
582 :     class GrowthCalcI : public GrowthCalcBase {
583 :     public:
584 :     /**
585 :     * \brief This is the default GrowthCalcI constructor
586 :     * \param infile is the CommentStream to read the growth parameters from
587 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
588 :     * \param TimeInfo is the TimeClass for the current model
589 :     * \param keeper is the Keeper for the current model
590 :     */
591 :     GrowthCalcI(CommentStream& infile, const IntVector& Areas,
592 :     const TimeClass* const TimeInfo, Keeper* const keeper);
593 :     /**
594 :     * \brief This is the default GrowthCalcI destructor
595 :     */
596 :     ~GrowthCalcI() {};
597 :     /**
598 :     * \brief This is the function that calculates the growth using a simple Jones growth function
599 :     * \param area is the area that the growth is being calculated on
600 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
601 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
602 :     * \param numGrow is the PopInfoVector of the current population of the stock
603 :     * \param Area is the AreaClass for the current model
604 :     * \param TimeInfo is the TimeClass for the current model
605 :     * \param Fphi is the DoubleVector of the feeding level of the stock
606 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
607 :     * \param LgrpDiv is the LengthGroupDivision of the stock
608 :     */
609 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
610 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
611 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
612 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
613 : ulcessvp 2
614 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
615 :     const PopInfoVector& numGrow, const AreaClass* const Area,
616 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
617 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
618 : agomez 1 /**
619 :     * \brief This will return the power term of the length - weight relationship
620 :     * \return growthPar[4]
621 :     */
622 :     virtual double getPower() { return growthPar[4]; };
623 :     /**
624 :     * \brief This will return the multiplier of the length - weight relationship
625 :     * \return growthPar[5]
626 :     */
627 :     virtual double getMult() { return growthPar[5]; };
628 :     protected:
629 :     /**
630 :     * \brief This is the number of growth parameters (set to 6)
631 :     */
632 :     int numGrowthConstants;
633 :     /**
634 :     * \brief This is the ModelVariableVector of growth parameters
635 :     */
636 :     ModelVariableVector growthPar;
637 :     };
638 :    
639 :     /**
640 :     * \class GrowthCalcJ
641 :     * \brief This is the class used to calculate the growth of a stock using a simple length based Von Bertalanffy growth function with a non-zero value for t0
642 :     */
643 :     class GrowthCalcJ : public GrowthCalcBase {
644 :     public:
645 :     /**
646 :     * \brief This is the default GrowthCalcJ constructor
647 :     * \param infile is the CommentStream to read the growth parameters from
648 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
649 :     * \param TimeInfo is the TimeClass for the current model
650 :     * \param keeper is the Keeper for the current model
651 :     */
652 :     GrowthCalcJ(CommentStream& infile, const IntVector& Areas,
653 :     const TimeClass* const TimeInfo, Keeper* const keeper);
654 :     /**
655 :     * \brief This is the default GrowthCalcJ destructor
656 :     */
657 :     ~GrowthCalcJ() {};
658 :     /**
659 :     * \brief This is the function that calculates the growth using a simple length based Von Bertalanffy growth function with a non-zero value for t0
660 :     * \param area is the area that the growth is being calculated on
661 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
662 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
663 :     * \param numGrow is the PopInfoVector of the current population of the stock
664 :     * \param Area is the AreaClass for the current model
665 :     * \param TimeInfo is the TimeClass for the current model
666 :     * \param Fphi is the DoubleVector of the feeding level of the stock
667 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
668 :     * \param LgrpDiv is the LengthGroupDivision of the stock
669 :     */
670 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
671 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
672 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
673 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
674 : ulcessvp 2
675 :    
676 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
677 :     const PopInfoVector& numGrow, const AreaClass* const Area,
678 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
679 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
680 : agomez 1 /**
681 :     * \brief This will return the power term of the length - weight relationship
682 :     * \return growthPar[4]
683 :     */
684 :     virtual double getPower() { return growthPar[4]; };
685 :     /**
686 :     * \brief This will return the multiplier of the length - weight relationship
687 :     * \return growthPar[3]
688 :     */
689 :     virtual double getMult() { return growthPar[3]; };
690 :     protected:
691 :     /**
692 :     * \brief This is the number of growth parameters (set to 5)
693 :     */
694 :     int numGrowthConstants;
695 :     /**
696 :     * \brief This is the ModelVariableVector of growth parameters
697 :     */
698 :     ModelVariableVector growthPar;
699 :     };
700 :    
701 :     /**
702 :     * \class GrowthCalcK
703 :     * \brief This is the class used to calculate the growth of a stock using a simple length based Gompertz function
704 :     */
705 :     class GrowthCalcK : public GrowthCalcBase {
706 :     public:
707 :     /**
708 :     * \brief This is the default GrowthCalcK constructor
709 :     * \param infile is the CommentStream to read the growth parameters from
710 :     * \param Areas is the IntVector of areas that the growth calculation can take place on
711 :     * \param TimeInfo is the TimeClass for the current model
712 :     * \param keeper is the Keeper for the current model
713 :     */
714 :     GrowthCalcK(CommentStream& infile, const IntVector& Areas,
715 :     const TimeClass* const TimeInfo, Keeper* const keeper);
716 :     /**
717 :     * \brief This is the default GrowthCalcK destructor
718 :     */
719 :     ~GrowthCalcK() {};
720 :     /**
721 :     * \brief This is the function that calculates the growth using a simple length based Gompertz function
722 :     * \param area is the area that the growth is being calculated on
723 :     * \param Lgrowth is the DoubleVector of the mean length increase for each length group of the stock
724 :     * \param Wgrowth is the DoubleVector of the mean weight increase for each length group of the stock
725 :     * \param numGrow is the PopInfoVector of the current population of the stock
726 :     * \param Area is the AreaClass for the current model
727 :     * \param TimeInfo is the TimeClass for the current model
728 :     * \param Fphi is the DoubleVector of the feeding level of the stock
729 :     * \param MaxCon is the DoubleVector of the maximum consumption of the stock
730 :     * \param LgrpDiv is the LengthGroupDivision of the stock
731 :     */
732 : ulcessvp 4 // virtual void calcGrowth(int area, DoubleVector& Lgrowth, DoubleVector& Wgrowth,
733 :     // const PopInfoVector& numGrow, const AreaClass* const Area,
734 :     // const TimeClass* const TimeInfo, const DoubleVector& Fphi,
735 :     // const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv);
736 : ulcessvp 2
737 :     virtual void calcGrowth(int area, double* Lgrowth, double* Wgrowth,
738 :     const PopInfoVector& numGrow, const AreaClass* const Area,
739 :     const TimeClass* const TimeInfo, const DoubleVector& Fphi,
740 : ulcessvp 4 const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size);
741 : agomez 1 /**
742 :     * \brief This will return the power term of the length - weight relationship
743 :     * \return growthPar[4]
744 :     */
745 :     virtual double getPower() { return growthPar[4]; };
746 :     /**
747 :     * \brief This will return the multiplier of the length - weight relationship
748 :     * \return growthPar[3]
749 :     */
750 :     virtual double getMult() { return growthPar[3]; };
751 :     protected:
752 :     /**
753 :     * \brief This is the number of growth parameters (set to 5)
754 :     */
755 :     int numGrowthConstants;
756 :     /**
757 :     * \brief This is the ModelVariableVector of growth parameters
758 :     */
759 :     ModelVariableVector growthPar;
760 :     };
761 :    
762 :     #endif

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

Powered By FusionForge