GCBM
standgrowthcurve.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_STANDGROWTHCURVE_H_
2 #define MOJA_MODULES_CBM_STANDGROWTHCURVE_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
5 #include "moja/flint/modulebase.h"
6 
11 
12 namespace moja {
13 namespace modules {
14 namespace cbm {
15 
16  class CBM_API StandGrowthCurve {
17  public:
18  virtual ~StandGrowthCurve() {};
19 
20  StandGrowthCurve(Int64 standGrowthCurveID, Int64 spuID);
21 
22  Int64 standGrowthCurveID() const { return _standGrowthCurveID; }
23  Int64 spuID() const { return _spuID; }
24  int standMaxAge() const { return _standMaxAge; }
25 
26  void addYieldTable(TreeYieldTable& yieldTable);
27  void processStandYieldTables();
28  bool hasYieldComponent(SpeciesType componentType);
29  double getStandTotalVolumeAtAge(int age) const;
30  double getStandSoftwoodVolumeRatioAtAge(int age) const;
31 
32  // Get the stand age at which the stand has the maximum merchantable volume
33  int getStandAgeWithMaximumVolume() const;
34 
35  // Get the maximum stand merchantable volume at an age
36  double getAnnualStandMaximumVolume() const;
37 
38  std::shared_ptr<const PERDFactor> getPERDFactor(SpeciesType speciesType) const;
39  void setPERDFactor(std::shared_ptr<PERDFactor> value, SpeciesType);
40 
41  const ForestTypeConfiguration& getForestTypeConfiguration(SpeciesType speciesType) const;
42  void setForestTypeConfiguration(const ForestTypeConfiguration& value, SpeciesType);
43 
44  private:
45  void resolveStandGrowthCurveMaxAge();
46  void initStandYieldDataStorage();
47  void checkAndUpdateYieldTables();
48  void summarizeStandComponentYieldTables();
49  void updateStandMaximumVolumeAgeInfo();
50 
52  Int64 _spuID;
57 
58  std::shared_ptr<PERDFactor> _swPERDFactor;
59  std::shared_ptr<PERDFactor> _hwPERDFactor;
60 
63 
64  std::vector<TreeYieldTable> _softwoodYieldTables;
65  std::vector<TreeYieldTable> _hardwoodYieldTables;
66 
67  std::vector<double> _standMerchVolumeAtEachAge;
69  };
70 
71 }}}
72 #endif
foresttypeconfiguration.h
ForestTypeConfiguration
Definition: foresttypeconfiguration.h:11
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::StandGrowthCurve::_hardwoodYieldTables
std::vector< TreeYieldTable > _hardwoodYieldTables
Definition: standgrowthcurve.h:65
moja::modules::cbm::StandGrowthCurve::_standGrowthCurveID
Int64 _standGrowthCurveID
Definition: standgrowthcurve.h:51
moja::modules::cbm::StandGrowthCurve::_swForestTypeConfiguration
ForestTypeConfiguration _swForestTypeConfiguration
Definition: standgrowthcurve.h:61
moja::modules::cbm::StandGrowthCurve::_spuID
Int64 _spuID
Definition: standgrowthcurve.h:52
moja::modules::cbm::StandGrowthCurve::standMaxAge
int standMaxAge() const
Definition: standgrowthcurve.h:24
moja::modules::cbm::SpeciesType
SpeciesType
Enumeration of tree species type, softwood or hardwood.
Definition: treespecies.h:14
moja::modules::cbm::StandGrowthCurve::_standMerchVolumeAtEachAge
std::vector< double > _standMerchVolumeAtEachAge
Definition: standgrowthcurve.h:67
moja::modules::cbm::TreeYieldTable
ADT - Tree yield table
Definition: treeyieldtable.h:16
moja::modules::cbm::StandGrowthCurve::_standSoftwoodVolumeRatioAtEachAge
std::vector< double > _standSoftwoodVolumeRatioAtEachAge
Definition: standgrowthcurve.h:68
moja::modules::cbm::StandGrowthCurve::_standMaxAge
int _standMaxAge
Definition: standgrowthcurve.h:53
moja::modules::cbm::StandGrowthCurve::_hwForestTypeConfiguration
ForestTypeConfiguration _hwForestTypeConfiguration
Definition: standgrowthcurve.h:62
moja::modules::cbm::StandGrowthCurve::~StandGrowthCurve
virtual ~StandGrowthCurve()
Definition: standgrowthcurve.h:18
moja::modules::cbm::StandGrowthCurve
Definition: standgrowthcurve.h:16
moja::modules::cbm::StandGrowthCurve::_softwoodYieldTables
std::vector< TreeYieldTable > _softwoodYieldTables
Definition: standgrowthcurve.h:64
moja::modules::cbm::StandGrowthCurve::_okToSmooth
bool _okToSmooth
Definition: standgrowthcurve.h:56
treeyieldtable.h
moja::modules::cbm::StandGrowthCurve::_hwPERDFactor
std::shared_ptr< PERDFactor > _hwPERDFactor
Definition: standgrowthcurve.h:59
perdfactor.h
moja::modules::cbm::StandGrowthCurve::spuID
Int64 spuID() const
Definition: standgrowthcurve.h:23
moja::modules::cbm::StandGrowthCurve::standGrowthCurveID
Int64 standGrowthCurveID() const
Definition: standgrowthcurve.h:22
moja::modules::cbm::StandGrowthCurve::_standAgeForMaximumMerchVolume
int _standAgeForMaximumMerchVolume
Definition: standgrowthcurve.h:54
moja::modules::cbm::StandGrowthCurve::_swPERDFactor
std::shared_ptr< PERDFactor > _swPERDFactor
Definition: standgrowthcurve.h:58
moja::modules::cbm::StandGrowthCurve::_standMaximumMerchVolume
double _standMaximumMerchVolume
Definition: standgrowthcurve.h:55
moja
Definition: ageclasshelper.cpp:10
treespecies.h