GCBM
|
#include <growthmultipliermodule.h>
Public Member Functions | |
GrowthMultiplierModule () | |
virtual | ~GrowthMultiplierModule ()=default |
void | configure (const DynamicObject &config) override |
void | subscribe (NotificationCenter ¬ificationCenter) override |
flint::ModuleTypes | moduleType () |
virtual void | doDisturbanceEvent (DynamicVar) override |
virtual void | doLocalDomainInit () override |
virtual void | doTimingInit () override |
virtual void | doTimingStep () override |
virtual void | doTimingShutdown () override |
Public Member Functions inherited from CBMModuleBase | |
virtual | ~CBMModuleBase ()=default |
void | onSystemInit () override |
void | onSystemShutdown () override |
void | onLocalDomainInit () override |
void | onLocalDomainShutdown () override |
void | onLocalDomainProcessingUnitInit () override |
void | onLocalDomainProcessingUnitShutdown () override |
void | onPreTimingSequence () override |
void | onTimingInit () override |
void | onTimingPrePostInit () override |
void | onTimingPostInit () override |
void | onTimingPostInit2 () override |
void | onTimingShutdown () override |
void | onTimingStep () override |
void | onTimingPreEndStep () override |
void | onTimingEndStep () override |
void | onTimingPostStep () override |
void | onOutputStep () override |
void | onPrePostDisturbanceEvent () override |
void | onPostDisturbanceEvent () override |
void | onPostDisturbanceEvent2 () override |
void | onError (std::string msg) override |
void | onDisturbanceEvent (DynamicVar e) override |
void | onPostNotification (short preMessageSignal) override |
virtual void | doSystemInit () |
virtual void | doSystemShutdown () |
virtual void | doLocalDomainShutdown () |
virtual void | doLocalDomainProcessingUnitInit () |
virtual void | doLocalDomainProcessingUnitShutdown () |
virtual void | doPreTimingSequence () |
virtual void | doTimingPrePostInit () |
virtual void | doTimingPostInit () |
virtual void | doTimingPostInit2 () |
virtual void | doTimingPreEndStep () |
virtual void | doTimingEndStep () |
virtual void | doTimingPostStep () |
virtual void | doOutputStep () |
virtual void | doError (std::string msg) |
virtual void | doPrePostDisturbanceEvent () |
virtual void | doPostDisturbanceEvent () |
virtual void | doPostDisturbanceEvent2 () |
virtual void | doPostNotification (short preMessageSignal) |
Private Member Functions | |
void | advanceMultipliers () |
void | clearMultipliers () |
Private Attributes | |
bool | _moduleEnabled |
bool | _debuggingEnabled = false |
flint::IVariable * | _currentGrowthMultipliers |
std::unordered_map< std::string, GrowthMultiplierSet > | _growthMultiplierSets |
GrowthMultiplierSet | _activeMultiplierSet |
|
virtualdefault |
|
private |
Set the next multiplier in GrowthMultiplierModule._activeMultiplierSet to GrowthMultiplierModule._currentGrowthMultipliers
If GrowthMultiplierSet.end() returns false on GrowthMultiplierModule._activeMultiplierSet, set the value of GrowthMultiplierModule._currentGrowthMultipliers to GrowthMultiplierSet.next() on GrowthMultiplierModule._activeMultiplierSet.
Else, if the value of GrowthMultiplierModule._currentGrowthMultipliers is not empty, set it to DynamicVar()
|
private |
If GrowthMultiplierModule._moduleEnabled is false, return
Set the value of GrowthMultiplierModule._currentGrowthMultipliers to DynamicVar(), instantiate GrowthMultiplierModule._activeMultiplierSet as an object of GrowthMultiplierSet
|
override |
Configuration function
Assign value of "debugging_enabled" in parameter config to GrowthMultiplierModule._debuggingEnabled if it exists
config | const DynamicObject& |
|
overridevirtual |
If GrowthMultiplierModule._moduleEnabled is false, return.
Else if the disturbanceType in parameter e, given by "disturbance" is not found in GrowthMultiplierModule._growthMultiplierSets, assign GrowthMultiplierModule._activeMultiplierSet an object of GrowthMultiplierSet, else the GrowthMultiplierSet object corresponding to the disturbanceType in GrowthMultiplierModule._growthMultiplierSets.
If GrowthMultiplierModule._debuggingEnabled is true and GrowthMultiplierSet.end() returns false on GrowthMultiplierModule._activeMultiplierSet, print all the growth multipliers for the current disturbanceType stored in GrowthMultiplierModule._activeMultiplierSet
e | DynamicVar |
Reimplemented from CBMModuleBase.
|
overridevirtual |
If _landUnitData does not have variable "current_growth_multipliers", set GrowthMultiplierModule._moduleEnabled to false and return
Else, set GrowthMultiplierModule._moduleEnabled to true.
Assign GrowthMultiplierModule._currentGrowthMultipliers value of variable "current_growth_multipliers" in _landUnitData
For each multiplier in variable "growth_multipliers" of _landUnitData, if the "disturbance_type" of the multiplier is not found in GrowthMultiplierModule._growthMultiplierSets, create an object of GrowthMultiplierSet, invoke GrowthMultiplierSet.add() on the object with "forest_type", "time_step" and "multiplier" of the multiplier.
Add to GrowthMultiplierModule._growthMultiplierSets, the "disturbance_type" as a key and set it to the GrowthMultiplierModule object created
Reimplemented from CBMModuleBase.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
If GrowthMultiplierModule._moduleEnabled is false, return
Invoke GrowthMultiplierModule.advanceMultipliers()
Reimplemented from CBMModuleBase.
flint::ModuleTypes moduleType | ( | ) |
|
override |
Subscribe to the signals LocalDomainInit, TimingInit, TimingStep, DisturbanceEvent and TimingShutdown
notificationCenter | NotificationCenter& |
|
private |
|
private |
|
private |
|
private |
|
private |