ILOG CPLEX .NET Reference Manual

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

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

public virtual void SetVectors(
   double[] x,
   double[] dj,
   INumVar[] var,
   int vstart,
   int vnum,
   double[] slack,
   double[] pi,
   IRange[] rng,
   int rstart,
   int rnum
);

Parameters

x
An array of starting values for the variables specified in var.
dj
An array of starting reduced costs for the variables specified in var.
var
An array containing the variables for which to set starting point information.
vstart
The index of the first element in the arrays x, dj, or var to be used.
vnum
The number of consecutive variables in the array var for which starting point information is to be set.
slack
An array of starting slack values for rng.
pi
An array of starting dual values for rng.
rng
An array containing the constraints for which to set starting point information.
rstart
The index of the first element in slack, pi, or rng to be used.
rnum
The number of consecutive constraints in the array rng for which starting point information is to be set.

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. Also, if vnum is not 0, x and dj must not both be null, and if rnum is not 0, slack and pi must not both be null.

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

See Also

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