XPRSloadqcqpglobal, XPRSloadqcqpglobal64
XPRSloadqcqpglobal, XPRSloadqcqpglobal64 |
Purpose
Used to load a global, quadratic problem with quadratic side constraints into the Optimizer data structure. Such a problem may have quadratic terms in its objective function as well as in its constraints. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
Synopsis
int XPRS_CC XPRSloadqcqpglobal(XPRSprob prob, const char * probname, int ncol, int nrow, const char qrtypes[], const double rhs[], const double range[], const double obj[], const int mstart[], const int mnel[], const int mrwind[], const double dmatval[], const double dlb[], const double dub[], int nqtr, const int mqcol1[], const int mqcol2[], const double dqe[], int qmn, const int qcrows[], const int qcnquads[], const int qcmqcol1[], const int qcmqcol2[], const double qcdqval[], const int ngents, const int nsets, const char qgtype[], const int mgcols[], const double dlim[], const char qstype[], const int msstart[], const int mscols[], const double dref[]);
int XPRS_CC XPRSloadqcqpglobal64(XPRSprob prob, const char * probname, int ncol, int nrow, const char qrtypes[], const double rhs[], const double range[], const double obj[], const XPRSint64 mstart[], const int mnel[], const int mrwind[], const double dmatval[], const double dlb[], const double dub[], XPRSint64 nqtr, const int mqcol1[], const int mqcol2[], const double dqe[], int qmn, const int qcrows[], const XPRSint64 qcnquads[], const int qcmqcol1[], const int qcmqcol2[], const double qcdqval[], const int ngents, const int nsets, const char qgtype[], const int mgcols[], const double dlim[], const char qstype[], const XPRSint64 msstart[], const int mscols[], const double dref[]);
Arguments
prob
|
The current problem.
|
||||||||||
probname
|
A string of up to
MAXPROBNAMELENGTH characters containing a name for the problem.
|
||||||||||
ncol
|
Number of structural columns in the matrix.
|
||||||||||
nrow
|
Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the
obj array, and the objective function should not be included in any of the other arrays.
|
||||||||||
qrtype
|
Character array of length
nrow containing the row types:
|
||||||||||
rhs
|
Double array of length
nrow containing the right hand side coefficients of the rows. The right hand side value for a range row gives the
upper bound on the row.
|
||||||||||
range
|
Double array of length
nrow containing the range values for range rows. Values for all other rows will be ignored. May be NULL if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
|
||||||||||
obj
|
Double array of length
ncol containing the objective function coefficients.
|
||||||||||
mstart
|
Integer array containing the offsets in the
mrwind and
dmatval arrays of the start of the elements for each column. This array is of length
ncol or, if
mnel is NULL,
length ncol+1. If
mnel is NULL the extra entry of
mstart,
mstart[ncol], contains the position in the
mrwind and
dmatval arrays at which an extra column would start, if it were present. In C, this value is also the length of the
mrwind and
dmatval arrays.
|
||||||||||
mnel
|
Integer array of length
ncol containing the number of nonzero elements in each column. May be NULL if all elements are contiguous and
mstart[ncol] contains the offset where the elements for column
ncol+1 would start. This array is not required if the non-zero coefficients in the
mrwind and
dmatval arrays are continuous, and the
mstart array has
ncol+1 entries as described above. It may be NULL if not required.
|
||||||||||
mrwind
|
Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the
mrwind is
mstart[ncol-1]+mnel[ncol-1] or, if
mnel is NULL,
mstart[ncol].
|
||||||||||
dmatval
|
Double array containing the nonzero element values; length as for
mrwind.
|
||||||||||
dlb
|
Double array of length
ncol containing the lower bounds on the columns. Use
XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
|
||||||||||
dub
|
Double array of length
ncol containing the upper bounds on the columns. Use
XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
|
||||||||||
nqtr
|
Number of quadratic terms.
|
||||||||||
mqc1
|
Integer array of size
nqtr containing the column index of the first variable in each quadratic term.
|
||||||||||
mqc2
|
Integer array of size
nqtr containing the column index of the second variable in each quadratic term.
|
||||||||||
dqe
|
Double array of size
nqtr containing the quadratic coefficients.
|
||||||||||
qmn
|
Number of rows containing quadratic matrices.
|
||||||||||
qcrows
|
Integer array of size
qmn, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined in
qrtype as type
L.
|
||||||||||
qcnquads
|
Integer array of size
qmn, containing the number of nonzeros in each quadratic constraint matrix.
|
||||||||||
qcmqcol1
|
Integer array of size
nqcelem, where
nqcelem equals the sum of the elements in
qcnquads (i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from
0 to
qcnquads[0]-1, for the second matrix from
qcnquads[0] to
qcnquads[0]+ qcnquads[1]-1, etc.
|
||||||||||
qcmqcol2
|
Integer array of size
nqcelem, containing the second index for the quadratic constraint matrices.
|
||||||||||
qcdqval
|
Integer array of size
nqcelem, containing the coefficients for the quadratic constraint matrices.
|
||||||||||
ngents
|
Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities.
|
||||||||||
nsets
|
Number of SOS1 and SOS2 sets.
|
||||||||||
qgtype
|
Character array of length
ngents containing the entity types:
|
||||||||||
mgcols
|
Integer array of length
ngents containing the column indices of the global entities.
|
||||||||||
dlim
|
Double array of length
ngents containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May be
NULL if not required.
|
||||||||||
qstype
|
Character array of length
nsets containing the set types:
May be
NULL if not required.
|
||||||||||
msstart
|
Integer array containing the offsets in the
mscols and
dref arrays indicating the start of the sets. This array is of length
nsets+1, the last member containing the offset where set
nsets+1 would start. May be
NULL if not required.
|
||||||||||
mscols
|
Integer array of length
msstart[nsets]-1 containing the columns in each set. May be
NULL if not required.
|
||||||||||
dref
|
Double array of length
msstart[nsets]-1 containing the reference row entries for each member of the sets. May be
NULL if not required.
|
Related controls
Integer
Double
Number of extra columns to be allowed for.
|
|
Number of extra matrix elements to be allowed for.
|
|
Number of extra global entities to be allowed for.
|
|
Number of extra elements to allow for in presolve.
|
|
Number of extra
qcqp elements to be allowed for.
|
|
Number of extra
qcqp matrices to be allowed for.
|
|
Number of extra rows to be allowed for.
|
|
Status for nonbinding rows.
|
|
Type of scaling.
|
Double
Tolerance on matrix elements.
|
Further information
1. The objective function is of the form
cTx+ 0.5 xTQx where
Q is positive semi-definite for minimization problems and negative semi-definite for maximization problems. If this is not the case the optimization algorithms may converge to a local optimum or may not converge at all. Note that only the upper or lower triangular part of the
Q matrix is specified.
2. All
Q matrices in the constraints must be positive semi-definite. Note that only the upper or lower triangular part of the
Q matrix is specified for constraints as well.
3. The row and column indices follow the usual C convention of going from
0 to
nrow-1 and
0 to
ncol-1 respectively.
4. The double constants
XPRS_PLUSINFINITY and
XPRS_MINUSINFINITY are defined in the Optimizer library header file.
5. The row and column indices follow the usual C convention of going from
0 to
nrow-1 and
0 to
ncol-1 respectively.
6. The double constants
XPRS_PLUSINFINITY and
XPRS_MINUSINFINITY are defined in the Optimizer library header file.
7. Semi-continuous lower bounds are taken from the dlim array. If this is
NULL then they are given a default value of
1.0. If a semi-continuous variable has a positive lower bound then this will be used as the semi-continuous lower bound and the lower bound on the variable will be set to zero.
Related topics