FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Parallel::FMTopareaschedulertask Class Reference

#include <FMTopareaschedulertask.hpp>

Inheritance diagram for Parallel::FMTopareaschedulertask:
[legend]
Collaboration diagram for Parallel::FMTopareaschedulertask:
[legend]

Public Member Functions

 FMTopareaschedulertask ()=default
 
 FMTopareaschedulertask (const FMTopareaschedulertask &rhs)
 
FMTopareaschedulertaskoperator= (const FMTopareaschedulertask &rhs)
 
virtual ~FMTopareaschedulertask ()=default
 
std::unique_ptr< FMTtaskclone () 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< FMTtaskspawn ()
 
virtual void work ()
 
virtual void finalize ()
 
void passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger) override
 
- Public Member Functions inherited from Parallel::FMTtask
 FMTtask ()
 
virtual ~FMTtask ()=default
 
 FMTtask (const FMTtask &rhs)
 
FMTtaskoperator= (const FMTtask &rhs)
 
virtual std::unique_ptr< FMTtaskclone () const
 
virtual std::vector< std::unique_ptr< FMTtask > > split (const unsigned int &numberoftasks) const
 
virtual std::unique_ptr< FMTtaskspawn ()
 
virtual void work ()
 
virtual void finalize ()
 
bool isdone () const
 
std::string getthreadid () const
 
- Public Member Functions inherited from Core::FMTobject
 FMTobject ()
 
virtual ~FMTobject ()
 
 FMTobject (const std::shared_ptr< Exception::FMTexceptionhandler > exhandler)
 
 FMTobject (const FMTobject &rhs)
 
FMTobjectoperator= (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 Public Member Functions inherited from Core::FMTobject
static std::string getruntimelocation ()
 
static unsigned long long getavailablememory ()
 
- Protected Member Functions inherited from Parallel::FMTtask
void setstatus (bool status)
 
std::vector< size_t > splitwork (int numberoftasks, const int &totalworksize) const
 
- Protected Member Functions inherited from Core::FMTobject
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 Protected Member Functions inherited from Core::FMTobject
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)
 
- Protected Attributes inherited from Parallel::FMTtask
std::unique_ptr< Logging::FMTloggertasklogger
 
- Static Protected Attributes inherited from Parallel::FMTtask
static boost::recursive_mutex taskmutex
 Recursive mutex for the task.
 
- Static Protected Attributes inherited from Core::FMTobject
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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FMTopareaschedulertask() [1/3]

Parallel::FMTopareaschedulertask::FMTopareaschedulertask ( )
default

Default constructor for FMTopareaschedulertask

◆ FMTopareaschedulertask() [2/3]

Parallel::FMTopareaschedulertask::FMTopareaschedulertask ( const FMTopareaschedulertask rhs)

Default copy constructor for FMTopareaschedulertask

◆ ~FMTopareaschedulertask()

virtual Parallel::FMTopareaschedulertask::~FMTopareaschedulertask ( )
virtualdefault

We need to define a destructor to take care of writing the solution.

◆ FMTopareaschedulertask() [3/3]

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.

Member Function Documentation

◆ clone()

std::unique_ptr< FMTtask > Parallel::FMTopareaschedulertask::clone ( ) const
virtual

Clone function for FMTopareaschedulertask

Reimplemented from Parallel::FMTtask.

◆ finalize()

virtual void Parallel::FMTopareaschedulertask::finalize ( )
virtual

Write the solution...

Reimplemented from Parallel::FMTtask.

◆ operator=()

FMTopareaschedulertask & Parallel::FMTopareaschedulertask::operator= ( const FMTopareaschedulertask rhs)

Default copy assignement for FMTopareaschedulertask

◆ passinlogger()

void Parallel::FMTopareaschedulertask::passinlogger ( const std::shared_ptr< Logging::FMTlogger > &  logger)
overridevirtual

Pass the logger

Reimplemented from Core::FMTobject.

◆ spawn()

virtual std::unique_ptr< FMTtask > Parallel::FMTopareaschedulertask::spawn ( )
virtual

Will spawn a minimal task from the master task

Reimplemented from Parallel::FMTtask.

◆ split()

virtual std::vector< std::unique_ptr< FMTtask > > Parallel::FMTopareaschedulertask::split ( const unsigned int &  numberoftasks) const
virtual

The split fonction that split the main task into multiple tasks of operating area scheduler.

Reimplemented from Parallel::FMTtask.

◆ work()

virtual void Parallel::FMTopareaschedulertask::work ( )
virtual

Main function that do the operating area scheduling task

Reimplemented from Parallel::FMTtask.


The documentation for this class was generated from the following file: