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

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

Powered By FusionForge