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

#include <FMTreplanningtask.hpp>

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

Public Member Functions

 FMTreplanningtask ()=default
 
 FMTreplanningtask (const FMTreplanningtask &rhs)=default
 
FMTreplanningtaskoperator= (const FMTreplanningtask &rhs)=default
 
virtual ~FMTreplanningtask ()=default
 
std::unique_ptr< FMTtaskclone () const
 
 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)
 
void setreplanningperiods (const int &periodsnumber)
 
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 replanning uses global/stochastic/local as abstract model to simulate natural disturbances
over a certain amount of replanning periods for multiple replications. Those replications may generate different results caused by the pseudo random constraints and seed used in the simulations / optimization of each abstract models.

Constructor & Destructor Documentation

◆ FMTreplanningtask() [1/4]

Parallel::FMTreplanningtask::FMTreplanningtask ( )
default

Default constructor for FMTreplanningtask

◆ FMTreplanningtask() [2/4]

Parallel::FMTreplanningtask::FMTreplanningtask ( const FMTreplanningtask rhs)
default

Default copy constructor for FMTreplanningtask

◆ ~FMTreplanningtask()

virtual Parallel::FMTreplanningtask::~FMTreplanningtask ( )
virtualdefault

Default destructor

◆ FMTreplanningtask() [3/4]

Parallel::FMTreplanningtask::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 
)

The models need to have common sections, outputs to write,outputlocation(outfile), gdaldriver of the output file, the number of replicates, the number of replanning period and the weight of the global schedule applied to the localschedule.

◆ FMTreplanningtask() [4/4]

Parallel::FMTreplanningtask::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 
)

Short constructor for replanning task will use the output of globalmodel as outputs. 0.5 as minimal drift... You then need to set the number of replanning periods,globalweight, and the number of replicates.

Member Function Documentation

◆ clone()

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

Clone function for FMTreplanningtask

Reimplemented from Parallel::FMTtask.

◆ finalize()

virtual void Parallel::FMTreplanningtask::finalize ( )
virtual

We need to take care of writing drift probabilities.

Reimplemented from Parallel::FMTtask.

◆ operator=()

FMTreplanningtask & Parallel::FMTreplanningtask::operator= ( const FMTreplanningtask rhs)
default

Default copy assignement for FMTreplanningtask

◆ passinlogger()

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

Pass the logger

Reimplemented from Core::FMTobject.

◆ setreplanningperiods()

void Parallel::FMTreplanningtask::setreplanningperiods ( const int &  periodsnumber)

Set the number oof replanning periods.

◆ setreplicates()

void Parallel::FMTreplanningtask::setreplicates ( const int &  replicatesnumber)

Set the number of replicates to use...

◆ spawn()

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

Will spawn a minimal task from the master task

Reimplemented from Parallel::FMTtask.

◆ split()

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

The split fonction that split the main task into multiple tasks of replanning.

Reimplemented from Parallel::FMTtask.

◆ work()

virtual void Parallel::FMTreplanningtask::work ( )
virtual

Main function that do the replanning task

Reimplemented from Parallel::FMTtask.


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