![]() |
FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTopareaschedulertask.hpp>
Public Member Functions | |
FMTopareaschedulertask ()=default | |
FMTopareaschedulertask (const FMTopareaschedulertask &rhs) | |
FMTopareaschedulertask & | operator= (const FMTopareaschedulertask &rhs) |
virtual | ~FMTopareaschedulertask ()=default |
std::unique_ptr< FMTtask > | clone () const |
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()) | |
virtual std::vector< std::unique_ptr< FMTtask > > | split (const unsigned int &numberoftasks) const |
virtual std::unique_ptr< FMTtask > | spawn () |
virtual void | work () |
virtual void | finalize () |
void | passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger) override |
![]() | |
FMTtask () | |
virtual | ~FMTtask ()=default |
FMTtask (const FMTtask &rhs) | |
FMTtask & | operator= (const FMTtask &rhs) |
virtual std::unique_ptr< FMTtask > | clone () const |
virtual std::vector< std::unique_ptr< FMTtask > > | split (const unsigned int &numberoftasks) const |
virtual std::unique_ptr< FMTtask > | spawn () |
virtual void | work () |
virtual void | finalize () |
bool | isdone () const |
std::string | getthreadid () const |
![]() | |
FMTobject () | |
virtual | ~FMTobject () |
FMTobject (const std::shared_ptr< Exception::FMTexceptionhandler > exhandler) | |
FMTobject (const FMTobject &rhs) | |
FMTobject & | operator= (const FMTobject &rhs) |
virtual void | passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger) |
void | passinexceptionhandler (const std::shared_ptr< Exception::FMTexceptionhandler > &exhandler) |
void | redirectlogtofile (const std::string &location) |
virtual void | setdefaultlogger () |
virtual void | setquietlogger () |
virtual void | settasklogger () |
virtual void | setdebuglogger () |
void | setdefaultexceptionhandler () |
void | setquietexceptionhandler () |
void | setdebugexceptionhandler () |
void | setfreeexceptionhandler () |
void | disablenestedexceptions () |
void | enablenestedexceptions () |
void | seterrorstowarnings (const std::vector< Exception::FMTexc > &errors) |
void | setmaxwarningsbeforesilenced (const size_t &maxwarningcount) |
Additional Inherited Members | |
![]() | |
static std::string | getruntimelocation () |
static unsigned long long | getavailablememory () |
![]() | |
void | setstatus (bool status) |
std::vector< size_t > | splitwork (int numberoftasks, const int &totalworksize) const |
![]() | |
template<class Archive > | |
void | forcesave (Archive &ar, const unsigned int version) const |
template<class Archive > | |
void | forceload (Archive &ar, const unsigned int version) |
void | checksignals () const |
void | setCPLhandler () |
![]() | |
static std::chrono::time_point< std::chrono::high_resolution_clock > | getclock () |
template<class chrono > | |
static double | getduration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock) |
static std::string | getdurationinseconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock) |
![]() | |
std::unique_ptr< Logging::FMTlogger > | tasklogger |
![]() | |
static boost::recursive_mutex | taskmutex |
Recursive mutex for the task. | |
![]() | |
static std::shared_ptr< Exception::FMTexceptionhandler > | _exhandler |
A shared pointer to the exception handler. | |
static std::shared_ptr< Logging::FMTlogger > | _logger |
A shared pointer to the logger. | |
The opareascheduler is a task used to find suboptimal schedule for operating area for a Models::FMTlpmodel. It keeps the best scheduler in memory and try to modify is actual schedule to get a better objective value. It will generate time yields for the operating area.
|
default |
Default constructor for FMTopareaschedulertask
Parallel::FMTopareaschedulertask::FMTopareaschedulertask | ( | const FMTopareaschedulertask & | rhs | ) |
Default copy constructor for FMTopareaschedulertask
|
virtualdefault |
We need to define a destructor to take care of writing the solution.
Parallel::FMTopareaschedulertask::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() |
||
) |
Using a model the constructor will call doplanning of the model. So you have to set the length and other parameters before. Then the task will obtain the operatingareascheme from the FMTlpmodel and setup everything else. If the returntime_output is non empty then it will use it to get the result for each FMToperatingareascheme and set the value to the returntime using the initial solution.
|
virtual |
Clone function for FMTopareaschedulertask
Reimplemented from Parallel::FMTtask.
|
virtual |
Write the solution...
Reimplemented from Parallel::FMTtask.
FMTopareaschedulertask & Parallel::FMTopareaschedulertask::operator= | ( | const FMTopareaschedulertask & | rhs | ) |
Default copy assignement for FMTopareaschedulertask
|
overridevirtual |
Pass the logger
Reimplemented from Core::FMTobject.
|
virtual |
Will spawn a minimal task from the master task
Reimplemented from Parallel::FMTtask.
|
virtual |
The split fonction that split the main task into multiple tasks of operating area scheduler.
Reimplemented from Parallel::FMTtask.
|
virtual |
Main function that do the operating area scheduling task
Reimplemented from Parallel::FMTtask.