FFSM++ 1.1.0
French Forest Sector Model ++
Loading...
Searching...
No Matches
ModelRegion Class Reference

#include <ModelRegion.h>

Inheritance diagram for ModelRegion:
Collaboration diagram for ModelRegion:

Public Member Functions

 ModelRegion (ThreadManager *MTHREAD_h, int regId_h, string regSName_h, string regLName_h, int regLevel_h, int parRegId_h, bool isResidual_h)
 Constructor.
 
 ~ModelRegion ()
 
void setRegId (int regId_h)
 
void setRegSName (string regSName_h)
 
void setRegLName (string regLName_h)
 
void setRegLevel (int regLevel_h)
 
void setParRegId (int parRegId_h)
 
void setIsResidual (bool isResidual_h)
 
void setParent (ModelRegion *parRegion_h)
 
void setChildren (vector< ModelRegion * > children_h)
 
void addForData (forData *data_h)
 Childrens are all the lvel-1 region that are parts of this region.
 
void addProdData (prodData *data_h)
 
void setMyPixels ()
 It sets a double link pixels <--> region.
 
void swap (const int &swap_what)
 
int getRegId () const
 
string getRegSName () const
 
string getRegLName () const
 
int getRegLevel () const
 
int getParRegId () const
 
bool getIsResidual () const
 
ModelRegiongetParent ()
 
vector< ModelRegion * > getChildren (bool excludeResidual=true)
 Returns a pointer to the parent regions.
 
vector< ModelRegion * > getSiblings (bool excludeResidual=true)
 Return a vector of pointers to the siblings regions.
 
double getVolumes ()
 
vector< double > getVolumes (int fType_h)
 
double getValue (string layerName, int op=OP_SUM)
 return the values of its own pixels for the specified layer. Possible operations: OP_SUM or OP_AVG
 
vector< vector< double > > getVolumes (int fType_h, string dClass_h)
 
double getArea (const string &fType_h, const string &dClass_h)
 Get area by ft and dc (from pixel->area matrix)
 
double getArea (const string &fType_h)
 Get area by ft (from pixel->area matrix)
 
double getArea (const int &ft_pos, const int &dc_pos)
 Get area by ft and dc positions (from pixel->area matrix)
 
double getArea (const int &ft_pos)
 Get area by ft position (from pixel->area matrix)
 
double getArea ()
 Get whole forest area (from pixel->area matrix)
 
int getNChildren (bool excludeResidual=true)
 
vector< Pixel * > getMyPixels ()
 
- 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.
 
void msgOut (const int &msgCode_h, const int &msg_h, const bool &refreshGUI_h=true) const
 Overloaded function to print the output log.
 
void msgOut (const int &msgCode_h, const double &msg_h, const bool &refreshGUI_h=true) const
 Overloaded function to print the output log.
 
int s2i (const string &string_h) const
 string to integer conversion
 
double s2d (const string &string_h) const
 string to double conversion
 
double s2d (const string &string_h, const bool &replaceComma) const
 string to double conversion
 
bool s2b (const string &string_h) const
 string to bool conversion
 
string i2s (const int &int_h) const
 integer to string conversion
 
string d2s (const double &double_h) const
 double to string conversion
 
string b2s (const bool &bool_h) const
 bool to string conversion
 
vector< int > s2i (const vector< string > &string_h) const
 string to integer conversion (vector)
 
vector< double > s2d (const vector< string > &string_h, const bool &replaceComma=false) const
 string to double conversion (vector)
 
vector< bool > s2b (const vector< string > &string_h) const
 string to bool conversion (vector)
 
vector< string > i2s (const vector< int > &int_h) const
 integer to string conversion (vector)
 
vector< string > d2s (const vector< double > &double_h) const
 double to string conversion (vector)
 
vector< string > b2s (const vector< bool > &bool_h) const
 bool to string conversion (vector)
 
int getType (const string &type_h) const
 Return a type according to enum TYPE_* from a string (eg: "string" -> TYPE_STRING (2))
 
void refreshGUI () const
 Ping to periodically return the control to the GUI.
 
