iLand
bitebiomass.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#ifndef BITEBIOMASS_H
20#define BITEBIOMASS_H
21
22#include "biteitem.h"
23#include "bitecellscript.h"
24#include "grid.h"
25
26namespace BITE {
27
28class BiteBiomass: public BiteItem
29{
30 Q_OBJECT
31
32public:
33 Q_INVOKABLE BiteBiomass(QJSValue obj);
34 void setup(BiteAgent *parent_agent);
35 QString info();
36 void notify(BiteCell *cell, BiteCell::ENotification what);
37
38
39public slots:
40 void runCell(BiteCell *cell, ABE::FMTreeList *treelist, ABE::FMSaplingList *saplist);
41 void beforeRun();
42 void afterSetup();
43
44protected:
45 QStringList allowedProperties();
46
48private:
49 void calculateLogisticGrowth(BiteCell *cell);
50 Grid<double> mHostBiomass;
51 Grid<double> mAgentBiomass;
52 Grid<double> mImpact;
53 QString mHostTreeFilter;
54 DynamicExpression mCalcHostBiomass; // calculate host biomass based on trees / cells
55 DynamicExpression mMortality;
56 Expression mGrowthFunction; // (logistic) growth function
57 DynamicExpression mGrowthRateFunction; // function to calculate the growth rate 'r'
58 int mGrowthIterations; // number of iterations during a time step (year) for updating agent/host biomass
59 DynamicExpression mGrowthConsumption; // consumption rate: cons= kg host biomass / kg agent per year
60 bool mVerbose;
61
62};
63
64
65} // end namespace
66#endif // BITEBIOMASS_H
Definition: fmsaplinglist.h:12
The FMTreeList class implements low-level functionality for selecting and harvesting of trees.
Definition: fmtreelist.h:34
Definition: biteagent.h:71
Definition: bitebiomass.h:29
Events mEvents
Definition: bitebiomass.h:47
QString info()
Definition: bitebiomass.cpp:96
void afterSetup()
Definition: bitebiomass.cpp:188
void beforeRun()
Definition: bitebiomass.cpp:182
void notify(BiteCell *cell, BiteCell::ENotification what)
Definition: bitebiomass.cpp:103
Q_INVOKABLE BiteBiomass(QJSValue obj)
Definition: bitebiomass.cpp:25
void setup(BiteAgent *parent_agent)
Definition: bitebiomass.cpp:30
QStringList allowedProperties()
Definition: bitebiomass.cpp:193
void runCell(BiteCell *cell, ABE::FMTreeList *treelist, ABE::FMSaplingList *saplist)
Definition: bitebiomass.cpp:118
Definition: bitecell.h:38
ENotification
Definition: bitecell.h:71
Definition: biteitem.h:37
Definition: bitecellscript.h:88
An expression engine for mathematical expressions provided as strings.
Definition: expression.h:29
Grid class (template).
Definition: grid.h:44
Definition: biteagent.cpp:32
DynamicExpression encapsulates an "expression" that can be either a iLand expression,...
Definition: bitecellscript.h:111