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

#include <FMTdevelopment.hpp>

Inheritance diagram for Core::FMTdevelopment:
[legend]
Collaboration diagram for Core::FMTdevelopment:
[legend]

Public Member Functions

int getage () const
 
int getlock () const
 
int getperiod () const
 
const Core::FMTmaskgetmask () const
 
Core::FMTmask getmaskcopy () const
 
void setage (const int &lage)
 
void setlock (const int &llock)
 
void setperiod (const int &lperiod)
 
void setmask (const Core::FMTmask &lmask)
 
 FMTdevelopment ()
 
virtual ~FMTdevelopment ()=default
 
 FMTdevelopment (const FMTmask &mask, const int &age, const int &lock)
 
 FMTdevelopment (const FMTmask &lmask, const int &lage, const int &llock, const int &lperiod)
 
 FMTdevelopment (const FMTdevelopment &rhs)
 
virtual std::unique_ptr< FMTdevelopmentClone () const
 
FMTdevelopmentoperator= (const FMTdevelopment &rhs)
 
bool operator== (const FMTdevelopment &rhs) const
 
bool operator!= (const FMTdevelopment &rhs) const
 
bool operator< (const FMTdevelopment &rhs) const
 
FMTfuturdevelopment grow () const
 
FMTyieldrequest getyieldrequest (const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
 
bool operable (const FMTaction &action, const Core::FMTyields &ylds, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
 
bool anyoperable (const std::vector< const FMTaction * > &actions, const Core::FMTyields &ylds, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
 
virtual operator std::string () const
 
virtual double getarea () const
 
FMTdevelopment clearlock () const
 
std::vector< FMTdevelopmentpathoperate (const FMTaction &action, const FMTtransition &Transition, const Core::FMTyields &ylds, const std::vector< FMTtheme > &themes) const
 
double getinventorycoef (const Core::FMTyields &ylds, const std::string &target_yield, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
 
double getharvestcoef (const std::vector< FMTdevelopmentpath > &topaths, const FMTaction &action, const Core::FMTyields &ylds, const std::string &target_yield, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
 
bool is (const FMTspec &specification, const Core::FMTyields &ylds, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
 
bool worthtestingoperability (const FMTaction &action) const
 
std::vector< int > anyworthtestingoperability (const std::vector< const FMTaction * > &actions, const FMTaction &firstaction) const
 
std::vector< bool > isanyworthtestingoperability (const std::vector< const FMTaction * > &actions, const std::vector< FMTaction > &allactions) const noexcept
 
size_t hash () 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)
 

Friends

class boost::serialization::access
 

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 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.
 

Detailed Description

FMTdevelopment is the base class of FMTactualdevelopement and FMTfuturdevelopement. This class is the thing that look like a forest stand. It holds informations about it's age, at which period it exist, the lock level of the stand and finaly the mask hold a description of the growth/spatial reference/ and other potential sutff.

Constructor & Destructor Documentation

◆ FMTdevelopment() [1/4]

Core::FMTdevelopment::FMTdevelopment ( )

Default constructor for FMTdevelopement

◆ ~FMTdevelopment()

virtual Core::FMTdevelopment::~FMTdevelopment ( )
virtualdefault

Default destructor for FMTdevelopement.

◆ FMTdevelopment() [2/4]

Core::FMTdevelopment::FMTdevelopment ( const FMTmask mask,
const int &  age,
const int &  lock 
)

FMTdevelopement constructor using a FMTmask the age and the lock level of the FMTdevelopment.

◆ FMTdevelopment() [3/4]

Core::FMTdevelopment::FMTdevelopment ( const FMTmask lmask,
const int &  lage,
const int &  llock,
const int &  lperiod 
)

FMTdevelopement constructor using a FMTmask the age and the lock level and the period of the FMTdevelopment.

◆ FMTdevelopment() [4/4]

Core::FMTdevelopment::FMTdevelopment ( const FMTdevelopment rhs)

FMTdevelopement copy constructor.

Member Function Documentation

◆ anyoperable()

bool Core::FMTdevelopment::anyoperable ( const std::vector< const FMTaction * > &  actions,
const Core::FMTyields ylds,
const Graph::FMTgraphvertextoyield graphyieldrequest = nullptr 
) const

Check if this FMTdevelopement is operable to any of FMTaction in the (actions) vector based on multiple yields (yields).

◆ anyworthtestingoperability()

std::vector< int > Core::FMTdevelopment::anyworthtestingoperability ( const std::vector< const FMTaction * > &  actions,
const FMTaction firstaction 
) const

Check if any action in the actions vector worth testing the operability and returns it's pointer distance from the firestaction.

◆ clearlock()

FMTdevelopment Core::FMTdevelopment::clearlock ( ) const

Returns a copy of this FMTdevelopment but set the lock level to 0.

◆ Clone()

virtual std::unique_ptr< FMTdevelopment > Core::FMTdevelopment::Clone ( ) const
virtual

Virtual clone function for FMTdevelopement for abstraction

Reimplemented in Core::FMTactualdevelopment, and Core::FMTfuturdevelopment.

◆ getage()

int Core::FMTdevelopment::getage ( ) const
inline

Get the age of the development.

◆ getarea()

virtual double Core::FMTdevelopment::getarea ( ) const
virtual

Returns the area of the FMTdevelopment

Reimplemented in Core::FMTactualdevelopment, and Core::FMTfuturdevelopment.

◆ getharvestcoef()

double Core::FMTdevelopment::getharvestcoef ( const std::vector< FMTdevelopmentpath > &  topaths,
const FMTaction action,
const Core::FMTyields ylds,
const std::string &  target_yield,
const Graph::FMTgraphvertextoyield graphyieldrequest = nullptr 
) const

Returns the harvest coefficiant of the FMTdevelopement for a given yield (target_yield) if it follows multiple developement path for a given action and based on yields. It gives the amount of yield the action produce if the *this FMTdevelopement is operated.

◆ getinventorycoef()

double Core::FMTdevelopment::getinventorycoef ( const Core::FMTyields ylds,
const std::string &  target_yield,
const Graph::FMTgraphvertextoyield graphyieldrequest = nullptr 
) const

Returns inventory coefficiant of the FMTdevelopement for a given yield (target_yield) based on (yields). The amount of (yield) do this FMTdevelopement has.

◆ getlock()

int Core::FMTdevelopment::getlock ( ) const
inline

Get the lock of the developement.

◆ getmask()

const Core::FMTmask & Core::FMTdevelopment::getmask ( ) const
inline

Get the mask of the developement.

◆ getmaskcopy()

Core::FMTmask Core::FMTdevelopment::getmaskcopy ( ) const
inline

Get the mask of the developement.

◆ getperiod()

int Core::FMTdevelopment::getperiod ( ) const
inline

Get the period of the developement.

◆ getyieldrequest()

FMTyieldrequest Core::FMTdevelopment::getyieldrequest ( const Graph::FMTgraphvertextoyield graphyieldrequest = nullptr) const

Get a yieldrequest without any reference to a FMTgraph for a given (ylds) and this FMTdevelopement.

◆ grow()

FMTfuturdevelopment Core::FMTdevelopment::grow ( ) const

The function returns a grown up copy of this FMTdevelopement increasing the age and the period and decreasing the lock level if the lock level was > 0.

◆ hash()

size_t Core::FMTdevelopment::hash ( ) const
inline

Hash function for FMTdevelopment combining mask,age,lock and period of the FMTdevelopement.

◆ is()

bool Core::FMTdevelopment::is ( const FMTspec specification,
const Core::FMTyields ylds,
const Graph::FMTgraphvertextoyield graphyieldrequest = nullptr 
) const

Check if this FMTdevelopment respects some specifications based on multiple yields.

◆ isanyworthtestingoperability()

std::vector< bool > Core::FMTdevelopment::isanyworthtestingoperability ( const std::vector< const FMTaction * > &  actions,
const std::vector< FMTaction > &  allactions 
) const
noexcept

Return a vector if true worth testting if false dont test for operability.

◆ operable()

bool Core::FMTdevelopment::operable ( const FMTaction action,
const Core::FMTyields ylds,
const Graph::FMTgraphvertextoyield graphyieldrequest = nullptr 
) const

Check if this FMTdevelopement is operable to an FMTaction (action) based on multiple yields (yields).

◆ operate()

std::vector< FMTdevelopmentpath > Core::FMTdevelopment::operate ( const FMTaction action,
const FMTtransition Transition,
const Core::FMTyields ylds,
const std::vector< FMTtheme > &  themes 
) const

Returns a vector of FMTdevelopementpath if the FMTdevelopement is operated by an (action), a (Transition) bases on multiple yields and the sorted FMTthemes of the model.

◆ operator std::string()

virtual Core::FMTdevelopment::operator std::string ( ) const
virtual

Returns the string reprensentation of a FMTdevelopment like in the area section.

Reimplemented in Core::FMTactualdevelopment.

◆ operator!=()

bool Core::FMTdevelopment::operator!= ( const FMTdevelopment rhs) const

FMTdevelopement nonequality operator.

◆ operator<()

bool Core::FMTdevelopment::operator< ( const FMTdevelopment rhs) const

FMTdevelopement less than operator.

◆ operator=()

FMTdevelopment & Core::FMTdevelopment::operator= ( const FMTdevelopment rhs)

FMTdevelopement copy assignment.

◆ operator==()

bool Core::FMTdevelopment::operator== ( const FMTdevelopment rhs) const

FMTdevelopement equality operator.

◆ setage()

void Core::FMTdevelopment::setage ( const int &  lage)

Set the age of the development.

◆ setlock()

void Core::FMTdevelopment::setlock ( const int &  llock)

Set the lock of the developement.

◆ setmask()

void Core::FMTdevelopment::setmask ( const Core::FMTmask lmask)

Set the mask of the developement.

◆ setperiod()

void Core::FMTdevelopment::setperiod ( const int &  lperiod)

Set the period of the developement.

◆ worthtestingoperability()

bool Core::FMTdevelopment::worthtestingoperability ( const FMTaction action) const

This function returns true if the function worth testing for operability for the action. Use for optimization.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)


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