template<typename T >
string toString (const T &x) const
 
template<typename 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)
 
void untokenize (string &str, vector< string > &tokens, const string &delimiter=" ") const
 
template<typename K , typename V >
findMap (const map< K, V > &mymap, const K &key, const int &error_level=MSG_CRITICAL_ERROR, const V &notFoundValue=numeric_limits< V >::min()) const
 Lookup a map for a value. Return the value starting from the key.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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)
 
template<typename V >
void debugMap (const map< iisskey, V > &mymap)
 Debug a map.
 
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)
 
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)
 
template<typename 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)
 
template<typename 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)
 
template<typename K >
double getAvg (const vector< K > &v)
 Returns the average of the elements in the vector.
 
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).
 
template<typename 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.
 
template<typename T >
std::string toString (const T &x) const
 

Public Attributes

vector< double > inResByAnyCombination
 Vector of inventory resource for each possible combination of primary products. This store both alive timber and death one.
 

Private Attributes

int regId
 Regional unique ID.
 
string regSName
 A short name of the region.
 
string regLName
 Region long name;.
 
int regLevel
 The level of the region. 1: country, 2: regions.
 
int parRegId
 Id of the parent region;.
 
bool isResidual
 A flag if this region should be explicitelly modelled or it is just a residual.
 
ModelRegionparRegion
 Pointer to the parent region.
 
vector< ModelRegion * > chRegions
 Vector of level-1 children regions.
 
vector< forData * > forDataVector
 Vector of pointers of forestry data (owned by ModelData)
 
vector< prodData * > prodDataVector
 Vector of pointers of product data (owned by ModelData)
 
vector< Pixel * > myPixels
 Vector of pixels for this region.
 

Additional Inherited Members

- Protected Attributes inherited from BaseClass
ThreadManagerMTHREAD
 Pointer to the Thread manager.
 

Detailed Description

Definition at line 45 of file ModelRegion.h.

Constructor & Destructor Documentation

◆ ModelRegion()

ModelRegion ( ThreadManager MTHREAD_h,
int  regId_h,
string  regSName_h,
string  regLName_h,
int  regLevel_h,
int  parRegId_h,
bool  isResidual_h 
)

Constructor.

The constructor of REGION instances want:

Parameters
MTHREAD_hPointer to the main thread manager

Definition at line 34 of file ModelRegion.cpp.

34 {
35 MTHREAD=MTHREAD_h;
36 regId = regId_h;
37 regSName = regSName_h;
38 regLName = regLName_h;
39 regLevel = regLevel_h;
40 parRegId = parRegId_h;
41 isResidual = isResidual_h;
42
43 // Create an empty vector of inventory bounds for each possible primary products combination
44 int nInBounds = pow(2,MTHREAD->MD->getStringVectorSetting("priProducts").size());
45 //int nInBounds = MTHREAD->MD->getStringVectorSetting("priProducts").size(); // TODO todo !Important
46 vector <double> inBounds(nInBounds,0.); // should have ceated a vector of size priProducts.size(), all filled with zeros
47 inResByAnyCombination = inBounds;
48 //inResByAnyCombination_deathTimber = inBounds;
49}
ThreadManager * MTHREAD
Pointer to the Thread manager.
Definition BaseClass.h:467
vector< string > getStringVectorSetting(const string &name_h, int reg=WORLD) const
string regSName
A short name of the region.
Definition ModelRegion.h:93
bool isResidual
A flag if this region should be explicitelly modelled or it is just a residual.
Definition ModelRegion.h:97
int regId
Regional unique ID.
Definition ModelRegion.h:92
int regLevel
The level of the region. 1: country, 2: regions.
Definition ModelRegion.h:95
string regLName
Region long name;.
Definition ModelRegion.h:94
vector< double > inResByAnyCombination
Vector of inventory resource for each possible combination of primary products. This store both alive...
Definition ModelRegion.h:88
int parRegId
Id of the parent region;.
Definition ModelRegion.h:96
ModelData * MD
the model data object
Here is the call graph for this function:

◆ ~ModelRegion()

