XPRSgetindex
PurposeSynopsisint XPRS_CC XPRSgetindex(XPRSprob prob, int type, const char *name, int *seq);
Arguments
prob The current problem. type
1 if a row index is required; 2 if a column index is required. name String of length MPSNAMELENGTH (plus a null terminator) holding the name of the row or column. seq Pointer of the integer where the row or column index number will be returned. A value of -1 will be returned if the row or column does not exist.Related ControlsInteger
Maximum name length in characters.
ExampleThe following example loads problem and checks to see if "n 0203" is the name of a row or column:int seqr, seqc; ... XPRSreadprob(prob,"problem",""); XPRSgetindex(prob,1,"n 0203", &seqr); XPRSgetindex(prob,2,"n 0203", &seqc); if(seqr==-1 && seqc ==-1) printf("n 0203 not there\n"); if(seqr!= -1) printf("n 0203 is row %d\n",seqr); if(seqc!= -1) printf"n 0203 is column %d\n",seqc);Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.