DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
populationdata.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------
2  * DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
3  * AND EFFORT DISPLACEMENT
4  * Copyright (c) 2012, 2013, 2014 Francois Bastardie <fba@aqua.dtu.dk>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  * --------------------------------------------------------------------------
20  */
21 #ifndef POPULATIONDATA_H
22 #define POPULATIONDATA_H
23 
24 #include <QVector>
25 
27 {
28  int id;
29  QString mName;
30  QVector<double> aggregate;
31  QVector<double> catches;
32  QVector<double> discards;
33  QVector<double> mortality;
34  QVector<double> natmortality;
35  QVector<double> numberatage;
36  QVector<double> weightatage;
37  QVector<double> maturityatage;
38  QVector<double> SSB;
39 
40  double totAggregate, totCatches, totDiscards, totMortality, totNatMortality, totNumberAtAge, totWeightAtAge, totMaturityAtAge, totSSB;
41 
42 public:
44  : id(-1), aggregate(), catches(), discards(), mortality(), natmortality(), numberatage(), weightatage(), maturityatage(), SSB(), totAggregate(0.0), totMortality(0.0), totSSB(0.0) { }
45 
46  explicit PopulationData(int _id);
48 
49  int getId() const;
50  QString getName() const;
51  void setName(const QString &value);
52 
53  double getAggregateTot() const;
54  void setAggregateTot(double value);
55 
56  double getCatchesTot() const;
57  void setCatchesTot(double value);
58 
59  double getDiscardsTot() const;
60  void setDiscardsTot(double value);
61 
62  double getMortalityTot() const;
63  void setMortalityTot(double value);
64 
65  double getNatMortalityTot() const;
66  void setNatMortalityTot(double value);
67 
68  double getNumberAtAgeTot() const;
69  void setNumberAtAgeTot(double value);
70 
71  double getWeightAtAgeTot() const;
72  void setWeightAtAgeTot(double value);
73 
74  double getMaturityAtAgeTot() const;
75  void setMaturityAtAgeTot(double value);
76 
77  double getSSBTot() const;
78  void setSSBTot(double value);
79 
80  void clear() {
81  for (int i = 0; i < aggregate.size(); ++i)
82  aggregate[i] = 0;
83  for (int i = 0; i < catches.size(); ++i)
84  catches[i] = 0;
85  for (int i = 0; i < discards.size(); ++i)
86  discards[i] = 0;
87  for (int i = 0; i < mortality.size(); ++i)
88  mortality[i] = 0;
89  for (int i = 0; i < natmortality.size(); ++i)
90  natmortality[i] = 0;
91  for (int i = 0; i < numberatage.size(); ++i)
92  numberatage[i] = 0;
93  for (int i = 0; i < weightatage.size(); ++i)
94  weightatage[i] = 0;
95  for (int i = 0; i < maturityatage.size(); ++i)
96  maturityatage[i] = 0;
97  for (int i = 0; i < SSB.size(); ++i)
98  SSB[i] = 0;
99  totAggregate = totCatches = totDiscards = totMortality = totNatMortality = totSSB = 0;
100  }
101 
102  const QVector<double> &getAggregate() const;
103  double getAggregateAt(int i) const;
104  void setAggregate(const QVector<double> &value);
105  const QVector<double> &getCatches() const;
106  double getCatchesAt(int i) const;
107  void setCatches(const QVector<double> &value);
108  const QVector<double> &getDiscards() const;
109  double getDiscardsAt(int i) const;
110  void setDiscards(const QVector<double> &value);
111  const QVector<double> &getMortality() const;
112  double getMortalityAt(int i) const;
113  void setMortality(const QVector<double> &value);
114  const QVector<double> &getNatMortality() const;
115  double getNatMortalityAt(int i) const;
116  void setNatMortality(const QVector<double> &value);
117  const QVector<double> &getNumberAtAge() const;
118  double getNumberAtAgeAt(int i) const;
119  void setNumberAtAge(const QVector<double> &value);
120  const QVector<double> &getWeightAtAge() const;
121  double getWeightAtAgeAt(int i) const;
122  void setWeightAtAge(const QVector<double> &value);
123  const QVector<double> &getMaturityAtAge() const;
124  double getMaturityAtAgeAt(int i) const;
125  void setMaturityAtAge(const QVector<double> &value);
126  const QVector<double> &getSSB() const;
127  void setSSB(const QVector<double> &value);
128 };
129 
130 #endif // POPULATIONDATA_H
double getNatMortalityAt(int i) const
Definition: populationdata.cpp:147
void setDiscards(const QVector< double > &value)
Definition: populationdata.cpp:121
void setNumberAtAgeTot(double value)
double getNumberAtAgeAt(int i) const
Definition: populationdata.cpp:176
void setAggregate(const QVector< double > &value)
Definition: populationdata.cpp:81
void setSSBTot(double value)
Definition: populationdata.cpp:280
const QVector< double > & getMortality() const
Definition: populationdata.cpp:130
const QVector< double > & getNumberAtAge() const
Definition: populationdata.cpp:171
void setCatchesTot(double value)
Definition: populationdata.cpp:301
double getMaturityAtAgeTot() const
double getNumberAtAgeTot() const
const QVector< double > & getDiscards() const
Definition: populationdata.cpp:109
const QVector< double > & getMaturityAtAge() const
Definition: populationdata.cpp:212
int getId() const
Definition: populationdata.cpp:250
const QVector< double > & getSSB() const
Definition: populationdata.cpp:233
double getMortalityAt(int i) const
Definition: populationdata.cpp:140
double getAggregateAt(int i) const
Definition: populationdata.cpp:74
void setDiscardsTot(double value)
void setAggregateTot(double value)
Definition: populationdata.cpp:291
double getNatMortalityTot() const
Definition: populationdata.cpp:260
double getDiscardsAt(int i) const
Definition: populationdata.cpp:114
void setMaturityAtAgeTot(double value)
QString getName() const
Definition: populationdata.cpp:59
void setNatMortality(const QVector< double > &value)
Definition: populationdata.cpp:162
void clear()
Definition: populationdata.h:80
double getWeightAtAgeAt(int i) const
Definition: populationdata.cpp:197
void setMaturityAtAge(const QVector< double > &value)
Definition: populationdata.cpp:224
double getCatchesTot() const
Definition: populationdata.cpp:296
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
double getMortalityTot() const
Definition: populationdata.cpp:255
double getDiscardsTot() const
double getCatchesAt(int i) const
Definition: populationdata.cpp:94
double getMaturityAtAgeAt(int i) const
Definition: populationdata.cpp:217
const QVector< double > & getNatMortality() const
Definition: populationdata.cpp:135
void setName(const QString &value)
Definition: populationdata.cpp:64
double getSSBTot() const
Definition: populationdata.cpp:275
PopulationData()
Definition: populationdata.h:43
void setNatMortalityTot(double value)
Definition: populationdata.cpp:270
const QVector< double > & getCatches() const
Definition: populationdata.cpp:89
Definition: populationdata.h:26
void setSSB(const QVector< double > &value)
Definition: populationdata.cpp:238
void setWeightAtAgeTot(double value)
void setWeightAtAge(const QVector< double > &value)
Definition: populationdata.cpp:204
void setMortalityTot(double value)
Definition: populationdata.cpp:265
void setNumberAtAge(const QVector< double > &value)
Definition: populationdata.cpp:183
void setCatches(const QVector< double > &value)
Definition: populationdata.cpp:101
const QVector< double > & getAggregate() const
Definition: populationdata.cpp:69
double getAggregateTot() const
Definition: populationdata.cpp:286
const QVector< double > & getWeightAtAge() const
Definition: populationdata.cpp:192
double getWeightAtAgeTot() const
void setMortality(const QVector< double > &value)
Definition: populationdata.cpp:154