Definition at line 51 of file ModelRegion.cpp.

51 {
52}

Member Function Documentation

◆ addForData()

void addForData ( forData *  data_h)
inline

Childrens are all the lvel-1 region that are parts of this region.

Definition at line 60 of file ModelRegion.h.

60{forDataVector.push_back(data_h);};
vector< forData * > forDataVector
Vector of pointers of forestry data (owned by ModelData)

◆ addProdData()

void addProdData ( prodData *  data_h)
inline

Definition at line 61 of file ModelRegion.h.

61{prodDataVector.push_back(data_h);};
vector< prodData * > prodDataVector
Vector of pointers of product data (owned by ModelData)

◆ getArea() [1/5]

double getArea ( )

Get whole forest area (from pixel->area matrix)

Definition at line 181 of file ModelRegion.cpp.

181 {
182 vector<Pixel*> regPx = this->getMyPixels();
183 double totalarea = 0.0;
184 for(uint i=0;i<myPixels.size(); i++){
185 totalarea += vSum(myPixels[i]->area);
186 }
187 return totalarea;
188}
int vSum(const vector< int > &vector_h) const
Definition BaseClass.h:276
vector< Pixel * > getMyPixels()
Definition ModelRegion.h:86
vector< Pixel * > myPixels
Vector of pixels for this region.

Referenced by getArea(), and getArea().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getArea() [2/5]

double getArea ( const int &  ft_pos)

Get area by ft position (from pixel->area matrix)

Definition at line 172 of file ModelRegion.cpp.

172 {
173 double totalarea = 0.0;
174 for(uint i=0;i<myPixels.size(); i++){
175 totalarea += vSum(myPixels[i]->area.at(ft_pos));
176 }
177 return totalarea;
178}
Here is the call graph for this function:

◆ getArea() [3/5]

double getArea ( const int &  ft_pos,
const int &  dc_pos 
)

Get area by ft and dc positions (from pixel->area matrix)

Definition at line 163 of file ModelRegion.cpp.

163 {
164 double totalarea = 0.0;
165 for(uint i=0;i<myPixels.size(); i++){
166 totalarea += myPixels[i]->area.at(ft_pos).at(dc_pos);
167 }
168 return totalarea;
169}

◆ getArea() [4/5]

double getArea ( const string &  fType_h)

Get area by ft (from pixel->area matrix)

Definition at line 149 of file ModelRegion.cpp.

149 {
150 vector <string> fTypes= MTHREAD->MD->getForTypeIds();
151 int ft_pos = -1000;
152 for(uint j=0;j<fTypes.size();j++){
153 if (fTypes[j] == fType_h){
154 ft_pos = j;
155 break;
156 }
157 }
158 if(ft_pos<0) msgOut(MSG_CRITICAL_ERROR,"Forest type "+fType_h+" not found in getArea() function.");
159 return getArea(ft_pos);
160}
@ MSG_CRITICAL_ERROR
Print an error message and stop the model.
Definition BaseClass.h:62
void msgOut(const int &msgCode_h, const string &msg_h, const bool &refreshGUI_h=true) const
Overloaded function to print the output log.
Definition BaseClass.cpp:50
vector< string > getForTypeIds(bool all=false)
By default it doesn't return forTypes used only as input.
double getArea()
Get whole forest area (from pixel->area matrix)
Here is the call graph for this function:

◆ getArea() [5/5]

double getArea ( const string &  fType_h,
const string &  dClass_h 
)

Get area by ft and dc (from pixel->area matrix)

Definition at line 125 of file ModelRegion.cpp.

125 {
126 vector <string> dClasses = MTHREAD->MD->getStringVectorSetting("dClasses");
127 vector <string> fTypes= MTHREAD->MD->getForTypeIds();
128 int ft_pos = -1000;
129 int dc_pos = -1000;
130 for(uint j=0;j<fTypes.size();j++){
131 if (fTypes[j] == fType_h){
132 ft_pos = j;
133 break;
134 }
135 }
136 for(uint u=0;u<dClasses.size();u++){
137 if (dClasses[u] == dClass_h){
138 dc_pos = u;
139 break;
140 }
141 }
142 if(ft_pos<0) msgOut(MSG_CRITICAL_ERROR,"Forest type "+fType_h+" not found in getArea() function.");
143 if(dc_pos<0) msgOut(MSG_CRITICAL_ERROR,"Diameter class"+dClass_h+" not found in getArea() function.");
144
145 return getArea(ft_pos, dc_pos);
146}

