Rev 453 | Rev 462 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 453 | Rev 454 | ||
---|---|---|---|
1 | Redirecting to URL 'https://iland.boku.ac.at/svn/iland/tags/release_1.0/src/core/resourceunitspecies.h': |
1 | Redirecting to URL 'https://iland.boku.ac.at/svn/iland/tags/release_1.0/src/core/resourceunitspecies.h': |
2 | #ifndef RESOURCEUNITSPECIES_H
|
2 | #ifndef RESOURCEUNITSPECIES_H
|
3 | #define RESOURCEUNITSPECIES_H
|
3 | #define RESOURCEUNITSPECIES_H
|
4 | #include "production3pg.h"
|
4 | #include "production3pg.h"
|
5 | #include "standstatistics.h"
|
5 | #include "standstatistics.h"
|
6 | #include "speciesresponse.h"
|
6 | #include "speciesresponse.h"
|
7 | #include "establishment.h"
|
7 | #include "establishment.h"
|
8 | #include "sapling.h"
|
8 | #include "sapling.h"
|
9 | #include "grid.h"
|
9 | #include "grid.h"
|
10 | class Species; |
10 | class Species; |
11 | class ResourceUnit; |
11 | class ResourceUnit; |
12 | 12 | ||
13 | class ResourceUnitSpecies
|
13 | class ResourceUnitSpecies
|
14 | {
|
14 | {
|
15 | public: |
15 | public: |
16 | ResourceUnitSpecies() : mLAIfactor(0.), mSpecies(0), mRU(0) {} |
16 | ResourceUnitSpecies() : mLAIfactor(0.), mSpecies(0), mRU(0) {} |
17 | void setup(Species *species, ResourceUnit *ru); |
17 | void setup(Species *species, ResourceUnit *ru); |
18 | 18 | ||
19 | // access
|
19 | // access
|
20 | const SpeciesResponse *speciesResponse() const { return &mResponse; } |
20 | const SpeciesResponse *speciesResponse() const { return &mResponse; } |
21 | const Species *species() const { return mSpecies; } ///< return pointer to species |
21 | const Species *species() const { return mSpecies; } ///< return pointer to species |
22 | const ResourceUnit *ru() const { return mRU; } ///< return pointer to resource unit |
22 | const ResourceUnit *ru() const { return mRU; } ///< return pointer to resource unit |
23 | const Production3PG &prod3PG() const { return m3PG; } ///< the 3pg production model of this speies x resourceunit |
23 | const Production3PG &prod3PG() const { return m3PG; } ///< the 3pg production model of this speies x resourceunit |
24 | StandStatistics &statistics() { return mStatistics; } ///< statistics of this species on the resourceunit |
24 | StandStatistics &statistics() { return mStatistics; } ///< statistics of this species on the resourceunit |
25 | StandStatistics &statisticsDead() { return mStatisticsDead; } ///< statistics of died trees |
25 | StandStatistics &statisticsDead() { return mStatisticsDead; } ///< statistics of died trees |
26 | StandStatistics &statisticsMgmt() { return mStatisticsMgmt; } ///< statistics of removed trees |
26 | StandStatistics &statisticsMgmt() { return mStatisticsMgmt; } ///< statistics of removed trees |
27 | const StandStatistics &constStatistics() const { return mStatistics; } ///< const accessor |
27 | const StandStatistics &constStatistics() const { return mStatistics; } ///< const accessor |
28 | const StandStatistics &constStatisticsDead() const { return mStatisticsDead; } ///< const accessor |
28 | const StandStatistics &constStatisticsDead() const { return mStatisticsDead; } ///< const accessor |
29 | const StandStatistics &constStatisticsMgmt() const { return mStatisticsMgmt; } ///< const accessor |
29 | const StandStatistics &constStatisticsMgmt() const { return mStatisticsMgmt; } ///< const accessor |
30 | 30 | ||
31 | // actions
|
31 | // actions
|
32 | void updateGWL(); |
32 | void updateGWL(); |
33 | double removedVolume() const { return mRemovedGrowth; } ///< sum of volume with was remvoved because of death/management (m3) |
33 | double removedVolume() const { return mRemovedGrowth; } ///< sum of volume with was remvoved because of death/management (m3) |
34 | double LAIfactor() const { return mLAIfactor; } ///< relative fraction of LAI of this species (0..1) |
34 | double LAIfactor() const { return mLAIfactor; } ///< relative fraction of LAI of this species (0..1) |
35 | void setLAIfactor(const double newLAIfraction) { mLAIfactor=newLAIfraction; if (mLAIfactor<0 || mLAIfactor>1.00001) qDebug() << "invalid LAIfactor"<<mLAIfactor; } |
35 | void setLAIfactor(const double newLAIfraction) { mLAIfactor=newLAIfraction; if (mLAIfactor<0 || mLAIfactor>1.00001) qDebug() << "invalid LAIfactor"<<mLAIfactor; } |
36 | // properties
|
36 | // properties
|
37 | double leafArea() const; ///< total leaf area of the species on the RU (m2). |
37 | double leafArea() const; ///< total leaf area of the species on the RU (m2). |
38 | // action
|
38 | // action
|
39 | void calculate(const bool fromEstablishment=false); ///< calculate response for species, calculate actual 3PG production |
39 | void calculate(const bool fromEstablishment=false); ///< calculate response for species, calculate actual 3PG production |
40 | void calclulateEstablishment(); ///< perform establishment calculations |
40 | void calclulateEstablishment(); ///< perform establishment calculations |
41 | void calclulateSaplingGrowth(); ///< growth of saplings |
41 | void calclulateSaplingGrowth(); ///< growth of saplings |
42 | void addSapling(const QPoint position) { mSapling.addSapling(position); } |
- | |
- | 42 | void addSapling(const QPoint &position) { mSapling.addSapling(position); } ///< add a saplings on a given position |
|
- | 43 | void clearSaplings(const QPoint &position) { mSapling.clearSaplings(position);} ///< clear saplings on a given position (after recruitment) |
|
- | 44 | ||
43 | // visualization/graphical output
|
45 | // visualization/graphical output
|
44 | void visualGrid(Grid<float> &grid) const; |
46 | void visualGrid(Grid<float> &grid) const; |
45 | 47 | ||
46 | private: |
48 | private: |
- | 49 | ResourceUnitSpecies(const ResourceUnitSpecies &); // no copy |
|
- | 50 | ResourceUnitSpecies &operator=(const ResourceUnitSpecies &); // no copy |
|
47 | double mLAIfactor; ///< relative amount of this species' LAI on this resource unit (0..1). Is calculated once a year. |
51 | double mLAIfactor; ///< relative amount of this species' LAI on this resource unit (0..1). Is calculated once a year. |
48 | double mRemovedGrowth; ///< m3 volume of trees removed/managed (to calculate GWL) |
52 | double mRemovedGrowth; ///< m3 volume of trees removed/managed (to calculate GWL) |
49 | StandStatistics mStatistics; ///< statistics of a species on this resource unit |
53 | StandStatistics mStatistics; ///< statistics of a species on this resource unit |
50 | StandStatistics mStatisticsDead; ///< statistics of died trees (this year) of a species on this resource unit |
54 | StandStatistics mStatisticsDead; ///< statistics of died trees (this year) of a species on this resource unit |
51 | StandStatistics mStatisticsMgmt; ///< statistics of removed trees (this year) of a species on this resource unit |
55 | StandStatistics mStatisticsMgmt; ///< statistics of removed trees (this year) of a species on this resource unit |
52 | Production3PG m3PG; ///< NPP prodution unit of this species |
56 | Production3PG m3PG; ///< NPP prodution unit of this species |
53 | SpeciesResponse mResponse; ///< calculation and storage of species specific respones on this resource unit |
57 | SpeciesResponse mResponse; ///< calculation and storage of species specific respones on this resource unit |
54 | Establishment mEstablishment; ///< establishment for seedlings and sapling growth |
58 | Establishment mEstablishment; ///< establishment for seedlings and sapling growth |
55 | Sapling mSapling; ///< saplings storage/growth |
59 | Sapling mSapling; ///< saplings storage/growth |
56 | Species *mSpecies; ///< speices |
60 | Species *mSpecies; ///< speices |
57 | ResourceUnit *mRU; ///< resource unit |
61 | ResourceUnit *mRU; ///< resource unit |
58 | int mLastYear; |
62 | int mLastYear; |
59 | }; |
63 | }; |
60 | 64 | ||
61 | #endif // RESSOURCEUNITSPECIES_H
|
65 | #endif // RESSOURCEUNITSPECIES_H
|
62 | 66 |