problem.getVariable
problem.getVariable |
Purpose
Returns one or more variables of a problem corresponding to one or more indices passed as arguments. These variables are returned as Python objects and can be used to access and manipulate the problem.
Synopsis
x = problem.getVariable(index, first, last)
Arguments
first
|
(optional) The first index of the variables to be returned. It must be between 0 and
COLS - 1.
|
last
|
(optional) The last index of the variables to be returned. It must be between 0 and
COLS - 1.
|
index
|
(optional) Either an integer or a list of integers (not necessarily sorted) with the index/indices of all variables to be returned, all between 0 and
COLS - 1
|
Further information
All arguments are optional. If neither of them is provided, the return value is a list with all variables of the problem. Otherwise, either
first and
last or just
index can be passed.
Related topics