CPXXsetdblannotations and CPXsetdblannotations
The routine
CPXXsetdblannotations/CPXsetdblannotations
sets the annotation values for a set of modeling objects in the CPLEX problem object.
int CPXXsetdblannotations( CPXCENVptr env, CPXLPptr lp, CPXDIM idx, int objtype, CPXDIM cnt, CPXDIM const * indices, double const * values )
int CPXsetdblannotations( CPXCENVptr env, CPXLPptr lp, int idx, int objtype, int cnt, int const * indices, double const * values )
Description
The routine
CPXXsetdblannotations/CPXsetdblannotations
sets the annotation values for a set of modeling objects in the CPLEX problem object.
This routine for annotations of type double resembles the similar routine
CPXXsetlongannotations and CPXsetlongannotations for annotations of
type long. The example benders.c distributed with the product
shows that routine for type long in use; follow the same steps with
the analogous double routines when you create annotations of type double.
For more routines supporting annotations, see Annotating Models in the CPLEX Callable Library (C API) in the reference manual of the CPLEX Callable Library (C API).
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX problem object as returned by
CPXXcreateprob/CPXcreateprob. - idx
- An integer that specifies the index of the annotation for which to assign values.
- objtype
-
An integer that specifies the type of the modeling objects listed by
the integers provided in the argument indices.
The table documents the types of modeling objects currently supported in CPLEX.
Variables (that is, columns) are the only type of annotated modeling object
pertinent to a Benders decomposition.
Table 1. Symbolic names and identifiers for annotation object types Symbol Value Meaning CPX_ANNOTATIONOBJ_OBJ 0 objective CPX_ANNOTATIONOBJ_COL 1 column or variable CPX_ANNOTATIONOBJ_ROW 2 row or constraint CPX_ANNOTATIONOBJ_SOS 3 special ordered set (SOS) CPX_ANNOTATIONOBJ_IND 4 indicator constraint CPX_ANNOTATIONOBJ_QC 5 quadratic constraint - cnt
- An integer that specifies the total number of annotations to set.
- indices
-
An array of length
cntcontaining the numeric indices of the modeling primitives of the given type for which to set the annotation values. - values
-
An array of length
cntcontaining the new annotation values for the modeling primitives of the givenobjtypeinindices.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXsetdblannotations (env, lp, CPX_ANNOTATIONOBJ_COL, cnt, indices, values);