34 const QString &
name()
const {
return mName; }
37 Species *
species(
const QString &speciesId)
const {
return mSpecies.value(speciesId); }
40 bool hasVar(
const QString& varName);
41 QVariant
var(
const QString& varName);
42 int count()
const {
return mSpecies.count(); }
44 void randomSpeciesOrder(QVector<int>::const_iterator &rBegin, QVector<int>::const_iterator &rEnd);
47 double nitrogenResponse(
const double availableNitrogen,
const double &responseClass)
const;
49 double lightResponse(
const double lightResourceIndex,
const double lightResponseClass)
const;
50 double LRIcorrection(
const double lightResourceIndex,
const double relativeHeight)
const {
return mLRICorrection.
calculate(lightResourceIndex, relativeHeight);}
61 double nitrogenResponse(
const double &availableNitrogen,
const double &NA,
const double &NB)
const;
62 void createRandomSpeciesOrder();
63 QList<Species*> mActiveSpecies;
64 QMap<QString, Species*> mSpecies;
65 static const int mNRandomSets = 20;
66 QVector<int> mRandomSpeciesOrder;
67 QSqlQuery *mSetupQuery;
70 double mNitrogen_1a, mNitrogen_1b;
71 double mNitrogen_2a, mNitrogen_2b;
72 double mNitrogen_3a, mNitrogen_3b;
74 double mCO2base, mCO2comp;
75 double mCO2p0, mCO2beta0;
An expression engine for mathematical expressions provided as strings.
Definition: expression.h:29
double calculate(const double Val1=0., const double Val2=0., const bool forceExecution=false) const
calculate formula.
Definition: expression.cpp:487
The class encapsulates the dispersal of seeds of one species over the whole landscape.
Definition: seeddispersal.h:28
The behavior and general properties of tree species.
Definition: species.h:75
A SpeciesSet acts as a container for individual Species objects.
Definition: speciesset.h:30
bool hasVar(const QString &varName)
test if variable exists
Definition: speciesset.cpp:63
double co2Response(const double ambientCO2, const double nitrogenResponse, const double soilWaterResponse) const
calculation for the CO2 response for the ambientCO2 for the water- and nitrogen responses given.
Definition: speciesset.cpp:296
const QString & name() const
table name of the species set
Definition: speciesset.h:34
double lightResponse(const double lightResourceIndex, const double lightResponseClass) const
calculates the lightResponse based on a value for LRI and the species lightResponseClass.
Definition: speciesset.cpp:320
SpeciesSet()
Definition: speciesset.cpp:38
void setupRegeneration()
setup of regenartion related data
Definition: speciesset.cpp:159
void clearSaplingSeedMap()
clear the seed maps that collect leaf area for saplings
Definition: speciesset.cpp:189
~SpeciesSet()
Definition: speciesset.cpp:43
void newYear()
is called at the beginning of a year
Definition: speciesset.cpp:200
void regeneration()
run regeneration (after growth)
Definition: speciesset.cpp:176
void randomSpeciesOrder(QVector< int >::const_iterator &rBegin, QVector< int >::const_iterator &rEnd)
return 2 iterators. The range between 'rBegin' and 'rEnd' are indices of the current species set (all...
Definition: speciesset.cpp:229
int setup()
loads active species from a database table and creates/setups the species.
Definition: speciesset.cpp:76
QVariant var(const QString &varName)
return variable as QVariant
Definition: speciesset.cpp:211
Species * species(const QString &speciesId) const
Definition: speciesset.h:37
double nitrogenResponse(const double availableNitrogen, const double &responseClass) const
calculate nitrogen response for a given amount of available nitrogen and a respone class for fraction...
Definition: speciesset.cpp:266
int count() const
Definition: speciesset.h:42
QList< Species * > activeSpecies() const
list of species that are "active" (flag active in database)
Definition: speciesset.h:36
const StampContainer & readerStamps()
Definition: speciesset.h:39
double LRIcorrection(const double lightResourceIndex, const double relativeHeight) const
Definition: speciesset.h:50
void clear()
Definition: speciesset.cpp:48
Collection of Stamp for one tree species.
Definition: stampcontainer.h:33