Purpose
Returns the column types for the
columns in a given range.
Synopsis
int XPRS_CC XPRSgetcoltype(XPRSprob prob, char coltype[], int first, int last);
Arguments
prob
|
The current problem.
|
coltype
|
Character array of length last-first+1 where the column types will be returned:
C
|
indicates a continuous variable;
|
I
|
indicates an integer variables;
|
B
|
indicates a binary variable;
|
S
|
indicates a semi-continuous variable;
|
R
|
indicates a semi-continuous integer variable;
|
P
|
indicates a partial integer variable.
|
|
first
|
First column in the range.
|
last
|
Last column in the range.
|
Example
This example finds the types for all columns in the matrix and prints them to the
console:
int cols, i;
char *types;
...
XPRSgetintattrib(prob,XPRS_COLS,&cols);
types = (char *)malloc(sizeof(char)*cols);
XPRSgetcoltype(prob,types,0,cols-1);
for(i=0;i<cols;i++) printf("%c\n",types[i]);
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.