DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
config.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-2019 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 /* --------------------------------------------------------------------------
22  * DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
23  * AND EFFORT DISPLACEMENT
24  * Copyright (c) 2012, 2013, 2014 Francois Bastardie <fba@aqua.dtu.dk>
25  *
26  * This program is free software; you can redistribute it and/or modify
27  * it under the terms of the GNU General Public License as published by
28  * the Free Software Foundation; either version 2 of the License, or
29  * (at your option) any later version.
30  *
31  * This program is distributed in the hope that it will be useful,
32  * but WITHOUT ANY WARRANTY; without even the implied warranty of
33  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34  * GNU General Public License for more details.
35  *
36  * You should have received a copy of the GNU General Public License along
37  * with this program; if not, write to the Free Software Foundation, Inc.,
38  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
39  * --------------------------------------------------------------------------
40  */
41 #ifndef CONFIG_H
42 #define CONFIG_H
43 
44 #include <idtypes.h>
45 
46 #include <QList>
47 #include <QString>
48 
49 class Config
50 {
51  int nbpops;
52  int nbbenthospops;
53  int szGroups;
54 
55  QList <int> m_implicit_pops;
56  QList <int> m_implicit_pops_level2;
57  QList <int> m_grouped_tacs;
58  QList <double> m_calib_oth_landings;
59  QList <double> m_calib_weight_at_szgroup;
60  QList <double> m_calib_cpue_multiplier;
61 
62 public:
63  QList <types::NodeId> m_interesting_harbours;
64 
65 public:
66  Config();
67 
68  bool save (QString path, QString modelname, QString outputname, QString *error);
69 
70  static Config readFromFile (QString path, QString modelname, QString outputname);
71 
72  int getNbpops() const;
73  void setNbpops(int value);
74  int getNbbenthospops() const;
75  void setNbbenthospops(int value);
76  const QList<int> &implicit_pops() const;
77  const QList<int> &implicit_pops_level2() const;
78  const QList<int> &grouped_tacs() const;
79  void setImplicit_pops(const QList<int> &implicit_pops);
80  void setImplicit_pops_level2(const QList<int> &implicit_pops_level2);
81  void setGrouped_tacs(const QList<int> &grouped_tacs);
82  const QList<double> &calib_oth_landings() const;
83  void setCalib_oth_landings(const QList<double> &calib_oth_landings);
84  const QList<double> &calib_weight_at_szgroup() const;
85  void setCalib_weight_at_szgroup(const QList<double> &calib_weight_at_szgroup);
86  const QList<double> &calib_cpue_multiplier() const;
87  void setCalib_cpue_multiplier(const QList<double> &calib_cpue_multiplier);
88  int getSzGroups() const;
89  void setSzGroups(int value);
90 };
91 
92 #endif // CONFIG_H
Config()
Definition: config.cpp:35
const QList< int > & implicit_pops_level2() const
Definition: config.cpp:58
void setSzGroups(int value)
Definition: config.cpp:134
int getNbpops() const
Definition: config.cpp:108
const QList< int > & implicit_pops() const
Definition: config.cpp:48
static Config readFromFile(QString path, QString modelname, QString outputname)
Definition: config.cpp:196
void setNbbenthospops(int value)
Definition: config.cpp:123
const QList< double > & calib_weight_at_szgroup() const
Definition: config.cpp:88
Definition: config.h:49
QList< types::NodeId > m_interesting_harbours
Definition: config.h:63
int getSzGroups() const
Definition: config.cpp:129
const QList< double > & calib_cpue_multiplier() const
Definition: config.cpp:98
int getNbbenthospops() const
Definition: config.cpp:118
void setCalib_cpue_multiplier(const QList< double > &calib_cpue_multiplier)
Definition: config.cpp:103
void setImplicit_pops(const QList< int > &implicit_pops)
Definition: config.cpp:53
const QList< int > & grouped_tacs() const
Definition: config.cpp:68
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
void setCalib_oth_landings(const QList< double > &calib_oth_landings)
Definition: config.cpp:83
void setNbpops(int value)
Definition: config.cpp:113
void setGrouped_tacs(const QList< int > &grouped_tacs)
Definition: config.cpp:73
void setImplicit_pops_level2(const QList< int > &implicit_pops_level2)
Definition: config.cpp:63
const QList< double > & calib_oth_landings() const
Definition: config.cpp:78
bool save(QString path, QString modelname, QString outputname, QString *error)
Definition: config.cpp:139
void setCalib_weight_at_szgroup(const QList< double > &calib_weight_at_szgroup)
Definition: config.cpp:93