problem.loadvars
problem.loadvars |
Purpose
Load SLP variables defined as matrix columns into an SLP problem
Synopsis
problem.loadvars (colindex, vartype, detrow, seqnum, tolindex, initvalue, stepbound)
Arguments
colindex
|
Integer array holding the index of the matrix column corresponding to each SLP variable.
|
||||||
vartype
|
Bitmap giving information about the SLP variable as follows:
May be
None 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 None 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 None 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 None 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 None 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
xpress.infinity 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 None 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
colindex = [23,25] vartype = [0,2] initvalue = [0,1.42] p.loadvars (colindex, vartype, None, None, None, initvalue, None)
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 None.
Further information
The loadvars functions load items into the SLP problem. Any existing items of the same type are deleted first. The corresponding addvars functions add or replace items leaving other items of the same type unchanged.
Related topics