![]() |
FMT 1.2.0
Forest management tools for forest planning
|
List of specifications dictating the operability of a subset of developments to this action. More...
#include <FMTAction.h>
Public Member Functions | |
| FMTAction & | operator+= (const FMTAction &OtherAction) |
| Append another action to this action; actions need to have the same age reset otherwise an exception is thrown. | |
| FMTAction () | |
| Default constructor for FMTAction. | |
| virtual | ~FMTAction ()=default |
| Default virtual destructor for FMTAction. | |
| FMTAction (const std::string &lname) | |
| Construct an empty action with a given name. | |
| FMTAction (const std::string &lname, const bool &p_lock, const bool &p_reset) | |
| Construct an empty action with a given name, respect lock and reset age flags. | |
| void | pushAggregate (const std::string &aggregate) |
| Push an aggregate to the aggregates of the action. | |
| void | pushPartials (const std::string &yield) |
| Push a partial yield name to the partials of the action. | |
| FMTAction (const FMTAction &rhs) | |
| Copy constructor for FMTAction. | |
| FMTAction & | operator= (const FMTAction &rhs) |
| Copy assignment operator for FMTAction. | |
| void | update () override |
| Update the action by setting the bounds and shrinking the list, for optimization. | |
| FMTAction | preSolve (const FMTMaskFilter &filter, const std::vector< FMTTheme > &originalthemes, std::vector< FMTTheme > &newthemes, bool compressdata=false) const |
| Presolve the action by eliminating specifications and presolving the masks; the returned action can be empty. | |
| void | preSolveRef (const FMTMaskFilter &p_filter, const std::vector< FMTTheme > &p_originalthemes, std::vector< FMTTheme > &p_newthemes, bool p_compressdata=false) |
| Presolve the action in place by eliminating specifications and presolving the masks; the action can become empty. | |
| const int & | getAgeLowerBound () const |
| Get the age lower bound for all specifications. | |
| const int & | getAgeUpperBound () const |
| Get the age upper bound for all specifications. | |
| const int & | getPeriodLowerBound () const |
| Get the period lower bound for all specifications. | |
| const int & | getPeriodUpperBound () const |
| Get the period upper bound for all specifications. | |
| size_t | hash () const |
| Return the hash of the action based on its name. | |
| std::string | getName () const |
| Get the name of the action. | |
| bool | doRespectLock () const |
| Return true if the action needs to respect the lock state of the development. | |
| bool | isResetAge () const |
| Return true if the development age is reset to 0 when operated by this action. | |
| bool | isPartOfASerie () const |
| Return true if the action is part of a serie. | |
| bool | isAllowedInSerie (const std::vector< std::string > &serie) const |
| Return true if the serie mask is part of one serie of the action. | |
| const FMTSerie * | getSerie (const std::vector< std::string > &p_SerieMask) const |
| get the serie with the partial mask p_SerieMask | |
| const std::vector< FMTSerie > & | getSeries () const |
| get all series of the actions | |
| std::vector< std::string > | getSeriesNames () const |
| Return the series names of the action. | |
| size_t | getLargestSerieSize () const |
| Return the size of the largest serie of the action. | |
| void | setSeries (std::vector< Core::FMTSerie > p_series) |
| Set the series of the action, checking which ones the action is part of and building them. | |
| bool | useYield (const std::string &yldname) const |
| Return true if the yield is used by the action to set operability. | |
| std::vector< std::string > | getAggregates () const |
| Return the names of the aggregates the action is part of. | |
| void | setAggregates (const std::vector< std::string > &p_aggregates) |
| Set a new vector of aggregates. | |
| std::vector< std::string > | getPartials () const |
| Return the partial yield names of the action. | |
| bool | operator< (const FMTAction &rhs) const |
| Less than comparison operator of FMTAction, testing the action length then the name. | |
| bool | operator== (const FMTAction &rhs) const |
| Equality comparison operator of FMTAction, checking if the actions have the same name. | |
| bool | operator!= (const FMTAction &rhs) const |
| Inequality comparison operator of FMTAction, checking if the actions have a different name. | |
| operator std::string () const | |
| Convert the action to a string as in a .act file. | |
| bool | partial (const std::string &yield) const |
| Check if the yield needs to be considered as partial for this action. | |
| int | getGCBMActionId () const |
| Return the corresponding GCBM action id. | |
| std::string | getGCBMActionName () const |
| Return the corresponding GCBM action name. | |
| std::vector< Core::FMTAction > | split (const std::vector< Core::FMTMask > &p_mask, const std::vector< Core::FMTTheme > &p_themes) const |
| Split the action into different actions using the masks. | |
| bool | notUse () const |
| Check if all specs are period lower == 0 and upper == 0. | |
| bool | isPartOf (const std::string &p_name) const |
| Check if action is part of action name or aggregate. | |
| bool | isInSeries () const |
| return true if you find this action first in a serie | |
Protected Member Functions | |
| void | _setBounds () |
| Set the age and period bounds member data by iterating on the specifications, for optimization. | |
| std::vector< std::string > | _getGCBMActionDef () const |
| Return the corresponding GCBM action definition. | |
Protected Attributes | |
| std::vector< std::string > | m_aggregates |
| An action can be part of a aggregate so this data member gets the name of all aggregate the action is being part of. | |
| std::vector< std::string > | m_partials |
| Keeps the yields name for determining the amount of wood harvested in case of partial cut. | |
| int | m_agelowerbound |
| int | m_ageupperbound |
| int | m_periodlowerbound |
| int | m_periodupperbound |
| std::string | m_name |
| The name of the action. | |
| bool | m_lock |
| If lock is true the action is not _lockexempt when false the action is _LOCKEXEMPT. | |
| bool | m_reset |
| If reset is true then the action is age reset Y else the action doen't reset age. | |
| std::vector< FMTSerie > | m_series |
| The action series that the action is part of. | |
| bool | m_InSerie |
| True if the actions is in a serie. | |
Friends | |
| class | FMTActionComparator |
| class | boost::serialization::access |
| Serialize the FMTAction through its base FMTList<FMTSpec> for multiprocessing across multiple cpus (pickle in Python). | |
List of specifications dictating the operability of a subset of developments to this action.
The operability testing for a given action is done in the FMTDevelopment class.
| Core::FMTAction::FMTAction | ( | ) |
Default constructor for FMTAction.
|
virtualdefault |
Default virtual destructor for FMTAction.
| Core::FMTAction::FMTAction | ( | const std::string & | lname | ) |
Construct an empty action with a given name.
| [in] | lname | the name of the action. |
| Core::FMTAction::FMTAction | ( | const std::string & | lname, |
| const bool & | p_lock, | ||
| const bool & | p_reset | ||
| ) |
Construct an empty action with a given name, respect lock and reset age flags.
| [in] | lname | the name of the action. |
| [in] | p_lock | if true the action respects the lock. |
| [in] | p_reset | if true the action resets the age. |
| Core::FMTAction::FMTAction | ( | const FMTAction & | rhs | ) |
|
protected |
Return the corresponding GCBM action definition.
|
protected |
Set the age and period bounds member data by iterating on the specifications, for optimization.
|
inline |
Return true if the action needs to respect the lock state of the development.
|
inline |
Get the age lower bound for all specifications.
|
inline |
Get the age upper bound for all specifications.
| std::vector< std::string > Core::FMTAction::getAggregates | ( | ) | const |
Return the names of the aggregates the action is part of.
| int Core::FMTAction::getGCBMActionId | ( | ) | const |
Return the corresponding GCBM action id.
| std::string Core::FMTAction::getGCBMActionName | ( | ) | const |
Return the corresponding GCBM action name.
| size_t Core::FMTAction::getLargestSerieSize | ( | ) | const |
Return the size of the largest serie of the action.
|
inline |
Get the name of the action.
| std::vector< std::string > Core::FMTAction::getPartials | ( | ) | const |
Return the partial yield names of the action.
|
inline |
Get the period lower bound for all specifications.
|
inline |
Get the period upper bound for all specifications.
| const FMTSerie * Core::FMTAction::getSerie | ( | const std::vector< std::string > & | p_SerieMask | ) | const |
get the serie with the partial mask p_SerieMask
| [in] | p_SerieMask | the partial serie mask |
| const std::vector< FMTSerie > & Core::FMTAction::getSeries | ( | ) | const |
get all series of the actions
| std::vector< std::string > Core::FMTAction::getSeriesNames | ( | ) | const |
Return the series names of the action.
|
inline |
Return the hash of the action based on its name.
| bool Core::FMTAction::isAllowedInSerie | ( | const std::vector< std::string > & | serie | ) | const |
Return true if the serie mask is part of one serie of the action.
| [in] | serie | the serie mask. |
| bool Core::FMTAction::isInSeries | ( | ) | const |
return true if you find this action first in a serie
| bool Core::FMTAction::isPartOf | ( | const std::string & | p_name | ) | const |
Check if action is part of action name or aggregate.
| [in] | p_name | action name or aggregate. |
|
inline |
Return true if the action is part of a serie.
|
inline |
Return true if the development age is reset to 0 when operated by this action.
| bool Core::FMTAction::notUse | ( | ) | const |
Check if all specs are period lower == 0 and upper == 0.
| Core::FMTAction::operator std::string | ( | ) | const |
Convert the action to a string as in a .act file.
| bool Core::FMTAction::operator!= | ( | const FMTAction & | rhs | ) | const |
Inequality comparison operator of FMTAction, checking if the actions have a different name.
| [in] | rhs | the action to compare with. |
Append another action to this action; actions need to have the same age reset otherwise an exception is thrown.
| [in] | OtherAction | the other action to append to this one. |
| bool Core::FMTAction::operator< | ( | const FMTAction & | rhs | ) | const |
Less than comparison operator of FMTAction, testing the action length then the name.
| [in] | rhs | the action to compare with. |
| bool Core::FMTAction::operator== | ( | const FMTAction & | rhs | ) | const |
Equality comparison operator of FMTAction, checking if the actions have the same name.
| [in] | rhs | the action to compare with. |
| bool Core::FMTAction::partial | ( | const std::string & | yield | ) | const |
Check if the yield needs to be considered as partial for this action.
| [in] | yield | the yield name. |
| FMTAction Core::FMTAction::preSolve | ( | const FMTMaskFilter & | filter, |
| const std::vector< FMTTheme > & | originalthemes, | ||
| std::vector< FMTTheme > & | newthemes, | ||
| bool | compressdata = false |
||
| ) | const |
Presolve the action by eliminating specifications and presolving the masks; the returned action can be empty.
| [in] | filter | the mask filter. |
| [in] | originalthemes | the original themes. |
| [in,out] | newthemes | the presolved themes. |
| [in] | compressdata | if true compresses the data. |
| void Core::FMTAction::preSolveRef | ( | const FMTMaskFilter & | p_filter, |
| const std::vector< FMTTheme > & | p_originalthemes, | ||
| std::vector< FMTTheme > & | p_newthemes, | ||
| bool | p_compressdata = false |
||
| ) |
Presolve the action in place by eliminating specifications and presolving the masks; the action can become empty.
| [in] | p_filter | the mask filter. |
| [in] | p_originalthemes | the original themes. |
| [in,out] | p_newthemes | the presolved themes. |
| [in] | p_compressdata | if true compresses the data. |
| void Core::FMTAction::pushAggregate | ( | const std::string & | aggregate | ) |
Push an aggregate to the aggregates of the action.
| [in] | aggregate | the aggregate to push. |
| void Core::FMTAction::pushPartials | ( | const std::string & | yield | ) |
Push a partial yield name to the partials of the action.
| [in] | yield | the partial yield name to push. |
| void Core::FMTAction::setAggregates | ( | const std::vector< std::string > & | p_aggregates | ) |
Set a new vector of aggregates.
| [in] | p_aggregates | the vector of aggregates to set. |
| void Core::FMTAction::setSeries | ( | std::vector< Core::FMTSerie > | p_series | ) |
Set the series of the action, checking which ones the action is part of and building them.
| [in] | p_series | the series to set. |
| std::vector< Core::FMTAction > Core::FMTAction::split | ( | const std::vector< Core::FMTMask > & | p_mask, |
| const std::vector< Core::FMTTheme > & | p_themes | ||
| ) | const |
Split the action into different actions using the masks.
| [in] | p_mask | the masks used to split the action. |
| [in] | p_themes | the themes to generate the masks. |
|
override |
Update the action by setting the bounds and shrinking the list, for optimization.
| bool Core::FMTAction::useYield | ( | const std::string & | yldname | ) | const |
Return true if the yield is used by the action to set operability.
| [in] | yldname | the yield name. |
|
friend |
Serialize the FMTAction through its base FMTList<FMTSpec> for multiprocessing across multiple cpus (pickle in Python).
| Archive | the archive type. |
| [in,out] | ar | the archive to serialize to or from. |
| [in] | version | the serialization version. |
|
friend |
|
protected |
Those data members are for optimization only, the class determine within which bounds the aciton can take place for a given development.
|
protected |
|
protected |
An action can be part of a aggregate so this data member gets the name of all aggregate the action is being part of.
|
protected |
True if the actions is in a serie.
|
protected |
If lock is true the action is not _lockexempt when false the action is _LOCKEXEMPT.
|
protected |
The name of the action.
|
protected |
Keeps the yields name for determining the amount of wood harvested in case of partial cut.
|
protected |
|
protected |
|
protected |
If reset is true then the action is age reset Y else the action doen't reset age.
|
protected |
The action series that the action is part of.