11#ifndef FMTsrmodel_H_INCLUDED
12#define FMTsrmodel_H_INCLUDED
15#include <boost/serialization/export.hpp>
16#include <boost/serialization/split_member.hpp>
34 class FMTgraphvertextoyield;
171 Core::FMTschedule getscheduleproportions(
int period,
bool withlock) const;
176 Graph::FMTgraphstats getstats() const;
184 virtual std::unique_ptr<
FMTmodel> getcopy(
int period = 0) const;
192 virtual std::map<std::
string,
double> getoutput(const
Core::FMToutput& output,
193 int period,
Core::FMToutputlevel level =
Core::FMToutputlevel::standard) const;
200 Rcpp::DataFrame getoutputsdataframe(
const std::vector<Core::FMToutput>& outputsdata,
int firstperiod,
int lastperiod)
const;
211 bool forcepartialbuild =
false,
int compressageclassoperability = 1);
226 virtual std::vector<Core::FMTactualdevelopment>
getarea(
int period = 0,
bool beforegrowanddeath =
false)
const override;
241 virtual std::unique_ptr<FMTmodel>
clone()
const override;
246 void passinlogger(
const std::shared_ptr<Logging::FMTlogger>& logger)
override;
251 virtual std::unique_ptr<FMTmodel>
presolve(std::vector<Core::FMTactualdevelopment> optionaldevelopments = std::vector<Core::FMTactualdevelopment>())
const override;
312 std::vector<int>& sumvariables, std::vector<double>& sumcoefficiants)
const;
341 friend class boost::serialization::access;
342 template<
class Archive>
343 void save(Archive& ar,
const unsigned int version)
const
345 ar& boost::serialization::make_nvp(
"model", boost::serialization::base_object<FMTmodel>(*
this));
346 ar& BOOST_SERIALIZATION_NVP(solver);
347 ar& BOOST_SERIALIZATION_NVP(graph);
353 template<
class Archive>
354 void load(Archive& ar,
const unsigned int version)
356 ar& boost::serialization::make_nvp(
"model", boost::serialization::base_object<FMTmodel>(*
this));
357 ar& BOOST_SERIALIZATION_NVP(solver);
358 ar& BOOST_SERIALIZATION_NVP(graph);
361 BOOST_SERIALIZATION_SPLIT_MEMBER()
#define FMT_DBL_TOLERANCE
Definition: FMTutility.hpp:11
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmask.hpp:96
Definition: FMTschedule.hpp:31
Definition: FMTgraph.hpp:78
std::pair< FMTvertex_iterator, FMTvertex_iterator > FMTvertex_pair
Definition: FMTgraph.hpp:117
Definition: FMTgraphstats.hpp:28
Definition: FMTgraphvertextoyield.hpp:27
Definition: FMTlogger.hpp:37
Definition: FMTlpsolver.hpp:39
void passinmessagehandler(Logging::FMTlogger &logger)
Definition: FMTmodel.hpp:60
Definition: FMTsrmodel.hpp:44
bool setsolutionbylp(int period, const Core::FMTschedule &schedule, double tolerance=FMT_DBL_TOLERANCE)
void postsolvegraph(const FMTmodel &originalbasemodel)
Graph::FMTgraphstats buildperiod(Core::FMTschedule schedule=Core::FMTschedule(), bool forcepartialbuild=false, int compressageclassoperability=1)
bool setparameter(const FMTintmodelparameters &key, const int &value) override
Graph::FMTgraphstats initializematrix()
FMTlpsolver * getsolverptr()
FMTsrmodel(FMTsrmodel &&rhs)=default
int getfirstactiveperiod() const
virtual std::unique_ptr< FMTmodel > clone() const override
bool summarize(const std::map< int, double > &variables, std::vector< int > &sumvariables, std::vector< double > &sumcoefficiants) const
Graph::FMTgraphvertextoyield getGraphVertexToYield() const
size_t getgraphsize() const
Graph::FMTgraphstats updatematrix(const Graph::FMTgraph< Graph::FMTvertexproperties, Graph::FMTedgeproperties >::FMTvertex_pair &targets, const Graph::FMTgraphstats &newstats)
FMTsrmodel(const FMTsrmodel &rhs)
static std::vector< Models::FMTsolverinterface > getavailablesolverinterface()
virtual std::unique_ptr< FMTmodel > presolve(std::vector< Core::FMTactualdevelopment > optionaldevelopments=std::vector< Core::FMTactualdevelopment >()) const override
bool boundsolution(int period, double tolerance=FMT_DBL_TOLERANCE)
virtual void postsolve(const FMTmodel &originalbasemodel)
Graph::FMTgraphstats getgraphstats() const
bool setparameter(const FMTboolmodelparameters &key, const bool &value) override
virtual double getobjectivevalue() const
bool isperiodbounded(int period) const
virtual bool isoptimal() const
virtual std::vector< Core::FMTactualdevelopment > getarea(int period=0, bool beforegrowanddeath=false) const override
FMTsrmodel(const FMTmodel &base, const Graph::FMTgraph< Graph::FMTvertexproperties, Graph::FMTedgeproperties > &lgraph, const FMTlpsolver &lsolver)
void passinlogger(const std::shared_ptr< Logging::FMTlogger > &logger) override
void setparallellogger(Logging::FMTlogger &logger) override
FMTsrmodel(const FMTmodel &base, FMTsolverinterface lsolvertype)
FMTlpsolver solver
The lpsolver.
Definition: FMTsrmodel.hpp:305
void cleargraphdevelopements()
bool unboundsolution(int period)
std::vector< const Core::FMTdevelopment * > getnochoice(const Core::FMTmask &base_mask) const
Graph::FMTgraph< Graph::FMTvertexproperties, Graph::FMTedgeproperties > graph
graph holding the FMTdevelopments for all the periods.
Definition: FMTsrmodel.hpp:302
std::set< Core::FMTSerie > getrorations(const Core::FMTmask &mask, const std::string &aggregate) const
bool forcesolution(int period, const Core::FMTschedule &proportionschedulewithlock)
bool setsolution(int period, const Core::FMTschedule &schedule, double tolerance=FMT_DBL_TOLERANCE)
Core::FMTschedule getsolution(int period, bool withlock=false) const final
const FMTlpsolver * getconstsolverptr() const
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
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
FMTsolverinterface
Definition: FMTsolverinterface.hpp:21
FMTintmodelparameters
Definition: FMTmodelparameters.hpp:24
FMTboolmodelparameters
Definition: FMTmodelparameters.hpp:45