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

#include <FMTyieldmodeldecisiontree.hpp>

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

Public Member Functions

 FMTyieldmodeldecisiontree ()=default
 
 FMTyieldmodeldecisiontree (const FMTyieldmodeldecisiontree &rhs)
 
FMTyieldmodeldecisiontreeoperator= (const FMTyieldmodeldecisiontree &rhs)=default
 
 ~FMTyieldmodeldecisiontree ()=default
 
 FMTyieldmodeldecisiontree (const boost::property_tree::ptree &jsonProps, const std::vector< std::string > &inputYields, const Core::FMTmask &mainmask)
 
std::unique_ptr< FMTyieldmodelClone () const
 
const std::vector< double > Predict (const Core::FMTyieldrequest &request) const
 
virtual std::unique_ptr< FMTyieldmodelpresolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &newthemes) const
 
virtual std::unique_ptr< FMTyieldmodelpostsolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &basethemes) const
 
virtual operator std::string () const
 
virtual std::vector< std::vector< double > > getperiodicvalues () const
 
- Public Member Functions inherited from Core::FMTyieldmodel
virtual ~FMTyieldmodel ()
 
 FMTyieldmodel ()
 
 FMTyieldmodel (const FMTyieldmodel &rhs)=default
 
FMTyieldmodeloperator= (const FMTyieldmodel &rhs)=default
 
const std::string & GetModelName () const
 
const std::vector< std::string > & GetModelYields () const
 
virtual std::unique_ptr< FMTyieldmodelClone () const =0
 
virtual const std::vector< double > Predict (const Core::FMTyieldrequest &request) const =0
 
virtual std::unique_ptr< FMTyieldmodelpresolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &newthemes) const
 
virtual std::unique_ptr< FMTyieldmodelpostsolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &basethemes) const
 
virtual operator std::string () const =0
 
virtual std::vector< std::vector< double > > getperiodicvalues () 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)
 

Static Public Member Functions

static std::string GetModelType ()
 
- Static Public Member Functions inherited from Core::FMTobject
static std::string getruntimelocation ()
 
static unsigned long long getavailablememory ()
 

Additional Inherited Members

- 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 Core::FMTyieldmodel
std::string modelName
 
std::vector< std::string > modelYields = {}
 
const std::string JSON_PROP_MODEL_NAME = "modelFileName"
 
- 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

FMTyieldmodeldecisiontree use a decision tree based on outputs of the model (growth only) to get yield values.

Constructor & Destructor Documentation

◆ FMTyieldmodeldecisiontree() [1/3]

Core::FMTyieldmodeldecisiontree::FMTyieldmodeldecisiontree ( )
default

Default constructor.

◆ FMTyieldmodeldecisiontree() [2/3]

Core::FMTyieldmodeldecisiontree::FMTyieldmodeldecisiontree ( const FMTyieldmodeldecisiontree rhs)

Copy constructor.

◆ ~FMTyieldmodeldecisiontree()

Core::FMTyieldmodeldecisiontree::~FMTyieldmodeldecisiontree ( )
default

Default destructor.

◆ FMTyieldmodeldecisiontree() [3/3]

Core::FMTyieldmodeldecisiontree::FMTyieldmodeldecisiontree ( const boost::property_tree::ptree jsonProps,
const std::vector< std::string > &  inputYields,
const Core::FMTmask mainmask 
)

Construct a FMTyieldmodeldecisiontree based on a JSON file and an input yield name list and also on the global mask

Member Function Documentation

◆ Clone()

std::unique_ptr< FMTyieldmodel > Core::FMTyieldmodeldecisiontree::Clone ( ) const
virtual

◆ GetModelType()

static std::string Core::FMTyieldmodeldecisiontree::GetModelType ( )
static

Return the modeltype of the FMTyieldmodel.

◆ getperiodicvalues()

virtual std::vector< std::vector< double > > Core::FMTyieldmodeldecisiontree::getperiodicvalues ( ) const
virtual

Try to turn the FMTyieldmodel into periodic constant values. if returns an non empty vector then each first dimension is the yield id and each second dimension are the periodic value calculated by the yield.

Reimplemented from Core::FMTyieldmodel.

◆ operator std::string()

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

When it comes to write down in a string the yield model.

Implements Core::FMTyieldmodel.

◆ operator=()

FMTyieldmodeldecisiontree & Core::FMTyieldmodeldecisiontree::operator= ( const FMTyieldmodeldecisiontree rhs)
default

Default equality operator.

◆ postsolve()

virtual std::unique_ptr< FMTyieldmodel > Core::FMTyieldmodeldecisiontree::postsolve ( const FMTmaskfilter filter,
const std::vector< FMTtheme > &  basethemes 
) const
virtual

Change the output and constraints mask to return to the original constraints and outputs.

Reimplemented from Core::FMTyieldmodel.

◆ Predict()

const std::vector< double > Core::FMTyieldmodeldecisiontree::Predict ( const Core::FMTyieldrequest request) const
virtual

Runs the decision tree so if the values are not set build a naturalgrowth model and run the decision tree and get the decision for all periods. Finaly return the predictions.

Implements Core::FMTyieldmodel.

◆ presolve()

virtual std::unique_ptr< FMTyieldmodel > Core::FMTyieldmodeldecisiontree::presolve ( const FMTmaskfilter filter,
const std::vector< FMTtheme > &  newthemes 
) const
virtual

Return a presolved FMTyieldmodeldecisiontree

Reimplemented from Core::FMTyieldmodel.


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