iLand
resourceunitspecies.h
Go to the documentation of this file.
1/********************************************************************************************
2** iLand - an individual based forest landscape and disturbance model
3** http://iland-model.org
4** Copyright (C) 2009- Werner Rammer, Rupert Seidl
5**
6** This program is free software: you can redistribute it and/or modify
7** it under the terms of the GNU General Public License as published by
8** the Free Software Foundation, either version 3 of the License, or
9** (at your option) any later version.
10**
11** This program is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14** GNU General Public License for more details.
15**
16** You should have received a copy of the GNU General Public License
17** along with this program. If not, see <http://www.gnu.org/licenses/>.
18********************************************************************************************/
19
20#ifndef RESOURCEUNITSPECIES_H
21#define RESOURCEUNITSPECIES_H
22#include "production3pg.h"
23#include "standstatistics.h"
24#include "speciesresponse.h"
25#include "establishment.h"
26#include "saplings.h"
27#include "grid.h"
28#include "snag.h"
29class Species;
30class ResourceUnit;
31
32
34{
35public:
36 ResourceUnitSpecies() : mSpecies(0), mRU(0) {}
39
40 // access
41 const SpeciesResponse *speciesResponse() const { return &mResponse; }
42 const Species *species() const { return mSpecies; }
43 const ResourceUnit *ru() const { return mRU; }
44 const Production3PG &prod3PG() const { return m3PG; }
45
46 SaplingStat &saplingStat() { return mSaplingStat; }
47 const SaplingStat &constSaplingStat() const { return mSaplingStat; }
48
49 Establishment &establishment() { return mEstablishment; }
50 StandStatistics &statistics() { return mStatistics; }
51 StandStatistics &statisticsDead() { return mStatisticsDead; }
52 StandStatistics &statisticsMgmt() { return mStatisticsMgmt; }
53 const StandStatistics &constStatistics() const { return mStatistics; }
54 const StandStatistics &constStatisticsDead() const { return mStatisticsDead; }
55 const StandStatistics &constStatisticsMgmt() const { return mStatisticsMgmt; }
56
57 // actions
58 void updateGWL();
59 double removedVolume() const { return mRemovedGrowth; }
60
61 // properties
63 double leafAreaIndex() const { return constStatistics().leafAreaIndex(); }
65 double leafAreaIndexSaplings() const;
66 // action
67 void calculate(const bool fromEstablishment=false);
68
69private:
70 ResourceUnitSpecies(const ResourceUnitSpecies &); // no copy
71 ResourceUnitSpecies &operator=(const ResourceUnitSpecies &); // no copy
72 double mRemovedGrowth;
73 StandStatistics mStatistics;
74 StandStatistics mStatisticsDead;
75 StandStatistics mStatisticsMgmt;
76 Production3PG m3PG;
77 SpeciesResponse mResponse;
78 Establishment mEstablishment;
79 SaplingStat mSaplingStat;
80 Species *mSpecies;
81 ResourceUnit *mRU;
82 int mLastYear;
83};
84
85#endif // RESSOURCEUNITSPECIES_H
Establishment deals with the establishment process of saplings.
Definition: establishment.h:27
Definition: production3pg.h:26
ResourceUnit is the spatial unit that encapsulates a forest stand and links to several environmental ...
Definition: resourceunit.h:49
The class contains data available at ResourceUnit x Species scale.
Definition: resourceunitspecies.h:34
ResourceUnitSpecies()
Definition: resourceunitspecies.h:36
StandStatistics & statisticsDead()
statistics of died trees
Definition: resourceunitspecies.h:51
double removedVolume() const
sum of volume with was remvoved because of death/management (m3/ha)
Definition: resourceunitspecies.h:59
const Species * species() const
return pointer to species
Definition: resourceunitspecies.h:42
Establishment & establishment()
establishment submodel
Definition: resourceunitspecies.h:49
const StandStatistics & constStatistics() const
const accessor
Definition: resourceunitspecies.h:53
StandStatistics & statisticsMgmt()
statistics of removed trees
Definition: resourceunitspecies.h:52
SaplingStat & saplingStat()
statistics for the sapling sub module
Definition: resourceunitspecies.h:46
void setup(Species *species, ResourceUnit *ru)
Definition: resourceunitspecies.cpp:47
const ResourceUnit * ru() const
return pointer to resource unit
Definition: resourceunitspecies.h:43
const SpeciesResponse * speciesResponse() const
Definition: resourceunitspecies.h:41
const Production3PG & prod3PG() const
the 3pg production model of this speies x resourceunit
Definition: resourceunitspecies.h:44
const SaplingStat & constSaplingStat() const
statistics for the sapling sub module
Definition: resourceunitspecies.h:47
const StandStatistics & constStatisticsMgmt() const
const accessor
Definition: resourceunitspecies.h:55
void updateGWL()
Definition: resourceunitspecies.cpp:97
double leafAreaIndexSaplings() const
leaf area (m2) of the saplings on the resource unit
Definition: resourceunitspecies.cpp:105
StandStatistics & statistics()
statistics of this species on the resourceunit
Definition: resourceunitspecies.h:50
~ResourceUnitSpecies()
Definition: resourceunitspecies.cpp:41
const StandStatistics & constStatisticsDead() const
const accessor
Definition: resourceunitspecies.h:54
double leafAreaIndex() const
leaf area index (m2/m2) of the species (trees>4m)
Definition: resourceunitspecies.h:63
void calculate(const bool fromEstablishment=false)
calculate response for species, calculate actual 3PG production
Definition: resourceunitspecies.cpp:69
The SaplingStat class stores statistics on the resource unit x species level.
Definition: saplings.h:132
The behavior and general properties of tree species.
Definition: species.h:75
Environmental responses relevant for production of a tree species on resource unit level.
Definition: speciesresponse.h:27
Collects information on stand level for each tree species.
Definition: standstatistics.h:28
double leafAreaIndex() const
[m2/m2]/ha stocked area (trees > 4m)
Definition: standstatistics.h:50