FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTmodelparameters.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef FMTmodelparameters_H_INCLUDED
9#define FMTmodelparameters_H_INCLUDED
10
12#include "FMTobject.hpp"
13#include <boost/serialization/export.hpp>
14#include <boost/serialization/array.hpp>
15#include <boost/serialization/vector.hpp>
16#include <array>
17#include <vector>
18
19namespace Models
20{
21 //DocString: FMTintmodelparameters
22 //
24 {
25 LENGTH = 0,
26 SEED = 1,
31 UPDATE = 6,
33 };
34 //DocString: FMTdblmodelparameters
35 //
37 {
41 };
42 //DocString: FMTboolmodelparameters
43 //
45 {
49 SHOW_LOCK_IN_SCHEDULES = 3,//Not needed or change parameters in fonctions ... maybe more for task
50 PRESOLVE_CAN_REMOVE_STATIC_THEMES =4,//The presolve will allow the removing of static themes even in use (it can alter the area section).
51 DEBUG_MATRIX = 5,//If true, when an error occur in lpmodel initialsolve or resolve, the matrix will be written.
53 };
54
55
56 // DocString: FMTmodelparameters
76 {
77 friend class boost::serialization::access;
78 // DocString: FMTmodelparameters::serialize
82 template<class Archive>
83 void serialize(Archive& ar, const unsigned int version)
84 {
85 try {
86 ar& boost::serialization::make_nvp("FMTobject", boost::serialization::base_object<FMTobject>(*this));
87 ar& BOOST_SERIALIZATION_NVP(intparameters);
88 ar& BOOST_SERIALIZATION_NVP(dblparameters);
89 ar& BOOST_SERIALIZATION_NVP(boolparameters);
90 ar& BOOST_SERIALIZATION_NVP(compresstime);
91 }
92 catch (...)
93 {
94 _exhandler->printexceptions("", "FMTmodelparameters::serialize", __LINE__, __FILE__);
95 }
96 }
97 private:
98 std::array<int, LastIntModelParam> intparameters;
99 std::array<double, LastDblModelParam> dblparameters;
100 std::array<bool, LastBoolModelParam> boolparameters;
101 std::vector<int> compresstime;
102 public:
103 // DocString: FMTmodelparameters()
108 // DocString: FMTmodelparameters(const FMTmodelparameters&)
113 // DocString: FMTmodelparameters::operator=(const FMTmodelparameters&)
117 FMTmodelparameters& operator = (const FMTmodelparameters& rhs);
118 // DocString: ~FMTmodelparameters
123 // DocString: FMTmodelparameters(FMTmodelparameters&&)
128 // DocString: FMTmodelparameters::operator=(FMTmodelparameters&& rhs)
132 FMTmodelparameters& operator =(FMTmodelparameters&& rhs) =default;
133 //###Setter
134 bool setintparameter(const FMTintmodelparameters& key,const int& value);
135 bool setdblparameter(const FMTdblmodelparameters& key,const double& value);
136 bool setboolparameter(const FMTboolmodelparameters& key,const bool& value);
137 bool setperiodcompresstime(const int& period, const int& value);
138 //###Getter
140 double getdblparameter(const FMTdblmodelparameters& key) const;
142 int getperiodcompresstime(const int& period)const;
143 std::vector<int> getcompresstime() const;
144 };
145}
146BOOST_CLASS_EXPORT_KEY(Models::FMTmodelparameters)
147#endif // FMTmodelparameters_H_INCLUDED
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTobject.hpp:50
Definition: FMTmodelparameters.hpp:76
bool getboolparameter(const FMTboolmodelparameters &key) const
std::vector< int > getcompresstime() const
bool setboolparameter(const FMTboolmodelparameters &key, const bool &value)
bool setintparameter(const FMTintmodelparameters &key, const int &value)
FMTmodelparameters(FMTmodelparameters &&rhs)=default
double getdblparameter(const FMTdblmodelparameters &key) const
int getperiodcompresstime(const int &period) const
bool setdblparameter(const FMTdblmodelparameters &key, const double &value)
bool setperiodcompresstime(const int &period, const int &value)
int getintparameter(const FMTintmodelparameters &key) const
FMTmodelparameters(const FMTmodelparameters &rhs)
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
FMTdblmodelparameters
Definition: FMTmodelparameters.hpp:37
@ TOLERANCE
Definition: FMTmodelparameters.hpp:38
@ LastDblModelParam
Definition: FMTmodelparameters.hpp:40
@ GOALING_SCHEDULE_WEIGHT
Definition: FMTmodelparameters.hpp:39
FMTintmodelparameters
Definition: FMTmodelparameters.hpp:24
@ LENGTH
Definition: FMTmodelparameters.hpp:25
@ LastIntModelParam
Definition: FMTmodelparameters.hpp:32
@ UPDATE
Definition: FMTmodelparameters.hpp:31
@ SEED
Definition: FMTmodelparameters.hpp:26
@ MATRIX_TYPE
Definition: FMTmodelparameters.hpp:30
@ NUMBER_OF_THREADS
Definition: FMTmodelparameters.hpp:29
@ PRESOLVE_ITERATIONS
Definition: FMTmodelparameters.hpp:28
@ NUMBER_OF_ITERATIONS
Definition: FMTmodelparameters.hpp:27
FMTboolmodelparameters
Definition: FMTmodelparameters.hpp:45
@ DEBUG_MATRIX
Definition: FMTmodelparameters.hpp:51
@ LastBoolModelParam
Definition: FMTmodelparameters.hpp:52
@ SHOW_LOCK_IN_SCHEDULES
Definition: FMTmodelparameters.hpp:49
@ PRESOLVE_CAN_REMOVE_STATIC_THEMES
Definition: FMTmodelparameters.hpp:50
@ STRICTLY_POSITIVE
Definition: FMTmodelparameters.hpp:47
@ FORCE_PARTIAL_BUILD
Definition: FMTmodelparameters.hpp:46
@ POSTSOLVE
Definition: FMTmodelparameters.hpp:48