Initializing help system before first use

problem.chgvar

Purpose
Define a column as an SLP variable or change the characteristics and values of an existing SLP variable
Synopsis
problem.chgvar(col=None, detrow=None, initstepbound=None, stepbound=None, penalty=None, damp=None, initial=None, value=None, tolset=None, history=None, converged=None, vartype=None)
Arguments
col 
The index of the matrix column.
detrow 
An integer holding the index of the determining row. Use -1 if there is no determining row. May be None if not required.
initstepbound 
The initial step bound size. May be None if not required.
stepbound 
The current step bound size. Use zero to disable the step bounds. May be None if not required.
penalty 
The weighting of the penalty cost for exceeding the step bounds. May be None if not required.
damp 
The damping factor for the variable. May be None if not required.
initial 
The initial value for the variable. May be None if not required.
value 
The current value for the variable. May be None if not required.
tolset 
The index of the tolerance set for this variable. Use zero if there is no specific tolerance set. May be None if not required.
history 
The history value for this variable. May be None if not required.
converged 
The convergence status for this variable. May be None if not required.
vartype 
A bitmap defining the existence of certain properties for this variable:
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.
Example
The following example sets an initial value of 1.42 and tolerance set 2 for column 25 in the matrix.
p.chgvar(col=25, initial=1.42, tolset=2,
           vartype=1<<1 | 1<<2)
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 problem.getvar 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 None 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 problem.construct.

If a value of xpress.infinity 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

© 2001-2024 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.