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

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

Powered By FusionForge