problem.chgcoltype
problem.chgcoltype |
Purpose
Changes the type of a column in the problem.
Synopsis
problem.chgcoltype(mindex, qctype)
Arguments
mindex
|
Array containing the columns (i.e.
xpress.var objects, indices, or names) whose type is to be changed.
|
||||||||||||
qctype
|
Character array giving the new column types:
|
Example
The following changes the type of variable
x from binary to integer:
p = xpress.problem() x = xpress.var(vartype=xp.binary) p.addVariable(x) p.chgcoltype([x],['I'])
Further information
1. The column types can only be changed before the global search is started.
2. Calling
chgcoltype to change any variable into a binary variable causes the bounds previously defined for the variable to be deleted and replaced by bounds of 0 and 1.
3. Calling
chgcoltype to change a continuous variable into an integer variable cause its lower bound to be rounded up to the nearest integer value and its upper bound to be rounded down to the nearest integer value.
Related topics