8#ifndef FMTreplanningtask_H_INCLUDED
9#define FMTreplanningtask_H_INCLUDED
36 class FMTparallelwriter;
47 std::shared_ptr<FMTparallelwriter>resultswriter;
50 std::shared_ptr<Core::FMTschedule>baseschedule;
53 std::shared_ptr<Models::FMTmodel>global;
56 std::shared_ptr<Models::FMTmodel>stochastic;
59 std::shared_ptr<Models::FMTmodel>local;
62 std::queue<int>replicateids;
65 std::vector<Core::FMTactualdevelopment>dynamicarea;
71 std::vector<Core::FMTconstraint>dynamicconstraints;
74 int replanningperiods;
80 std::unique_ptr<Models::FMTmodel>copysharedmodel(
const std::shared_ptr<Models::FMTmodel>model);
86 std::unique_ptr<Models::FMTmodel>domodelplanning(
87 const std::shared_ptr<Models::FMTmodel>model,
88 const int& replanningperiod,
89 bool getsolutionandlocal =
false,
90 bool applyscheduleweight =
false,
91 bool setdynamicconstraints=
true);
96 void writeresults(
const std::string& modelname,
const int& modellength,
97 const std::unique_ptr<Models::FMTmodel>& modelptr,
const int& replanningperiod,
bool onlyfirstperiod =
false);
102 const int getiteration()
const;
107 void setreignore(std::unique_ptr<Models::FMTmodel>& modelcpy,
const int& replanningperiod)
const;
112 void setreplicate(std::unique_ptr<Models::FMTmodel>& modelcpy,
const int& replanningperiod)
const;
138 std::unique_ptr<FMTtask>
clone()
const;
148 const std::vector<Core::FMToutput>& outputs,
149 const std::string& outputlocation,
150 const std::string& gdaldriver,
151 const std::vector<std::string>& creationoptions,
152 const int& replicates,
153 const int& replanningperiodssize,
154 const double& minimaldrift,
165 const std::string& outputlocation,
166 const std::string& gdaldriver,
167 const std::vector<std::string>& creationoptions,
183 virtual std::vector<std::unique_ptr<FMTtask>>
split(
const unsigned int& numberoftasks)
const;
188 virtual std::unique_ptr<FMTtask>
spawn();
203 void passinlogger(
const std::shared_ptr<Logging::FMTlogger>& logger)
override;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTschedule.hpp:31
Definition: FMTmodel.hpp:60
Definition: FMTreplanningtask.hpp:44
FMTreplanningtask(const Models::FMTmodel &globalm, const Models::FMTmodel &stochasticm, const Models::FMTmodel &localm, const std::vector< Core::FMToutput > &outputs, const std::string &outputlocation, const std::string &gdaldriver, const std::vector< std::string > &creationoptions, const int &replicates, const int &replanningperiodssize, const double &minimaldrift, Core::FMToutputlevel outputlevel)
FMTreplanningtask(const Models::FMTmodel &globalm, const Models::FMTmodel &stochasticm, const Models::FMTmodel &localm, const std::string &outputlocation, const std::string &gdaldriver, const std::vector< std::string > &creationoptions, Core::FMToutputlevel outputlevel)
void setreplicates(const int &replicatesnumber)
FMTreplanningtask(const FMTreplanningtask &rhs)=default
void setreplanningperiods(const int &periodsnumber)
virtual std::unique_ptr< FMTtask > spawn()
virtual std::vector< std::unique_ptr< FMTtask > > split(const unsigned int &numberoftasks) const
virtual ~FMTreplanningtask()=default
void passinlogger(const std::shared_ptr< Logging::FMTlogger > &logger) override
FMTreplanningtask()=default
std::unique_ptr< FMTtask > clone() const
Definition: FMTtask.hpp:28
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
FMToutputlevel
Definition: FMTutility.hpp:17
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
Namespace for parallel tasking may include multithreading / multiprocessing.
Definition: FMTopareaschedulertask.hpp:40