8#ifndef FMTSESM_Hm_included
9#define FMTSESM_Hm_included
12#include <boost/serialization/vector.hpp>
13#include <boost/serialization/serialization.hpp>
14#include <boost/serialization/nvp.hpp>
15#include <boost/serialization/export.hpp>
33 friend class boost::serialization::access;
34 template<
class Archive>
35 void serialize(Archive& ar,
const unsigned int version)
37 ar & boost::serialization::make_nvp(
"semodel", boost::serialization::base_object<FMTSeModel>(*
this));
44 virtual void swapPtr(std::unique_ptr<FMTModel>& rhs);
118 size_t p_randomIterations,
126 virtual std::unique_ptr<FMTModel>
clone()
const;
133 virtual bool build(std::vector<Core::FMTSchedule> schedules=std::vector<Core::FMTSchedule>());
149 virtual std::unique_ptr<FMTModel>
preSolve(std::vector<Core::FMTActualDevelopment> optionaldevelopments = std::vector<Core::FMTActualDevelopment>())
const;
156 virtual std::unique_ptr<FMTModel>
getCopy(
int period = 0)
const;
#define FMT_DBL_TOLERANCE
Definition: FMTutility.h:11
#define FMTEXPORT
Definition: FMTutility.h:125
Spatially referenced schedule describing the area of developments for which an action can be operated...
Definition: FMTSchedule.h:29
Base class for the different models in FMT.
Definition: FMTModel.h:62
Abstract class for spatially explicit models, parent of FMTSesModel and FMTSaModel.
Definition: FMTSeModel.h:33
Spatially explicit simulation model using a cellular automaton to simulate actions on a raster stack ...
Definition: FMTSesModel.h:25
virtual std::unique_ptr< FMTModel > getCopy(int period=0) const
Return a copy of the model for the selected period.
FMTSesModel()=default
Default constructor for FMTSesModel.
std::string getDisturbanceStats() const
Return a string of patch statistics (area, perimeter) of the disturbances stack.
virtual bool solve()
Return true; there is no solve since this is a simulation.
Definition: FMTSesModel.h:139
~FMTSesModel()=default
Default destructor for FMTSesModel.
FMTSesModel(const FMTModel &rhs)
Construct a FMTSesModel from a FMTModel.
FMTSesModel(const FMTSesModel &rhs)=default
Copy constructor for FMTSesModel.
FMTSesModel(FMTSesModel &&rhs)=default
Default move constructor for FMTSesModel.
virtual std::unique_ptr< FMTModel > preSolve(std::vector< Core::FMTActualDevelopment > optionaldevelopments=std::vector< Core::FMTActualDevelopment >()) const
Return a presolved copy of the model.
FMTSesModel(const FMTModel &rhs, const Spatial::FMTForest &forest)
Construct a FMTSesModel from a FMTModel and a forest.
virtual bool build(std::vector< Core::FMTSchedule > schedules=std::vector< Core::FMTSchedule >())
Build the model by calling greedyReferenceBuild over the number of periods set as LENGTH.
virtual std::unique_ptr< FMTModel > clone() const
Get a clone of the FMTSesModel.
std::map< std::string, double > greedyReferenceBuild(const Core::FMTSchedule &p_schedule, size_t p_randomIterations, int p_seed=0, double p_tolerance=FMT_DBL_TOLERANCE)
Find the best spatialization for a schedule using random draws over several iterations.
Spatially referenced layer of Core::FMTDevelopment representing the forest.
Definition: FMTForest.h:33
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTAreaParser.h:54