Usage
Barrier Users OnlyDescription
This routine is used to read LP format files containing quadratic objective terms. It is used just like the CPXlpread() routine, except that it has six additional arguments. The parameter qnzspace_p is used in a way analogous to the other space parameters. *qnzspace_p indicates the amount of extra space to allocate in *qmatind_p and *qmatval_p.
|
|
Even though CPXlpqread() returns a ctype array, it is not possible to copy both a ctype array and a quadratic matrix simultaneously into a single problem.
|
int CPXlpqread (CPXENVptr env,
char *filename,
int *numcols_p,
int *numrows_p,
int *objsen_p,
double **obj_p,
double **rhs_p,
char **sense_p,
int **matbeg_p,
int **matcnt_p,
int **matind_p,
double **matval_p,
double **lb_p,
double **ub_p,
char **objname_p,
char **rhsname_p,
char ***colname_p,
char **colnamestore_p,
char ***rowname_p,
char **rownamestore_p,
int *colspace_p,
int *rowspace_p,
int *nzspace_p,
unsigned *colnamespace_p,
unsigned *rownamespace_p,
char **ctype_p,
int **qmatbeg_p,
int **qmatcnt_p,
int **qmatind_p,
double **qmatval_p,
int *qnzspace_p);
CPXlpqread() are identical to those of CPXlpread(), with these additional arguments:
char **ctype_pA pointer to a variable that will contain the address of an array that is used to store the type of each variable. Refer to the
CPXcopyctype() routine for a description of each possible array value.
int **qmatbeg_p int **qmatcnt_p int **qmatind_p double **qmatval_pThese four arguments are pointers to variables that will contain the addresses of arrays that describe the Q matrix. They are analogous to the
matbeg_p, matcnt_p, matind_p, and matval_p parameters used in the CPXlpread() and CPXmpsread() routines. The CPXlpqread() routine allocates these arrays if the routine is successful.
int *qnzspace_pA pointer to an integer that indicates the length of the arrays
*qmatind_p and *qmatval_p. It is also used, as described at the beginning of this section, to allocate additional space for these arrays.
status = CPXlpqread (env, filename, &numcols, &numrows, &objsen,
&obj, &rhs, &sense, &matbeg, &matcnt,
&matind, &matval, &lb, &ub, &objname,
&rhsname, &colname, &colnamestore, &rowname,
&rownamestore, &colspace, &rowspace,
&nzspace, &colnamespace, &rownamespace,
&ctype, &qmatbeg, &qmatcnt, &qmatind,
&qmatval, &qnzspace);