XPRBsetdictionarysize


Purpose
Set the size of a dictionary.
Synopsis
int XPRBsetdictionarysize(XPRBprob prob, int dict, int size)
Arguments
prob 
Reference to a problem.
dict 
Choice of the dictionary. Possible values:
XPRB_DICT_NAMES 
names dictionary
XPRB_DICT_IDX 
indices dictionary
size 
Non-negative value, preferrably a prime number; 0 disables the dictionary (for names dictionary only).
Return value
0 if function executed successfully, 1 otherwise.
Example
Switch off the names dictionary:
XPRBprob expl2;
expl2 = XPRBnewprob("example2");
XPRBsetdictsize(expl2, XPRB_DICT_NAMES, 0);
Further information
This function sets the size of the hash table of the names or indices dictionaries (defaults: names 2999, indices 1009) of the given problem. It can only be called immediately after the creation of the corresponding problem. The names dictionary serves for storing and accessing the names of all modeling objects (variables, arrays of variables, constraints, SOS, index sets), the indices dictionary for all index set elements. Once the names dictionary has been disabled it cannot be enabled any more. All methods relative to the names cannot be used if this dictionary has been disabled. The indices dictionary cannot be disabled, it is created automatically once an index set element is defined.
Related topics
XPRBnewprob, XPRBgetbyname.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.