XSLPchgvar
XSLPchgvar |
Purpose
Define a column as an SLP variable or change the characteristics and values of an existing SLP variable
Synopsis
int XPRS_CC XSLPchgvar(XSLPprob Prob, int ColIndex, int *DetRow, double *InitStepBound, double *StepBound, double *Penalty, double *Damp, double *InitValue, double *Value, int *TolSet, int *History, int *Converged, int *VarType);
Arguments
Prob
|
The current SLP problem.
|
||||||
ColIndex
|
The index of the matrix column.
|
||||||
DetRow
|
Address of an integer holding the index of the determining row. Use -1 if there is no determining row. May be
NULL if not required.
|
||||||
InitStepBound
|
Address of a double precision variable holding the initial step bound size. May be
NULL if not required.
|
||||||
StepBound
|
Address of a double precision variable holding the current step bound size. Use zero to disable the step bounds. May be
NULL if not required.
|
||||||
Penalty
|
Address of a double precision variable holding the weighting of the penalty cost for exceeding the step bounds. May be
NULL if not required.
|
||||||
Damp
|
Address of a double precision variable holding the damping factor for the variable. May be
NULL if not required.
|
||||||
InitValue
|
Address of a double precision variable holding the initial value for the variable. May be
NULL if not required.
|
||||||
Value
|
Address of a double precision variable holding the current value for the variable. May be
NULL if not required.
|
||||||
TolSet
|
Address of an integer holding the index of the tolerance set for this variable. Use zero if there is no specific tolerance set. May be
NULL if not required.
|
||||||
History
|
Address of an integer holding the history value for this variable. May be
NULL if not required.
|
||||||
Converged
|
Address of an integer holding the convergence status for this variable. May be
NULL if not required.
|
||||||
VarType
|
Address of an integer holding a bitmap defining the existence of certain properties for this variable:
May be
NULL if not required.
|
Example
The following example sets an initial value of 1.42 and tolerance set 2 for column 25 in the matrix.
double InitialValue; int VarType, TolSet; InitialValue = 1.42; TolSet = 2; VarType = 1<<1 | 1<<2; XSLPchgvar(Prob, 25, NULL, NULL, NULL, NULL, NULL, &InitialValue, NULL, &TolSet, NULL, NULL, &VarType);
Note that bits 1 and 2 of
VarType are set, indicating that the variable has a delta vector and an initial value. For columns already defined as SLP variables, use
XSLPgetvar to obtain the current value of
VarType because other bits may already have been set by the system.
Further information
If any of the arguments is NULL then the corresponding information for the variable will be left unaltered. If the information is new (i.e. the column was not previously defined as an SLP variable) then the default values will be used.
Changing Value, History or Converged is only effective during SLP iterations.
Changing InitValue and InitStepBound is only effective before XSLPconstruct.
If a value of XPRS_PLUSINFINITY is used in the value for StepBound or InitStepBound, the delta will never have step bounds applied, and will almost always be regarded as converged.
Related topics