XPRSgetglobal, XPRSgetglobal64
XPRSgetglobal, XPRSgetglobal64 |
Purpose
Retrieves
global information about a problem. It must be called before
XPRSmipoptimize if the presolve option is used.
Synopsis
int XPRS_CC XPRSgetglobal(XPRSprob prob, int *nglents, int *sets, char qgtype[], int mgcols[], double dlim[], char qstype[], int msstart[], int mscols[], double dref[]);
int XPRS_CC XPRSgetglobal64(XPRSprob prob, int *nglents, int *sets, char qgtype[], int mgcols[], double dlim[], char qstype[], XPRSint64 msstart[], int mscols[], double dref[]);
Arguments
prob
|
The current problem.
|
||||||||||
nglents
|
Pointer to the integer where the number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities will be returned. This is equal to the problem attribute
MIPENTS.
|
||||||||||
sets
|
Pointer to the integer where the number of SOS1 and SOS2 sets will be returned. It can be retrieved from the problem attribute
SETS.
|
||||||||||
qgtype
|
Character array of length
nglents where the entity types will be returned. The types will be one of:
|
||||||||||
mgcols
|
Integer array of length
nglents where the column indices of the global entities will be returned.
|
||||||||||
dlim
|
Double array of length
nglents where the limits for the partial integer variables and lower bounds for the semi-continuous and semi-continuous integer variables will be returned (any entries in the positions corresponding to binary and integer variables will be meaningless).
|
||||||||||
qstype
|
Character array of length
sets where the set types will be returned. The set types will be one of:
|
||||||||||
msstart
|
Integer array where the offsets into the
mscols and
dref arrays indicating the start of the sets will be returned. This array must be of length
sets+1, the final element will contain the offset where set
sets+1 would start and equals the length of the
mscols and
dref arrays,
SETMEMBERS.
|
||||||||||
mscols
|
Integer array of length
SETMEMBERS where the columns in each set will be returned.
|
||||||||||
dref
|
Double array of length
SETMEMBERS where the reference row entries for each member of the sets will be returned.
|
Example
The following obtains the global variables and their types in the arrays
mgcols and
qrtype:
int nglents, nsets, *mgcols; char *qgtype; ... XPRSgetglobal(prob,&nglents,&nsets,NULL,NULL,NULL,NULL, NULL,NULL,NULL); mgcols = malloc(nglents*sizeof(int)); qgtype = malloc(nglents*sizeof(char)); XPRSgetglobal(prob,&nglents,&nsets,qgtype,ngcols,NULL, NULL,NULL,NULL,NULL);
Further information
Any of the arguments except
prob,
nglents and
sets may be
NULL if not required.
Related topics