8#ifndef FMTmodelparser_H_INCLUDED
9#define FMTmodelparser_H_INCLUDED
35class FMTconstantparser;
36class FMTlandscapeparser;
40class FMTlifespanparser;
42class FMToptimizationparser;
43class FMTscheduleparser;
58 Models::FMTmodel referenceread(std::map<std::string, std::vector<int>>& common_sections,
59 std::vector<Models::FMTmodel>& models,
60 const std::string& con,
const std::string& lan,
61 const std::string& lif,
const std::string& are,
const std::string& yld,
62 const std::string& act,
const std::string& tr,
const std::string& out,
63 std::string opt = std::string(),
bool allow_mapping=
false);
69 std::vector<Models::FMTmodel>readfromfolder(
const std::string& primary_location,
70 const std::string& folder,
71 std::vector<std::string>scenarios,
72 bool validatescenarioname,
73 bool readarea=
true,
bool readoutputs=
true,
bool readoptimize=
true);
85 OGRLayer*
createdriftlayer(GDALDataset* dataset, std::vector<std::string> creationoptions = std::vector<std::string>())
const;
90 void writedrift(OGRLayer* layer,
const std::map<std::string,std::map<
double,std::vector<double>>>& lowervalues,
91 const std::map<std::string, std::map<
double, std::vector<double>>>& uppervalues)
const;
98 const std::string& location,
99 const std::string& lanfile,
100 const std::string& arefile,
101 const std::string& yldfile,
102 const std::string& actfile,
103 const std::string& trnfile,
104 const std::string& outfile,
105 const std::string& optfile,
106 const std::string& liffile,
107 std::string seqfile=std::string())
const;
113 const std::string& lanfile,
114 const std::string& arefile,
115 const std::string& yldfile,
116 const std::string& actfile,
117 const std::string& trnfile,
118 const std::string& outfile,
119 const std::string& optfile,
120 const std::string& liffile,
121 const std::string& seqfile)
const;
150 const std::string& lif,
const std::string& are,
const std::string& yld,
151 const std::string& act,
const std::string& tr,
const std::string& out,
152 std::string opt = std::string());
159 std::vector<Models::FMTmodel>
readtemplates(
const std::string& primary_location,
const std::string& templatefolder);
169 std::vector<Models::FMTmodel>
readproject(
const std::string& primary_location,
170 std::vector<std::string>scenarios = std::vector<std::string>(),
171 bool readarea =
true,
bool readoutputs =
true,
bool readoptimize =
true);
187 std::vector<std::vector<Core::FMTschedule>>
readschedules(
const std::string& primary_location,
188 const std::vector<Models::FMTmodel>& models);
207 GDALDataset* dataset, std::vector<std::string> creationoptions=std::vector<std::string>())
const;
213 const std::vector<Core::FMToutput>&theoutputs,
214 const int& iteration,
const int& firstperiod,
const int&lastperiod)
const;
219 void writefeatures(OGRLayer* layer,
const int& firstperiod,
const int& iteration,
220 const std::vector<Core::FMToutput>&theoutputs,
221 const std::map<std::string,std::vector<std::vector<double>>>& values,
bool writeNaN =
false)
const;
228 const std::vector<Core::FMToutput>&theoutputs,
229 const int& firstperiod,
const int& lastperiod,
230 const std::string& location,
232 std::string gdaldrivername=
"CSV")
const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTconstants.hpp:29
Definition: FMTmodel.hpp:60
Definition: FMTmodelparser.hpp:51
void write(const Models::FMTmodel &model, const std::string &folder) const
OGRLayer * createresultslayer(const Models::FMTmodel &model, GDALDataset *dataset, std::vector< std::string > creationoptions=std::vector< std::string >()) const
virtual ~FMTmodelparser()=default
void writetoproject(const std::string &primary_location, const Models::FMTmodel &model)
void writeprimary(const std::string &location, const std::string &lanfile, const std::string &arefile, const std::string &yldfile, const std::string &actfile, const std::string &trnfile, const std::string &outfile, const std::string &optfile, const std::string &liffile, std::string seqfile=std::string()) const
std::vector< Core::FMTconstraint > getconstraintsfromstring(std::string constraintstr, const Models::FMTmodel &model, Core::FMTconstants constants=Core::FMTconstants())
OGRLayer * createdriftlayer(GDALDataset *dataset, std::vector< std::string > creationoptions=std::vector< std::string >()) const
std::vector< Models::FMTmodel > readtemplates(const std::string &primary_location, const std::string &templatefolder)
void writeresults(const Models::FMTmodel &model, const std::vector< Core::FMToutput > &theoutputs, const int &firstperiod, const int &lastperiod, const std::string &location, Core::FMToutputlevel level=Core::FMToutputlevel::standard, std::string gdaldrivername="CSV") const
void writedrift(OGRLayer *layer, const std::map< std::string, std::map< double, std::vector< double > > > &lowervalues, const std::map< std::string, std::map< double, std::vector< double > > > &uppervalues) const
void writefeatures(OGRLayer *layer, const int &firstperiod, const int &iteration, const std::vector< Core::FMToutput > &theoutputs, const std::map< std::string, std::vector< std::vector< double > > > &values, bool writeNaN=false) const
std::vector< Models::FMTmodel > readproject(const std::string &primary_location, std::vector< std::string >scenarios=std::vector< std::string >(), bool readarea=true, bool readoutputs=true, bool readoptimize=true)
FMTmodelparser(const FMTmodelparser &rhs)
Models::FMTmodel read(const std::string &con, const std::string &lan, const std::string &lif, const std::string &are, const std::string &yld, const std::string &act, const std::string &tr, const std::string &out, std::string opt=std::string())
void fillupinfeasibles(OGRLayer *layer, const std::vector< Core::FMToutput > &theoutputs, const int &iteration, const int &firstperiod, const int &lastperiod) const
std::vector< std::vector< Core::FMTschedule > > readschedules(const std::string &primary_location, const std::vector< Models::FMTmodel > &models)
void writemodel(const Models::FMTmodel &model, const std::string &lanfile, const std::string &arefile, const std::string &yldfile, const std::string &actfile, const std::string &trnfile, const std::string &outfile, const std::string &optfile, const std::string &liffile, const std::string &seqfile) const
std::map< std::string, std::vector< std::vector< double > > > getiterationsvalues(OGRLayer *layer) const
Definition: FMTparser.hpp:66
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
FMToutputlevel
Definition: FMTutility.hpp:17
@ standard
Definition: FMTutility.hpp:18
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
Namespace handling all FMT's parsers. Everything related to I/O should be located in this namespace.
Definition: FMTactionparser.hpp:26