![]() |
FMT 1.2.0
Forest management tools for forest planning
|
FMTList containing multiple yield handlers as seen in the yield section, holding the information related to forest productivity. More...
#include <FMTYields.h>
Public Member Functions | |
| void | generateDefaultYields (const std::vector< Core::FMTTheme > &themes) |
| Generate the default yields such as _TSLA in the yield class. | |
| void | swap (FMTYields &rhs) |
| Swap this FMTYields with another. | |
| bool | gotYieldType (FMTyldtype type) const |
| Return true if the yield section has a given yield type. | |
| void | setActionsMappingToModelHandlers (const std::vector< int > &actionids) |
| Clear and replace the actions mapping of every yield model handler. | |
| std::vector< std::string > | getAllYieldNames () const |
| Return all the yield names from the list. | |
| FMTYields () | |
| Default constructor for FMTYields. | |
| ~FMTYields ()=default | |
| Default destructor for FMTYields. | |
| FMTYields (const FMTYields &rhs) | |
| Copy constructor for FMTYields. | |
| FMTYields & | operator= (const FMTYields &rhs) |
| Copy assignment operator for FMTYields. | |
| void | clearCache () final |
| Clear the caching from all FMTData. | |
| void | clearRandomYieldsCache () |
| Clear the cache of all random yield models. | |
| bool | isYld (const std::string &value, bool fromsource=false) const |
| Return true if the yield section contains a given non null yield. | |
| bool | isNullYld (const std::string &value) const |
| Return true if the yield section contains a given null yield. | |
| int | getAge (const FMTYieldRequest &request, const FMTSpec &spec) const |
| Get the yields values for a development from a set of yield requests. | |
| std::map< std::string, std::map< std::string, std::vector< double > > > | getAllYields (const FMTTheme &target, FMTyldtype type) const |
| Return a map of all the yield values for a given yield handler type, used for generating a text file of yields for GCBM. | |
| bool | operator== (const FMTYields &rhs) const |
| Equality comparison operator of FMTYields. | |
| bool | operator!= (const FMTYields &rhs) const |
| Inequality comparison operator of FMTYields. | |
| void | update () override |
| Update the yield names and null yield names caching, as required by FMTList. | |
| void | reserve (const FMTYields &p_other) |
| Reserve memory based on another FMTYields. | |
| FMTYields | preSolve (const FMTMaskFilter &filter, const std::vector< FMTTheme > &originalthemes, const std::vector< FMTTheme > &newthemes) const |
| Return a presolved FMTYields section, removing useless data. | |
| void | preSolveRef (const FMTMaskFilter &p_filter, const std::vector< FMTTheme > &p_originalThemes, const std::vector< FMTTheme > &p_newThemes) |
| Presolve the FMTYields section in place, removing useless data. | |
| std::vector< std::string > | getStacked () const |
| Return the yields as a vector of strings. | |
| FMTYields | getFromFactor (const double &factor, std::vector< std::string >yieldnames=std::vector< std::string >()) const |
| Multiply the yields section by a factor and return a new yields section. | |
| double | get (const FMTYieldRequest &request, const std::string &yld) const |
| Get the yield value for a development from a yield request. | |
| void | pushBackAgeHandler (const FMTMask &mask, const FMTAgeYieldHandler &value) |
| Push back an age yield handler, for R. | |
| void | pushBackTimeHandler (const FMTMask &mask, const FMTTimeYieldHandler &value) |
| Push back a time yield handler, for R. | |
| void | clear () |
| Clear all the yield data. | |
Static Public Member Functions | |
| static const std::string & | getNullYield () |
| Return the null yield. | |
| static int | getMaxBase (const std::vector< const FMTYieldHandler * > &handlers) |
| Return the maximum age seen in the yield handlers. | |
Friends | |
| class | Models::FMTModel |
| class | Models::FMTNssModel |
| class | boost::serialization::access |
| Serialize the FMTYields through its base FMTList for multiprocessing across multiple cpus (pickle in Python). | |
| class | FMTYieldRequest |
FMTList containing multiple yield handlers as seen in the yield section, holding the information related to forest productivity.
Used to check if a development is operable to an action, calculate outputs and constraints, and disturb a forest stand in a transition.
| Core::FMTYields::FMTYields | ( | ) |
Default constructor for FMTYields.
|
default |
Default destructor for FMTYields.
| Core::FMTYields::FMTYields | ( | const FMTYields & | rhs | ) |
| void Core::FMTYields::clear | ( | ) |
Clear all the yield data.
|
final |
Clear the caching from all FMTData.
| void Core::FMTYields::clearRandomYieldsCache | ( | ) |
Clear the cache of all random yield models.
| void Core::FMTYields::generateDefaultYields | ( | const std::vector< Core::FMTTheme > & | themes | ) |
Generate the default yields such as _TSLA in the yield class.
| [in] | themes | the themes. |
| double Core::FMTYields::get | ( | const FMTYieldRequest & | request, |
| const std::string & | yld | ||
| ) | const |
Get the yield value for a development from a yield request.
| [in] | request | the yield request. |
| [in] | yld | the yield name. |
| int Core::FMTYields::getAge | ( | const FMTYieldRequest & | request, |
| const FMTSpec & | spec | ||
| ) | const |
Get the yields values for a development from a set of yield requests.
Get the yield value for a development, looking at age, period, lock and mask.
Get the yields used and their values for a development and a specification.
Return the new age of a development when disturbed by a transition specification.
| [in] | request | the yield request. |
| [in] | spec | the specification. |
| std::vector< std::string > Core::FMTYields::getAllYieldNames | ( | ) | const |
Return all the yield names from the list.
| std::map< std::string, std::map< std::string, std::vector< double > > > Core::FMTYields::getAllYields | ( | const FMTTheme & | target, |
| FMTyldtype | type | ||
| ) | const |
Return a map of all the yield values for a given yield handler type, used for generating a text file of yields for GCBM.
| [in] | target | the target theme. |
| [in] | type | the yield handler type. |
| FMTYields Core::FMTYields::getFromFactor | ( | const double & | factor, |
| std::vector< std::string > | yieldnames = std::vector< std::string >() |
||
| ) | const |
Multiply the yields section by a factor and return a new yields section.
| [in] | factor | the factor. |
| [in] | yieldnames | the yield names to multiply, all if empty. |
|
static |
Return the maximum age seen in the yield handlers.
| [in] | handlers | the yield handlers. |
|
static |
Return the null yield.
| std::vector< std::string > Core::FMTYields::getStacked | ( | ) | const |
Return the yields as a vector of strings.
| bool Core::FMTYields::gotYieldType | ( | FMTyldtype | type | ) | const |
Return true if the yield section has a given yield type.
| [in] | type | the yield type. |
| bool Core::FMTYields::isNullYld | ( | const std::string & | value | ) | const |
Return true if the yield section contains a given null yield.
| [in] | value | the yield name. |
| bool Core::FMTYields::isYld | ( | const std::string & | value, |
| bool | fromsource = false |
||
| ) | const |
Return true if the yield section contains a given non null yield.
| [in] | value | the yield name. |
| [in] | fromsource | if true checks the sources. |
| bool Core::FMTYields::operator!= | ( | const FMTYields & | rhs | ) | const |
Inequality comparison operator of FMTYields.
| [in] | rhs | the yields to compare with. |
| bool Core::FMTYields::operator== | ( | const FMTYields & | rhs | ) | const |
Equality comparison operator of FMTYields.
| [in] | rhs | the yields to compare with. |
| FMTYields Core::FMTYields::preSolve | ( | const FMTMaskFilter & | filter, |
| const std::vector< FMTTheme > & | originalthemes, | ||
| const std::vector< FMTTheme > & | newthemes | ||
| ) | const |
Return a presolved FMTYields section, removing useless data.
| [in] | filter | the mask filter. |
| [in] | originalthemes | the original themes. |
| [in] | newthemes | the presolved themes. |
| void Core::FMTYields::preSolveRef | ( | const FMTMaskFilter & | p_filter, |
| const std::vector< FMTTheme > & | p_originalThemes, | ||
| const std::vector< FMTTheme > & | p_newThemes | ||
| ) |
Presolve the FMTYields section in place, removing useless data.
| [in] | p_filter | the mask filter. |
| [in] | p_originalThemes | the original themes. |
| [in] | p_newThemes | the presolved themes. |
| void Core::FMTYields::pushBackAgeHandler | ( | const FMTMask & | mask, |
| const FMTAgeYieldHandler & | value | ||
| ) |
Push back an age yield handler, for R.
| [in] | mask | the mask. |
| [in] | value | the age yield handler. |
| void Core::FMTYields::pushBackTimeHandler | ( | const FMTMask & | mask, |
| const FMTTimeYieldHandler & | value | ||
| ) |
Push back a time yield handler, for R.
| [in] | mask | the mask. |
| [in] | value | the time yield handler. |
| void Core::FMTYields::reserve | ( | const FMTYields & | p_other | ) |
Reserve memory based on another FMTYields.
| [in] | p_other | the other yields. |
| void Core::FMTYields::setActionsMappingToModelHandlers | ( | const std::vector< int > & | actionids | ) |
Clear and replace the actions mapping of every yield model handler.
| [in] | actionids | the new action ids. |
| void Core::FMTYields::swap | ( | FMTYields & | rhs | ) |
|
override |
Update the yield names and null yield names caching, as required by FMTList.
|
friend |
|
friend |
|
friend |
|
friend |