|
GCBM
|
#include <volumetobiomasscarbongrowth.h>

Public Member Functions | |
| VolumeToBiomassCarbonGrowth (bool smootherEnabled=true) | |
| virtual | ~VolumeToBiomassCarbonGrowth () |
| void | generateBiomassCarbonCurve (StandGrowthCurve &standGrowthCurve) |
| std::unordered_map< std::string, double > | getBiomassCarbonIncrements (flint::ILandUnitDataWrapper *landUnitData, Int64 growthCurveID, Int64 spuID) |
| std::vector< double > | getAboveGroundCarbonCurve (Int64 growthCurveID, Int64 spuID) |
| std::vector< double > | getFoliageCarbonCurve (Int64 growthCurveID, Int64 spuID) |
| bool | isBiomassCarbonCurveAvailable (Int64 growthCurveID, Int64 spuID) |
| void | setSmoothing (bool enabled) |
| Poco::SharedPtr< StandBiomassCarbonCurve > | getBiomassCarbonCurve (Int64 growthCurveID, Int64 spuID) |
Private Member Functions | |
| VolumeToBiomassConverter & | getConverter () |
| Poco::LRUCache< std::tuple< Int64, Int64 >, StandBiomassCarbonCurve > & | getCache () |
| VolumeToBiomassCarbonGrowth | ( | bool | smootherEnabled = true | ) |
|
virtual |
| void generateBiomassCarbonCurve | ( | StandGrowthCurve & | standGrowthCurve | ) |
Generate Biomass carbon curves
If parameter standGrowthCurve has the yield component SpeciesType::Softwood or/and SpeciesType::Hardwood, generate the component biomass carbon curve and the root biomass equation corresponding to the forest configuration using moja::modules::CBM::StandGrowthCurve.getForestTypeConfiguration()
Add the components species type, root biomass equation and carbon curve to the parameter standCarbonCurve
Add the standCarbonCurve to the cache using VolumeToBiomassCarbonGrowth.getCache() for the tuple key (StandGrowthCurve.standGrowthCurveID(), StandGrowthCurve.spuID())
| standGrowthCurve | StandGrowthCurve& |
| std::vector< double > getAboveGroundCarbonCurve | ( | Int64 | growthCurveID, |
| Int64 | spuID | ||
| ) |
If the tuple parameter growthCurveId, spuId exists in VolumeToBiomassCarbonGrowth.getCache(), get the StandBiomassCarbonCurve object from cache, and return the result of VolumeToBiomassCarbonGrowth.getAboveGroundCarbonCurve()
| growthCurveId | Int64 |
| spuId | Int64 |
| Poco::SharedPtr< StandBiomassCarbonCurve > getBiomassCarbonCurve | ( | Int64 | growthCurveID, |
| Int64 | spuID | ||
| ) |
| std::unordered_map< std::string, double > getBiomassCarbonIncrements | ( | flint::ILandUnitDataWrapper * | landUnitData, |
| Int64 | growthCurveID, | ||
| Int64 | spuID | ||
| ) |
If the tuple parameter growthCurveId, spuId exists in VolumeToBiomassCarbonGrowth.getCache(), get the StandBiomassCarbonCurve object from cache, and return the result of StandBiomassCarbonCurve.getIncrements() with argument as parameter landUnitData
| landUnitData | flint::ILandUnitDataWrapper* |
| growthCurveID | Int64 |
| spuID | Int64 |
|
private |
|
private |
| std::vector< double > getFoliageCarbonCurve | ( | Int64 | growthCurveID, |
| Int64 | spuID | ||
| ) |
If the tuple parameter growthCurveId, spuId exists in VolumeToBiomassCarbonGrowth.getCache(), if the StandBiomassCarbonCurve object returned from cache is not null, return it, else return nullptr
| growthCurveId | Int64 |
| spuId | Int64 |
| bool isBiomassCarbonCurveAvailable | ( | Int64 | growthCurveID, |
| Int64 | spuID | ||
| ) |
Return if VolumeToBiomassCarbonGrowth.getBiomassCarbonCurve() with arguments growthCurveID, spuID is not null
| growthCurveID | Int64 |
| spuID | Int64 |
| void setSmoothing | ( | bool | enabled | ) |
1.8.17