Referenced by ModelCoreSpatial::runManagementModule().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChildren()

vector< ModelRegion * > getChildren ( bool  excludeResidual = true)

Returns a pointer to the parent regions.

Return a vector of pointers to the direct child regions

Definition at line 55 of file ModelRegion.cpp.

55 {
56 if(excludeResidual){
57 vector<ModelRegion*> toReturn;
58 for(uint i=0;i<chRegions.size();i++){
59 if(!chRegions[i]->getIsResidual()){
60 toReturn.push_back(chRegions[i]);
61 }
62 }
63 return toReturn;
64 }
65 return chRegions;
66}
bool getIsResidual() const
Definition ModelRegion.h:71
vector< ModelRegion * > chRegions
Vector of level-1 children regions.
Definition ModelRegion.h:99

Referenced by ModelData::applyOverrides(), Output::commonInit(), Opt::get_nlp_info(), ModelData::getForData(), getNChildren(), ModelData::getProdData(), ModelData::getRegionIds(), ModelData::setForData(), and ModelData::setProdData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIsResidual()

bool getIsResidual ( ) const
inline

Definition at line 71 of file ModelRegion.h.

71{return isResidual;};

Referenced by getChildren().

Here is the caller graph for this function:

◆ getMyPixels()

◆ getNChildren()

int getNChildren ( bool  excludeResidual = true)

Definition at line 69 of file ModelRegion.cpp.

69 {
70 /*if(excludeResidual){
71 int toReturn = 0; // Bug found 20180927
72 for(uint i=0;i<chRegions.size();i++){
73 if(!chRegions[i]->getIsResidual()){
74 toReturn++;
75 }
76 }
77 return toReturn;
78 }
79 return chRegions.size();
80 */
81 return getChildren(excludeResidual).size();
82}
vector< ModelRegion * > getChildren(bool excludeResidual=true)
Returns a pointer to the parent regions.

Referenced by ModelData::applyOverrides(), ModelData::getForData(), ModelData::getProdData(), ModelData::setForData(), and ModelData::setProdData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParent()

ModelRegion * getParent ( )
inline

Definition at line 72 of file ModelRegion.h.

72{return parRegion;}; ///< Returns a pointer to the parent regions
ModelRegion * parRegion
Pointer to the parent region.
Definition ModelRegion.h:98

Referenced by Pixel::getMyRegion().

Here is the caller graph for this function:

◆ getParRegId()

int getParRegId ( ) const
inline

Definition at line 70 of file ModelRegion.h.

70{return parRegId;};

◆ getRegId()

int getRegId ( ) const
inline

Definition at line 66 of file ModelRegion.h.

66{return regId;};

Referenced by Pixel::getMultiplier(), and getSiblings().

Here is the caller graph for this function:

◆ getRegLevel()

int getRegLevel ( ) const
inline

Definition at line 69 of file ModelRegion.h.

69{return regLevel;};

◆ getRegLName()

string getRegLName ( ) const
inline

Definition at line 68 of file ModelRegion.h.

68{return regLName;};

◆ getRegSName()

string getRegSName ( ) const
inline

Definition at line 67 of file ModelRegion.h.

67{return regSName;};

Referenced by ModelData::regId2RegSName(), ModelData::regSName2RegId(), and ModelCoreSpatial::runBiologicalModule().

Here is the caller graph for this function:

◆ getSiblings()

vector< ModelRegion * > getSiblings ( bool  excludeResidual = true)

Return a vector of pointers to the siblings regions.

Definition at line 85 of file ModelRegion.cpp.

