8#ifndef FMTopareaschedulertask_H_INCLUDED
9#define FMTopareaschedulertask_H_INCLUDED
17#include <boost/thread.hpp>
34 class FMToperatingareascheme;
35 class FMToperatingareascheduler;
51 static boost::mutex generalmutex;
54 std::shared_ptr<Heuristics::FMToperatingareascheduler>bestscheduler;
57 std::unique_ptr<Heuristics::FMToperatingareascheduler>actualscheduler;
60 static std::string solutionlocation;
63 static unsigned int iterations;
66 static std::chrono::time_point<std::chrono::high_resolution_clock>stoptime;
69 static double relax_objective;
72 static std::string outyldname;
75 static std::unique_ptr<Models::FMTlpmodel>basemodel;
89 const std::vector<Heuristics::FMToperatingareascheme>& opareas,
const Core::FMToutputnode& node);
94 std::chrono::time_point<std::chrono::high_resolution_clock>getstoppoint(
const double& timegap)
const;
99 void getconstraintssolution(std::vector<Core::FMToutput>& outputs,std::vector<Core::FMTconstraint>& constraints)
const;
105 void writefinalmodel()
const;
110 void writesolution()
const;
115 bool gotinitialsolution()
const;
121 void evaluateandcopy();
126 bool goodtogo()
const;
132 std::vector<Heuristics::FMToperatingareascheme> getreturntimefromoutput(
Models::FMTlpmodel& model,
133 const std::vector<Heuristics::FMToperatingareascheme>& opareas,
160 std::unique_ptr<FMTtask>
clone()
const;
169 const std::vector<Heuristics::FMToperatingareascheme>& opareas,
171 const std::string& outputlocation,
172 const std::string& outputyieldname,
173 const unsigned int& maxiterations,
174 const double& maxtime,
180 virtual std::vector<std::unique_ptr<FMTtask>>
split(
const unsigned int& numberoftasks)
const;
185 virtual std::unique_ptr<FMTtask>
spawn();
200 void passinlogger(
const std::shared_ptr<Logging::FMTlogger>& logger)
override;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMToutput.hpp:39
Definition: FMToutputnode.hpp:20
Definition: FMTlpmodel.hpp:57
Definition: FMTopareaschedulertask.hpp:48
virtual std::vector< std::unique_ptr< FMTtask > > split(const unsigned int &numberoftasks) const
FMTopareaschedulertask()=default
void passinlogger(const std::shared_ptr< Logging::FMTlogger > &logger) override
FMTopareaschedulertask(const Models::FMTlpmodel &model, const std::vector< Heuristics::FMToperatingareascheme > &opareas, const Core::FMToutputnode &node, const std::string &outputlocation, const std::string &outputyieldname, const unsigned int &maxiterations, const double &maxtime, Core::FMToutput returntime_output=Core::FMToutput())
std::unique_ptr< FMTtask > clone() const
FMTopareaschedulertask(const FMTopareaschedulertask &rhs)
virtual std::unique_ptr< FMTtask > spawn()
virtual ~FMTopareaschedulertask()=default
Definition: FMTtask.hpp:28
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Namespace regrouping all tools for solving LP/MIP problems using an heuristic.
Definition: FMTareaparser.hpp:43
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