ILOG CPLEX .NET Reference Manual

Cplex.SetVectors Method (Double[], Double[], INumVar[], Double[], Double[], IRange[])

Specifies a starting point for the next invocation of the method solve.

public virtual void SetVectors(
   double[] x,
   double[] dj,
   INumVar[] var,
   double[] slack,
   double[] pi,
   IRange[] rng
);

Parameters

x
The array of starting primal values for var.
dj
The array of starting reduced costs for var.
var
The array of variables for which to set starting point information.
slack
The array of starting slack values for rng.
pi
The array of starting dual values for rng.
rng
The array of constraints for which to set starting point information.

Remarks

Starting point information is exploited at the next call of the method solve. In particular, if the active model is an LP or QP, and the parameter Cplex.IntParam.RootAlg is Cplex.Algorithm.Primal or Cplex.Algorithm.Dual, the starting point information provided with this method is used to construct a starting basis for the simplex algorithm.

If the active model is a MIP, only x values can be used. Values may be specified for any subset of the integer and continuous variables in the model, either through a single invocation of setVectors, or incrementally through multiple calls. When optimization commences or resumes, CPLEX will attempt to find a feasible MIP solution that is compatible with the set of specified x values. When start values are not provided for all integer variables, CPLEX tries to extend the partial solution to a complete solution by solving a MIP on the unspecified variables. The parameter SubMIPNodeLim controls the amount of effort CPLEX expends in trying to solve this secondary MIP. If CPLEX finds a complete feasible solution, that solution becomes the incumbent. If the specified values are infeasible, they are retained for use in a subsequent solution repair heuristic. The amount of effort spent in this heuristic can be controlled by parameter RepairTries.

The starting point information is provided in the parameters of this method. null can be passed for any of the arrays. However, if x or dj are not null, var must not be null. Similarly, if slack or pi are not null, rng must not be null.

For all variables given in var, x[j] specifies the starting primal value for variable var[j]. Similarly, dj[j] specifies the starting reduced cost for variable var[j]. For all ranges specified in rng, slack[i] specifies the starting slack value for rng[i]. Similarly, pi[i] specifies the starting dual value for rng[i].

See Also

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