85 {
86 vector<ModelRegion*> toReturn;
87 vector<ModelRegion*> allRegions = MTHREAD->MD->getAllRegions(excludeResidual);
88 for (uint i=0;i<allRegions.size();i++){
89 if (allRegions[i]->parRegId == parRegId && allRegions[i]->getRegId() != regId){
90 toReturn.push_back(allRegions[i]);
91 }
92 }
93 return toReturn;
94}
vector< ModelRegion * > getAllRegions(bool excludeResidual=true)
int getRegId() const
Definition ModelRegion.h:66

Referenced by ModelCoreSpatial::computeEconomicBalances().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getValue()

double getValue ( string  layerName,
int  op = OP_SUM 
)

return the values of its own pixels for the specified layer. Possible operations: OP_SUM or OP_AVG

Definition at line 191 of file ModelRegion.cpp.

191 {
192 int nPx = myPixels.size();
193 double sumvalue=0;
194 for(uint i=0;i<nPx; i++){
195 sumvalue += myPixels[i]->getDoubleValue(layerName,true);
196 }
197 if(op==OP_SUM){
198 return sumvalue;
199 } else if (op == OP_AVG) {
200 return sumvalue/nPx;
201 } else {
202 string thisf = __PRETTY_FUNCTION__;
203 msgOut(MSG_CRITICAL_ERROR, "in "+thisf+", operation not supported");
204 }
205 return 0.;
206}
@ OP_SUM
Perform a SUM operation.
Definition BaseClass.h:77
@ OP_AVG
Perform an AVERAGE operation.
Definition BaseClass.h:78

Referenced by ModelCoreSpatial::initializePixelArea(), ModelCoreSpatial::initializePixelVolumes(), ModelCoreSpatial::runBiologicalModule(), and ModelCore::updateMapAreas().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVolumes() [1/3]

double getVolumes ( )
Todo:
Implement me (but really needed?)

Definition at line 104 of file ModelRegion.cpp.

104 {
105 /// \todo Implement me (but really needed?)
106 return 0;
107}

◆ getVolumes() [2/3]

vector< double > getVolumes ( int  fType_h)
Todo:
Implement me (but really needed?)

Definition at line 110 of file ModelRegion.cpp.

110 {
111 /// \todo Implement me (but really needed?)
112 vector<double> toReturn;
113 return toReturn;
114}

◆ getVolumes() [3/3]

vector< vector< double > > getVolumes ( int  fType_h,
string  dClass_h 
)
Todo:
Implement me (but really needed?)

Definition at line 117 of file ModelRegion.cpp.

117 {
118 /// \todo Implement me (but really needed?)
119 vector < vector <double> > toReturn;
120 return toReturn;
121}

◆ setChildren()

void setChildren ( vector< ModelRegion * >  children_h)
inline

Definition at line 59 of file ModelRegion.h.

59{chRegions = children_h;}; ///< Childrens are all the lvel-1 region that are parts of this region.

◆ setIsResidual()

void setIsResidual ( bool  isResidual_h)
inline

Definition at line 57 of file ModelRegion.h.

57{isResidual = isResidual_h;};

◆ setMyPixels()

void setMyPixels ( )

It sets a double link pixels <--> region.

Definition at line 215 of file ModelRegion.cpp.

215 {
216 int xyNPixels = MTHREAD->GIS->getXyNPixels();
217 for(uint i=0;i<xyNPixels;i++){
218 Pixel* px = MTHREAD->GIS->getPixel(i);
219 if(px->getDoubleValue("regLev_1")==regId || px->getDoubleValue("regLev_2")==regId){
220 myPixels.push_back(px);
221 if(regLevel == 2){
222 px->setMyRegion(this);
223 }
224 }
225 }
226}
double getXyNPixels() const
Return the number of pixels on Y.
Definition Gis.h:131
Pixel * getPixel(int x_h, int y_h)
Definition Gis.h:134
Pixel-level class.
Definition Pixel.h:47
void setMyRegion(ModelRegion *region_h)
Definition Pixel.h:90
double getDoubleValue(const string &layerName_h, const bool &returnZeroForNoValue=false) const
Return the value for a specific layer.
Definition Pixel.cpp:158
Gis * GIS
GIS information and methods.
Here is the call graph for this function:

◆ setParent()

void setParent ( ModelRegion parRegion_h)
inline

Definition at line 58 of file ModelRegion.h.

58{parRegion = parRegion_h;};

◆ setParRegId()

void setParRegId ( int  parRegId_h)
inline

Definition at line 56 of file ModelRegion.h.

56{parRegId = parRegId_h;};

◆ setRegId()

void setRegId ( int  regId_h)
inline

Definition at line 52 of file ModelRegion.h.

52{regId = regId_h;};

◆ setRegLevel()

void setRegLevel ( int  regLevel_h)
inline

Definition at line 55 of file ModelRegion.h.

55{regLevel = regLevel_h;};

◆ setRegLName()

void setRegLName ( string  regLName_h)
inline

Definition at line 54 of file ModelRegion.h.

54{regLName = regLName_h;};

◆ setRegSName()

void setRegSName ( string  regSName_h)
inline

Definition at line 53 of file ModelRegion.h.

53{regSName = regSName_h;};

◆ swap()

void swap ( const int &  swap_what)

Definition at line 229 of file ModelRegion.cpp.

229 {
230
231 for(uint i=0;i<myPixels.size();i++) {
232 myPixels[i]->swap(swap_what);
233 }
234
235}

Member Data Documentation

◆ chRegions

vector<ModelRegion*> chRegions
private

Vector of level-1 children regions.

Definition at line 99 of file ModelRegion.h.

Referenced by getChildren(), and setChildren().

◆ forDataVector

vector<forData*> forDataVector
private

Vector of pointers of forestry data (owned by ModelData)

Definition at line 100 of file ModelRegion.h.

Referenced by addForData().

◆ inResByAnyCombination

vector<double> inResByAnyCombination

Vector of inventory resource for each possible combination of primary products. This store both alive timber and death one.

Definition at line 88 of file ModelRegion.h.

Referenced by ModelCoreSpatial::computeInventary(), Opt::copyInventoryResourses(), ModelRegion(), and ModelCoreSpatial::runMarketModule().

◆ isResidual

bool isResidual
private

A flag if this region should be explicitelly modelled or it is just a residual.

Definition at line 97 of file ModelRegion.h.

Referenced by getIsResidual(), ModelRegion(), and setIsResidual().

◆ myPixels

vector<Pixel*> myPixels
private

Vector of pixels for this region.

Definition at line 102 of file ModelRegion.h.

Referenced by getArea(), getArea(), getArea(), getMyPixels(), getValue(), setMyPixels(), and swap().

◆ parRegId

int parRegId
private

Id of the parent region;.

Definition at line 96 of file ModelRegion.h.

Referenced by getParRegId(), getSiblings(), ModelRegion(), and setParRegId().

◆ parRegion

ModelRegion* parRegion
private

Pointer to the parent region.

Definition at line 98 of file ModelRegion.h.

Referenced by getParent(), and setParent().

◆ prodDataVector

vector<prodData*> prodDataVector
private

Vector of pointers of product data (owned by ModelData)

Definition at line 101 of file ModelRegion.h.

Referenced by addProdData().

◆ regId

int regId
private

Regional unique ID.

Definition at line 92 of file ModelRegion.h.

Referenced by getRegId(), getSiblings(), ModelRegion(), setMyPixels(), and setRegId().

◆ regLevel

int regLevel
private

The level of the region. 1: country, 2: regions.

Definition at line 95 of file ModelRegion.h.

Referenced by getRegLevel(), ModelRegion(), setMyPixels(), and setRegLevel().

◆ regLName

string regLName
private

Region long name;.

Definition at line 94 of file ModelRegion.h.

Referenced by getRegLName(), ModelRegion(), and setRegLName().

◆ regSName

string regSName
private

A short name of the region.

Definition at line 93 of file ModelRegion.h.

Referenced by getRegSName(), ModelRegion(), and setRegSName().


The documentation for this class was generated from the following files: