|
FFSM++ 1.1.0
French Forest Sector Model ++
|
#include <Opt.h>


Public Member Functions | |
| Opt (ThreadManager *MTHREAD_h) | |
| Constructor. | |
| ~Opt () | |
Overloaded from TNLP | |
| virtual bool | get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style) |
| virtual bool | get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) |
| virtual bool | get_starting_point (Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda) |
| template<class T > | |
| bool | eval_obj (Index n, const T *x, T &obj_value) |
| template<class T > | |
| bool | eval_constraints (Index n, const T *x, Index m, T *g) |
| virtual bool | eval_f (Index n, const Number *x, bool new_x, Number &obj_value) |
| virtual bool | eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f) |
| virtual bool | eval_g (Index n, const Number *x, bool new_x, Index m, Number *g) |
| virtual bool | eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) |
| virtual bool | eval_h (Index n, const Number *x, bool new_x, Number obj_factor, Index m, const Number *lambda, bool new_lambda, Index nele_hess, Index *iRow, Index *jCol, Number *values) |
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 > | |
| 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 > | |
| 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. | |
| 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 > | |
| 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 > | |
| 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 > | |
| 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 |
Solution Methods | |
| vector< string > | priPr |
| vector< string > | secPr |
| vector< string > | allPr |
| vector< string > | othPr |
| vector< vector< int > > | l2r |
| vector< vector< int > > | priPrCombs |
| A vector with all the possible combinations of primary products. | |
| vector< vector< vector< double > > > | ins |
| A copy of the inventoried resourses by region and primary product combination. It works also with dynamic loading of the region and the in, but it may be slower. | |
| map< string, int > | initPos |
| A map that returns the initial index position in the concatenated array for each variable. | |
| map< int, string > | initPos_rev |
| A map with the name of the variable keyed by its initial position in the index. | |
| vector< int > | cInitPos |
| A vector that returns the initial index position in the concatenated array for each constrain. | |
| map< string, endvar > | vars |
| List of variables in the model and their domain: pr product, sec prod, all products or all products over each subregion pair (exports) | |
| map< string, vector< vector< vector< vector< int > > > > > | vpositions |
| cached position in the concatenated vector for each variables. Dimensions are l1reg, l2reg, prod, (l2To region). | |
| vector< vector< vector< vector< vector< int > > > > > | cpositions |
| cached position in the concatenated vector for each variables. Dimensions are contrain number, l1reg, l2reg, prod, (l2To region). | |
| int | nPriPr |
| int | nOthPr |
| int | nPriPrCombs |
| int | nSecPr |
| int | nAllPr |
| int | nL2r |
| int | nVar |
| int | nCons |
| int | nEqualityConstrains |
| int | nLowerEqualZeroConstrains |
| int | nGreaterEqualZeroConstrains |
| int | previousYear |
| int | firstYear |
| int | secondYear |
| int | worldCodeLev2 |
| bool | debugRunOnce |
| double | overharvestingAllowance |
| Allows to harvest more than the resources available. Useful when resources got completelly exausted and the model refuses to solve. | |
| bool | initOpt |
| vector< constrain > | cons |
| vector< vector< Index > > | nzjelements |
| nzero elements for the jacobian matrix. nzelements[i][0] -> row (constrain), nzelements[i][1] -> column (variable) | |
| vector< vector< Index > > | nzhelements |
| nzero elements for the hessian matrix | |
| virtual void | finalize_solution (SolverReturn status, Index n, const Number *x, const Number *z_L, const Number *z_U, Index m, const Number *g, const Number *lambda, Number obj_value, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) |
| virtual bool | intermediate_callback (AlgorithmMode mode, Index iter, Number obj_value, Number inf_pr, Number inf_du, Number mu, Number d_norm, Number regularization_size, Number alpha_du, Number alpha_pr, Index ls_trials, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) |
| virtual void | generate_tapes (Index n, Index m, Index &nnz_jac_g, Index &nnz_h_lag) |
| void | declareVariables () |
| declare the variables, their domains and their bounds | |
| void | declareVariable (const string &name, const int &domain, const string &desc="", const double &l_bound=0.0, const double &u_bound=UBOUND_MAX, const string &l_bound_var="", const string &u_bound_var="") |
| Declare a single variable, its domain and its bounds. | |
| void | declareConstrains () |
| declare the constrains, their domain, their direction and their associated evaluation function | |
| void | cacheInitialPosition () |
| cache the initial positions of the variables and the constrains | |
| void | calculateNumberVariablesConstrains () |
| calculate the number of variables and constrains | |
| void | cachePositions () |
| cache the exact position index (initial+f(r1,r2,p,r2To) for each variable and constrain | |
| int | getDomainElements (int domain) |
| return the number of elements of a domain | |
| template<class T > | |
| vector< vector< vector< vector< int > > > > | buildPositionVector (const T &v_or_c, int dType) |
| build the matrix of the positions for a given variable or contrain | |
| int | getVarInstances (const string &varName) |
| build the matrix of the positions for a given variable or contrain | |
| void | calculateSparsityPatternJ () |
| void | calculateSparsityPatternH () |
| const Number & | mymax (const Number &a, const Number &b) |
| const adouble & | mymax (const adouble &a, const adouble &b) |
| const double | gpd (const string &type_h, const int ®Id_h, const string &prodId_h, const int &year=DATA_NOW, const string &freeDim_h="") const |
| const double | gfd (const string &type_h, const int ®Id_h, const string &forType_h, const string &diamClass_h, const int &year=DATA_NOW) const |
| void | spd (const double &value_h, const string &type_h, const int ®Id_h, const string &prodId_h, const int &year=DATA_NOW, const bool &allowCreate=false, const string &freeDim_h="") const |
| void | sfd (const double &value_h, const string &type_h, const int ®Id_h, const string &forType_h, const string &diamClass_h, const int &year=DATA_NOW, const bool &allowCreate=false) const |
| bool | app (const string &prod_h, const string &forType_h, const string &dClass_h) const |
| const int | gip (const string &varName) const |
| Get the initial index position of a given variable in the concatenated array. | |
| const int | gip (const int &cn) const |
| Return the initial index position of a certain constrain. | |
| template<class T > | |
| const int | gix_uncached (const T &v_or_c, int r1Ix, int r2Ix, int prIx, int r2IxTo=0) |
| Get the index in the concatenated array gived a certain var name (string) or constrain index (int), the reg lev1 index, the reg lev2 index and the prod. index. | |
| const int | gix (const string &varName, const int &r1Ix, const int &r2Ix, const int &prIx, const int &r2IxTo=0) const |
| Get the index in the concatenated array gived a certain var name, the reg lev1 index, the reg lev2 index and the prod. index. | |
| const int | gix (const int &cn, const int &r1Ix, const int &r2Ix, const int &prIx, const int &r2IxTo=0) const |
| Get the index in the concatenated array gived a certain constrain, the reg lev1 index, the reg lev2 index and the prod. index. | |
| const int | gdt (const string &varName) |
| Get the domain type of a given variable. | |
| const int | gdt (const int &cn) |
| Get the domain type of a given constrain. | |
| int | getConstrainDirectionByIndex (int idx) |
| Return the direction of a given constrain. | |
| double | getBoundByIndex (const int &bound_type, const int &idx) |
| Return the bound of a given variable (by index) | |
| double | getDetailedBoundByVarAndIndex (const endvar &var, const int &idx, const int &bType) |
| Return the bound of a given variable given the variable and the required index. Called by getBoundByIndex(). | |
| constrain * | getConstrainByIndex (int idx) |
| void | unpack (int ix_h, int domain, int initial, int &r1_h, int &r2_h, int &p_h, int &r2to_h, bool fullp=false) |
| Return the dimensions given a certain index, domain type and initial position. | |
| int | getConNumber (constrain *con) |
| Return the position in the cons vector. | |
| void | copyInventoryResourses () |
| Copy the inventoried resources in the in vector for better performances. | |
| void | tempDebug () |
| void | debugPrintParameters () |
Methods to block default compiler methods. | |
The compiler automatically generates the following three methods. Since the default compiler implementation is generally not what you want (for all but the most simple classes), we usually put the declarations of these methods in the private section and never implement them. This prevents the compiler from implementing an incorrect "default" behavior without us knowing. (See Scott Meyers book, "Effective C++") | |
| double * | x_lam |
| unsigned int ** | HP_t |
| unsigned int * | rind_g |
| unsigned int * | cind_g |
| double * | jacval |
| unsigned int * | rind_L |
| unsigned int * | cind_L |
| unsigned int * | rind_L_total |
| unsigned int * | cind_L_total |
| double * | hessval |
| int | nnz_jac |
| int | nnz_L |
| int | nnz_L_total |
| int | options_g [4] |
| int | options_L [4] |
| Opt (const Opt &) | |
| Opt & | operator= (const Opt &) |
Additional Inherited Members | |
Protected Attributes inherited from BaseClass | |
| ThreadManager * | MTHREAD |
| Pointer to the Thread manager. | |
| Opt | ( | ThreadManager * | MTHREAD_h | ) |
|
inlineprotected |
Definition at line 172 of file Opt.h.

| vector< vector< vector< vector< int > > > > buildPositionVector | ( | const T & | v_or_c, |
| int | dType | ||
| ) |
build the matrix of the positions for a given variable or contrain
Definition at line 1401 of file Opt.cpp.
Referenced by cachePositions().


| void cacheInitialPosition | ( | ) |
cache the initial positions of the variables and the constrains
Definition at line 1370 of file Opt.cpp.
Referenced by get_nlp_info().


| void cachePositions | ( | ) |
cache the exact position index (initial+f(r1,r2,p,r2To) for each variable and constrain
Definition at line 1386 of file Opt.cpp.
Referenced by get_nlp_info().


| void calculateNumberVariablesConstrains | ( | ) |
calculate the number of variables and constrains
Definition at line 1455 of file Opt.cpp.
Referenced by get_nlp_info().


| void calculateSparsityPatternH | ( | ) |
Definition at line 1708 of file Opt.cpp.
| void calculateSparsityPatternJ | ( | ) |
Definition at line 1680 of file Opt.cpp.
|
protected |
Copy the inventoried resources in the in vector for better performances.
Opt::createCombinationsVector Return a vector containing any possible combination of nItems items (including all subsets).
For example with nItems = 3: 0: []; 1: [0]; 2: [1]; 3: [0,1]; 4: [2]; 5: [0,2]; 6: [1,2]; 7: [0,1,2]
| nItems | number of items to create p |
Definition at line 1845 of file Opt.cpp.
Referenced by get_nlp_info().


|
protected |
| void declareConstrains | ( | ) |
declare the constrains, their domain, their direction and their associated evaluation function
Declare the constrains and their properties. For the domain type
Definition at line 84 of file Opt.cpp.
Referenced by get_nlp_info().

| void declareVariable | ( | const string & | name, |
| const int & | domain, | ||
| const string & | desc = "", |
||
| const double & | l_bound = 0.0, |
||
| const double & | u_bound = UBOUND_MAX, |
||
| const string & | l_bound_var = "", |
||
| const string & | u_bound_var = "" |
||
| ) |
Declare a single variable, its domain and its bounds.
Opt::declareVariable Define a single variable together with its domain and optionally its lower and upper bound (default 0.0, +inf)
| name | var name |
| domain | domain of the variable |
| l_bound | lower bound (fixed) |
| u_bound | upper bound (fixed) |
| l_bound_var | variable name defining lower bound |
| u_bound_var | variable name defining upper bound |
Definition at line 1791 of file Opt.cpp.
Referenced by declareVariables().

| void declareVariables | ( | ) |
declare the variables, their domains and their bounds
Definition at line 59 of file Opt.cpp.
Referenced by get_nlp_info().


| bool eval_constraints | ( | Index | n, |
| const T * | x, | ||
| Index | m, | ||
| T * | g | ||
| ) |
Template to compute contraints
Template function to implement (define) the previously declared constains. To the initial macro loop it must be passed the product vector over where to loop (priPr, secPr or allPr) and the order of the constrain has it has been added to the const vector. It could be possible to change this in a map and uses name, but then we would loose control on the constrains order, and we saw that it matters for finding the equilibrium.
Definition at line 311 of file Opt.cpp.
Referenced by eval_g(), and generate_tapes().


|
virtual |
|
virtual |
Original method from Ipopt to return the constraint residuals remains unchanged
Definition at line 837 of file Opt.cpp.

|
virtual |
|
virtual |
Original method from Ipopt to return: 1) The structure of the hessian of the lagrangian (if "values" is NULL) 2) The values of the hessian of the lagrangian (if "values" is not NULL) remains unchanged
Definition at line 871 of file Opt.cpp.
|
virtual |
Original method from Ipopt to return: 1) The structure of the jacobian (if "values" is NULL) 2) The values of the jacobian (if "values" is not NULL) remains unchanged
Definition at line 845 of file Opt.cpp.
| bool eval_obj | ( | Index | n, |
| const T * | x, | ||
| T & | obj_value | ||
| ) |
Template to return the objective value
Define the objective function
Definition at line 220 of file Opt.cpp.
Referenced by eval_f(), and generate_tapes().


|
virtual |
This method is called when the algorithm is complete so the TNLP can store/write the solution
Definition at line 732 of file Opt.cpp.

|
protected |
|
protected |
Get the domain type of a given variable.
Definition at line 1292 of file Opt.cpp.
Referenced by getVarInstances(), and gix_uncached().


|
virtual |
Method to generate the required tapes
Copied from http://bocop.org/
test avec "<=" (avant on avait "<" : bug, acces memoire non allouee)
valgrind : invalid read
test avec "<=" (pour etre coherent avec la remarque ci dessus, mais pas de cas test, a verifier)
test
test
Definition at line 918 of file Opt.cpp.
Referenced by get_nlp_info().


|
virtual |
Method to return the bounds for my problem
Definition at line 634 of file Opt.cpp.

|
virtual |
Method to return some info about the nlp
Definition at line 551 of file Opt.cpp.

|
virtual |
Method to return the starting point for the algorithm
Definition at line 664 of file Opt.cpp.
Referenced by generate_tapes().


|
protected |
Return the bound of a given variable (by index)
Definition at line 1538 of file Opt.cpp.
Referenced by get_bounds_info().


|
protected |
|
protected |
Definition at line 1592 of file Opt.cpp.

|
protected |
Return the direction of a given constrain.
Definition at line 1522 of file Opt.cpp.
Referenced by get_bounds_info().


|
protected |
Return the bound of a given variable given the variable and the required index. Called by getBoundByIndex().
Definition at line 1569 of file Opt.cpp.
Referenced by getBoundByIndex().


| int getDomainElements | ( | int | domain | ) |
return the number of elements of a domain
Definition at line 1488 of file Opt.cpp.
Referenced by cacheInitialPosition(), calculateNumberVariablesConstrains(), and getVarInstances().


| int getVarInstances | ( | const string & | varName | ) |
build the matrix of the positions for a given variable or contrain
return the number of instances of a variable, given his domain type
Definition at line 1768 of file Opt.cpp.

|
inlineprotected |
Definition at line 169 of file Opt.h.

|
protected |
|
protected |
Get the initial index position of a given variable in the concatenated array.
Definition at line 1274 of file Opt.cpp.
Referenced by getConstrainByIndex(), getConstrainDirectionByIndex(), getDetailedBoundByVarAndIndex(), and gix_uncached().


|
protected |
Get the index in the concatenated array gived a certain constrain, the reg lev1 index, the reg lev2 index and the prod. index.
|
protected |
Get the index in the concatenated array gived a certain var name, the reg lev1 index, the reg lev2 index and the prod. index.
Definition at line 1351 of file Opt.cpp.
Referenced by eval_constraints(), eval_obj(), finalize_solution(), and get_starting_point().


