Rev 440 | Rev 450 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | |||
187 | iland | 2 | #ifndef RESOURCEUNITSPECIES_H |
3 | #define RESOURCEUNITSPECIES_H |
||
115 | Werner | 4 | #include "production3pg.h" |
180 | werner | 5 | #include "standstatistics.h" |
193 | werner | 6 | #include "speciesresponse.h" |
440 | werner | 7 | #include "establishment.h" |
111 | Werner | 8 | |
9 | class Species; |
||
187 | iland | 10 | class ResourceUnit; |
111 | Werner | 11 | |
187 | iland | 12 | class ResourceUnitSpecies |
111 | Werner | 13 | { |
14 | public: |
||
367 | werner | 15 | ResourceUnitSpecies() : mLAIfactor(0.), mSpecies(0), mRU(0) {} |
234 | werner | 16 | void setup(Species *species, ResourceUnit *ru); |
115 | Werner | 17 | |
449 | werner | 18 | // access |
209 | werner | 19 | const SpeciesResponse *speciesResponse() const { return &mResponse; } |
208 | werner | 20 | const Species *species() const { return mSpecies; } ///< return pointer to species |
21 | const ResourceUnit *ru() const { return mRU; } ///< return pointer to resource unit |
||
228 | werner | 22 | const Production3PG &prod3PG() const { return m3PG; } ///< the 3pg production model of this speies x resourceunit |
208 | werner | 23 | StandStatistics &statistics() { return mStatistics; } ///< statistics of this species on the resourceunit |
278 | werner | 24 | StandStatistics &statisticsDead() { return mStatisticsDead; } ///< statistics of died trees |
25 | StandStatistics &statisticsMgmt() { return mStatisticsMgmt; } ///< statistics of removed trees |
||
262 | werner | 26 | const StandStatistics &constStatistics() const { return mStatistics; } ///< const accessor |
27 | const StandStatistics &constStatisticsDead() const { return mStatisticsDead; } ///< const accessor |
||
278 | werner | 28 | const StandStatistics &constStatisticsMgmt() const { return mStatisticsMgmt; } ///< const accessor |
29 | |||
449 | werner | 30 | // actions |
277 | werner | 31 | void updateGWL(); |
32 | double removedVolume() const { return mRemovedGrowth; } ///< sum of volume with was remvoved because of death/management (m3) |
||
367 | werner | 33 | double LAIfactor() const { return mLAIfactor; } ///< relative fraction of LAI of this species (0..1) |
370 | werner | 34 | void setLAIfactor(const double newLAIfraction) { mLAIfactor=newLAIfraction; if (mLAIfactor<0 || mLAIfactor>1.00001) qDebug() << "invalid LAIfactor"<<mLAIfactor; } |
376 | werner | 35 | // properties |
36 | double leafArea() const; ///< total leaf area of the species on the RU (m2). |
||
115 | Werner | 37 | // action |
440 | werner | 38 | void calculate(const bool fromEstablishment=false); ///< calculate response for species, calculate actual 3PG production |
39 | void calclulateEstablishment(); ///< perform establishment calculations |
||
115 | Werner | 40 | |
111 | Werner | 41 | private: |
376 | werner | 42 | double mLAIfactor; ///< relative amount of this species' LAI on this resource unit (0..1). Is calculated once a year. |
277 | werner | 43 | double mRemovedGrowth; ///< m3 volume of trees removed/managed (to calculate GWL) |
262 | werner | 44 | StandStatistics mStatistics; ///< statistics of a species on this resource unit |
45 | StandStatistics mStatisticsDead; ///< statistics of died trees (this year) of a species on this resource unit |
||
278 | werner | 46 | StandStatistics mStatisticsMgmt; ///< statistics of removed trees (this year) of a species on this resource unit |
234 | werner | 47 | Production3PG m3PG; ///< NPP prodution unit of this species |
48 | SpeciesResponse mResponse; ///< calculation and storage of species specific respones on this resource unit |
||
440 | werner | 49 | Establishment mEstablishment; ///< establishment for seedlings and sapling growth |
234 | werner | 50 | Species *mSpecies; ///< speices |
51 | ResourceUnit *mRU; ///< resource unit |
||
438 | werner | 52 | int mLastYear; |
111 | Werner | 53 | }; |
54 | |||
55 | #endif // RESSOURCEUNITSPECIES_H |