iLand
landscapeout.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 LANDSCAPEOUT_H
21#define LANDSCAPEOUT_H
22
23#include "output.h"
24#include "expression.h"
25#include "standstatistics.h"
26#include <QMap>
27
29class LandscapeOut : public Output
30{
31public:
33 virtual void exec();
34 virtual void setup();
35private:
36 Expression mCondition;
37 QMap<QString,StandStatistics> mLandscapeStats;
38};
39
40
43{
44public:
46 void execRemovedTree(const Tree *t, int reason);
47 virtual void exec();
48 virtual void setup();
49private:
50 const int mMaxDbh = 200;
51 int dbhClass(float dbh);
52 void setupDbhClasses(QString cls_string);
53 bool mIncludeDeadTrees;
54 bool mIncludeHarvestTrees;
55 Expression mCondition;
56 struct LROdata {
57 LROdata() { clear(); }
58 void clear() { volume=0.; basal_area=0.; carbon=0.; n=0.; cstem=0.; cbranch=0.; cfoliage=0.; }
59 double volume;
60 double basal_area;
61 double carbon;
62 double n;
63 double cstem;
64 double cbranch;
65 double cfoliage;
66 };
67 QVector<float> mDBHThreshold;
68 QVector<int> mDBHClass;
69
70 QHash<int,LROdata> mLandscapeRemoval;
71};
72
73#endif // LANDSCAPEOUT_H
An expression engine for mathematical expressions provided as strings.
Definition: expression.h:29
LandscapeOut is aggregated output for the total landscape per species.
Definition: landscapeout.h:30
virtual void setup()
setup() is called during project setup and can be ovveridden for specific setup
Definition: landscapeout.cpp:51
virtual void exec()
main function that executes the output
Definition: landscapeout.cpp:58
LandscapeOut()
Definition: landscapeout.cpp:25
LandscapeRemovedOut is aggregated output for removed trees on the full landscape.
Definition: landscapeout.h:43
virtual void setup()
setup() is called during project setup and can be ovveridden for specific setup
Definition: landscapeout.cpp:183
void execRemovedTree(const Tree *t, int reason)
Definition: landscapeout.cpp:130
virtual void exec()
main function that executes the output
Definition: landscapeout.cpp:154
LandscapeRemovedOut()
Definition: landscapeout.cpp:102
The Output class abstracts output data (database, textbased, ...).
Definition: output.h:55
A tree is the basic simulation entity of iLand and represents a single tree.
Definition: tree.h:44