FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTyieldmodel.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#include "FMTobject.hpp"
8#include <boost/serialization/serialization.hpp>
9#include <boost/serialization/nvp.hpp>
10
11
12#ifndef FMTYIELDMODEL_H_INCLUDED
13#define FMTYIELDMODEL_H_INCLUDED
14
15namespace Graph
16{
17 class FMTpredictor;
18}
19
20
21namespace boost
22{
23 namespace property_tree
24 {
25 template < class Key, class Data, class KeyCompare >
28 }
29}
30
31namespace Core
32{
33 class FMTyieldrequest;
34 class FMTtheme;
35 class FMTmaskfilter;
36 // DocString: FMTyieldmodel
40 class FMTyieldmodel : public FMTobject
41 {
43 template<class Archive>
44 void serialize(Archive& ar, const unsigned int version)
45 {
46 ar & boost::serialization::make_nvp("FMTobject", boost::serialization::base_object<FMTobject>(*this));
47 }
48 protected:
49 std::string modelName;
50 std::vector<std::string> modelYields = {};
51 const std::string JSON_PROP_MODEL_NAME = "modelFileName";
52 public:
53 // DocString: FMTyieldmodel::~FMTyieldmodel()
57 virtual ~FMTyieldmodel();
58 // DocString: FMTyieldmodel::FMTyieldmodel()
63 // DocString: FMTyieldmodel::FMTyieldmodel()
67 FMTyieldmodel(const FMTyieldmodel& rhs)=default;
68 // DocString: FMTyieldmodel::operator = (const FMTyieldmodel& rhs)
73 // DocString: FMTyieldmodel::GetModelName()
77 const std::string& GetModelName() const;
78 // DocString: FMTyieldmodelnn::GetModelYields()
82 const std::vector<std::string>& GetModelYields() const;
83 // DocString: FMTyieldmodel::Clone()
87 virtual std::unique_ptr<FMTyieldmodel>Clone() const = 0;
88 // DocString: FMTyieldmodel::Predict
92 virtual const std::vector<double>Predict(const Core::FMTyieldrequest& request) const = 0;
93 // DocString: FMTyieldmodel::presolve
98 virtual std::unique_ptr<FMTyieldmodel> presolve(const FMTmaskfilter& filter,
99 const std::vector<FMTtheme>& newthemes) const;
100 // DocString: FMTyieldmodel::postsolve
104 virtual std::unique_ptr<FMTyieldmodel> postsolve(const FMTmaskfilter& filter,
105 const std::vector<FMTtheme>& basethemes) const;
106 // DocString: FMTyieldmodel::std::string()
110 virtual operator std::string() const=0;
111 // DocString: FMTyieldmodel::getperiodicvalues
116 virtual std::vector<std::vector<double>>getperiodicvalues() const;
117 };
118}
119
120#endif
Definition: FMTmaskfilter.hpp:27
Definition: FMTobject.hpp:50
Definition: FMTyieldmodel.hpp:41
FMTyieldmodel & operator=(const FMTyieldmodel &rhs)=default
FMTyieldmodel(const FMTyieldmodel &rhs)=default
const std::vector< std::string > & GetModelYields() const
virtual const std::vector< double > Predict(const Core::FMTyieldrequest &request) const =0
virtual std::unique_ptr< FMTyieldmodel > Clone() const =0
const std::string & GetModelName() const
std::string modelName
Definition: FMTyieldmodel.hpp:49
virtual std::vector< std::vector< double > > getperiodicvalues() const
virtual std::unique_ptr< FMTyieldmodel > postsolve(const FMTmaskfilter &filter, const std::vector< FMTtheme > &basethemes) const
const std::string JSON_PROP_MODEL_NAME
Definition: FMTyieldmodel.hpp:51
virtual ~FMTyieldmodel()
std::vector< std::string > modelYields
Definition: FMTyieldmodel.hpp:50
friend class boost::serialization::access
Definition: FMTyieldmodel.hpp:42
virtual std::unique_ptr< FMTyieldmodel > presolve(const FMTmaskfilter &filter, const std::vector< FMTtheme > &newthemes) const
Definition: FMTyieldrequest.hpp:36
Definition: FMTyieldmodel.hpp:26
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Namespace for using/building unidirectional graphs in FMT.
Definition: FMTareaparser.hpp:31
basic_ptree< std::string, std::string, std::less< std::string > > ptree
Definition: FMTyieldmodel.hpp:27
Definition: FMTaction.hpp:364