CPXcopymipstart


Description

The routine CPXcopymipstart() is used to copy MIP starting values to a CPLEX problem object of type CPXPROB_MILP or CPXPROB_MIQP.

Values must be specified for all integer and SOS member variables. Optionally, values may be specified for continuous variables. If the provided starting values are compatible with an integer feasible solution, that solution becomes the incumbent at the start of the optimizations. Otherwise the starting values are ignored. The values for member variables of Special Ordered Sets are used to indicate which members of the set take on nonzero values.

The parameter CPX_PARAM_MIPSTART must be set to CPX_ON (1) for the values to be used. If it is set to zero, which is the default, the values are not used.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

  int CPXcopymipstart (CPXCENVptr env,
                       CPXLPptr lp,
                       int cnt,
                       const int *indices,
                       const double *value);

Arguments

CPXCENVptr env

The pointer to the CPLEX environment as returned by CPXopenCPLEX().

CPXLPptr lp

A pointer to a CPLEX problem object as returned by CPXcreateprob().

int cnt

An integer giving the number of entries in the list.

const int *indices

An array of length cnt containing the numerical indices of the columns corresponding to the variables which are assigned starting values.

const double *value

An array of length cnt containing the values to be used for the starting integer solution. The entry value[j] is the value assigned to variable indices[j]. An entry value[j] greater than or equal to CPX_INFBOUND indicates no value is set for variable indices[j].

Example

  status = CPXcopymipstart (env, lp, cnt, indices, value);

See Also

CPXreadcopyorder(), CPXreadcopymipstart()

Previous Page: CPXcopylpwnames Return to Top Next Page: CPXcopynettolp