GCBM
standmaturitymodule.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_STANDMATURITYMODULE_H_
2 #define MOJA_MODULES_CBM_STANDMATURITYMODULE_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
8 
9 namespace moja {
10 namespace modules {
11 namespace cbm {
12 
14 public:
15  StandMaturityModule(std::shared_ptr<StandGrowthCurveFactory> gcFactory, std::shared_ptr<VolumeToBiomassCarbonGrowth> volumeToBioGrowth)
16  : _gcFactory(gcFactory), _volumeToBioGrowth(volumeToBioGrowth) {};
17 
18  void subscribe(NotificationCenter& notificationCenter) override;
19 
20  flint::ModuleTypes moduleType() override { return flint::ModuleTypes::Model; };
21 
22  void doLocalDomainInit() override;
23  void doTimingInit() override;
24  void doTimingEndStep() override;
25 
26 private:
27  double getCurrentFoliageValue();
28 
29  const flint::ILandUnitController* _landUnitController;
30 
31  const flint::IVariable* _age;
32  const flint::IVariable* _gcId;
33  const flint::IVariable* _spuId;
34 
35  flint::IVariable* _standMaturity;
36 
37  const flint::IPool* _swFoliage;
38  const flint::IPool* _hwFoliage;
39 
40  mutable DynamicVar _value;
41  mutable std::unordered_map<std::tuple<int, int>, double> _maxFoliageValues;
42 
43  std::shared_ptr<StandGrowthCurveFactory> _gcFactory;
44  std::shared_ptr<VolumeToBiomassCarbonGrowth> _volumeToBioGrowth;
45 };
46 
47 }}}
48 
49 #endif // MOJA_MODULES_CBM_STANDMATURITYMODULE_H_
volumetobiomasscarbongrowth.h
moja::modules::cbm::StandMaturityModule::_standMaturity
flint::IVariable * _standMaturity
Definition: standmaturitymodule.h:35
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::StandMaturityModule::_swFoliage
const flint::IPool * _swFoliage
Definition: standmaturitymodule.h:37
moja::modules::cbm::StandMaturityModule::_landUnitController
const flint::ILandUnitController * _landUnitController
Definition: standmaturitymodule.h:29
moja::modules::cbm::StandMaturityModule::_spuId
const flint::IVariable * _spuId
Definition: standmaturitymodule.h:33
moja::modules::cbm::StandMaturityModule::getCurrentFoliageValue
double getCurrentFoliageValue()
Definition: standmaturitymodule.cpp:112
moja::modules::cbm::CBMModuleBase
Definition: cbmmodulebase.h:22
moja::modules::cbm::StandMaturityModule::_value
DynamicVar _value
Definition: standmaturitymodule.h:40
moja::modules::cbm::StandMaturityModule::_hwFoliage
const flint::IPool * _hwFoliage
Definition: standmaturitymodule.h:38
moja::modules::cbm::StandMaturityModule::_maxFoliageValues
std::unordered_map< std::tuple< int, int >, double > _maxFoliageValues
Definition: standmaturitymodule.h:41
moja::modules::cbm::StandMaturityModule
Definition: standmaturitymodule.h:13
moja::modules::cbm::StandMaturityModule::StandMaturityModule
StandMaturityModule(std::shared_ptr< StandGrowthCurveFactory > gcFactory, std::shared_ptr< VolumeToBiomassCarbonGrowth > volumeToBioGrowth)
Definition: standmaturitymodule.h:15
moja::modules::cbm::StandMaturityModule::_volumeToBioGrowth
std::shared_ptr< VolumeToBiomassCarbonGrowth > _volumeToBioGrowth
Definition: standmaturitymodule.h:44
moja::modules::cbm::StandMaturityModule::_age
const flint::IVariable * _age
Definition: standmaturitymodule.h:31
moja::modules::cbm::StandMaturityModule::doLocalDomainInit
void doLocalDomainInit() override
Definition: standmaturitymodule.cpp:36
moja::modules::cbm::StandMaturityModule::doTimingEndStep
void doTimingEndStep() override
Definition: standmaturitymodule.cpp:65
moja::modules::cbm::StandMaturityModule::doTimingInit
void doTimingInit() override
Definition: standmaturitymodule.cpp:50
moja::modules::cbm::StandMaturityModule::subscribe
void subscribe(NotificationCenter &notificationCenter) override
Definition: standmaturitymodule.cpp:23
standgrowthcurvefactory.h
moja
Definition: ageclasshelper.cpp:10
cbmmodulebase.h
moja::modules::cbm::StandMaturityModule::moduleType
flint::ModuleTypes moduleType() override
Definition: standmaturitymodule.h:20
moja::modules::cbm::StandMaturityModule::_gcId
const flint::IVariable * _gcId
Definition: standmaturitymodule.h:32
moja::modules::cbm::StandMaturityModule::_gcFactory
std::shared_ptr< StandGrowthCurveFactory > _gcFactory
Definition: standmaturitymodule.h:43