|
protected |
Get the index in the concatenated array gived a certain var name (string) or constrain index (int), the reg lev1 index, the reg lev2 index and the prod. index.
Definition at line 1310 of file Opt.cpp.
Referenced by buildPositionVector().


|
inlineprotected |
Definition at line 168 of file Opt.h.
Referenced by eval_constraints(), eval_obj(), get_starting_point(), and getDetailedBoundByVarAndIndex().


|
virtual |
| const adouble & mymax | ( | const adouble & | a, |
| const adouble & | b | ||
| ) |
| const Number & mymax | ( | const Number & | a, |
| const Number & | b | ||
| ) |
Definition at line 1749 of file Opt.cpp.
Referenced by eval_obj().

|
inlineprotected |
Definition at line 171 of file Opt.h.

|
inlineprotected |
Definition at line 170 of file Opt.h.
Referenced by finalize_solution().


|
protected |
|
protected |
Return the dimensions given a certain index, domain type and initial position.
Definition at line 1609 of file Opt.cpp.
Referenced by getDetailedBoundByVarAndIndex().


|
protected |
Definition at line 195 of file Opt.h.
Referenced by buildPositionVector(), eval_constraints(), eval_obj(), finalize_solution(), get_nlp_info(), get_starting_point(), and getDetailedBoundByVarAndIndex().
|
protected |
Definition at line 253 of file Opt.h.
Referenced by eval_jac_g(), finalize_solution(), and generate_tapes().
|
protected |
Definition at line 256 of file Opt.h.
Referenced by eval_h(), finalize_solution(), and generate_tapes().
|
protected |
Definition at line 258 of file Opt.h.
Referenced by eval_h(), finalize_solution(), and generate_tapes().
|
protected |
A vector that returns the initial index position in the concatenated array for each constrain.
Definition at line 202 of file Opt.h.
Referenced by cacheInitialPosition(), and gip().
|
protected |
Definition at line 225 of file Opt.h.
Referenced by cacheInitialPosition(), cachePositions(), calculateNumberVariablesConstrains(), declareConstrains(), gdt(), getConNumber(), getConstrainByIndex(), and getConstrainDirectionByIndex().
|
protected |
cached position in the concatenated vector for each variables. Dimensions are contrain number, l1reg, l2reg, prod, (l2To region).
Definition at line 205 of file Opt.h.
Referenced by cachePositions(), and gix().
|
protected |
Definition at line 218 of file Opt.h.
Referenced by get_nlp_info().
|
protected |
Definition at line 259 of file Opt.h.
Referenced by eval_h(), finalize_solution(), and generate_tapes().
|
protected |
Definition at line 251 of file Opt.h.
Referenced by finalize_solution(), and generate_tapes().
|
protected |
Definition at line 224 of file Opt.h.
Referenced by get_nlp_info(), and Opt().
|
protected |
A map that returns the initial index position in the concatenated array for each variable.
Definition at line 200 of file Opt.h.
Referenced by cacheInitialPosition(), and gip().
|
protected |
A map with the name of the variable keyed by its initial position in the index.
Definition at line 201 of file Opt.h.
Referenced by cacheInitialPosition(), and getBoundByIndex().
|
protected |
A copy of the inventoried resourses by region and primary product combination. It works also with dynamic loading of the region and the in, but it may be slower.
Definition at line 199 of file Opt.h.
Referenced by copyInventoryResourses(), and eval_constraints().
|
protected |
Definition at line 254 of file Opt.h.
Referenced by eval_jac_g(), finalize_solution(), and generate_tapes().
|
protected |
Definition at line 197 of file Opt.h.
Referenced by buildPositionVector(), copyInventoryResourses(), eval_constraints(), eval_obj(), finalize_solution(), get_nlp_info(), get_starting_point(), getDetailedBoundByVarAndIndex(), getDomainElements(), gix_uncached(), and unpack().
|
protected |
Definition at line 210 of file Opt.h.
Referenced by get_nlp_info(), getDomainElements(), gix_uncached(), and unpack().
|
protected |
Definition at line 213 of file Opt.h.
Referenced by calculateNumberVariablesConstrains(), calculateSparsityPatternH(), calculateSparsityPatternJ(), get_nlp_info(), getConstrainByIndex(), getConstrainDirectionByIndex(), Opt(), and tempDebug().
|
protected |
Definition at line 214 of file Opt.h.
Referenced by calculateNumberVariablesConstrains().
|
protected |
Definition at line 216 of file Opt.h.
Referenced by calculateNumberVariablesConstrains().
|
protected |
Definition at line 211 of file Opt.h.
Referenced by get_nlp_info(), and getDomainElements().
|
protected |
Definition at line 215 of file Opt.h.
Referenced by calculateNumberVariablesConstrains().
|
protected |
Definition at line 260 of file Opt.h.
Referenced by eval_jac_g(), and generate_tapes().
|
protected |
Definition at line 261 of file Opt.h.
Referenced by eval_h(), and generate_tapes().
|
protected |
Definition at line 261 of file Opt.h.
Referenced by eval_h(), and generate_tapes().
|
protected |
Definition at line 207 of file Opt.h.
Referenced by get_nlp_info().
|
protected |
Definition at line 206 of file Opt.h.
Referenced by eval_constraints(), eval_obj(), get_nlp_info(), getDomainElements(), gix_uncached(), and unpack().
|
protected |
Definition at line 208 of file Opt.h.
Referenced by get_nlp_info(), getDomainElements(), and gix_uncached().
|
protected |
Definition at line 209 of file Opt.h.
Referenced by get_nlp_info(), getDomainElements(), gix_uncached(), and unpack().
|
protected |
Definition at line 212 of file Opt.h.
Referenced by calculateNumberVariablesConstrains(), calculateSparsityPatternH(), calculateSparsityPatternJ(), get_nlp_info(), Opt(), and tempDebug().
|
protected |
nzero elements for the hessian matrix
Definition at line 227 of file Opt.h.
Referenced by calculateSparsityPatternH(), and tempDebug().
|
protected |
nzero elements for the jacobian matrix. nzelements[i][0] -> row (constrain), nzelements[i][1] -> column (variable)
Definition at line 226 of file Opt.h.
Referenced by calculateSparsityPatternJ().
|
protected |
Definition at line 262 of file Opt.h.
Referenced by eval_jac_g(), and generate_tapes().
|
protected |
Definition at line 263 of file Opt.h.
Referenced by eval_h(), and generate_tapes().
|
protected |
Definition at line 196 of file Opt.h.
Referenced by eval_constraints(), and get_nlp_info().
|
protected |
Allows to harvest more than the resources available. Useful when resources got completelly exausted and the model refuses to solve.
Definition at line 222 of file Opt.h.
Referenced by eval_constraints(), and get_nlp_info().
|
protected |
Definition at line 217 of file Opt.h.
Referenced by eval_constraints(), get_nlp_info(), and get_starting_point().
|
protected |
Definition at line 193 of file Opt.h.
Referenced by buildPositionVector(), eval_constraints(), eval_obj(), finalize_solution(), get_nlp_info(), and get_starting_point().
|
protected |
A vector with all the possible combinations of primary products.
Definition at line 198 of file Opt.h.
Referenced by buildPositionVector(), copyInventoryResourses(), eval_constraints(), and get_nlp_info().
|
protected |
Definition at line 252 of file Opt.h.
Referenced by eval_jac_g(), finalize_solution(), and generate_tapes().
|
protected |
Definition at line 255 of file Opt.h.
Referenced by eval_h(), finalize_solution(), and generate_tapes().
|
protected |
Definition at line 257 of file Opt.h.
Referenced by eval_h(), finalize_solution(), and generate_tapes().
|
protected |
Definition at line 219 of file Opt.h.
Referenced by eval_obj(), and get_nlp_info().
|
protected |
Definition at line 194 of file Opt.h.
Referenced by buildPositionVector(), eval_constraints(), eval_obj(), finalize_solution(), get_nlp_info(), and get_starting_point().
|
protected |
List of variables in the model and their domain: pr product, sec prod, all products or all products over each subregion pair (exports)
Definition at line 203 of file Opt.h.
Referenced by cacheInitialPosition(), cachePositions(), calculateNumberVariablesConstrains(), declareVariable(), finalize_solution(), gdt(), get_starting_point(), and getBoundByIndex().
|
protected |
cached position in the concatenated vector for each variables. Dimensions are l1reg, l2reg, prod, (l2To region).
Definition at line 204 of file Opt.h.
Referenced by cachePositions(), and gix().
|
protected |
Definition at line 220 of file Opt.h.
Referenced by eval_constraints(), and get_nlp_info().
|
protected |
Definition at line 248 of file Opt.h.
Referenced by eval_h(), finalize_solution(), and generate_tapes().