|
FFSM++
1.1.0
French Forest Sector Model ++
|
Output methods More...
#include <Output.h>


Public Member Functions | |
| Output (ThreadManager *MTHREAD_h) | |
| Constructor. More... | |
| ~Output () | |
| void | initOutput () |
| void | commonInit () |
| void | initOutputMaps () |
| void | initOutputForestData () |
| void | initOutputProductData () |
| void | initOptimisationLog () |
| void | initDebugOutput () |
| void | initDebugPixelValues () |
| void | initCarbonBalance () |
| void | print (bool earlyPrint=true) |
| Print output. If earlyPrinting it doesn't print some stuff for which we don't yet have values. More... | |
| void | printMaps () |
| void | printForestData (bool finalFlush) |
| void | printProductData (bool finalFlush) |
| void | printCarbonBalance () |
| void | printFinalOutput () |
| void | printDebugOutput () |
| void | printDetailedHV (map< tr1::array< string, 4 >, double > hVol_byPrd) |
| void | printDebugPixelValues () |
| void | printOptLog (bool optimal, int &nIterations, double &obj) |
| char | getOutputFieldDelimiter () |
| void | cleanScenario (string fileName, string scenarioName, char d) |
Public Member Functions inherited from BaseClass | |
| BaseClass () | |
| ~BaseClass () | |
| void | msgOut (const int &msgCode_h, const string &msg_h, const bool &refreshGUI_h=true) const |
| Overloaded function to print the output log. More... | |
| void | msgOut (const int &msgCode_h, const int &msg_h, const bool &refreshGUI_h=true) const |
| Overloaded function to print the output log. More... | |
| void | msgOut (const int &msgCode_h, const double &msg_h, const bool &refreshGUI_h=true) const |
| Overloaded function to print the output log. More... | |
| int | s2i (const string &string_h) const |
| string to integer conversion More... | |
| double | s2d (const string &string_h) const |
| string to double conversion More... | |
| double | s2d (const string &string_h, const bool &replaceComma) const |
| string to double conversion More... | |
| bool | s2b (const string &string_h) const |
| string to bool conversion More... | |
| string | i2s (const int &int_h) const |
| integer to string conversion More... | |
| string | d2s (const double &double_h) const |
| double to string conversion More... | |
| string | b2s (const bool &bool_h) const |
| bool to string conversion More... | |
| vector< int > | s2i (const vector< string > &string_h) const |
| string to integer conversion (vector) More... | |
| vector< double > | s2d (const vector< string > &string_h, const bool &replaceComma=false) const |
| string to double conversion (vector) More... | |
| vector< bool > | s2b (const vector< string > &string_h) const |
| string to bool conversion (vector) More... | |
| vector< string > | i2s (const vector< int > &int_h) const |
| integer to string conversion (vector) More... | |
| vector< string > | d2s (const vector< double > &double_h) const |
| double to string conversion (vector) More... | |
| vector< string > | b2s (const vector< bool > &bool_h) const |
| bool to string conversion (vector) More... | |
| int | getType (const string &type_h) const |
| Return a type according to enum TYPE_* from a string (eg: "string" -> TYPE_STRING (2)) More... | |
| void | refreshGUI () const |
| Ping to periodically return the control to the GUI. More... | |
| template<typename T > | |
| string | toString (const T &x) const |
| template<typename T > | |
| T | stringTo (const std::string &s) const |
| int | vSum (const vector< int > &vector_h) const |
| double | vSum (const vector< double > &vector_h) const |
| int | vSum (const vector< vector< int > > &vector_h) const |
| double | vSum (const vector< vector< double > > &vector_h) const |
| void | tokenize (const string &str, vector< string > &tokens, const string &delimiter=" ") const |
| Tokenize a string using a delimiter (default is space) More... | |
| void | untokenize (string &str, vector< string > &tokens, const string &delimiter=" ") const |
| template<typename K , typename V > | |
| V | findMap (const map< K, V > &mymap, const K &key, const int &error_level=MSG_CRITICAL_ERROR, const V ¬FoundValue=numeric_limits< V >::min()) const |
| Lookup a map for a value. Return the value starting from the key. More... | |
| template<typename K , typename V > | |
| void | changeMapValue (map< K, V > &mymap, const K &key, const V &value, const int &error_level=MSG_CRITICAL_ERROR) |
| Change the value stored in a map given the key and the new value. More... | |
| template<typename K , typename V > | |
| void | incrMapValue (map< K, V > &mymap, const K &key, const V &value, const int &error_level=MSG_CRITICAL_ERROR) |
| Increments a value stored in a map of the specified value, given the key. More... | |
| template<typename K , typename V > | |
| void | incrOrAddMapValue (map< K, V > &mymap, const K &key, const V &value) |
| Increments a value stored in a map of the specified value, given the key. More... | |
| template<typename K , typename V > | |
| void | resetMapValues (map< K, V > &mymap, const V &value) |
| Reset all values stored in a map to the specified one. More... | |
| template<typename K , typename V > | |
| map< K, V > | vectorToMap (const vector< K > &keys, const V &value=0.0) |
| Returns a map built using the given vector and the given (scalar) value as keys/values pairs. More... | |
| template<typename T > | |
| vector< T > | positionsToContent (const vector< T > &vector_h, const vector< int > &positions) |
| Return a vector of content from a vector and a vector of positions (int) More... | |
| template<typename V > | |
| void | debugMap (const map< iisskey, V > &mymap) |
| Debug a map. More... | |
| template<typename K , typename V > | |
| void | debugMap (const map< K, V > &mymap, const K &key) |
| template<typename K > | |
| int | getMaxPos (const vector< K > &v) |
| Returns the position of the maximum element in the vector (the last one in case of multiple equivalent maxima) More... | |
| template<typename K > | |
| int | getMinPos (const vector< K > &v) |
| Returns the position of the minimum element in the vector (the first one in case of multiple equivalent minima) More... | |
| template<typename K > | |
| K | getMax (const vector< K > &v) |
| Returns the value of the maximum element in the vector (the last one in case of multiple equivalent maxima) More... | |
| template<typename K > | |
| K | getMin (const vector< K > &v) |
| Returns the value of the minimum element in the vector (the first one in case of multiple equivalent minima) More... | |
| template<typename K > | |
| double | getAvg (const vector< K > &v) |
| Returns the average of the elements in the vector. More... | |
| template<typename K > | |
| double | getSd (const vector< K > &v, bool sample=true) |
| template<typename K > | |
| int | getPos (const K &element, const vector< K > &v, const int &msgCode_h=MSG_CRITICAL_ERROR) |
| template<typename K > | |
| bool | inVector (const K &element, const vector< K > &v) |
| double | normSample (const double &avg, const double &stdev, const double &minval=NULL, const double &maxval=NULL) const |
| Sample from a normal distribution with bounds. Slower (double time, but still you see the diff only after milion of loops). More... | |
| template<typename K > | |
| K | normSample (normal_distribution< K > &d, std::mt19937 &gen, const K &minval=NULL, const K &maxval=NULL) const |
| Sample from a normal distribution with bounds. Faster (half time) as the normal_distribution is made only once. More... | |
| template<typename T > | |
| std::string | toString (const T &x) const |
Public Attributes | |
| vector< vector< vector< vector< vector< double > > > > > | expReturnsDebug |
| l2_region, for type, d.c., pr prod, variable name More... | |
| vector< string > | expReturnsDebugVariables |
Private Attributes | |
| int | oLevel |
| char | d |
| int | inYear |
| int | nYears |
| string | baseDir |
| string | oDir |
| string | scenarioName |
| string | oFileExt |
| bool | oHRedeable |
| bool | oSingleFile |
| vector< int > | oYears |
| vector< int > | mapsOYears |
| int | wRegId_l1 |
| int | wRegId_l2 |
| string | outFileName |
| vector< string > | outForVariables |
| vector< string > | outProdVariables |
| bool | oForData |
| bool | oProdData |
| bool | oCarbonData |
| int | outStepRange |
| bool | forestDiamDetailedOutput |
| vector< string > | priPr |
| vector< string > | secPr |
| vector< string > | allPr |
| vector< int > | l1regIds |
| vector< vector< int > > | l2r |
| vector< string > | fTypes |
| vector< string > | dClasses |
| vector< string > | pDClasses |
| includes an empty string for variables without diameter attribute More... | |
| int | nPriPr |
| int | nSecPr |
| int | nAllPr |
| int | nL2r |
| string | logFilename |
| string | debugFilename |
| string | debugPxValuesFilename |
| bool | spMode |
Additional Inherited Members | |
Protected Attributes inherited from BaseClass | |
| ThreadManager * | MTHREAD |
| Pointer to the Thread manager. More... | |
Output methods
Class responsable to output the data, both as all kind of log as well as georeferenciated one.
| Output | ( | ThreadManager * | MTHREAD_h | ) |
| ~Output | ( | ) |
Definition at line 41 of file Output.cpp.
| void cleanScenario | ( | string | fileName, |
| string | scenarioName, | ||
| char | d | ||
| ) |
This routine clean the output scenario from previous outputs of the defined scenario. Other scenarios are untouched. The scenarioName must be in the first row.
| filename | Filename of the output file to clean |
| scenarioName | Name of the scenario we are replacing |
| d | Field delimiter. It must not be changed in the meantime (between the various scenarios) |
Definition at line 1149 of file Output.cpp.
Referenced by initCarbonBalance(), initDebugOutput(), initDebugPixelValues(), initOptimisationLog(), initOutputForestData(), and initOutputProductData().


