![]() |
FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTtransition.hpp>
Public Member Functions | |
| FMTtransition & | operator+= (const FMTtransition &OtherTransition) |
| append OtherTransition to this transition needs to be unskrink or it will throw an exception. | |
| FMTtransition () | |
| ~FMTtransition ()=default | |
| FMTtransition (const std::string &lname) | |
| FMTtransition (const FMTtransition &rhs) | |
| FMTtransition & | operator= (const FMTtransition &rhs) |
| operator std::string () const | |
| FMTtransition | single () const |
| std::string | getname () const |
| bool | isleaking () const |
| const FMTfork * | getfork (const Core::FMTdevelopment &developement, const FMTyields &ylds) const |
| std::vector< FMTtheme > | getstaticthemes (const std::vector< FMTtheme > &themes) const |
| std::vector< Core::FMTmask > | canproduce (const Core::FMTmask &testmask, const std::vector< Core::FMTtheme > &themes) const |
| unsigned int | age_after (const std::vector< FMTdevelopment > &devs, const FMTaction &action, const FMTyields &ylds, const std::vector< FMTtheme > &themes) const |
| FMTmask | main_target (const std::vector< FMTdevelopment > &devs, const FMTyields &ylds) const |
| std::map< std::string, std::vector< FMTdevelopment > > | attribute_targets (const std::vector< FMTdevelopment > &devs, const FMTyields &ylds, const std::vector< FMTtheme > &themes) const |
| bool | operator< (const FMTtransition &rhs) const |
| bool | operator== (const FMTtransition &rhs) const |
| bool | operator!= (const FMTtransition &rhs) const |
| FMTtransition | presolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &originalthemes, std::vector< FMTtheme > &newthemes, bool compressdata=false) const |
Public Member Functions inherited from Core::FMTlist< FMTfork > | |
| Core::FMTlist< FMTfork > & | operator+= (const Core::FMTlist< FMTfork > &OtherList) |
| append OtherList to this list actions both list had to be non shrinked, will throw exception if shrinked. | |
| void | swap (Core::FMTlist< FMTfork > &rhs) |
| FMTmask | getunion (const std::vector< FMTtheme > &themes) const |
| FMTlist () | |
| FMTlist (const FMTlist< FMTfork > &rhs) | |
| FMTlist & | operator= (const FMTlist< FMTfork > &rhs) |
| bool | operator== (const FMTlist< FMTfork > &rhs) const |
| ~FMTlist ()=default | |
| bool | empty () const |
| bool | canshrink () const |
| virtual void | clearcache () |
| size_t | size () const |
| std::vector< const FMTfork * > | findsets (const FMTmask &mask) const |
| std::vector< const FMTfork * > | findsetswithfiltered (const FMTmask &newkey) const |
| FMTmask | filtermask (const FMTmask &basemask) const |
| void | shrink () |
| void | unshrink (const std::vector< FMTtheme > &themes) |
| void | APIpush_back (const FMTmask &mask, const FMTfork &value) |
| void | push_back (const FMTmask &mask, const FMTfork &value) |
| void | push_back (const FMTlist< FMTfork > &rhs) |
| void | push_back (const FMTmask &mask, const std::unique_ptr< Core::FMTyieldhandler > &value) |
| virtual void | update () |
| void | push_front (const FMTmask &mask, const FMTfork &value) |
| void | pop_back () |
| void | erase (const size_t &location) |
| void | insert (const size_t &location, const FMTmask &mask, const FMTfork &value) |
| void | insert (const size_t &location, const FMTmask &mask, const std::unique_ptr< Core::FMTyieldhandler > &value) |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
Public Member Functions inherited from Core::FMTobject | |
| 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) |
Protected Attributes | |
| std::string | name |
| name of the FMTtranstion same name seen in FMTaction | |
Friends | |
| class | boost::serialization::access |
Additional Inherited Members | |
Public Types inherited from Core::FMTlist< FMTfork > | |
| typedef std::vector< std::pair< FMTmask, FMTfork > >::value_type | value_type |
| Value typedef of the FMTlist. | |
| typedef std::vector< std::pair< FMTmask, FMTfork > >::iterator | iterator |
| Iterator typedef of the FMTlist. | |
| typedef std::vector< std::pair< FMTmask, FMTfork > >::const_iterator | const_iterator |
| Const_Iterator typedef of the FMTlist. | |
Static Public Member Functions inherited from Core::FMTobject | |
| static std::string | getruntimelocation () |
| static unsigned long long | getavailablememory () |
Protected Member Functions inherited from Core::FMTlist< FMTfork > | |
| void | compressmasks (std::vector< FMTtheme > &newthemes) |
| void | compressmasks (std::vector< FMTtheme > &newthemes) |
| void | presolvelist (const FMTmaskfilter &filter, const std::vector< FMTtheme > &originalthemes, const std::vector< FMTtheme > &newthemes) |
| void | copydata (const Core::FMTlist< FMTfork > &rhs) |
| void | copydata (const FMTlist< std::unique_ptr< Core::FMTyieldhandler > > &rhs) |
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) |
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. | |
FMTtransition is a list of FMTfork (FMTspec). Each FMTaction has it's FMTtransition. Using a FMTdevelopment you can simulate the impact of harvesting that development with a FMTtransition. Each fork is a transition source and its linked targets. FMTaction test for operability and FMTtransition only "disturb" the FMTdevelopement and generates new FMTdevelopementpath.
| Core::FMTtransition::FMTtransition | ( | ) |
Default constructor for FMTtransition
|
default |
Default destructor for FMTtransition
| Core::FMTtransition::FMTtransition | ( | const std::string & | lname | ) |
FMTtransition constructor keeping only the name of the FMTtransition.
| Core::FMTtransition::FMTtransition | ( | const FMTtransition & | rhs | ) |
FMTtransition copy constructor.
| unsigned int Core::FMTtransition::age_after | ( | const std::vector< FMTdevelopment > & | devs, |
| const FMTaction & | action, | ||
| const FMTyields & | ylds, | ||
| const std::vector< FMTtheme > & | themes | ||
| ) | const |
For GCBM a GCBMtransition is described by the age of the stand after the disturbance of the stand. Using a vector of FMTdevelopement (devs) this functions return the average age after disturbances optained calculating the return age for each FMTdevelopement in the list.
| std::map< std::string, std::vector< FMTdevelopment > > Core::FMTtransition::attribute_targets | ( | const std::vector< FMTdevelopment > & | devs, |
| const FMTyields & | ylds, | ||
| const std::vector< FMTtheme > & | themes | ||
| ) | const |
| std::vector< Core::FMTmask > Core::FMTtransition::canproduce | ( | const Core::FMTmask & | testmask, |
| const std::vector< Core::FMTtheme > & | themes | ||
| ) | const |
The function return all the possibles masks, if pass as a source for the transition, that can produce the given(mask).
| const FMTfork * Core::FMTtransition::getfork | ( | const Core::FMTdevelopment & | developement, |
| const FMTyields & | ylds | ||
| ) | const |
Returns the FMTfork pointer for which the FMTdevelopment (dev) can be disturbed based on a given FMTyields section (ylds). Looking at every possible fork returns only the first usefull fork.
|
inline |
Getter for the FMTtransition name
| std::vector< FMTtheme > Core::FMTtransition::getstaticthemes | ( | const std::vector< FMTtheme > & | themes | ) | const |
Using a list of (themes) this function returns a subset of the theme list for which their's no attribute change in the FMTtransitionmask (what we call here static themes).
| bool Core::FMTtransition::isleaking | ( | ) | const |
This function checks if each FMTfork has a total proportion equal to 1 if the transition proportion != 1 then isleaking returns true.
| FMTmask Core::FMTtransition::main_target | ( | const std::vector< FMTdevelopment > & | devs, |
| const FMTyields & | ylds | ||
| ) | const |
Again for GCBM each GCBMtransition needs to have only one possible mask target. So this function returns the most targeted FMTmask across the developements list (devs) based on a given yields section (ylds).
| Core::FMTtransition::operator std::string | ( | ) | const |
FMTtransition conversion to string value like into a transition file.
| bool Core::FMTtransition::operator!= | ( | const FMTtransition & | rhs | ) | const |
FMTtransition nonequality operator check if FMTtransition (rhs) have not the same name.
| FMTtransition & Core::FMTtransition::operator+= | ( | const FMTtransition & | OtherTransition | ) |
append OtherTransition to this transition needs to be unskrink or it will throw an exception.
| OtherTransition | the other transition to append to this one. |
| bool Core::FMTtransition::operator< | ( | const FMTtransition & | rhs | ) | const |
FMTtransition less than operator.
| FMTtransition & Core::FMTtransition::operator= | ( | const FMTtransition & | rhs | ) |
FMTtransition assignment operator.
| bool Core::FMTtransition::operator== | ( | const FMTtransition & | rhs | ) | const |
FMTtransition equality operator check if FMTtransition (rhs) have the same name.
| FMTtransition Core::FMTtransition::presolve | ( | const FMTmaskfilter & | filter, |
| const std::vector< FMTtheme > & | originalthemes, | ||
| std::vector< FMTtheme > & | newthemes, | ||
| bool | compressdata = false |
||
| ) | const |
Returns a presolved FMTtransition based on a (basemask), the actual model FMTtheme (originalthemes), a (presolvedmask) and the new presolved themes list.
| FMTtransition Core::FMTtransition::single | ( | ) | const |
A transition can lead to multiple FMTdevelopementpath but for cell basesd models the FMTtransition should lead to only one futurdevelopementtype. Calling this function returns the a new FMTtransition that does not allow multiple FMTdevelopementpath. It select the path where the area proportion is the higher.
|
friend |
serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)
|
protected |
name of the FMTtranstion same name seen in FMTaction