problem.getIndex
problem.getIndex |
Purpose
Returns the numerical index for a specified row, column, or set of the optimizer.
Synopsis
ind = problem.getIndex (obj)
Argument
|
obj
|
Python object with the column, row, or SOS
|
Example
The following example adds a constraint to a problem and then retrieves its index:
x = xpress.var ()
c = x**2 + 2*x >= 5
p.addVariable (x)
p.addConstraint (c)
print ("c has index", p.getIndex (c))
Related topics
