#include <ProblemDescription.h>
Collaboration diagram for ProblemDescription:
Public Member Functions | |
Description data query functions | |
int | getNumOfNonzeroCols () |
int | getNumOfNonzeroRows () |
int | getIndexOfCapacity (CapacityType type) |
int | getIndexOfCapacity (CapacityType type, const int arrayIndex) |
int | getNumOfIrrigationActivities () |
int | getNumOfIrrigationGroups () |
infoPerf | getCashOnFarm () |
infoPerf | getCashOffFarm () |
infoPerf | getHiringTempLaborOnFarm () |
infoPerf | getHiringTempLaborOffFarm () |
infoPerf | getHiringPermanentLaborOnFarm () |
infoPerf | getHiringPermanentLaborOffFarm () |
int | getNumOfLaborSpans () |
int | getNumOfCashSpans () |
int | getFixedBinaryLabor () |
int | getIndexOfActivity (ActivityType type) |
int | getIndexOfActivity (ActivityType type, const int arrayIndex) |
int | getNumOfFixedVariablesConsumption () |
const int * | getFixedVariablesConsumption () const |
int | getNumOfFixedCapacities () |
int | getNumOfFineTuneParameter () |
const infoFine * | getFineTuneParameters () const |
infoTSPC | getInfoOnActivityCropTSPC (int x, int y) |
infoResi | getInfoOnActivityCropResiduals (int arrayIndex) |
int | getNumOfHydrologyCroppingActivities () |
InfoHydro | getInfoOnActivityCropHydrology (int arrayIndex) |
Description parameter query functions | |
bool | getTestFlag () |
double | getTolearance () |
Description parameter modification functions | |
virtual void | setTestFlag (bool test) |
virtual void | setTolerance (double eps_) |
reading and writing fieles | |
virtual int | read (FILE *datStream, const AgentProblem &agentProblemObject) |
read in the whole ProblemDescription data from an Excel style file | |
virtual int | write (FILE *datStream) |
write problem description to file. | |
Constructors and Desturctors | |
ProblemDescription () | |
Standard constructor. | |
virtual | ~ProblemDescription () |
TODO 3 -oGoehring -cImplement : default copy constructorTODO 3 -oGoehring -cImplement : default assignment operatorDestructor. | |
Private Member Functions | |
Private methods | |
virtual int | writeInfoOnActivityCropTSPC (char *filename) |
writes actTSPC to file with given filename | |
virtual void | writeHydroInfoInFile (char *filename) |
void | gutsOfConstructor () |
real work of constructor | |
void | gutsOfDestructor () |
real work of destructor | |
template<class Type> | |
int | allocateVector (Type *&pointertovector, long int sizeofvector) |
allocates memory for an array of type Type with size sizefovector and checks if size is positive | |
Private Attributes | |
Desription data | |
int | nncols |
number of nonzero columns | |
int | nnrows |
number of nonzero rows | |
double | pfill |
percentage of nonzeros in MatrixDouble | |
int | capLab |
row index labor capacity | |
int | capLiq |
row index liquidity capacity | |
int * | capInv |
row indices for investments in different soil classes | |
int | capWat |
row index of first water capacity | |
int | numIrrActiv |
Number of irrigation activities (old:anzahlBV). | |
int | numIrrGroups |
Number of irrigation groups (old:anzahlGr). | |
int | capLnd |
index of first soil type capacity | |
int | capCsh |
index of average capital capacity | |
int | capAvl |
index of average labor capacity | |
int | capMac |
index of average machinery capacity of permanent cultures | |
int | actSvg |
Savings activity (LP column). | |
int | actExt |
Extra consumption activity (LP column). | |
infoPerf | cashOnf |
info on cash on-farm (=short-term credit) | |
infoPerf | cashOff |
info on cash off-farm (=short-term deposit) | |
infoPerf | tLabOnf |
info on hiring in temporary labor | |
infoPerf | tLabOff |
info on hiring out temporary labor | |
infoPerf | pLabOnf |
info on hiring in permanent labor | |
infoPerf | pLabOff |
info on hiring out permanent labor | |
int | labSpans |
number of labor spans | |
int | cshSpans |
number of cash spans | |
int | fixLabor |
fix binary labor (yes/no) | |
int | actFemaY |
activity index for female adult labor (yes) | |
int | actFemaN |
activity index for female adult labor (no) | |
int | actMaleY |
activity index for male adult labor (yes) | |
int | actMaleN |
activity index for male adult labor (no) | |
int | numFixCaps |
Number of fixed (= agent independent ) LP Capacities (old:anzahlK). | |
int | disBinC |
activity index of binary disinvestment activity | |
int | disBinR |
capacity index of first asset in binary disinvestment activity | |
int | ntrDmdR |
capacity index of first food nutrient demand | |
int | numFixV |
number of variables to be fixed in consumption model | |
int * | fixCols |
activity indices of fixed variable in consumption model | |
int | numFine |
number of fine-tuning parameters | |
infoFine * | actFine |
pointer to MILP fine-tuning information | |
infoTSPC ** | actTSPC |
pointer to crop information used in TSPC model (TSPC cropping activities) | |
infoResi * | actResi |
pointer to stover information (crop residuals) | |
int | colManu |
manure accounting activity (LP column) | |
int | numHydro |
InfoHydro * | actHydro |
Parameters | |
double | eps |
Tolerance. | |
int | test |
Test flag. |
This class contains data wich is supposed to override the data of the MIP which is hold by the MipHandler as specific AgentProblem's. In particular information about the Hydrology is contained.
|
Standard constructor.
|
|
TODO 3 -oGoehring -cImplement : default copy constructorTODO 3 -oGoehring -cImplement : default assignment operatorDestructor.
|
|
allocates memory for an array of type Type with size sizefovector and checks if size is positive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns the capacity chosen with type (cf. enum CapacityType) and 0 on failure |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
real work of constructor
|
|
real work of destructor
|
|
read in the whole ProblemDescription data from an Excel style file
|
|
|
|
|
|
write problem description to file. A complete .dat file is produced when first the Agent Problem part (=mtx) is written and then ProblemDescription::write() is called. C.f. MipHandler::writeDat() TODO:(i) implement write InfoHydro part (ii) test this function!!! |
|
|
|
writes actTSPC to file with given filename
|
|
Extra consumption activity (LP column).
|
|
activity index for female adult labor (no)
|
|
activity index for female adult labor (yes)
|
|
pointer to MILP fine-tuning information
|
|
READ FROM FILE: numHydro dimensions: (1 X numHydro) |
|
activity index for male adult labor (no)
|
|
activity index for male adult labor (yes)
|
|
pointer to stover information (crop residuals)
|
|
Savings activity (LP column).
|
|
pointer to crop information used in TSPC model (TSPC cropping activities) dimensions: (soilsp->getNumCropA() X soilsp->getNumCropA()) |
|
index of average labor capacity
|
|
index of average capital capacity
|
|
row indices for investments in different soil classes
|
|
row index labor capacity
|
|
row index liquidity capacity
|
|
index of first soil type capacity
|
|
index of average machinery capacity of permanent cultures
|
|
row index of first water capacity
|
|
info on cash off-farm (=short-term deposit)
|
|
info on cash on-farm (=short-term credit)
|
|
manure accounting activity (LP column)
|
|
number of cash spans
|
|
activity index of binary disinvestment activity
|
|
capacity index of first asset in binary disinvestment activity
|
|
Tolerance.
|
|
activity indices of fixed variable in consumption model
|
|
fix binary labor (yes/no)
|
|
number of labor spans
|
|
number of nonzero columns
|
|
number of nonzero rows
|
|
capacity index of first food nutrient demand
|
|
number of fine-tuning parameters
|
|
Number of fixed (= agent independent ) LP Capacities (old:anzahlK).
|
|
number of variables to be fixed in consumption model
|
|
|
|
Number of irrigation activities (old:anzahlBV).
|
|
Number of irrigation groups (old:anzahlGr).
|
|
percentage of nonzeros in MatrixDouble
|
|
info on hiring out permanent labor
|
|
info on hiring in permanent labor
|
|
Test flag.
|
|
info on hiring out temporary labor
|
|
info on hiring in temporary labor
|