15#include <boost/serialization/serialization.hpp>
16#include <boost/serialization/nvp.hpp>
17#include <boost/serialization/split_member.hpp>
18#include <boost/serialization/export.hpp>
36 friend class boost::serialization::access;
37 template<
class Archive>
38 void save(Archive& ar,
const unsigned int version)
const
40 ar & boost::serialization::make_nvp(
"model", boost::serialization::base_object<FMTsrmodel>(*
this));
41 std::stringstream basegenerator;
42 basegenerator << generator;
43 const std::string basegeneratorstring(basegenerator.str());
44 ar & BOOST_SERIALIZATION_NVP(basegeneratorstring);
51 template<
class Archive>
52 void load(Archive& ar,
const unsigned int version)
54 ar & boost::serialization::make_nvp(
"model", boost::serialization::base_object<FMTsrmodel>(*
this));
55 std::string basegeneratorstring;
56 ar & BOOST_SERIALIZATION_NVP(basegeneratorstring);
57 std::stringstream(basegeneratorstring) >> generator;
60 BOOST_SERIALIZATION_SPLIT_MEMBER()
63 std::default_random_engine generator;
68 std::vector<const
Core::FMToutput*> constraintstotarget(std::vector<
double>& targets,const
int& period);
73 std::vector<std::pair<
size_t, const
Core::FMTaction*>> getoperabilities(const
Core::FMTactualdevelopment& development,
74 std::vector<std::vector<const
Core::FMTaction*>> targets,
75 const std::vector<const
Core::FMToutput*>& alloutputs) const;
80 std::vector<std::vector<const
Core::FMTaction*>> getactionstargets(const std::vector<const
Core::FMToutput*>& alloutputs) const;
85 std::vector<
Core::FMTdevelopmentpath> operate(const
Core::FMTactualdevelopment& development,const
double& areatarget,const
Core::FMTaction* target,
Core::FMTschedule& schedule) const;
90 void updatearea(std::vector<
Core::FMTactualdevelopment>& basearea, std::vector<
Core::FMTactualdevelopment>::iterator developmentit,const std::vector<
Core::FMTdevelopmentpath>& paths, const
double& operatedarea);
95 void updateareatargets(const
double& areaoperated,const
size_t& outtarget,
96 std::vector<const
Core::FMToutput*>& alloutputs,std::vector<
double>& targets,
97 std::vector<std::vector<const
Core::FMTaction*>>& actiontargets) const;
98 virtual
void swap_ptr(const std::unique_ptr<FMTmodel>& rhs);
103 FMTnssmodel(const FMTsrmodel& rhs,
unsigned int seed);
151 virtual std::unique_ptr<
FMTmodel>presolve(std::vector<
Core::FMTactualdevelopment> optionaldevelopments = std::vector<
Core::FMTactualdevelopment>()) const;
161 virtual
bool build(std::vector<
Core::FMTschedule> schedules=std::vector<
Core::FMTschedule>());
187 virtual std::unique_ptr<FMTmodel>
getcopy(
int period = 0)
const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmodel.hpp:60
Definition: FMTnssmodel.hpp:31
virtual std::unique_ptr< FMTmodel > getcopy(int period=0) const
bool setparameter(const FMTboolmodelparameters &key, const bool &value) override
bool setparameter(const FMTintmodelparameters &key, const int &value) override
Definition: FMTsrmodel.hpp:44
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
FMTintmodelparameters
Definition: FMTmodelparameters.hpp:24
FMTboolmodelparameters
Definition: FMTmodelparameters.hpp:45