| void commonInit | ( | ) |
Definition at line 61 of file Output.cpp.
Referenced by initOutput().


| char getOutputFieldDelimiter | ( | ) |
Definition at line 802 of file Output.cpp.
Referenced by commonInit().


| void initCarbonBalance | ( | ) |
Definition at line 370 of file Output.cpp.
Referenced by initOutput().


| void initDebugOutput | ( | ) |
Definition at line 170 of file Output.cpp.
Referenced by initOutput().


| void initDebugPixelValues | ( | ) |
Definition at line 207 of file Output.cpp.
Referenced by initOutput().


| void initOptimisationLog | ( | ) |
Definition at line 131 of file Output.cpp.
Referenced by initOutput().


| void initOutput | ( | ) |
Definition at line 48 of file Output.cpp.
Referenced by Init::setInitLevel3().


| void initOutputForestData | ( | ) |
Definition at line 296 of file Output.cpp.
Referenced by initOutput().


| void initOutputMaps | ( | ) |
Resetting the list of printed layers and the scenario name..
Printing scenario name for post-processing scripts
Definition at line 406 of file Output.cpp.
Referenced by initOutput().


| void initOutputProductData | ( | ) |
Definition at line 338 of file Output.cpp.
Referenced by initOutput().


| void print | ( | bool | earlyPrint = true | ) |
Print output. If earlyPrinting it doesn't print some stuff for which we don't yet have values.
Definition at line 426 of file Output.cpp.
Referenced by ModelCore::runInitPeriod(), ModelCoreSpatial::runInitPeriod(), ModelCore::runSimulationYear(), and ModelCoreSpatial::runSimulationYear().


