8#ifndef FMToutput_H_INCLUDED
9#define FMToutput_H_INCLUDED
19#include <boost/serialization/string.hpp>
20#include <boost/serialization/serialization.hpp>
21#include <boost/serialization/export.hpp>
56 FMToutput(
const std::string& lname,
const std::string& ldescription,
57 const std::string& lgroup,
58 const std::vector<FMToutputsource>& lsources,
59 const std::vector<FMToperator>& loperators);
111 operator std::string()
const;
193 double shuntingyard(
const std::vector<double>& sourcevalues,
const std::vector<FMToperator>& simple_operators)
const;
205 std::vector<FMToutputnode>
getnodes(std::vector<std::string>& equation,
206 double multiplier = 1,
207 bool orderbyoutputid =
false,
208 int period = 1)
const;
235 void setsources(
const std::vector<FMToutputsource>& p_sources);
256 inline std::vector<FMToperator>
getopes()
const
272 return sources.begin()->getthemetarget();
290 const std::vector<Core::FMTtheme>& themes)
const;
308 const std::vector<FMTtheme>& originalthemes,
309 const std::vector<FMTtheme>& selectedthemes,
310 const std::vector<FMTtheme>& newthemes,
311 const std::vector<FMTaction>& actions,
const FMTyields& yields)
const;
317 void changesourcesid(
const std::set<int>& newoutputsorigin,
const std::set<int>& newthemeid);
333 void getRHSvalue(
const int& period,
double& lower,
double& upper)
const;
361 const std::vector<std::string>baseeq,
362 std::map<std::string, double>& results,
363 const std::vector<Core::FMToutputnode>& nodes,
364 std::map<std::string, std::vector<std::string>>& allequations)
const;
388 void setproportions(std::map<std::string, std::vector<std::string>>& allequations,
389 const std::vector<std::string>& baseequation)
const;
406 friend class boost::serialization::access;
407 template<
class Archive>
408 void serialize(Archive& ar,
const unsigned int version)
411 ar& boost::serialization::make_nvp(
"FMTobject", boost::serialization::base_object<FMTobject>(*
this));
412 ar& BOOST_SERIALIZATION_NVP(sources);
413 ar& BOOST_SERIALIZATION_NVP(operators);
415 ar& BOOST_SERIALIZATION_NVP(name);
416 ar& BOOST_SERIALIZATION_NVP(description);
420 _exhandler->printexceptions(
"",
"FMToutput::serialize", __LINE__, __FILE__);
432 std::string output_name;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmask.hpp:96
Definition: FMTmaskfilter.hpp:27
Definition: FMTobject.hpp:50
Definition: FMToutput.hpp:39
void setproportions(std::map< std::string, std::vector< std::string > > &allequations, const std::vector< std::string > &baseequation) const
std::string name
Sometime output can specify multiple attributes of a given themes.
Definition: FMToutput.hpp:377
void changesourcesid(const std::set< int > &newoutputsorigin, const std::set< int > &newthemeid)
bool containslevel() const
double getconstantvalue() const
void replacedivision(const double &bound)
virtual ~FMToutput()=default
bool isvariablesizeof(const size_t &masksize) const
std::vector< FMToutputnode > getnodes(std::vector< std::string > &equation, double multiplier=1, bool orderbyoutputid=false, int period=1) const
bool isactionbased() const
FMTmask getvariableintersect() const
bool canbenodesonly() const
bool isconstantlevel() const
void setsources(const std::vector< FMToutputsource > &p_sources)
set new sources for this output
int gettargetperiod() const
void changesourcesid(const int &outid)
std::vector< std::string > getdecomposition(const std::vector< FMTtheme > &themes) const
double shuntingyard(const std::vector< double > &sourcevalues, const std::vector< FMToperator > &simple_operators) const
std::string getgroup() const
Definition: FMToutput.hpp:132
FMToutput(const FMToutput &rhs)
std::vector< Core::FMTtheme > getstaticthemes(const std::vector< Core::FMTtheme > &themes, const Core::FMTyields &yields, bool ignoreoutputvariables=false) const
int targetthemeid() const
Definition: FMToutput.hpp:270
bool issingleperiod() const
FMTtheme targettheme(const std::vector< FMTtheme > &themes) const
std::vector< FMToperator > operators
vector of simple operators like +-*â€/
Definition: FMToutput.hpp:371
std::string getname() const
Definition: FMToutput.hpp:116
std::vector< FMToutputsource > getsources() const
Definition: FMToutput.hpp:240
std::vector< FMToperator > getopes() const
Definition: FMToutput.hpp:256
FMToutput(const std::string &lname)
FMToutput boundto(const std::vector< FMTtheme > &themes, const FMTperbounds &bound, const std::string &specialbound, std::string attribute="") const
void getRHSvalue(const int &period, double &lower, double &upper) const
FMToutput intersectwithmask(const Core::FMTmask &mask, const std::vector< Core::FMTtheme > &themes) const
FMToutput(const std::string &lname, const std::string &ldescription, const std::string &lgroup, const std::vector< FMToutputsource > &lsources, const std::vector< FMToperator > &loperators)
Core::FMToutput removeRHSvalue() const
const std::vector< FMToutputsource > & getsourcesreference() const
Definition: FMToutput.hpp:248
void fillfromshuntingyard(const std::vector< std::string >baseeq, std::map< std::string, double > &results, const std::vector< Core::FMToutputnode > &nodes, std::map< std::string, std::vector< std::string > > &allequations) const
std::string group
This is the group of the output, if empty there's no group.
Definition: FMToutput.hpp:383
std::string getdescription() const
Definition: FMToutput.hpp:124
FMToutput presolve(const FMTmaskfilter &filter, const std::vector< FMTtheme > &originalthemes, const std::vector< FMTtheme > &selectedthemes, const std::vector< FMTtheme > &newthemes, const std::vector< FMTaction > &actions, const FMTyields &yields) const
std::vector< FMToutputsource > sources
outputsources data used to generate outputnodes
Definition: FMToutput.hpp:368
std::vector< std::string > getthemedecomposition(const FMTtheme &theme) const
std::string description
This is description of the FMToutput has seen in the output section.
Definition: FMToutput.hpp:380
void setperiod(const int &newperiod)
Definition: FMToutput.hpp:429
FMToutputcomparator(std::string name)
bool operator()(const FMToutput &output) const
Definition: FMTbounds.hpp:293
Definition: FMTtheme.hpp:47
Definition: FMTyields.hpp:40
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31