|
Returns the solution values at the current node.
In the case that the node LP is unbounded, this method returns
a vector that corresponds to an unbounded direction, scaled so
that at least one of its elements has magnitude
cplex.infinity. Thus, often the vector can be used directly,
for example to separate a lazy constraint. However, due to
the presence of large values in the vector care must be taken
to avoid potential numerical errors. If in doubt,
rescale the vector, and use it as an unbounded ray
rather than a primal vector.
There are four forms by which get_values may be called.
- self.get_values()
- returns the entire primal solution vector.
- self.get_values(i)
- i must be a variable index or name. Returns the solution
value of the variable with index i.
- self.get_values(s)
- s must be a sequence of variable indices or names. Returns
a list of the solution values of the variables with indices
the members of s, in the same order as they appear in s.
Equivalent to [self.get_values(i) for i in s]
- self.get_values(begin, end)
- begin and end must be variable indices or variable names.
Returns a list of the solution values of variables with indices
between begin and end, inclusive of end. Equivalent to
self.get_values(range(begin, end + 1))
|