| void printCarbonBalance | ( | ) |
Definition at line 727 of file Output.cpp.
Referenced by print().


| void printDebugOutput | ( | ) |
Definition at line 843 of file Output.cpp.
Referenced by print().


| void printDebugPixelValues | ( | ) |
Definition at line 880 of file Output.cpp.
Referenced by print().


| void printDetailedHV | ( | map< tr1::array< string, 4 >, double > | hVol_byPrd | ) |
Definition at line 1173 of file Output.cpp.
Referenced by ModelCoreSpatial::sumRegionalForData().


| void printFinalOutput | ( | ) |
Definition at line 462 of file Output.cpp.
Referenced by Init::setInitLevel6().


| void printForestData | ( | bool | finalFlush | ) |
Definition at line 474 of file Output.cpp.
Referenced by ModelData::getCachedInitialYear(), print(), and printFinalOutput().


| void printMaps | ( | ) |
Definition at line 451 of file Output.cpp.
Referenced by print().


| void printOptLog | ( | bool | optimal, |
| int & | nIterations, | ||
| double & | obj | ||
| ) |
Definition at line 827 of file Output.cpp.
Referenced by ModelCore::runMarketModule(), and ModelCoreSpatial::runMarketModule().


| void printProductData | ( | bool | finalFlush | ) |
Definition at line 589 of file Output.cpp.
Referenced by ModelData::getCachedInitialYear(), print(), and printFinalOutput().


|
private |
Definition at line 103 of file Output.h.
Referenced by commonInit(), and printProductData().
|
private |
Definition at line 83 of file Output.h.
Referenced by commonInit(), initCarbonBalance(), initDebugOutput(), initDebugPixelValues(), initOptimisationLog(), initOutputForestData(), initOutputMaps(), initOutputProductData(), printCarbonBalance(), printDetailedHV(), printForestData(), and printProductData().
|
private |
Definition at line 80 of file Output.h.
Referenced by commonInit(), initCarbonBalance(), initDebugOutput(), initDebugPixelValues(), initOptimisationLog(), initOutputForestData(), initOutputProductData(), printCarbonBalance(), printDebugOutput(), printDebugPixelValues(), printDetailedHV(), printForestData(), printOptLog(), and printProductData().
|
private |
Definition at line 107 of file Output.h.
Referenced by commonInit(), initDebugPixelValues(), printDebugOutput(), printDebugPixelValues(), printDetailedHV(), and printForestData().
|
private |
Definition at line 114 of file Output.h.
Referenced by initDebugOutput(), and printDebugOutput().
|
private |
Definition at line 115 of file Output.h.
Referenced by initDebugPixelValues(), and printDebugPixelValues().
| vector<vector < vector <vector <vector <double> > > > > expReturnsDebug |
l2_region, for type, d.c., pr prod, variable name
Definition at line 75 of file Output.h.
Referenced by printDebugOutput(), and ModelCore::runManagementModule().
| vector<string> expReturnsDebugVariables |
Definition at line 76 of file Output.h.
Referenced by initDebugOutput(), and printDebugOutput().
|
private |
Definition at line 100 of file Output.h.
Referenced by commonInit(), and printForestData().
|
private |
Definition at line 106 of file Output.h.
Referenced by commonInit(), initDebugPixelValues(), printDebugOutput(), printDebugPixelValues(), printDetailedHV(), and printForestData().
|
private |
Definition at line 81 of file Output.h.
Referenced by commonInit(), initOutputForestData(), initOutputProductData(), printCarbonBalance(), printForestData(), and printProductData().
|
private |
Definition at line 104 of file Output.h.
Referenced by commonInit(), printCarbonBalance(), printDetailedHV(), printForestData(), and printProductData().
|
private |
Definition at line 105 of file Output.h.
Referenced by commonInit(), printCarbonBalance(), printDetailedHV(), printForestData(), and printProductData().
|
private |
Definition at line 113 of file Output.h.
Referenced by initOptimisationLog(), and printOptLog().
|
private |
Definition at line 90 of file Output.h.
Referenced by commonInit(), and printMaps().
|
private |
Definition at line 111 of file Output.h.
Referenced by commonInit().
|
private |
Definition at line 112 of file Output.h.
Referenced by commonInit().
|
private |
Definition at line 109 of file Output.h.
Referenced by commonInit().
|
private |
Definition at line 110 of file Output.h.
Referenced by commonInit().
|
private |
Definition at line 82 of file Output.h.
Referenced by commonInit(), initOutputForestData(), initOutputProductData(), print(), printForestData(), and printProductData().
|
private |
Definition at line 98 of file Output.h.
Referenced by commonInit(), initCarbonBalance(), and printCarbonBalance().
|
private |
Definition at line 84 of file Output.h.
Referenced by commonInit(), initCarbonBalance(), initDebugOutput(), initDebugPixelValues(), initOptimisationLog(), initOutputForestData(), initOutputMaps(), initOutputProductData(), printCarbonBalance(), printDetailedHV(), printForestData(), and printProductData().
|
private |
Definition at line 86 of file Output.h.
Referenced by commonInit(), initCarbonBalance(), initOutputForestData(), initOutputProductData(), printCarbonBalance(), printDetailedHV(), printForestData(), and printProductData().
|
private |
Definition at line 96 of file Output.h.
Referenced by commonInit(), initOutputForestData(), and printForestData().
|
private |
Definition at line 87 of file Output.h.
Referenced by commonInit(), initOutputForestData(), initOutputProductData(), printFinalOutput(), printForestData(), and printProductData().
|
private |
Definition at line 79 of file Output.h.
Referenced by commonInit(), initDebugOutput(), initDebugPixelValues(), initOptimisationLog(), initOutputMaps(), printDebugOutput(), printDebugPixelValues(), printMaps(), and printOptLog().
|
private |
Definition at line 97 of file Output.h.
Referenced by commonInit(), initOutputProductData(), and printProductData().
|
private |
Definition at line 88 of file Output.h.
Referenced by commonInit(), initCarbonBalance(), initDebugOutput(), initDebugPixelValues(), initOptimisationLog(), initOutputForestData(), initOutputProductData(), printCarbonBalance(), printForestData(), and printProductData().
|
private |
Definition at line 93 of file Output.h.
Referenced by initCarbonBalance(), initOutputForestData(), initOutputProductData(), printCarbonBalance(), printDetailedHV(), printForestData(), and printProductData().
|
private |
Definition at line 94 of file Output.h.
Referenced by commonInit(), and printForestData().
|
private |
Definition at line 95 of file Output.h.
Referenced by commonInit(), and printProductData().
|
private |
Definition at line 99 of file Output.h.
Referenced by commonInit(), and print().
|
private |
Definition at line 89 of file Output.h.
Referenced by commonInit(), and print().
|
private |
includes an empty string for variables without diameter attribute
production diameter classes: exclude the fist diameter class below 15 cm
Definition at line 108 of file Output.h.
Referenced by commonInit().
|
private |
Definition at line 101 of file Output.h.
Referenced by commonInit(), printDebugOutput(), and printDetailedHV().
|
private |
Definition at line 85 of file Output.h.
Referenced by commonInit(), initCarbonBalance(), initDebugOutput(), initDebugPixelValues(), initOptimisationLog(), initOutputForestData(), initOutputMaps(), initOutputProductData(), printCarbonBalance(), printDebugOutput(), printDebugPixelValues(), printDetailedHV(), printForestData(), printOptLog(), and printProductData().
|
private |
Definition at line 102 of file Output.h.
Referenced by commonInit().
|
private |
Definition at line 116 of file Output.h.
Referenced by commonInit(), initDebugOutput(), initDebugPixelValues(), printDebugOutput(), and printDebugPixelValues().
|
private |
Definition at line 91 of file Output.h.
Referenced by commonInit().
|
private |
Definition at line 92 of file Output.h.
Referenced by commonInit().