Purpose
Load SLP variables defined as matrix columns into an SLP problem
Synopsis
int XPRS_CC XSLPloadvars(XSLPprob Prob, int nSLPVar, int *ColIndex,
int *VarType, int *DetRow, int *SeqNum, int *TolIndex,
double *InitValue, double *StepBound);
Arguments
|
Prob
|
The current SLP problem.
|
|
nSLPVar
|
The number of SLP variables to be loaded.
|
|
ColIndex
|
Integer array holding the index of the matrix column corresponding
to each SLP variable. This respects the setting of XPRS_CSTYLE.
|
|
VarType
|
Bitmap giving information about the SLP variable as follows:
|
Bit 1
|
Variable has a delta vector;
|
|
Bit 2
|
Variable has an initial value;
|
|
Bit 14
|
Variable is the reserved "=" column;
|
May be NULL if not required.
|
|
DetRow
|
Integer array holding the index of the determining row for each SLP
variable (a negative value means there is no determining row)
May be NULL if not required.
|
|
SeqNum
|
Integer array holding the index sequence number for cascading for
each SLP variable (a zero value means there is no pre-defined order for this variable)
May be NULL if not required.
|
|
TolIndex
|
Integer array holding the index of the tolerance set for each SLP
variable (a zero value means the default tolerances are used)
May be NULL if not required.
|
|
InitValue
|
Double array holding the initial value for each SLP variable
(use the VarType bit map to indicate if a value is being provided)
May be NULL if not required.
|
|
StepBound
|
Double array holding the initial step bound size for each SLP
variable (a zero value means that no initial step bound size has been specified). If a
value of XPRS_PLUSINFINITY is used for a value in StepBound, the delta
will never have step bounds applied, and will almost always be regarded as converged.
May be NULL if not required.
|
Example
The following example loads two SLP variables into the problem. They
correspond to columns 23 and 25 of the underlying LP problem. Column 25 has an
initial value of 1.42; column 23 has no specific initial value
int ColIndex[2], VarType[2];
double InitValue[2];
ColIndex[0] = 23; VarType[0] = 0;
ColIndex[1] = 25; Vartype[1] = 2; InitValue[1] = 1.42;
XSLPloadvars(Prob, 2, ColIndex, VarType, NULL, NULL,
NULL, InitValue, NULL);
InitValue is not set for the first variable, because it is not
used (VarType = 0). Bit 1 of VarType is set for the second variable to
indicate that the initial value has been set.
The arrays for determining rows, sequence numbers, tolerance sets and step bounds
are not used at all, and so have been passed to the function as NULL.
Further information
The XSLPload... functions load items into the SLP problem. Any existing items of
the same type are deleted first. The corresponding XSLPadd... functions add or
replace items leaving other items of the same type unchanged.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.