ILOG CPLEX .NET Reference Manual

Cplex.GetValues Method (INumVar[], Int32, Int32)

Returns solution values for a set of variables.

public virtual double[] GetValues(
   INumVar[] var,
   int start,
   int num
);

Parameters

var
An array containing the variables whose solution values are being queried. These variables must be in the active model.
start
The index of the first variable in var for which to query the solution value.
num
The number of consecutive variables in var for which to query the solution value.

Return Value

The solution values for the specified variables. If x is the array returned by this method, x[j] will be the solution value for the variable var[j+start].

Remarks

UnknownObjectException One of the variables specified in var is not in the active model. ILOG.Concert.Exception If the method fails, an exception of type ILOG.Concert.Exception, or one of its derived classes, is thrown.

See Also

Cplex Class | ILOG.CPLEX Namespace | Cplex.GetValues Overload List