FFSM++  1.1.0
French Forest Sector Model ++
ModelData.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2015 by Laboratoire d'Economie Forestière *
3  * http://ffsm-project.org *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version, given the compliance with the *
9  * exceptions listed in the file COPYING that is distribued together *
10  * with this file. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ***************************************************************************/
22 #ifndef MODELDATA_H
23 #define MODELDATA_H
24 
25 // Core C++ headers
26 #include <string>
27 #include <vector>
28 #include <map>
29 #include <stdexcept>
30 #include <iostream>
31 #include <sstream>
32 
33 // Qt headers...
34 #include <QString>
35 
36 // RegMAS headers...
37 #include "BaseClass.h"
38 #include "InputNode.h"
39 #include "Output.h"
40 
41 using namespace std;
42 
43 typedef map<string, vector <double> > DataMap;
44 typedef pair<string, vector <double> > DataPair;
45 
46 struct IFiles;
47 struct BasicData;
48 class LLData;
49 class ModelRegion;
50 class Layers;
51 class Output;
52 struct forData;
53 struct prodData;
54 struct forToProd;
55 struct reclRule;
56 struct pathRule;
57 struct forType;
58 
59 
60 struct scenarioData {
61  string id;
62  string shortDesc;
63  string longDesc;
64  string settingTable;
65  string forDataTable;
66  string prodDataTable;
68  string pathTable;
69  string settingFile;
70 };
71 
72 /// Regional data, including macros and settings
73 
74 /**
75 All regional data are within this class. It may have linked other data-classes.
76 <br>On some variables ModelData has just the definition of the objects, but the values may change at the agent-level. This is why each agent has a "personal copy" of them.
77 @author Antonello Lobianco
78 */
79 
80 class ModelData: public BaseClass{
81 
82 public:
83  ModelData(ThreadManager* MTHREAD_h);
84  ~ModelData();
85 
86  /// Unzip the OpenOffice input file (NEW 2008.05.13)
87  void loadInput();
88 
89  //void loadDataFromCache(string tablename); ///< Load data from a cached CSV instead of the openoffice file
90  LLData getTableFromFile(string tablename, string filename_h); ///< Load and return a data table from a file (instead that from a spreadsheet sheet)
91  vector<string> getScenarios();
92  int getScenarioIndex();
93  bool delDir(QString dirname); ///< Recursivelly delete a directory
94  void setScenarioData(); ///< Set the infos about this scenario (long description and overriding tables)
95  void setDefaultSettings();
96  void setScenarioSettings();
97  void createRegions();
98  void setDefaultForData();
99  void setScenarioForData();
100  void setDefaultProdData();
101  void setScenarioProdData();
102  void setDefaultProductResourceMatrixLink();
103  void setScenarioProductResourceMatrixLink();
104  void setForestTypes();
105  void setReclassificationRules();
106  void setDefaultPathogenRules();
107  void setScenarioPathogenRules();
108  void applyOverrides(); ///< Cancel all reg1 level data and trasform them in reg2 level if not already existing
109  void applyDebugMode(); ///< Works only a specified subset of regions and products
110  void setSpace();
111 
112  /// Return a vector of objects that together provide the specified resource in the specified quantity
113  string getOutputDirectory() const {return outputDirname;}
114  int getFilenamesByDir (const string & dir, vector<string> &files, const string &filter = ""); ///< Return a list of files in a directory
115  string getFilenameByType(string type_h);
116  LLData getTable(string tableName_h, int debugLevel=MSG_CRITICAL_ERROR);
117  vector <IFiles> getIFilesVector() const {return iFilesVector;}
118  string getBaseDirectory() const {return baseDirectory;}
119  ModelRegion* getRegion(int regId_h);
120  bool regionExist (const int & regId_h) const ;
121  vector <ModelRegion*> getAllRegions(bool excludeResidual=true);
122  vector<int> getRegionIds(int level_h, bool excludeResidual=true);
123  vector < vector <int> > getRegionIds( bool excludeResidual=true);
124  string regId2RegSName (const int & regId_h) const ;
125  int regSName2RegId (const string & regSName_h) const ;
126  int getNForTypes(){return forTypes.size();}
127  int getNReclRules(){return reclRules.size();}
128  forType* getForType(int position){return &forTypes[position];}
129  forType* getForType(string& forTypeId_h);
130  int getForTypeCounter(string& forTypeId_h, bool all=false); ///< By default it doesn't return forTypes used only as input
131  vector <string> getForTypeIds(bool all=false); ///< By default it doesn't return forTypes used only as input
132  string getForTypeParentId(const string& forTypeId_h);
133  vector<string> getForTypeChilds(const string &forTypeId_h);
134  vector<int> getForTypeChilds_pos(const string &forTypeId_h, bool all=false);
135  vector<string> getForTypeParents();
136  int getNForTypesChilds(const string& forTypeId_h);
137  reclRule* getReclRule(int position){return &reclRules[position];}
138  vector <string> getDiameterClasses(bool productionOnly=false);
139  /// A simple function to assess if a specified product can be made by a certain forest type and diameter class
140  const bool assessProdPossibility(const string &prod_h, const string &forType_h, const string &dClass_h);
141  const int getMaxYearUsableDeathTimber(const string &prod_h, const string &forType_h, const string &dClass_h);
142  const int getMaxYearUsableDeathTimber();
143  void setErrorLevel(int errorLevel_h){errorLevel=errorLevel_h;}
144  int getErrorLevel(){return errorLevel;}
145  bool getTempBool(){return tempBool;}
146  void setTempBool(bool tempBool_h){tempBool = tempBool_h;}
147  bool getValueFoundBool(){return valueFoundBool;}
148  void setValueFoundBool(bool valueFoundBool_h){valueFoundBool = valueFoundBool_h;}
149 
150  vector < vector <int> > createCombinationsVector(const int& nItems); ///< Return a vector containing any possible combination of nItems items (including any possible subset). The returned vector has in each slot the items present in that specific combination.
151 
152  double getTimedData(const vector <double> &dated_vector, const int& year_h) const; ///< Return the value for the specified year in a timelly ordered vector, taking the last value if this is smaller than the required position.
153  void setTimedData(const double& value_h, vector<double> &dated_vector, const int& year_h, const int& MSG_LEVEL=MSG_WARNING);
154 
155  int getIntSetting (const string &name_h, int position=0, int reg=WORLD) const;
156  double getDoubleSetting (const string &name_h, int position=0, int reg=WORLD) const;
157  string getStringSetting (const string &name_h, int position=0, int reg=WORLD) const;
158  bool getBoolSetting (const string &name_h, int position=0, int reg=WORLD) const;
159  vector <int> getIntVectorSetting (const string &name_h, int reg=WORLD) const;
160  vector <double> getDoubleVectorSetting (const string &name_h, int reg=WORLD) const;
161  vector <string> getStringVectorSetting (const string &name_h, int reg=WORLD) const;
162  vector <bool> getBoolVectorSetting (const string &name_h, int reg=WORLD) const;
163 
164 
165  const double getProdData(const string &type_h, const int& regId_h, const string &prodId_h, const int &year=DATA_NOW, const string &freeDim_h="");
166  const double getForData(const string &type_h, const int& regId_h, const string &forType_h, const string &freeDim_h, const int& year=DATA_NOW);
167 
168 
169  void setProdData(const double& value_h, const string &type_h, const int& regId_h, const string &prodId_h, const int& year=DATA_NOW, const bool& allowCreate=false, const string &freeDim_h=""); // Remember default arguments must be at the end
170  void setForData(const double& value_h, const string &type_h, const int& regId_h, const string &forType_h, const string &freeDim_h, const int& year=DATA_NOW, const bool& allowCreate=false); // Remember default arguments must be at the end
171 
172  string makeKeyProdData(const string& parName, const string& regId, const string& prod, const string& freeDim="") const {return parName+"#"+regId+"#"+prod+"#"+freeDim+"#";}
173  string makeKeyForData(const string& parName, const string& regId, const string& forType, const string& diamClass) const {return parName+"#"+regId+"#"+forType+"#"+diamClass+"#";}
174  void unpackKeyProdData(const string& key, string& parName, int &regId, string& prod, string& freeDim) const;
175  void unpackKeyForData(const string& key, string& parName, int &regId, string& forType, string& diamClass) const;
176 
177  vector<pathRule*> getPathMortalityRule(const string& forType, const string& dC); ///< Return the pathogen mortality rule(s) associated with a given ft and dc (plural as more than a single pathogen could be found)
178 
179  double calculateAnnualisedEquivalent(const double& amount_h, const int& years_h, const double& ir) const; ///< Calculate the annual equivalent flow
180  double calculateAnnualisedEquivalent(const double& amount_h, const double& years_h, const double& ir) const; ///< Transform the double to the highest integer and call calculateAnnualisedEquivalent(double amount_h, int years_h)
181 
182  void setOutputDirectory(const char* output_dirname_h);
183  void setBaseDiretory(string baseDirectory_h){baseDirectory=baseDirectory_h;}
184  void addSetting(string name_h, vector <string> values_h, int type_h, string comment_h);
185  void addSetting(string name_h, string value_h, int type_h, string comment_h);
186  void cacheSettings(); ///< Called after input reading, it fix frequently used data;
187  int getCachedInitialYear(){return cached_initialYear;}
188 
189  //void setBasicData(const string &name_h, int value, int position=0);
190  //void setBasicData(const string &name_h, double value, int position=0);
191  //void setBasicData(const string &name_h, string value, int position=0);
192  //void setBasicData(const string &name_h, bool value, int position=0);
193  friend void Output::printForestData(bool finalFlush);
194  friend void Output::printProductData(bool finalFlush);
195  void deathTimberInventory_incrOrAdd(const iisskey &thekey, double value_h){incrOrAddMapValue(deathTimberInventory,thekey, value_h);}
196  void deathTimberInventory_incr(const iisskey &thekey, double value_h){incrMapValue(deathTimberInventory,thekey, value_h);}
197  double deathTimberInventory_get(const iisskey &thekey){return findMap(deathTimberInventory, thekey);}
198  map<iisskey, double > * getDeathTimberInventory() {return &deathTimberInventory;};
199  double getAvailableDeathTimber(const vector<string> &primProd_h, int regId_h, int year_h); ///< Returns the timber available for a given set of primary products as stored in the deathTimberInventory map
200  double getAvailableAliveTimber(const vector<string> &primProd_h, int regId_h); ///< Returns the timber available for a given set of primary products as stored in the px->vol_l vector
201  vector <int> getAllocableProductIdsFromDeathTimber(const int &regId_h, const string &ft, const string &dc, const int &harvesting_year, int request_year=DATA_NOW); ///< Returns the ids of the primary products that is possible to obtain using the timber recorded death in the specific year, ft, dc combination
203 
204 private:
205  string getBaseData (const string &name_h, int type_h, int position=0, int regId_h=WORLD);
206  vector <string> getVectorBaseData (const string &name_h, int type_h, int regId_h=WORLD);
207  //void setBasicData(const string &name_h, string value, int type_h, int position);
208 
209  bool dataMapCheckExist(const DataMap& map, const string& search_for, const bool& exactMatch=true) const;
210  double dataMapGetValue(const DataMap& map, const string& search_for, const int& year_h, const bool& exactMatch=true);
211  int dataMapSetValue(DataMap& map, const string& search_for, const double& value_h, const int& year_h, const bool& exactMatch=true);
212 
213  string inputFilename; // from Qt fileOpen dialog
214  string outputDirname; // from main config files
215  string baseDirectory; // from Qt fileOpen dialog
216 
217  map <string, vector<double> > forDataMap; ///< Forestry data
218  map <string, vector<double> > prodDataMap; ///< Product data
219  vector <forToProd> forToProdVector; ///< Vector of coefficients from forest resources to primary products
220 
221  vector <IFiles> iFilesVector; ///< List of all input files. Simple (struct)
222  vector <BasicData> programSettingsVector; ///< Setting data. Simple (struct)
223  vector <LLData> LLDataVector; ///< Vector of Low Level Data
224  vector <ModelRegion> regionsVector; ///< Vector of modelled regions
225 
226  vector <forType> forTypes; ///< Vector of forest types
227  vector <reclRule> reclRules; ///< Vector of reclassification rules
228  vector <pathRule> pathRules; ///< Vector of pathogen rules
229  vector < vector <int> > l2r; ///< Region2 ids
230  map<iisskey, double > deathTimberInventory; ///< Map that register the death of biomass still usable as timber by year, l2_region, forest type and diameter class [Mm^3 wood]
231 
232  // cahced setting data..
233  vector <string> diamClasses; ///< Diameter classes
235  vector <string> priProducts;
236  vector <string> secProducts;
237  vector <string> allProducts;
238 
239  bool tempBool; ///< a temporary bool variable used for various functions
240  bool valueFoundBool; ///< a bool used in getForData() and getProdData() to communicate they didn't found a variable
241 
242  /// For each agricultural soil type (as defined in the setting "agrLandTypes") this list define the objects that can be placed on that soil type
243  InputNode mainDocument; ///< the main input document, loaded in memory at unzipping stage
245 };
246 
247 /// Input files (struct)
248 /**
249 Very short struct containing the input files used (one istance==one file).
250 <br>A copy of each Istances is saved on vector iFilesVector in class ModelData.
251 <br>iFiles are defined in the main config file and parsed subsequently.
252 @author Antonello Lobianco
253 */
254 //Changed from a class to a structure on 2006.10.17.
255 struct IFiles {
256  string directory;
257  string type;
258  string name;
259  string comment;
260 };
261 
262 /// Basic data units (struct)
263 /**
264 Struct containing the basic data objects. At the moment, data are used to store programm settings or macro data.
265 @author Antonello Lobianco
266 */
267 struct BasicData {
268  string name;
269  /// Values are stored as "string" because we don't yet know at this point if they are string, double or integers!
270  vector <string> values;
271  int type; //< enum TYPE_*
272  int regId;
273  string comment;
274 };
275 
276 /// IO production matrix between the forest resources and the primary products (struct)
277 /**
278 Struct containing the io matrix between the forest resources and the primary products. Not to be confunded with the IO matrix between primary products and secondary products.
279 */
280 struct forToProd {
281  string product;
282  string forType;
283  string dClass;
284  /// The maximum year for a tree collapse that this product can be harvested from. E.g. a 0 value means it can be obtained only from live trees, a 5 years value mean it can be obtained from trees death no longer than 5 years ago.
285  int maxYears;
286 };
287 
288 /// Forest types (struct)
289 /**
290 Struct containing the list of the forest types managed in the model.
291 @par memType Parameter to define if this type is used only in initial data reading, then is reclassed and no more used (1) or if it is generated from the reclass rule and then used in the model (2). New 20150311: (3) means a layer with spatial data of vol and area added respectiely in layers and proportionally to volumes. New 20170313: (2) also means a ft layer with no initial area nor volumes, but that can be choosen by forest managers (e.g. a new cc adapted ft). No need to introduce a new code specifically for that
292 */
293 struct forType {
294  string forTypeId;
295  string forLabel;
296  int memType;
297  string forLayer;
300 };
301 
302 /// IO production matrix between the forest resources and the primary products (struct)
303 /**
304 Struct containing the io matrix between the forest resources and the primary products. Not to be confunded with the IO matrix between primary products and secondary products.
305 */
306 struct reclRule {
307  int regId;
308  string forTypeIn;
309  string forTypeOut;
310  double coeff;
311 };
312 
313 /// Pathogen rule (how pathogen presense influence mortality) for a given forest type and diameter class (struct)
314 /**
315 Struct containing the rule that affect the mortality of a given ft and dc by a given pathogen: depending on the number of year of presence
316 of the pathogen over a given tollerance level the mortality increase more and more.
317 */
318 struct pathRule {
319  string forType;
320  string dClass;
321  string pathId; ///< Pathogen id (name)
322  double pres_min; ///< Minimum level of presence of the pathogen to be counted as present (tolerance threshold)
323  vector<double> mortCoefficents; ///< Mortality coefficients ordered by number of presence of the pathogen, e.g. first value is the mortality increase in the first year of pathogen appareance.
324 };
325 
326 
327 
328 /// Low level data. XML input is reversed here after unzipping oocalc file and parsing content.xml
329 class LLData: public BaseClass{
330 
331 public:
332  LLData(ThreadManager* MTHREAD_h, string tableName_h);
333  ~LLData();
334  void clean(); // clean the data from empty headers
335  string getTableName(){return tableName;}
336  int nrecords(){return records.size();}
337  int nheaders(){return headers.size();}
338  string getData(const int& pos_h, const string& header_h, const int& debugLevel=MSG_CRITICAL_ERROR) const;
339  friend void ModelData::loadInput();
340  //friend void ModelData::loadDataFromCache(string tablename);
341  //friend void ModelData::getTableFromFile(string tablename, string filename_h);
342 
343  string tableName;
344  vector<string> headers;
345  vector < vector <string> > records;
346 
347 };
348 
349 
350 #endif
string comment
Definition: ModelData.h:273
Class to provide a simple integer-integer-string-string key in std maps.
Definition: BaseClass.h:213
string dClass
Definition: ModelData.h:283
The required data is for the current year.
Definition: BaseClass.h:73
int errorLevel
Definition: ModelData.h:244
InputNode mainDocument
For each agricultural soil type (as defined in the setting "agrLandTypes") this list define the objec...
Definition: ModelData.h:243
string forLabel
Definition: ModelData.h:295
bool tempBool
a temporary bool variable used for various functions
Definition: ModelData.h:239
string pathId
Pathogen id (name)
Definition: ModelData.h:321
Forest types (struct)
Definition: ModelData.h:293
IO production matrix between the forest resources and the primary products (struct) ...
Definition: ModelData.h:306
vector< reclRule > reclRules
Vector of reclassification rules.
Definition: ModelData.h:227
Wrapper around the underlying library for reading DOM elements (nodes).
Definition: InputNode.h:51
reclRule * getReclRule(int position)
Definition: ModelData.h:137
string getBaseDirectory() const
Definition: ModelData.h:118
double pres_min
Minimum level of presence of the pathogen to be counted as present (tolerance threshold) ...
Definition: ModelData.h:322
int memType
Definition: ModelData.h:296
vector< string > headers
Definition: ModelData.h:344
Request something that is not region-specific.
Definition: BaseClass.h:80
int nrecords()
Definition: ModelData.h:336
vector< LLData > LLDataVector
Vector of Low Level Data.
Definition: ModelData.h:223
Basic data units (struct)
Definition: ModelData.h:267
string forTypeOut
Definition: ModelData.h:309
STL namespace.
string id
Definition: ModelData.h:61
int getCachedInitialYear()
Definition: ModelData.h:187
Thread manager. Responsable to manage the main thread and "speak" with the GUI.
Definition: ThreadManager.h:65
string getTableName()
Definition: ModelData.h:335
vector< double > mortCoefficents
Mortality coefficients ordered by number of presence of the pathogen, e.g. first value is the mortali...
Definition: ModelData.h:323
map< iisskey, double > * getDeathTimberInventory()
Definition: ModelData.h:198
double deathTimberInventory_get(const iisskey &thekey)
Definition: ModelData.h:197
map< string, vector< double > > prodDataMap
Product data.
Definition: ModelData.h:218
string forDataTable
Definition: ModelData.h:65
string longDesc
Definition: ModelData.h:63
Input files (struct)
Definition: ModelData.h:255
void printProductData(bool finalFlush)
Definition: Output.cpp:589
string forTypeIn
Definition: ModelData.h:308
vector< IFiles > iFilesVector
List of all input files. Simple (struct)
Definition: ModelData.h:221
string ereditatedFrom
Definition: ModelData.h:298
Regional data, including macros and settings.
Definition: ModelData.h:80
int maxYears
The maximum year for a tree collapse that this product can be harvested from. E.g. a 0 value means it can be obtained only from live trees, a 5 years value mean it can be obtained from trees death no longer than 5 years ago.
Definition: ModelData.h:285
Output methods
Definition: Output.h:48
string forType
Definition: ModelData.h:319
Print an error message and stop the model.
Definition: BaseClass.h:62
int getNReclRules()
Definition: ModelData.h:127
string comment
Definition: ModelData.h:259
void loadInput()
Unzip the OpenOffice input file (NEW 2008.05.13)
Definition: ModelData.cpp:1527
void setValueFoundBool(bool valueFoundBool_h)
Definition: ModelData.h:148
string prodDataTable
Definition: ModelData.h:66
string shortDesc
Definition: ModelData.h:62
bool getTempBool()
Definition: ModelData.h:145
Define layer objects at the regional level.
Definition: Layers.h:49
void setTempBool(bool tempBool_h)
Definition: ModelData.h:146
string tableName
Definition: ModelData.h:343
string baseDirectory
Definition: ModelData.h:215
vector< string > priProducts
Definition: ModelData.h:235
map< string, vector< double > > DataMap
Definition: ModelData.h:43
string forTypeId
Definition: ModelData.h:294
Print a WARNING message.
Definition: BaseClass.h:60
string name
Definition: ModelData.h:258
vector< pathRule > pathRules
Vector of pathogen rules.
Definition: ModelData.h:228
int regId
Definition: ModelData.h:272
Base class for the regmas application.
Definition: BaseClass.h:239
vector< string > secProducts
Definition: ModelData.h:236
string inputFilename
Definition: ModelData.h:213
int nheaders()
Definition: ModelData.h:337
int getErrorLevel()
Definition: ModelData.h:144
string forLayer
Definition: ModelData.h:297
int type
Definition: ModelData.h:271
string forToProdTable
Definition: ModelData.h:67
string outputDirname
Definition: ModelData.h:214
string makeKeyForData(const string &parName, const string &regId, const string &forType, const string &diamClass) const
Definition: ModelData.h:173
bool valueFoundBool
a bool used in getForData() and getProdData() to communicate they didn&#39;t found a variable ...
Definition: ModelData.h:240
vector< vector< int > > l2r
Region2 ids.
Definition: ModelData.h:229
string settingTable
Definition: ModelData.h:64
string settingFile
Definition: ModelData.h:69
map< string, vector< double > > DataMap
Definition: ModelData.cpp:56
void setErrorLevel(int errorLevel_h)
Definition: ModelData.h:143
Layers * layer
Definition: ModelData.h:299
int cached_initialYear
Definition: ModelData.h:234
vector< forToProd > forToProdVector
Vector of coefficients from forest resources to primary products.
Definition: ModelData.h:219
string name
Definition: ModelData.h:268
int regId
Definition: ModelData.h:307
Pathogen rule (how pathogen presense influence mortality) for a given forest type and diameter class ...
Definition: ModelData.h:318
string dClass
Definition: ModelData.h:320
double coeff
Definition: ModelData.h:310
string pathTable
Definition: ModelData.h:68
string getOutputDirectory() const
Return a vector of objects that together provide the specified resource in the specified quantity...
Definition: ModelData.h:113
vector< string > allProducts
Definition: ModelData.h:237
bool getValueFoundBool()
Definition: ModelData.h:147
string forType
Definition: ModelData.h:282
int getNForTypes()
Definition: ModelData.h:126
vector< ModelRegion > regionsVector
Vector of modelled regions.
Definition: ModelData.h:224
string product
Definition: ModelData.h:281
vector< string > values
Values are stored as "string" because we don&#39;t yet know at this point if they are string...
Definition: ModelData.h:270
vector< BasicData > programSettingsVector
Setting data. Simple (struct)
Definition: ModelData.h:222
string makeKeyProdData(const string &parName, const string &regId, const string &prod, const string &freeDim="") const
Definition: ModelData.h:172
void printForestData(bool finalFlush)
Definition: Output.cpp:474
This file is the header of BaseClass and it is included by ALL compiled code.
void deathTimberInventory_incrOrAdd(const iisskey &thekey, double value_h)
Definition: ModelData.h:195
vector< forType > forTypes
Vector of forest types.
Definition: ModelData.h:226
vector< IFiles > getIFilesVector() const
Definition: ModelData.h:117
string directory
Definition: ModelData.h:256
void deathTimberInventory_incr(const iisskey &thekey, double value_h)
Definition: ModelData.h:196
pair< string, vector< double > > DataPair
Definition: ModelData.h:44
IO production matrix between the forest resources and the primary products (struct) ...
Definition: ModelData.h:280
map< string, vector< double > > forDataMap
Forestry data.
Definition: ModelData.h:217
vector< vector< string > > records
Definition: ModelData.h:345
vector< string > diamClasses
Diameter classes.
Definition: ModelData.h:233
map< iisskey, double > deathTimberInventory
Map that register the death of biomass still usable as timber by year, l2_region, forest type and dia...
Definition: ModelData.h:230
scenarioData scenario
Definition: ModelData.h:202
void setBaseDiretory(string baseDirectory_h)
Definition: ModelData.h:183
string type
Definition: ModelData.h:257
forType * getForType(int position)
Definition: ModelData.h:128
Low level data. XML input is reversed here after unzipping oocalc file and parsing content...
Definition: ModelData.h:329