Initializing help system before first use

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 (note that Bit numbering begins at zero):
Bit 1 
Variable has a delta vector;
Bit 2 
Variable has an initial value;
Bit 14 
Variable is the reserved "=" column;
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,4]
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

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.