ILOG CPLEX .NET Reference Manual

IMPModeler.SetLinearCoefs Method (IObjective, Double[], INumVar[], Int32, Int32)

Sets linear coefficients for variables in the expression of the specified IObjective object.

void SetLinearCoefs(
   IObjective obj,
   double[] val,
   INumVar[] var,
   int start,
   int num
);

Parameters

obj
The objective to modify.
val
The array containing linear coefficient values. The linear coefficient of variable var[i] is set to val[i].
var
The array containing the variables for which to set linear coefficients. A variable may only appear once in this array.
start
The first element in val and var to use for setting coefficients.
num
The number of consecutive elements in val and var to use for setting coefficients.

See Also

IMPModeler Interface | ILOG.Concert Namespace | IMPModeler.SetLinearCoefs Overload List