#include <standmaturitymodule.h>
◆ StandMaturityModule()
◆ doLocalDomainInit()
void doLocalDomainInit |
( |
| ) |
|
|
overridevirtual |
Assign StandMaturityModule._standMaturity, StandMaturityModule._age, StandMaturityModule._gcId, StandMaturityModule._spuId, StandMaturityModule._swFoilage, StandMaturityModule._hwFoilage values of variables "stand_maturity", "age", "growth_curve_id", "spatial_unit_id", "SoftwoodFoliage", "HardwoodFoliage" in _landUnitData
- Returns
- void
Reimplemented from CBMModuleBase.
◆ doTimingEndStep()
If the value of StandMaturityModule._gcId or StandMaturityModule._spuId or StandMaturityModule._age is empty, set the value of StandMaturityModule._standMaturity to 0.0 and return, else assign the values to variables standGrowthCurveId, spuId, ageVar
If isBiomassCarbonCurveAvailable() with arguments standGrowthCurveId, spuId on StandMaturityModule._volumeToBioGrowth is false, call createStandGrowthCurve() with arguments standGrowthCurveId, spuId, *_landUnitData on StandMaturityModule._gcFactory to create the stand growth curve, invoke generateBiomassCarbonCurve() on StandMaturityModule._volumeToBioGrowth to process and convert yield volume to carbon curves
Assign variable maxFoilage, the value corresponding to the tuple key (standGrowthCurveId, spuId) in StandMaturityModule._maxFoliageValues, if found.
Else, get the foilageCurve from getFoliageCarbonCurve() on StandMaturityModule._volumeToBioGrowth with arguments standGrowthCurveId, spuId. Assign maxFoilage the maximum of the iterator maxFoilage, if not empty, else 0 Set the value of the key (standGrowthCurveId, spuId) in StandMaturityModule._maxFoliageValues to maxFoilage
Set the value of StandMaturityModule._standMaturity to 0 if maxFoilage is 0, else to StandMaturityModule.getCurrentFoliageValue() / maxFoilage
- Returns
- void
Reimplemented from CBMModuleBase.
◆ doTimingInit()
◆ getCurrentFoliageValue()
double getCurrentFoliageValue |
( |
| ) |
|
|
private |
◆ moduleType()
flint::ModuleTypes moduleType |
( |
| ) |
|
|
override |
◆ subscribe()
void subscribe |
( |
NotificationCenter & |
notificationCenter | ) |
|
|
override |
Subscribe to the signals LocalDomainInit, TimingInit and TimingEndStep
- Parameters
-
notificationCenter | NotificationCenter& |
- Returns
- void
◆ _age
const flint::IVariable* _age |
|
private |
◆ _gcFactory
◆ _gcId
const flint::IVariable* _gcId |
|
private |
◆ _hwFoliage
const flint::IPool* _hwFoliage |
|
private |
◆ _landUnitController
const flint::ILandUnitController* _landUnitController |
|
private |
◆ _maxFoliageValues
std::unordered_map<std::tuple<int, int>, double> _maxFoliageValues |
|
mutableprivate |
◆ _spuId
const flint::IVariable* _spuId |
|
private |
◆ _standMaturity
flint::IVariable* _standMaturity |
|
private |
◆ _swFoliage
const flint::IPool* _swFoliage |
|
private |
◆ _value
◆ _volumeToBioGrowth
The documentation for this class was generated from the following files: